Saturday, 26 July 2014

Planting trees, even model ones, is more tiring than you might think.

Sunday, 18 May 2014

Hi guys, I thought I'd give you a bit of an update today. I started uni this year and I've been incredibly busy! So I haven't really had time to work on any ambitious projects lately. However I have done a few little things which I think are worth a post. 

The 3D printer works and has done for a while now. It's running quite well and I think I've nutted out all its little idiosyncrasies. It was a total pain to set up but now that it's running, it's so nice to have. For me it's the perfect system because I prefer designing things to actually making them so being able to design lots of things and have them made for me by a machine is fantastic. 


This is a model Tardis I made (yes with the printer) for my friend who is well into Dr Who. It is actually printed in white plastic and painted blue, although I've since bought some blue plastic to make more Tardises with. This was somewhat rare amongst my projects because I actually finished this one. It's even got a flashing light in it! 

Light off, light on.
Probably my longest term project and one which doesn't get much of a mention is my model train layout. It's a replica of a German layout called Zofeld which was originally in HO scale but I'm making it in N scale which is about half the size. But even though it's half the size, it's still damned expensive and it's impossible to find the right buildings. Whilst they exist in HO scale, the manufacturers don't seem to make the same models in the scale I'm using. So I have to make do with similar ones. However with the printer I can simply make my own buildings. So that's exactly what I've done.


This is the first building made on the printer, I've just finished painting it and I think it's come out quite well. I'm not going to print all my own buildings because the computer models for them are very fiddly and time consuming. I'll only make the ones which I can't find good replacements for. This model isn't quite finished, it still needs windows, lights and weathering but so far it's looking good. Let me know what you think.

Thursday, 13 March 2014

Wednesday, 12 March 2014

Update

I've got to say a big thank you to everyone who donated to our team. In total we raised $523 all to go towards cancer research. The event was a huge success. Out of all the teams, over $237,000 was raised in what was the largest relay for life in Hobart yet.

Next year we'll be back with a bigger goal and a bigger team to try and raise as much as we can.

It was a very sobering experience to meet so many people who had been affected by cancer. Either with cancer themselves or caring for a loved one with cancer. It affects so many people but we can beat it with your help with funds for research.

Now, back to the projects!

I haven't really been doing much lately as I've just started uni which takes up a surprising amount of time. I did get the printer working for a while and printed a few things but when I tried to transport it, some electronics broke and I don't have time to fix it right now. That's something for later.

I have recently got back into flying model planes and I plan to put out a few short videos of that soon. Also I'm thinking of rekindling, if you will, my old YouTube channel with various types of videos. Mostly to do with my projects and inventions but also some science, vlogs, hiphop, interviews and general larking about. So go and subscribe to catch all the action → http://www.youtube.com/user/RCapricot

Wednesday, 5 February 2014

Donate for cancer research.

Hi guys, I hope you're having an awesome day!
I have recently got involved with a charity called cancer council. I'm part of a team called Duct Tape Almighty in the relay for life. The relay for life is a yearly event that raises money for cancer research by getting teams of people to run around a track for 24 hours. It sounds ghastly but I'm really looking forward to it. 

There is just one problem, we have a goal of raising $2000 before the event and currently we are on $50. The relay starts on the 1st of march so we haven't got long to go. So this is where I need your help. Myself and all my team mates would really appreciate it if you would make a small donation online by becoming a sponsor of our team. It doesn't have to be a big donation, jut one or two dollars will do, because if everyone who reads this blog donates just $1 then we will easily reach our goal. 

To donate, just go to the link, then click on "Donate to this team", put in your details and you're done!

I would like to stress that ALL the money you donate will go into research, none of it goes to our team at all. 

So thanks for donating and I'll get back to you soon!


Wednesday, 25 December 2013

3D printer problems.

Seriously, who thought it would be a good idea to base a whole system around uploading an arduino sketch to something which isn't an arduino? Really not a happy chappy right now. If you hadn't already worked it out I've recently bought a 3D printer. It's a RepRap Prusa Mendel I2 from GeeeTech and it has a Sanguinololu 1.3a electronics board with an ATMEL ATMEGA1284P processor.

