Book recommendation

Posted by Lance | Posted in Beginner, Intermediate | Posted on 26-06-2011-05-2008

0

OK, so this has taken longer than I was hoping to get some real content up here, but I recently bought something that I thought I would share.

I’ve been doing some research on an idea for a project for another hobby of mine, high power rocketry. (I will have an upcoming post that will talk about my idea in great detail.) During my research I found some glowing reviews for an O’Reilly book, Arduino Cookbook by Michael Margolis. After a couple of minutes after opening the book, I can completely understand the reason for the glowing reviews.

Simply put, I’ve always felt that there were plenty of sites that continually have some very good information about the Arduino & projects for the Arduino. The only problem is that the documentation can often be inconsistent & vary widely in quality. Also, It’s a challenge to refer back to some of those pages as a point of reference.

The Arduino Cookbook is exceptionally thorough, laid out in a very logical manner, & the documentation is consistently strong throughout. Best of all, it’s altogether in a single volume that is easy to keep in arm’s reach. And that’s a good thing because the depth of components it covers is impressive. Remember in my last post how I talked about how excited I was about my new ethernet shield? Well, aside from a surprisingly underwhelming number of projects online, there is an entire chapter with 16 “recipes” on everything from getting started with the ethernet shield to serving up HTML pages to interacting with other websites. There are entire chapters dedicated to wireless communication, audio output, & using displays just to whet your appetite for the wealth of content found in the 600+ pages.

And I should take a moment to explain the “recipe” concept. The idea is that while it gives you full sketches to make each point, the explanations inspire you to bridge the gap between the chapters to combine elements of the sketches together to do something new, let’s say like, make a webserver that allows visitors to control a servo. And like a good cookbook, the recipes at the end of the cookbook are built upon the concepts found at the beginning.

The Arduino Cookbook would be a sound investment for anyone just starting out as well as most intermediates, & pretty much anyone who wants to interface with some new hardware for the first time. It won’t collect much dust on a bookshelf because you’ll certainly be thumbing its pages on a frequent basis.

Parts recommendations for beginner “Arduino-ites”

Posted by Lance | Posted in Beginner | Posted on 14-06-2010-05-2008

5

Since getting my Arduino, I have spent quite a bit of money (easily $150 to date) on components–breadboards, hook-up wire, LEDs, resistors (both fixed & potentiometers), transistors, switches, & more. I have sourced most of these items from eBay, but a local store, Skycraft Surplus & Digi-Key have been immensely helpful as well.
While I don’t have much yet to show as far as anything new or original for it, I thought I’d take the time to share a few things I’ve learned through this buying process as well as actually using the components.

  • Saving money. As far as buying components on eBay, I’ve found nearly a dozen different sellers that I have all had good experiences from. Perhaps the only issue is that it takes a long time–usually 2 weeks–for the items to arrive in my mailbox. There were sometimes another seller in the US who would have the same items but it usually was 2-5 times the price. I’m rarely in desperate need of any component(s), so I don’t mind the wait while I save a buck or two…
  • Data sheets. Many components (all ICs, 7-segment LEDs, LED matrices, transistors, voltage regulators, etc.) require data sheets from the manufacturer to verify that you are connecting everything to the correct pins. Any seller worthy of spending your money on will either offer these data sheets in a PDF on their website/auction page or email you one upon request. [Be sure to create a special folder on your PC for storing all of these data sheets!]
  • Hook-up wires. I’ve bought a few different kinds of hook-up wires. Here are the pros & cons of each:
    • Breadboard bundles. There are bundles like these where the wires have little tips attached to the end of them & come in an array of nice colors, which is particularly nice for helping troubleshoot a complex circuit. These are great to use for basic circuits, but complex projects are probably going to require several of these. It’s a cost that can quickly add up! The lengths of the wires is nice but I can’t tell you how many times I wished I had some that were shorter & there’s even be a few times I wish I had more of the longer wires.
    • Pre-cut jump wires. (See this eBay auction or do a search for “460PCS Pre-Cut Connection Cable Jump WIRES”.) Turn the other direction & run. Thankfully they are cheap in case you get suckered into buying these. Quantity is great, but the quality is awful. Mine weren’t cut very cleanly & the wire itself is very, very thin. I am highly suspect of the seller’s claim the wires are 24AWG. The sleeves might be 24AWG! Therefore, it was often difficult to insert the wires into the breadboard as they would quickly bend under pressure, sometimes didn’t make reliable connection, & could only handle a limited amount of current.
    • Make your own. A recent trip to Skycraft found me bringing home 20ft (~6m) of 20AWG solid core wire. The upsides were A) it was cheap–$0.06 per foot! B) I could cut it to whatever lengths/quantities that I wanted. C) Once inserted into the breadboard, it made solid contact. There were, however, some definite drawbacks: A) It took time to make each hook-up wire since I had to cut it to length & then strip 1/4″ off the ends (which would give anyone the reason to buy some wire cutters & wire strippers–you’ll need them eventually anyway!) B) 20 feet of wire doesn’t go as far as you think it would. I should’ve picked up at least 50 feet. C) Skycraft only had it in white. So that means I’ll probably use it in conjunction with the breadboard wires (see above) until I can find it in more colors. I also would think that 22AWG would be acceptable if 20AWG isn’t available. D) If I was going to convert a project from a breadboard to something more permanent (such as protoboard), I’d want some wire that was more flexible, such as multi-strand. [6/15 Update: I found a pretty good source for 20 & 22 AWG solid core hook-up wire at All Spectrum Electronics. 100ft spools are available in 10 different colors for $7.29 & $5.59, respectively. (Website has ugly URLs so just go to Categories>>Wire>>Solid Core Wire.)] [6/24 Update: I made another trip to Skycraft Surplus today. They had several new spools of wire in stock since my last visit. I bought 25' of 20AWG solid core black, 25' of 22AWG solid core red, & 50' of 22AWG solid core orange. Made a few hook-up wires of each color & while there's nothing wrong with 20AWG, definitely save yourself a little $$$ & get the 22AWG. It works just as well in a breadboard but is a little easier to cut/strip to length. And the 22AWG is only $0.05/ft!]
  • Making ICs easier to identify. I’ve been tinkering with a couple different shift registers to use a large number of LEDs. Problem is that both shift registers have 16 pins so they aren’t easy to identify without good lighting and/or a magnifying glass to read the chips. I picked up a multi-color pack of metallic ink permanent markers & drew a small silver or gold dot so now I can more easily & quickly differentiate between them. [Feel free to drop other suggestions in the comments below!]

