Let it begin

No, you’re not getting any more info than that about what I’m doing.

Advertisements

Instructables Arduino competition

I was actually stuck in a bit of a tricky situation deciding whether to spread the word about this cool competition. You see, if I didn’t spread the word I would have had more chance at winning as there would be less entries. But, that would make me feel kind of bad for not telling you guys about cool stuff. So I decided to tell you about it and hopefully get some more people into this stuff with the incentive of a big, juicy DSLR.

So, on to the competition details. There is a DSLR, kindle fire and an Arduino mega on offer as prizes. And it’s open to Australians! How is that even possible? Tech competitions are never open to us…. I’m very confused. Anyway, there’s not that many entries (yet) so I think it’s a good idea to make a project quickly so it can get the early votes before it gets lost in the pages of projects. I would tell you some of my ideas but I’m not that generous.

Check the competition out here: http://www.instructables.com/contest/arduino2012/?show=INFO

A cool little robot I’m working on

So after getting back from my holiday I was bored for a bit. Then I came up with a cool idea. How awesome would it be to have a robot that sits in my school locker greeting me whenever I open it. Like a little animal that hides out in there. So a small holiday project was born. It consists of a servo, speaker, led, light sensor, rechargeable AAA batteries,a little cheap telescope, blu tac and an arduino clone board designed by me to control the whole thing.

The robot looks like this at the moment. Please excuse the low res of the iPad’s camera. It was all I had with me.

20120208-181611.jpg

The eye part of the robot is constructed out of a plastic lens and an LED for lighting it up. It sits on a servo providing robotic movement.

20120208-181611.jpg

The whole project is controlled by a simple arduino clone I made. It’s basically just the atmega328 processor, programming pinout, crystal and caps, reset resistor and an LED connected to digital pin 13 to determine whether a problem is caused by the processor or other electronics.

20120208-181946.jpg

So the robot head at the moment is pretty much just a servo with a little telescope for an eye and an LED to light up the “eye”. The program for it at the moment is pretty simple. It basically just checks whether the door is open with a light sensor reading, then when it detects an open door it does some beeping, head shaking and eye blinking. When I get some free time (stupid school) I’ll make a better program for it that makes it happy, sad or excited and plays a little tune etc making it more realistic. Then I’ll give you some more details.

I’m beginning to learn iOS development through school at the moment. It’s going to be an awesome year. There’s lots of other cool stuff happening as well.

Just thought I’d keep you posted.

My little iPad stylus made from chip foam.

Well I got an iPad for Christmas. Which is quite possibly the best Christmas present I have ever received. However, after about half an hour of operation it became clear that some tasks on the iPad are just better with a stylus rather than a finger. So I decided to make one instead of paying $20 for one at a department store.

I remember reading somewhere that iPads only work with anti static material. This was soon validated when I used some anti static chip storing foam to operate the touch screen. Instead of sticky taping the foam to a pencil (very messy) I took advantage of the small hole in the end of a pencil where the eraser is housed. I removed the eraser and replaced it with some foam which was then cut to shape. I then cut the sharp end of the pencil off as it wasn’t needed and I felt like I was going to stab myself in the eye sooner or later. The end result is shown below. Just saved myself $20!

20111225-230129.jpg

Making the tape-player synthesizer a permanent project.

A few days my mum gave me an utimatum. If I didn’t clean my room I wouldn’t be paid for washing the house’s windows. I needed to wash the windows to raise money for my 3D printer. At this point you’re probaby asking why I needed to clean my room. The header for this blog has a perfectly clean bedroom desk in it. Well, you haven’t seen the floor. So I cleaned it up. And I found buried under a small mountain of old DVD drives my old tape-player synthesizer. Don’t remember my tape-player synth? Here’s the link to my last post about it.

So I opened it up. And it was a mess. There was a breadboard clinging on with a few scraps of blu-tac and the etherten board was long gone (sabotaged for another project). There were loose wires everywhere. Looked like it was time to do this thing properly. Because, you know, retro synths are cool to have around …

I opened up fritzing (the free electronics circuit designer) on my laptop and got to work laying out a controller circuit on some stipboard. To avoid having to do any major code changes I simply used the atmega328 chip from an arduino. This meant that to reprogram the board all I had to do is program it in the uno board then remove it and place it in my board. The part count for running an atmega328 without the arduino board is quite low. You only need a crystal, 2 capacitors and a resistor. So it’s very easy to design a DIY stripboard version of an arduino. Here’s the link to the circuit for using an atmega328 without the arduino board: http://arduino.cc/en/Tutorial/ArduinoToBreadboard . I just converted the layout to copper strip board.

