Saturday, January 15, 2011

Final Thoughts

I apologize in advance for the length of this "final" post - final in quotes because who knows... there may be reason to occasionally revisit this blog with updates. But before I leave and move on to the next blog project, I'd like to put down some overall thoughts on this entire experience.

1. Should be required reading for all engineering students - I feel strongly that this book should be a standard textbook for all engineering students. I wasn't in the electrical engineering department, and my electronics training was mostly white-board theory and word problems in the back of chapters. One class did get us some hands-on time with a soldering iron and some resistors, but come on! I don't think any engineer should leave school without having this level of basic knowledge.

2. Should be suggested reading for all high school students - We have these lists of books that we tell every high schooler they should read - mainly classics of literature. But how often do we provide those students who have a strong interest in math and science with a list of good technology books? This is the book I WISH I had in high school - it may very well have changed the course of my studies. I'm happy with my chosen vocation, but it took over a decade out of university for me to find the time and the right book to get my understanding of electronics to this level. So... high school teachers and parents - try to buy a few copies of this for your high school library. (I'd donate mine, but the picture I'm including here should give you an idea of how I've abused my copy - the spine is peeling away and every other page is curled and written on.)

3. The cost to learn is high - I've read some comments about Component Packs 1 and 2 that Makershed sells... and there are concerns about the extra costs involved in finishing this book and its 36 experiments. Yes, the costs are high. But I'd estimate that for less than $300 you can have everything you need, including tools, to finish this book. That's the cost of a few college textbooks these days. It's also about the same cost as a LEGO MINDSTORMS robot kit which many parents buy for kids ages 8 and up. Consider this book, all the parts, and all the tools an investment in your education (or your child's education) and dive in. The tools will always be yours (and will last if you take good care of them). I simply refuse to worry about the costs I've incurred by working through this book. The education is priceless.

4. I missed a few... argh! - A few of the experiments I never could get to work... and a few others I skipped (especially towards the end). But the important part is that I understand! I get it. I have never understood electronics before the way I do now. I am still in shock that a book like this has alluded me all these years, but I'm glad it's here now, and I have shared (and will continue to share) both the book and the skills I've learned with teachers, parents, and students.

5. Learning by Doing... and Blogging - I've always had success learning a new skill when I'm actually doing something... I think most of us will agree that this method works. But I've also learned over the years that when I write something down... either my own explanation or at least my thoughts on something... it sticks better. By sharing my experiences - and reading your feedback/comments - I get to go back through each experiment again and further cement that knowledge. Maybe you'll consider doing something like this yourself - pick a book, create a blog, and document your work as you plow through the material. Reading a book is typically a solo endeavor, but I was surprised at how many folks tuned in to follow me work through this book. It was nice to know others were doing the experiments, getting their own results, and comparing them to mine... and those who helped me troubleshoot were a huge asset that you'll never get reading a book on a couch alone.

6. Never stop learning - I've already picked my next blogging project, but for those of you not ready to leave the book after Experiment 36, you'll be happy to know that the author appears to be providing more experiments in the pages of Make magazine... I've already seen in the previous 2 issues (23 and 24) that the author has included new experiments to perform with all new components to investigate. Rest assured, if one picks my interest, I may grab it, do it, and follow up here with a post.

Just a little over a year ago (Jan 6, 2010) I began this blog with the simple goal of using it to motivate me... if I posted my work for anyone to see, it'd light a fire under me to finish. I figured if I knew people were checking in on my status, it'd be hard to quit. Peer pressure can be a great motivator.

So, here we are... Jan 15, 2011. Make: Electronics finished.

Thank you, Charles Platt, for writing the book. I think it is one of the most valuable books I've ever read.

Thank you, Make Magazine, for putting it out there and creating those components packs that have allowed many folks to perform the experiments. (I also want to thank you for supplying a nice bundle of Maker Notebooks to give away as prizes - I've kept a few for my own personal use in future projects.)

Thank you, Readers... I've enjoyed your comments, and the results and obstacles you've shared. Good luck finishing the book (if you haven't already done so). I'll continue to receive notices when you post comments, and I'll do my best to reply to them. And please feel free to share (as a comment to this post) what you'll be doing next - any books of interest? Any project kits you've found that look interesting? Let me know.

James Floyd Kelly
Atlanta, GA
Jan 2011

Friday, January 14, 2011

Chapter 5 - Experiment 36

I never could get my alarm system (Experiment 20) to work as planned, so I wasn't quite sure how to handle this last exercise. I've read over it 3 or 4 times, trying to understand the theory behind it... and it makes total sense.

What I find interesting about this experiment is the how much of the circuit from experiment 20 goes away when you bring in the PICAXE chip... letting the chip handle the logic rather than all those logic chips just makes sense from both a cost perspective and a losing-my-sanity one.

Take a look at page 201 at the circuit for Experiment 20... and then jump to the bit of code that allows the chip to determine if 7-4-1 has been pressed. It's a subroutine that's called by the code on page 313...and flashes of BASIC programming started flitting through my head. I was pleasantly surprised at how I understood the code and the logic behind it. Although I haven't rebuilt the alarm, it would be a rather simple matter to gut the box and recreate the alarm using just the PICAXE chip.

Some of you (myself included) may be wondering 'Why didn't the author save the alarm project for the PICAXE section of the book?' and, of course, I totally understand the reasoning - having worked through Experiment 20 and understanding how those logic chips work, I can both appreciate the power of MCUs and the author's making us go that route and doing it "the hard way" first.

Chapter 5 - Experiment 35 Completed

Exercise 35 is pretty straightforward... you can see in the photo that I've added in the trimmer potentiometer to the circuit, making certain the center terminal connects to pin 5 on the PICAXE (logic pin 2).

I ran through a few tests, taking a reading with my multimeter at various settings... the debug window screenshot I'm including here shows the potentiometer maxed out at resistance - that's what the 255 for b0 is referencing.

I took about four different readings and compared the resistance readings on the multimeter to the chart on page 307... pretty close and the deviations are certainly due to the fact that this is an analog device and I'm turning a slot screw to increase or decrease the resistance... but I totally understand why the values you'd obtain with any trimmer would be linear in nature.

The final step was to update the code to allow the LED to flash faster or slower based on the trimmer... I'm including a video here that shows those results. Pretty cool stuff. Make certain you understand that paragraph on page 309 that talks about how you can use this information to control things with major changes being done in the code versus in the circuit.

Don't forget to read over the extras on page 310 that tell you about the different features that the PICAXE chips come with... I find it interesting that this little 08M chip has the ability to generate pseudorandom numbers and tones!

Thursday, January 13, 2011

What's Next?

I must have missed the memo!

In the last week, the following things have occurred:

1. Arduino The Documentary was released.

Arduino The Documentary (2010) English HD from gnd on Vimeo.

2. Make magazine Volume 25 focuses on the Arduino. (I'd estimate 50-60% of the magazine is directly related or involves the Arduino in some manner - I have the PDF/digital version on my iPad, but the print version should be out by Jan 25.)

3. Beginning Arduino from Apress hit the shelves (once again, however, I got the digital version)

4. Even The Ben Heck Show has coverage of the Arduino in this week's episode!

Given that the Arduino seems to have multiple spotlights on it for the month of January 2011, I guess this is as good a time as any to announce that when I finish the Make: Electronics book (this week, I believe) I plan on continuing forward by learning (and blogging) about my experiences with tackling the 50 projects in the Beginning Arduino book (#3 above).

Fifty projects?! I've scanned most of them and believe that I can do it... but I'm not setting a timeline and I'm most certainly not committing to doing all 50. A lot of it depends on costs (which I haven't figured out yet) of all the required components... and interest. The book looks great, but if I dig in and find myself getting bogged down or dissatisfied with the projects/book? Who knows?

That said... I've been waiting a LONG time to begin my hands-on with the Arduino. I know what it is... I know how it works... sort of. But I've never actually done anything with one. So...

I've ordered myself the Arduino Uno... and I may be ordering a few add-ons/accessories from the MakerStore shortly.

But because this is a completely different topic and book, I'll be moving this discussion over to a new blog - - I've already got 2 followers, so apparently some folks have already jumped in even before the announcement.

As with this book, I'll be documenting my results - both successful and otherwise - and including photos and videos of my work. While I'm at it, I'll also do my best to build a running Google Spreadsheet that contains all the parts I've used (and where I bought them... and cost). Chime in if there's anything I've missed (or that you'd like to see me add) and I'll see what I can do...

Now... back to Exercise 35 and that PICAXE...

Wednesday, January 12, 2011

Chapter 5 - Experiment 34 Completed

I've got a handful of videos for you here, but before I show you the final results I want to share a bit about the troubleshooting I had to perform to get the PICAXE software to properly download to the chip.

The first bit of troubleshooting was mentioned in the previous post - I simply needed to test to make certain the voltage regulator was providing 5v across the circuit... it was.

Next, I plugged in the USB cable to my laptop and to the stereo connector and clicked the Program button (to upload the program)... I got an error. (Of course.) The error window that popped up suggested I check to make certain I had the Options setting for COM port configured properly - I checked and it was (COM4) but then I noticed a button on the Option window that allows you to test the chip. The first screenshot I'm including here contains a set of short troubleshooting steps. I tested the voltage between pin 2 (the Serial Input Pin) and ground and it was 0. So far, so good. The second photo here shows that 0 volts is being read and the dark green dot (on the laptop screen) is turned off.

Next, I clicked on the dark green button (it turns to a bright green) and the voltage jumped to almost 5v (see the next photo).

So that checked out, but for some reason the program still would not download to the chip. It took me about thirty seconds to figure out the very simple problem... and here it is:

Make certain to insert the USB Cable jack into the Stereo Connector until you hear it CLICK! I didn't have it pushed all the way in (although it felt that way) and the final bit of movement requires a tiny bit of extra pressure to fully seat the jack.

After that... the program downloaded just fine. The first three videos below are all variations of the first bit of code on page 301. The first video is with the code downloaded and the USB cable still connected. Second video is with the USB cable disconnected. The third video just shows the LED blinking faster after the code has been changed.

The last video shows the results of the second program from page 304.

Tuesday, January 11, 2011

Chapter 5 - Experiment 34 Circuit

I got to work on wiring up the circuit that will be used - the most time consuming part was simply soldering some wire so it touches both leads (twice) on the stereo socket, but I think I got that part done correctly.

After wiring up the circuit, I ran a voltage test to make sure the voltage regulator was working, and one of the photos shows the 5v clearly.

There is an error in the book (verified by the errata page) with a resistor shown at the bottom of the schematic - ignore it... no resistor goes there.

Up next - typing up the code and then uploading it to the 08M.

Note: You may have noticed in the last photo a clear box of jumper wires. I purchased a box of 150+ pieces for about $10 at a nearby electronics store and I love these things - should have bought a box at the beginning. You can see in the other two photos that I've relied heavily on these pre-cut and pre-stripped wires, ignoring any sense of style when it comes to color.

Saturday, January 8, 2011

Chapter 5 - Experiment 34 Driver Installation

Before you get too far into this experiment, you must make certain to install the special USB cable driver on your computer. The USB cable fools the computer into thinking it's talking to the Picaxe chip with an old serial connection (versus actual USB).

The instructions for doing this can be found on an included PDF file in the ZIP file you download, but I didn't have as easy a time installing it as the instructions suggest, so I wanted to walk through this in case there are others who encounter this issue. (Specifically, the screenshots in the PDF do NOT match what is seen on a Vista computer - they do include Windows 7 steps but my limited memory of using XP has me thinking the screenshots also DO NOT match the XP operating system - please feel free to correct me if you find the PDF is correct for XP.)

First, you need to be aware that I'm installing the driver on a Window Vista operating system, so these instructions may not match exactly with your OS... but I think you'll be able to get the basic idea of how to get around any hiccups you encounter.

The first thing you'll do (after downloading the driver - see previous post) is plug in the USB cable. My Vista laptop automatically detected it as seen in the first screen capture I'm including here. As you can see, it recognizes the cable as an AXE027 PICAXE USB device. But whereas the instructions show a nice little pop-up window that asks you to specify the location of the files, I never got this - I got an error message saying "Device Driver Could Not Be Found" and my only option was to click OK. So... it's off to the Device Manager (from a previous life as an IT consultant, I know my way around just enough to be dangerous and figure things out...)

Open Device Manager by clicking Start, and then right-clicking on Computer and choose Properties. Click on the Device Manager option in the left column of the screen. As you can see in my 2nd screenshot, there's an exclamation point next to the device telling me there's a problem.

Next, I right click the AXE027 PICAXE USB device and choose Properties. On the window that appears, I click the "Update Driver" button and a screen appears like the one in the 3rd screenshot.

Click the Browse button and find the AXE027 folder that you unzipped from the driver download. In the screen capture, click on the axe027 folder and click OK.

If everything goes as planned, you should get a screen like the 4th screenshot tellign you the driver installed correctly.

Click the Close button and if you go back and look at the Device Manager screen, you should see that the device no longer has the little exclamation point next to it like my final screenshot here.

And that's it... for the driver install. Next, I'll install the Programming Editor software and get the circuit wired up.

Thursday, January 6, 2011

Chapter 5 - Experiment 34 Software

Before I get started with the circuit on page 299, I need to download and install the appropriate software and driver. The instructions for doing this are clearly explained on pages 296 and 297. I'm running Vista on my laptop, but be sure you click on the driver download that's appropriate for your operating system (Windows, Mac, and Unix all have links).

The 60MB Picaxe software is downloading right now, but when it's done, I'll first install the driver (while the USB cable is plugged in) and then the software.

Monday, January 3, 2011

Jumping to Experiment 34

I spent a bit of time rewiring the entire circuit for Experiment 32... taking one of my readers suggestions that the protoboard could have a bad insertion area, I moved all the wires to new locations. I then replaced the 555 chip with a new one and used my multimeter to confirm that the relay was getting higher voltage on the coil when a microswitch was pressed. Finally, as a last ditch effort after these efforts produced no change in results, I swapped out the 47uF capacitor with a 100uF... increasing the size should have increased the length of the pulse, but in this case, I get the same results - the motor reverses only when the microswitch is held down.


Okay... so... enough of this. I may choose to come back to it at a later time (things like this really bug me) but for now it's time to move forward and get this book finished. Which leads me up to my next announcement - I've read over Experiment 33 numerous times... lost count, actually. But I've decided I'm done with robots for right now. I understand what Experiment 33 does and how it works, and, more importantly, I understand how all those 555 chips work together.

So... now it's time to get to Experiment 34. I've been looking forward to this for a while as my interest in programmable chips has been growing ever since I saw an Arduino in action controlling a remote control lawn mower (see Make issue #22). But I want to start slow... so I placed the order for all the required hardware for Experiment 34 (and 35) and it all arrived this afternoon (see the picture).

I've got 3 of the 08M PICAXE chips, the special USB cable required, and the small stereo socket. Also included in the box was a handful of resistors and misc required to properly wire up the stereo socket. I need to download and install the software specified and I'm ready to go.

Note: Inside the box, the company also sent a photocopied sheet that included a hand-drawing of the 08M wired up in a special manner, complete with resistors and voltage requirements. I'm including a close-up of that photo here, but it doesn't look complicated at all.

More to come...

Saturday, January 1, 2011

Chapter 5 - Exercise 32 Still Drivin' Me Crazy!

This circuit is still driving me up the wall... I triple-checked all my connections, but I'm fairly certain the connections are done properly as the motor behaves somewhat correctly - it spins forward until a microswitch is pressed and then reverses direction... but only for a split second.

I used my logic probe to check the pulse on pin 3 but I'm honestly not 100% sure what I'm looking for...

One thing I did do that puzzles me - I unplugged the motor as it's quite loud and was making it difficult to hear the relay switching... when I did this and I turn on the power, I don't hear the relay doing anything, but when I press a microswitch, I hear the relay click (once) indicating that the coil is getting power and reversing the direction of the motor... but when I release the microswitch, I don't hear the click indicating the relay has switched back... but when I release the power button, I do hear a click. Maybe this is normal, but I'm wondering if somehow the relay is not functioning properly.

I've about decided to move on - I'll puzzle over it later tonight, maybe tomorrow... but if I can't find a solution, I'll move forward as I think I've gotten out of the experiment all I can.