I’ve got so many different components that the next item I need to purchase is a storage cabinet that has tiny slide out drawers. Re-purposing empty Altoids tins is a temporary stop gap, but it has reached the point that I need to eat a lot more mints if I’m going to continue storing my components like this!

Getting started with 7-segment LED displays

Posted by Lance | Posted in Beginner | Posted on 05-05-2010-05-2008

0

I’ve done many of the Arduino tutorials. (The few I haven’t done is because I don’t have all the components–yet–to build them.) As I have been acquiring the parts, there are other projects I’ve seen online that have caught my eye. One that I got the parts to while waiting for others to arrive were some 7-segment LEDs.

7-segment LEDs are actually 8 LEDs (counting the decimal point as LED #8) arranged in that recognizable calculator-esque format. They have 10 pins, one for each segment plus 2 common cathode grounds.

On eBay I found 4 Siemens HD 1133 7-segment red LEDs along with a socket for mounting them, however, the socket is nice to have but is not required for mounting the LEDs on my breadboard.

With so many connections (9 to the Arduino) required to get it working, I was going to have to start with only a single display. However, just to test out the display, a quick search revealed an excellent beginner’s post in the Arduino.cc forum that had an easy to put together circuit & code for 7-segment LED displays. If nothing, I verified that I had made all the proper connections & that the displays were fully functional with the 2 code samples posted.

Moving on to something a little more challenging, I wanted to make the display show numbers, perhaps as a basic counter. That lead me to a tutorial from Hacktronics. I felt that the article was helpful, but I was left to my own devices to write the code other than a big hint as to how to get Arduino to display numbers. Some trial & error came in to play here as I discovered that the documentation for my displays, aside from being hard to read, was completely incorrect with the pinout data. Also, I realized the difference between a LEDs with a common cathode vs. a common anode: the digitalWrite values (HIGH & LOW) are opposite for which ones you are using. With my common cathode LEDs, on is HIGH & off is LOW. (Also, here is an explanation of the difference between a common anode vs. common cathode.)

7-segment LED connected to Arduino

Code:

From here I am waiting on an order with some 74HC595s. That will allow me to build a circuit with multiple 7-segment LED displays, of course after some initial testing with LEDs. Next time…