My layout was fairly simple. It included:

  • An atmega328 microprocessor.
  • 2 18pf capacitors
  • 1 10k resistor
  • 16mhz crystal
  • A header for breaking out the 5V, TX, RX, GND and RESET pins of the atmega328. So you can program it without having to remove the chip if you don’t want to.
  • A few jumper wires

And that was all. Including designing, test fitting, board cutting, laying out components and soldering it wouldn’t have taken more than an hour. Very easy to do. Here’s a pic of the finished board.

And here’s a fritzing diagram.

Ignore the speakers and pots for now. We'll talk about those later.

Now the controller board is done we can solder it up to the synth controls and give it a go. The output of the synth program is on digital pin 9 (PWM) and the input pins are analog pins 1-5. Simple. Each pot has to be wired to 5V,GND and it’s analog pin. Which isn’t particularly difficult, just arduous. The speaker is wired to digital pin 9 and GND. For the output I didn’t have an audio jack handy so I ended up just using alligator clip wires connected to nice logitech speakers. Which provided plenty of output volume because the logitech speakers have an amplifier built in  (I think). Here’s a pic of the finished electronics:

I know the wiring is messy... I didn't have enough to make it neat again.

I know the wiring is messy... I didn't have enough wire to make it neat again.

So there you have it. I wired up an old USB cable for power so I can use it wherever I want and that’s about it. Here’s the final version of the code:

int note = 100;
int beat = 50;
int length = 10;
int pin = 9;
int note2;
int note3;
int button1;
int button2;
int effect;
void setup() {
pinMode(13, OUTPUT);
pinMode(pin, OUTPUT);
pinMode(2,INPUT);
pinMode(3,INPUT);
Serial.begin(9600);
}

void loop() {
length= analogRead(1)/10;
beat= analogRead(2)/10;
note= analogRead(3)/5;
note2= analogRead(4)/5;
note3= analogRead(5)/5;
tone(pin,note);
delay(length);
noTone(pin);
delay(beat);
tone(pin,note2);
delay(length);
noTone(pin);
delay(beat);
tone(pin,note3);
delay(length);
noTone(pin);
delay(beat);
}

Oh, and of course I couldn’t leave you without a long video displaying how horrible it sounds…..

Arduino 1.0- the good and the bad

Arduino 1.0 was released (relatively) recently and having had the chance to do some coding with it I’ll share some impressions.

The first time I used 1.0 didn’t go too well. I was showing my school electronics teacher how to program arduinos and it wouldn’t load a duemilanove board with a Blink sketch. This was with a freshly downloaded hot off the press 1.0. I tried the usual wrong board or comport but that wouldn’t fix the problem. It had me stumped. This had never happened before to me. This was on a Dell computer running Windows XP. However, when I got home I loaded up 1.0 on my computer and it worked fine. I think there may have been some issues with the early release files. After a while his worked fine as well. So it must have just been a one-off.

Let’s now look at the good and the bad of the new IDE having used it for a few weeks. This is not from some article which tells you what the new code features are or anything like that. This is just the stuff that I’ve noticed while using it and thought “that’s nice”. Or, why hasn’t that been fixed yet.

The good

Awesome new load screen with a nicely designed logo. Much better than the old one. But it doesn’t make it load any faster.

I like the loopy love heart thingys......

I like the loopy love heart thingys.....

New icons make it look much sleeker than the old version. This provides a better and cleaner experience. Having the upload button next to the Verify button should also makes things a bit easier for beginners. Not that I ever really use the verify button anyway. I mean, your code is automatically verified before it is uploaded so what’s the point?

Progress bar! This surely has to be the best improvement of all! No more staring at the little black console window to see whether it is actually going to load your code or not.

It does seem to be quite jumpy however...

It does seem to be quite jumpy however...

Another very useful feature is the line of text in the lower right hand corner ofthe window telling you what board and serial port you have selected. It is nice to know what these are as these are the settings you change the most. It’s also means you don’t have to use the super slow Java menus.

It also tells you what line of code you're on... but the old one did that as well...

It also tells you what line of code you're on... but the old one did that as well...

The blue colour scheme is slightly lighter…. doesn’t really affect functionality but I thought I would mention it anyway.

The bad

Java. I’m told it’s what makes the whole thing super slow. Arduino is a massive international open source project. Surely we can make something together that can load a menu bar in under 5 seconds. I have never used a windows app that is so slow.

It’s killed off quite a bit of old code. Things like LCD CreateChar sketches required some modification. I’ve heard it’s rendered some other things useless as well. I guess it’s all in the way of progress….

There’s not much more I can complain about. It’s pretty darn good for something that is free….