The Arduino used in the this tutorial is a 5v model so we need to convert the 3.3v signal coming out of the G1 using a level shifter. It should be possible to connect directly to a 3.3v Arduino
but that was not something I tested.
There are several ways to approach this but we'll use a 74LS04 chip in this example. You can search for one here
and they are likely under $1. Tim and I picked ours up from the Hacker Dojo in Mountain View
, CA but these are VERY common and should be plentiful wherever chips are sold or donated.
At a high level we're simply going to send the TX signal from the HTS USB breakout board into pin 1 of the 74LS04 chip. To make it work we go through the chip twice and come out pin 4 to the RX pin on the Freeduino SB (your serial pin may be different if you have another Arduino board but all should support this).
Follow these steps to wire up the level shifter and connect the HTC USB board (do not plug it into the phone yet and unplug power to the Arduino):
1. Insert the 74LS04 chip onto your breadboard. Make sure the chip hurdles the center break so the pins aren't shorted (a dumb move I made at first)
2. Soldier two wires to the HTC USB board as described in this instructable
, but we'll only be using pins 7 (Ground) and 8 (TX0) since we're only doing one-way transmission for this tutorial.
3. Connect the other end of the ground (pin 7) wire to a ground on your breadboard (which should be connected to a ground on your Arduino)
4. Connect the other end of the TX0 (pin 8) wire to the breadboard where it runs into pin 1 of the 74LS04 chip. (do an image search
for a full diagram of the chip)
5. Use a wire to connect pin 2 and 3 of the chip
6. Connect pin 4 of the chip to the Arduino RX point (pin 0 on the Freeduino SB and Arduino Duemilanove)
7. Connect pin 7 (GND) on the chip to the ground for your breadboard (which also connects to the Arduino ground)
8. Connect pin 14 (VCC) to the 5v power on your breadboard (which gets the power from the Arduino 5v output)
You should now be ready to plug in the HTC USB break-out board into the bottom of the phone and power on the Arduino. Check for sparks and smells and touch things to make sure they are cool.Note: The current cellbot code turns on LED #13 when the servo motors of the robot should be running. If you don't have a robot yet you can check to see that the LED turns on and off to confirm it is working.