Mar132009

Wrtilty

(or The iPod car with an awkward name)

Last summer I worked at a software company, Green Hills Software in Santa Barbara, California. I like software, but I also like to be involved in the hardware. So I decided to take on a hardware/software project which had been bouncing around in my mind for a while: control a rc car with my iPod Touch over Wifi.

Theory of operation:

The iPod touch reads values from its onboard accelerometer and sends them over wifi (UDP) to my wrt54g (dd-wrt firmware) router. The router then reads the values in the packets and sends those values out the UART. A microcontroller attached to the UART reads commands from the router and creates a PWM signal to control the motor speed and a varied pulse width to control the steering servo.

Implementation:

I looked around for a good car to build on. Radio Shack’s selection isn’t nearly as awesome as it was when I was a kid and the high-end RC kits i looked at the local hobby store were out of my price range. I decided to have my parents mail me my old Blue Shark remote control car that they gave me for christmas when I was 10. When I got it, I took it apart, wiping off the years of dust as I went. I decided to gut the original servo which was just a potentiometer and a motor (all the control logic was on the board). The main motor was driven by some big TO-220 BJTs (transistors). I decided to scrap the original servo and retrofit a standard hobby servo to make it easier on myself later.

For the car-side wifi I decided to use the WRT54g router which I had previously modified to have a serial port (see iSwitch). This router runs linux (dd-wrt). At Green Hills Software I was learning a lot about development on and for Linux which helped emboldened me to learn the necessary tcp/ip and serial port programming.

The iPod is an iPod Touch 16gb. When I made my first implementation of the iPod software, the 2.0 firmware was not officially released and I didn’t have a mac. So I went about building the dev-team toolchain for iPod development on iPod 1.1.4 from Linux. This felt like fumbling around in the dark and ultimately I just got the helloworld example to work and then dropped in c posix code for the network code. It didn’t look like anything, but it worked. iPhone/iTouch programming is in ObjectiveC, which is a superset of c/c++. It is also a language Apple (and few others) uses a lot. The second implementation was built on the Apple SDK one night at my friend’s appartment. It still doesn’t look like much, but it works on the 2.0 firmware.

To interface the router with the servo and the motor, I grabbed a piece that I and a few others had built for a project for Dr. Jonathan Valvano’s EE345M class (sidenote: go to the University of Texas and take his classes). This part contained a motorola HC12 microcontroller, an L293 H-Bridge IC, a RS232 serial port with DB-9 connector, a 3-pin connector for the servo. Here is the schematic. This was an ideal starting point except that the L293D h-bridge only supports .6A continuous / 1A peak through each of its two H-bridges. The Blue Shark’s motor peaks around 7 and continuously pulls about 2 on even terrain. So I hacked together a first prototype by wiring a couple L293Ds in parallel on a breadboard. That worked ok for a few days then burned up. Then (I really wanted a quick prototype) I soldered 4 on top of eachother and that worked for a week or so; this was plenty of time to demonstrate my project before I left Santa Barbara.

My current implementation of this piece uses Mosfet transistors which are rated to 18A although some kind of heatsink would be good if you were going to use that much. In the resources selection below you can find the schematic for this board. The h-bridge specifically has a few places I could improve, but this implementation works pretty well. A picture of my current implementation H-Bridge board is below

Video:

Here is a video of my first implementation (before I laid out a PCB).

Resources: (download .zip file)

  • AVR code for H-Bridge board
  • (old) HC12 code for first implementation of H-Bridge
  • PCB / SCH Eagle files for H-Bridge Board
  • POSIX code for dd-wrt router
  • iPhone code for iPhone / iPod

Contact:

Shoot me an email at johnaboiles [at] gmail [dot] com if you have any questions about this. I’m glad to help.

Thanks / Credit:

  • Yasha Okstein did this first with the wrt54g and his palmtop
  • This site for a mosfet h-bridge design that I took and modified
  • All the people like Daniel Imfeld and Peter Newman who I asked about linux tcp/ip and serial stuff and just generally listened to me talk very excitedly abou the project.
  • Dr. Jonathon Valvano go to UT and take his classes
  • My roomates last summer Ryan Pangrle, Philip Miller, Evan Danaher; you guys are brilliant. A big part of my motivation for this project was to keep up with you.
  • Mom and dad for buying me the Blue Shark when i was 10

Note: sorry for posting this information so late, an entrepreneurial friend of mine invested some money to see if we could get this protected and marketed. I’d love to release things to the community right off but if I could somehow make a living working for myself building things like this I’d be real happy.

Write a comment


If you have trouble reading the code, click on the code itself to generate a new random code.
 