The whole thing has been a bit of a disaster really. When I first bought it off eBay I thought I was getting a really great deal and that I'd be printing in no time. Not so. A week after I paid for it, another similar printer appeared which could print four times more accurately and cost $200 less and when it cost a few hundred, that really makes a difference, so I wasn't too happy about that. The seller I bought it from said that they ship within 48 hours of receiving payment but after a week of waiting I spoke to them and asked what was going on, they grovelled and atoned and after yet another week it was finally on its way. Two more weeks later it arrived and I was beside myself with anticipation.

It came in kit form and I put it together over a weekend using the general plans on the RepRap Wiki. It was only after I finished it that I discovered there were plans for the exact model I had. You see, although it's an open source design and they should all be the same, each manufacturer makes lots of little changes to the ones they produce. What this means is that the general plans are useless, and that there were lots of little mistakes in mine. So I fixed the ones I could be bothered to fix and left it at that. But really, my troubles hadn't even started yet.

The fully assembled printer with everything but electronics. 

The way the whole software works on a 3D printer is fairly simple. The processor chip has a bootloader on it which allows you to actually use it and upload programs to it. Then there is the firmware which takes the form of a program, specifically an arduino sketch, this is what takes the instructions of what must be printed where and translates that into motor movements and this has to be calibrated and have various parameters set. The instructions of what must be printed where is stored in a file and is usually called G-code. The G-code is worked out by a 3D CAD program on a computer from a model of whatever your printing. Okay well maybe it's not that simple but the problem I'm having is getting the firmware onto the chip. Once you have the right software installed it should be a simple matter of configuring the firmware and uploading it to the controller board but whenever I try to do that I just get an "uploading" message for about ten minutes and then it times out without having uploaded anything.

I tried lots of different settings and software and got some help from some friends but no matter what I tried the error wouldn't go away. I got so desperate that I went to my local hackerspace for help because I knew they had a 3D printer there and that the place is full of nerds. I figured if they couldn't fix it, no one could. After a couple of hours of fiddling around with it they determined the problem was most likely the FTDI chip which allows the computer to communicate with the controller. Unfortunately this renders the whole board basically useless so because I know my arduino MEGA2560 works I'm going to use that instead and buy a 3D printer shield for it. So until that arrives, printer progress is halted.
I'll catch up with you again soon, cheers.

Sunday, 29 September 2013

Sine method.

Another method I've recently made in java is a sine (sin) method which returns the sin value of a number.

public double sin(double angle, String type)
    {
        double length = 0, x;
        if(type == "deg")                                //Change to radians if not already
        {
            angle = (angle/180)*(Math.PI);
        }
       
        x = angle;                                          // x is easier to work with than a word
       
        while(x > Math.PI)                            //Bring x into the accurately represented range.
        {
            x = x-(2*Math.PI);
        }
       
        while(x < -Math.PI)
        {
            x = x+(2*Math.PI);
        }
       
        //The polinomial calculation
        length = (x-(Math.pow(x, 3)/6)+(Math.pow(x, 5)/120)-(Math.pow(x, 7)/5040)+(Math.pow(x, 9)/(362880))-(Math.pow(x, 11)/39916800));
           
        return length;
    }

This is where maths and technology come together beautifully. You see, a computer is a very stupid thing, literally the only piece of maths it can do at it's most basic level is add. Luckily maths at its most basic level is also just adding. So to do other maths functions we need to add in a certain way a certain number of times. For example subtraction is just adding a negative number, multiplication is just adding a number several times. You get the idea. However trigonometry functions(sin, cos, tan etc) are different, they cannot be calculated using addition alone so they pose a serious problem to computers. This is where maths comes to the rescue. In the area of sequences and series there is a special kind of series called a Maclaurin series, I won't bore you with how it's calculated but the great thing about them is that they can be used to model other functions in maths, like sin, with only the use of adding! Here's the formula for them:
f(x) = f(0)+ f '(0)*x + f "(0)* x^2/2!+ f "'(0)*x^3/3!+...+ f(n)(0)*x^n/n!+....
I say "model" because this formula is almost never totally precise but it's pretty good. If you were to work out this formula to infinite terms ie: n = ∞, then you would get an exact answer but we don't have enough time to do that, not even with a very very fast computer. It's alright to stop calculating at about the fifteenth term because the number you calculate would be accurate to about the tenth decimal place which is plenty for most applications. So when you do a trig function on your calculator it's not actually giving you back the trig function, just something very much like it.
When you actually implement a piece of code to calculate sin you have to handle the input number being greater than PI or less than -PI because sin goes for ever to infinity and to negative infinity and the pattern repeats every 2PI. The polynomial which is the Maclaurin series only accurately models sin from about -PI to PI which means if the input number passed into the method is grater than Pi you have to subtract 2PI from it over and over again until the number is within the accurate range. Or if it's less that -PI, you must add 2PI onto it until it's within range. Doing this doesn't change the output number because the value at any one point is equal to the value at that point +/- 2PI. It's a repeating pattern.

