Arduino

It’s been a while since my last post but even longer since I last dabbled in the field of electronics. Nice segue there huh?

The last time that I tinkered with electronic components was more than 20 years ago, when I think I was at sixth form college. I had an interest in electronics when I was in my very early teens and began playing with a soldering iron to solder components to a Veroboard (or stripboard), following instructions from a children’s book on electronics. Of course the internet wasn’t around then and all I seemingly had to go one was photos and diagrams in books and descriptions of how soldering should be done.

I then had an electronics project kit bought for me, or I bought one with pocket money, not sure which was the case. One of those wooden box affairs from Tandy (or Radio Shack if you’re in the U.S.) with little springs where you could attach wires to the components that were fixed to a rigid card base. It was interesting but I don’t really know that I learnt a lot from it.

When the subject of electronics eventually came-up at school, when I was 15 I guess, I simply lost interest. I think that possibly the theory didn’t interest or inspire me. Perhaps it was the teacher. More likely I just had more fun constructing circuits and experimenting; our school was probably short on practical experiments. Anyway. It’s been a few years.

The whole Arduino ‘project’ came to my attention a few years ago and last November I finally got around to buying an Arduino Uno, a small breadboard and a small range of electronic components. The plan being to follow some of the projects in the ‘Beginning Arduino’ book that I’d bought earlier last year.

Beginning Arduino

Beginning Arduino

The Arduino, along with the breadboard and components, have sat in the cardboard box in which they were delivered to me for the past 6 or 7 months (not strictly true as I did get the Arduino out to connect to my computer and to upload a flashing LED program). The other week I finally got them out and began to do something constructive with them. This does mean that I’ve placed my current Javascript-HTML5-’geolocation-game-thing’ project on hold. I can’t do everything and I’m also currently very busy at work doing my day job.

The first project that I followed from the Beginning Arduino book was to construct ‘interactive traffic lights’. I skipped some of the earlier projects because they were extremely simple but decided to try this traffic light one practically so that I would at least start using that abandoned box of electronic ‘stuff’ and get used to handling fiddly components again.

I had forgotten how fiddly they were. I’d purchased a pack containing some 160 resistors of different resistances and spent several minutes trying to find the 100 ohm resistor that I needed for the project. Of course once I’d found it I then did some calculations to determine what ‘current limiting resistor’ my Light Emitting Diodes (LEDs) required only to discover that I needed to locate a 150 ohm resistor from my pack. So that required further hunting.

Pack of 610 resistors

Pack of 610 resistors


150 ohm resistors

150 ohm resistors

Once I’d got all of the necessary components laid out I inserted them into my breadboard and then added wires to connect the breadboard to the Arduino and to complete the circuit. Actually I was a little lazier than this as I didn’t place all of the components and wires until another day.

I then copied out the code from the book into the Arduino development environment, compiled it and uploaded it to the Arduino device via a USB cable connected to by Macbook.

The initial result was the illumination of 2 of the LEDs; or did nothing happen at first? I can’t recall now. The little push-button switch wasn’t working anyway. When pushed it should have initiated the traffic light sequence but pushing the switch resulted in no change. I wasn’t sure if I’d placed the switch correctly (it had 4 pins and not just 2) and so I rotated it by 90 degrees and tried again. Still no success. I decided that the switch pins weren’t fitting into the breadboard holes properly and removed the switch from the board, added some extra wires to the board and then held these wires to the switch that I held in my hand. That did the trick. I then wondered why I was bothering to mess around with the switch as I had two wires that I could simply hold together momentarily to perform the same task as a switch anyway!

LED traffic lights

LED traffic lights

So that first project was useful in that it got me to investigate the field of electronics again. With the Arduino I’m combining that journey into electronics with my existing interest/hobby/job in programming. The act of programming the Arduino is the easy bit although there are some things to learn when it comes to communicating with the components that are attached to the Arduino. It’s very tempting to jump into some of the later projects in the book and begin looking at projects that involve controlling motors and servos. It’s also tempting to get hold of some of the Arduino ‘shields’ and just plug larger components together. With these shields, basically pre-built circuit boards that plug in to the Arduino, I could have the little device connected to the internet or controlling a set of motors or supplying a video feed. However I am telling myself to walk before I can run and to get back to some of the basics first. I’m also telling myself that it’s not a race and that I should just enjoy the experience, and I am enjoying it so far.

I guess that ultimately my aim is to build some form of robot, complete with motor control and sensors, but for now I’ll be content with getting LEDs to flash and to get a little Liquid Crystal Display (LCD) to show messages on it’s screen.

Comments are closed.