Showing comments 1 to 10 of 571 | Next | Last
Comment http://www.elizabethmenzel.com/w/jordan.htm on : Fri April 18, 2014, 20:40:50
http://lildivasspaonthego.com/dovan/louboutin.htm <a href="http://www.elizabethmenzel.com/w/jordan.htm">http://www.elizabethmenzel.com/w/jordan.htm</a> http://dcwestyouth.com/ol/mk.htmvf<a href="http://www.boussais.com/thearea.htm">christian louboutin shoes</a>
&#x005B;url=http://www.elizabethmenzel.com/w/jordan.htm&#x005D;http://www.elizabethmenzel.com/w/jordan.htm&#x005B;/url&#x005D;
Comment ugg boots on : Wed April 16, 2014, 23:57:09
http://cateringaffairs.net/sale/mk.php <a href="http://www.elizabethmenzel.com/view/gc.htm">cheap gucci</a> http://cateringaffairs.net/sale/mk.phpgfh<a href="http://www.elizabethmenzel.com/u/uggs.htm">uggs on sale</a>
&#x005B;url=http://www.elizabethmenzel.com/u/uggs.htm&#x005D;ugg boots&#x005B;/url&#x005D;
Comment scarpe louboutin prezzi on : Wed April 16, 2014, 02:27:11
Tacchi alti per le star. Sei alla foto 1 su un totale di 40 immagini della fotogallery.Guarda altre immagini sfogliando questa e altre gallerie fotografiche su Shoes
scarpe louboutin prezzi http://gina.gov.gy/cache/scarpetacchi.php?p=scarpe-louboutin-prezzi
Comment beats outlet on : Wed April 16, 2014, 01:34:29
http://hopsnlops.com/36/by.htm <a href="http://www.elizabethmenzel.com/view/gc.htm">http://www.elizabethmenzel.com/view/gc.htm</a> http://boussais.com/ol/beats.htmv<a href="http://www.wisemanconst.com/us/jc.html">cheap jordans</a>
&#x005B;url=http://crushhoggottiline.com/02/beats.htm&#x005D;beats outlet&#x005B;/url&#x005D;
Comment http://www.wisemanconst.com/us/jc.html on : Mon April 14, 2014, 22:21:50
http://www.wisemanconst.com/ton/cl.html <a href="http://www.wisemanconst.com/en/navyuggbaileybow/">ugg bailey bow</a> http://www.thurstonsbarn.com/location.htmdfs<a href="http://www.elizabethmenzel.com/w/jordan.htm">jordan outlet</a>
&#x005B;url=http://www.wisemanconst.com/us/jc.html&#x005D;http://www.wisemanconst.com/us/jc.html&#x005B;/url&#x005D;
Comment ?????????? on : Mon April 14, 2014, 21:28:57
???????? Wrtilty (john boiles dot com) ???? ??????????????????????????????|??????? ?????????????
&#x005B;url=http://www.antiqueflyin.com/&#x005D;??????????&#x005B;/url&#x005D;
Comment http://crushhoggottiline.com/make/rus.php on : Sun April 13, 2014, 15:14:34
http://www.elizabethmenzel.com/rates.htm <a href="http://www.wisemanconst.com/en/navyuggbaileybow/">uggs outlet</a> http://boussais.com/jia/lbt.htmgfh<a href="http://www.wisemanconst.com/store/blueuggbaileybow/">uggs outlet</a>
&#x005B;url=http://crushhoggottiline.com/make/rus.php&#x005D;http://crushhoggottiline.com/make/rus.php&#x005B;/url&#x005D;
Comment michael kors outlet on : Sat April 12, 2014, 20:31:49
http://www.thurstonsbarn.com/mk/bags.htm <a href="http://crushhoggottiline.com/02/beats.htm">beats outlet</a> http://hopsnlops.com/mbt-shoes.htma<a href="http://crushhoggottiline.com/jungle/moe.php">christian louboutin shoes</a>
&#x005B;url=http://www.wisemanconst.com/en/&#x005D;michael kors outlet&#x005B;/url&#x005D;
Comment Cheap tiffany on : Fri April 11, 2014, 19:21:36
Wrtilty (john boiles dot com)
&#x005B;url=http://tiffanyrings-cx.tripod.com&#x005D;Cheap tiffany&#x005B;/url&#x005D;
Comment replica christian louboutin on : Fri April 11, 2014, 09:44:37
http://www.boussais.com/dining.htm <a href="http://www.cateringaffairs.net/Gallery.htm">gucci outlet</a> http://www.hopsnlops.com/showresults.htmhj<a href="http://www.boussais.com/thearea.htm">replica christian louboutin</a>
&#x005B;url=http://www.boussais.com/thearea.htm&#x005D;replica christian louboutin&#x005B;/url&#x005D;
Showing comments 1 to 10 of 571 | Next | Last