This is what y = sin(x) looks like.


 This is what the Maclaurin series representation of y = sin(x) looks like.

And this is them laid on top of one another. As you can see, they're basically identical from about   - 4 to 4.

Sunday, 18 August 2013

Factorial method.

One of the things we have been learning about in computer science at college is using methods in programming. Methods are an absolute god-send. Rather than having to write big long strings of code, instead you can group a small chunk together and give it a name, and then retrieve that small piece of code at any time with just one line.
Here is an example method.

int a_plus_b;

Public void add(int a, int b)
{
                a_plus_b = a + b;             
}

"Int a_plus_b" is a global variable, that means it can be used or changed at anytime, anywhere in the program. The bit between the curly brackets is the code that the method executes. ‘a’ and ‘b’ are the formal parameters of the method. "Public" means the method can be called from anywhere in the program. "Void" means the method doesn’t return a value.  "add" is simply the name of the method and this could be anything you like, it could be "pony" or "omnibus", but it's convention to call methods something to do with what they do. "Int a_plus_b" isn’t part of the method, but I had to declare that variable. "Int" just means that the variable type is a number. To implement or "call" this method you would write the following line:

add(2, 3);

Where 2 and 3 are the actual parameters you put into the method but these can be any number you want. So when you write “ add(2, 3); ” the value of “a_plus_b” becomes 5, similarly if you were to write “ add(18, 5) “, “a_plus_b” would be equal to 23.


This is a method I wrote to return the factorial of a number.
If you don't know what a factorial is, it is when you multiply a number by each number that comes before it. The symbol for factorial is '!'. So, 3! = 3x2x1 = 6. Similarly 5! = 5x4x3x2x1 = 120.

public int factorial(int a)                 //Method declaration. The input to this method must be
{                                                  // an integer (a)
int afact = 1;                                 //afact will be used to generate the factorial and will     
    //be equal to the factorial of a.
boolean neg = false;                      //Declaration of a Boolean variable to state if ‘a’ is positive
                                                    //or negative.
if(a < 0)                                        //If a is negative (less than zero) neg, which stands for                                                     //negative will be set to true.
    //else it will stay as false.
{
                neg = true;
                a*= -1;                        //If a is negative, it must be changed to positive.
}

if(a == 0)                                     //The factorial of 0 is one, so if a is 0, afact must be 1.
{
                afact = 1;
}
else                                               //a will only get here if it is a positive integer.
{
                while(a >= 1)                 //In the while loop, afact gets multiplied by (a) and then
     //(a-1), and then (a-2) and so on down to 2 and 1.
                {
                                afact=afact*a;
                                a--;
                }
}
                               
if(neg == true)                               //Finally, if the input number was negative, which was
   //checked for earlier, the output number gets changed to 
   //negative.
{
                afact*= -1;
}
return afact;

}

And that is how you calculate a factorial, at least it’s one way, there are more mathematically precise ways of doing it, but this method works for integers and I’m happy with it. A few weeks after I wrote this method, my teacher taught the whole class a factorial method which was amusing for me as I’d already written this one.

Saturday, 17 August 2013

ALBATROSS!!!

