Surface mount soldering with garden tools

Thu, Aug 13 2009: Filed under Tips
Posted by Jonathan Oxer I bet this is a tip you never expected to see! My essential tools for surface-mount soldering include tweezers and ... a garden fork? A couple of weeks ago I came across a little how-to on MakeZine about making a pointer weight for SMD soldering. I had a go at making up a slightly smaller one and it seemed promising but not quite heavy enough (I was lazy and didn't put washers on top as weights like in the MakeZine article) and I used it for a couple of days with surprisingly good results. I didn't get around to adding weight though and then while coming in through the back door I saw my wife's gardening fork, and inspiration struck. I grabbed the fork, put a blank ProtoShield down on my bench, grabbed some surface-mount parts, and went for it. Perfect! The fork has just the right amount of weight to hold parts firmly without being too heavy, and the tip is rounded enough that it doesn't damage the part but narrow enough not to get in the way of the soldering iron. All I have to do is line the part up with tweezers, lay the fork tip onto it, and it's ready to go. Both hands are then free to deal with the solder and the iron. The result: very neat part placement very fast, with fresh solder applied rather than relying on solder stored on the tip of the iron. Thanks MakeZine :-)

Organising Arduino bits n pieces

Mon, Jun 1 2009: Filed under Tips
Posted by Jonathan Oxer

Trying to keep track of the parts for 40+ Arduino projects at once has been a bit of an exercise in controlled chaos so a couple of weekends ago I went down to the Reject Shop and bought a stack more cheap kitchen containers with snap-on lids. Now things are much neater. This is one shelf:

Yellow labels for projects for Practical Arduino, white and blue labels for general supplies. I started doing blue labels using a Dymo labeler but it turned out that hand-written labels on electrical tape are easier to read from a distance so I gave up on the high-tech approach.

There are actually about twice that many containers now: that photo is a couple of weeks old and since then I've been back to buy even more.

Arduino code highlighting in Vim

Tue, May 26 2009: Filed under Tips
Posted by Jonathan Oxer A big thankyou to Johannes Hoff for putting together a Vim syntax highlighting file for Arduino development. Most people start their Arduino journey using the IDE but many then move on to using other tools, and for me personally my editor of choice has been Vim for so long I can't remember when I started with it. The Arduino language is really just C++ with some extra libraries thrown on top but because sketch files are stored with a .pde extension Vim doesn't even apply regular C++ highlighting by default, let alone highlight Arduino-specific functions. So Johannes put together an "arduino.vim" syntax file that you can grab from To get it running on my Ubuntu system these are the steps I followed: * Create the directory to store syntax files if it doesn't already exist: mkdir -p ~/.vim/syntax * Put the file you just downloaded into it: mv arduino.vim ~/.vim/syntax/ * Bind that syntax definition to files with the .pde extension by adding the following line to your ~/.vimrc file: au BufNewFile,BufRead *.pde setf arduino * Open a .pde file in Vim and type: :syntax on Voila! Syntax highlighty goodness for .pde files:
If you want Vim to always have syntax highlighting automatically each time you open a file, just add this to your ~/.vimrc file: syntax on Enjoy!

Updated library for nuelectronics / Seeed Studio ethernet shield

Fri, May 22 2009: Filed under Tips
Posted by Jonathan Oxer The Seeed Studios Ethernet shield is a beautifully made board: the gloss white overlay gives easily the best finish I've ever seen on a PCB, and they were smart enough to realise that when people put an Ethernet shield on a project they probably also want to add some custom hardware as well so the spare board area is a mini prototyping area. Sweet! The downside of the board is that it uses the nuelectronics etherShield library which has a tiny but fatal bug that prevents it working on operating systems with case-sensitive filesystems, such as Linux: the wrapper class has incorrect capitalisation on the filename for the library header. The syntax itself is also all over the place with semi-random indentation in the examples that makes them really hard to follow, and there's close to zero documentation for it. So to save other people the pain I've created an updated version of the library and put it on github so it can be updated: Enjoy!

Problem: Arduino won't run with USB disconnected

Thu, May 14 2009: Filed under Tips
Posted by Jonathan Oxer

I've seen a few people mention problems with getting their Arduino board to execute code when running stand-alone disconnected from USB, and it's a problem that had me scratching my head when I first came across it too. The symptom is that you've written some code, uploaded it to the Arduino, tested it, and everything seems to work fine - until you disconnect the USB and try to run the Arduino off a battery, and it just won't go. Plug it back in to USB and everything is fine. Grrrrr!

The basic problem is the Arduino seeing a floating input to the RX line on the serial port. While booting up the Arduino bootloader searches for an update from a host computer, and if it finds one it loads it up and runs it. But with the RX line floating it sees garbage data and sits there indefinitely waiting for an update that will never come.

The solution is easy when you know how. Just stick a 10k resistor across the RX and TX connections (ie: digital pins 0 and 1) or from RX to GND when you're not using the USB connection and the Arduino will boot cleanly and execute your code as expected.

1 of 1