In which I start to play with my PICAXE microcontroller development board / system / kit / thingy / whatever.
With regard to my ongoing Men vs. Women Display-O-Meter project (see blogs #212701651 and #212900832 ... and don't forget that I still need suggestions for a better name than "Display-O-Meter")...
For the last few months I've been forced to work on ... well, work-related projects at the weekends. In fact, this past weekend was the first one that I've had free since "I-don't-know-when." Thus, when my wife (Gina the Gorgeous), who is a realtor, was called away to meet some of her customers on Saturday, I immediately broke out my trusty soldering iron and started to play with the PICAXE microcontroller development kit I'd purchased a few days earlier.
This is just a "teaser" – see more detailed images below....
On the off-chance you're interested, I acquired the majority of the parts (a breadboard with wire links, a voltage regulator kit, a PIXAXE 28X1 microcontroller kit, and a special USB programming cable) from SolarBotics at www.solarbotics.com (see product #28621). These folks were great to work with and the kit arrived in just a couple of days.
I have to say that this is really, really cool concept. In the case of a typical PIC microcontroller, you also need a special piece of hardware to program it. By comparison, in the case of the PICAXE, the PIC microcontroller has been pre-programmed with a little boot-loader program.
The end result is that you don't need a special-purpose programmer. Once you've created a program on your PC using the supplied editor / simulator / whatever as discussed below, you simply click the Run button to download it into your PICAXE via an RS232 or USB cable (I'll write a full "How To" on all of this sometime in the future when I've finished the "Display-O-Meter").
So, the first step was to build a little voltage regulator (as we all know, it's not the size of your voltage regulator, it's what you do with it that counts). I then plugged this little scamp into my breadboard and used my cheap-and-cheerful multi-meter to check that I was receiving the expected 5 volts.
Testing my little voltage regulator.
Next, I soldered the various bits-and-pieces onto the microcontroller board and plugged that into the breadboard as shown below. Note that I hadn't plugged the PICAXE chip into the board at this stage, because first I wanted to use my multi-meter to ensure that I was getting good power and ground connections to the appropriate pins ... and also that I wasn't getting power or ground to any "inappropriate" pins (call me "old-fashioned" if you will).
Checking power and ground to the PICAXE board.
Once I was happy that everything was as it should be, I powered everything down, inserted the PICAXE chip, powered everything up, and checked the voltages again ("better safe than sorry," as they say). I then used the free PICAXE editor software to enter a simple test program (in PICAXE BASIC) that set one output pin high and another output pin low, waited a second, reversed the polarity of the pins, waited another second, and then jumped back to the beginning to do the whole thing again.
Entering a program in PICAXE BASIC.
I connected a light-emitting diode (LED) and associated current limiting resistor to each of the two outputs in question, powered up the breadboard, and hit the Run command to download my program. The dialog on my PC assured me that everything had occurred as expected ... but nothing seemed to be happening...
Bummer! So, it was back to the multi-meter. It didn't take long to determine that the two output pins I had targeted were toggling back and forth as expected, so why weren't the rascally little LEDs flashing? Surely I hadn't connected them the wrong way round (I have my "senior moments," but still...).
No worries... it was just that I'd forgotten to tie the back end of the current-limiting resistors to ground. I quickly added a couple of wire links, my LEDs started to flash like troupers, and I started to perform my "happy dance" (it wasn't a pretty sight).
Hurray! It works! My LEDs are flashing!
When Gina eventually returned, I proudly displayed my masterpiece. Now, Gina has little interest in techno-weenie topics, so it took some time to explain, but she pondered it for a while and then said something along the lines of:
So, if I understand this correctly, you've used your incredibly powerful notebook computer to create a program. Then you've downloaded this program into this computer-on-a-chip that you've spent hours building. And the end result of all of this work is that you can now make these two little lights flash...
Hmmm, it doesn't sound quite so exciting the way she says it. But what Gina doesn't realize is that – armed with my PICAXE – I now have the power to control the world... well, to control my small corner of it (so long as Gina says that's OK).
So now I have my controller... the next step is to start working on a prototype of the fully-fledged "Display-O-Meter" ... watch this space!
2009 New Year Resolution (Goal: Walk 1000 miles at ~3 miles a day)
[A=Actual, C=Current, P=Plan-to-Date, R=Remaining, T=Total]
|Days:|| T=365, C=21, R=344|
|Miles:|| T=1000, P=63.00, A=74.71, Δ=+11.71, R=925.45|
|Note:|| "These shoes were made for walking..."|
Questions? Comments? Feel free to email me – Clive "Max" Maxfield – at email@example.com). And, of course, if you haven't already done so, don't forget to Sign Up