It’s been a long time since I’ve posted here, more than six months in fact. But I’ve been very busy with college work lately so I haven’t had much time to make things. So rest assured I haven’t forgotten about this blog, I’m just concentrating on school at the moment. I’m currently studying maths specialised, physics, advanced electronics and computer science at college. For you American readers out there, that’s a Tasmanian college, it’s not like a university. It’s years 11 and 12, just before university. We’ve just had our mid-year exams and I thought this was a good time to write about my most recent project.

A few weeks ago my friend had a fancy dress birthday party, I went as the albatross seller as played by John Cleese in Monty Python. It’s something I’ve always wanted to do, don’t judge me. The outfit wasn’t difficult to find, I just went to a costume hire shop but the albatross proved to be much harder. Weeks before the event, I scoured the internet looking for stuffed toy albatrosses. Or any sort of albatross at all. I looked through EBay, model shops, toy shops and Monty Python even had their own albatross-in-a-tray plush toy. But there was nothing in stock or in my price range anywhere. Buying albatrosses is harder than you might imagine! So in a moment of desperation, I decided to make the damn thing myself.

John Cleese (left) and Terry Jones (right) Performing live at the Hollywood bowl.
This is pretty much what I looked like on the night. 
 Here is a link to that Performance, and a warning, this does contain coarse language.

The first thing I had to do was decide what materials to make it out of. To start with, all of this was very hard for me; I hadn’t made a model of an animal since grade 2. That was a Platypus and it was made from chicken wire and paper mache. After talking to some of my more artistic friends, who do this sort of thing a lot, chicken wire and paper mache is what I went for. I made a wire frame in the general shape of an albatross, just based on pictures from the internet. It has a wingspan slightly narrower than a doorway; I did this deliberately just to make it practical. 

The wire frame then had to be covered with chicken wire, and for this I used ½ inch hexagonal chicken wire. It wouldn’t be good enough to simply stretch chicken wire over the frame because it would flatten out in the sections between the frame wires. So to give it some “form”, I stuffed the body and part of the wings with tissue paper. That certainly made it more "solid".

I’m not really sure why I did this, it just seemed right at the time. I covered the whole thing with masking tape. I think it was to smooth-out the surface a bit before applying the paper mache. If that is indeed what it was for, it certainly seemed to work.

The tail was very satisfying, it looks really nice but it was so simple to make. All I did was poke wooden skewers into the rear end in a sort-of fan pattern and then put masking tape over it. I think the effect works really well. 

The paper mache was pretty easy. It was suggested to me to use PVA mixed 50/50 with water and really long strips of paper, again by my artistic friends. 

Next was the beak. At last back to familiar territory, because it’s made from balsa wood. Before I even started to make the frame, I cut out two pieces of 12mm balsa easily big enough to make the beak and glued them together side by side. I made two of these in case I messed the first one up. But the carving and sanding all went fine and it looks just like an albatross beak.



The next thing was to paint it. This is where I needed help; I’m not that good when it comes to painting things artistically, which is what was needed here. So I asked my good friend Kat to paint it for me because she’s really good with those sorts of things and I’m glad I did because, as I’m sure you’ll agree, it looks great! 



The day of the party: First class has just finished, I rush to the shops to buy the rest of the things I need to finish the albatross box, and I then go home in my free to work on it. I still had the box and the straps to make so it was a bit of a rush job. The box is made of 3mm corflute and the straps are just one inch wide red ribbon. The box is simply taped together, nothing fancy, and the straps are stapled on. But it all held together and that night, I had a lot of fun making everyone at La-Porchetta have a good laugh.

Sunday, 3 February 2013

RC kart

I've set it up to run now, so the brakes work, the steering works and the fuel and exhaust systems are in place and lately I've been having a little bit of fun, err... I mean practice, at driving it. And I can report that there is plenty of power, there's no shortage on the power front, everything is hunky-dory there. In fact there may be a bit too much power, every time I accelerate the wheels spin and because it has such a short wheel base, the back flicks round and it's facing in the opposite direction in an instant. So there's not much more I an tell you about the handling of this kart because it spends most of the time going round in circles. However I have only tested it on gravel so far and wheel spinning is probably entirely expectable, so I will report back to you the moment I get to test it out on a a proper tarmac surface. And frankly I can't wait, because I expect this to be seriously fast!



You can really see the shape starting to emerge now, especially when you compare it to a picture of the real one.