My Functional Test Rig
Up until now, my functional testing has been pretty labor intensive. If I wanted to check that Rhyduino was setting pin 4 high then I had to plug something in to pin 4, like and LED, and see if it lit up. It's simple and it works, so what's the problem?
Well, the list of functional tests that I was performing was starting to get pretty long and constantly rearranging the hardware was really taking the fun out of the project. I thought about how to solve that problem and came up with a system that uses two
The way the test system works is like this - one Arduino is the one I'm testing (the test subject) and the other is the observer. The observer sits atop the test subject Arduino like an Arduino backpack and observes the test subject. Both are connected
to my PC so both can be reconfigured on the fly (with Rhyduino code) to test almost everything that I need tested without any human interaction. The rest of this page is a discussion about how I built the observer.
Testing Rig With Headers Removed - Larger View
||First, I removed the digital and analog pin headers. Perhaps this wasn't the best device to use for demonstration, but it's the only one I had lying around. I modified this particular Arduino so that it had a ZIF socket to hold the microcontroller.
I like to build Arduino circuits into other devices without using an actual Arduino, so this one has the ZIF socket so that I can pop in empty micros and easily burn the Ardunino bootloader code onto them. The happy face is just there as a marker to remind
myself that I've loaded that micro with the bootloader and tested it successfully. But I digress. What I really want you to see is that I've left the power header block in place; I don't want to mess with that because as the Arduinos will be functioning
as two independent units, I want them to have independent power supplies.
Digital Pins Extending Downward - Larger View
||Next, I soldered 30 gauge wires extending out of the bottom of the analog pin holes, and the digital pin holes from numbers 2 to 13. I left AREF and GND empty because, as you'll recall from my comments above, I want the power supplies of the Arduinos
isolated from each other. Firmata doesn't use pins 0 and 1 because the micro reserves those for serial communication. However, the first time around I forgot to leave extensions off those pins and then nothing was working. Don't make the same mistake
(look closely in the blown up image and you'll see that I used some creative photo editing to remove the pins from the image). 30 gauge wire was probably a little too thick. If I were to do it again, I would have used 20 gauge so that it would fit better
into the Arduino pin sockets.
Testing Rig Joined with a Normal Arduino - Larger View.
||Finally, I joined the two devices together, with the observer sitting on top of my device being tested. I didn't make the wires on my observer long enough so I had to trim down the JTAG header pins on the Arduino being tested and put some electrical
tape between the USB sockets; they were making contact and it was shorting the observer.
Now all I need to do is write some code and make sure it does everything I hope it will.