Playstation Controller Interface
So I had this rover I built and I wanted a better way to control it. Up until now I had been using a program written in C#(Mono) on my computer and a usb->serial adapter with a hacked together level converter. Quite a mess. Some research showed that it was easy to interface with Playstation controllers becsause its basically SPI. If you want to pretend to be a PS controller there are some strange things you have to deal with, but if you want to talk to one its much simpler.
Most of the work had already been done (here and here), but I needed an implementation for the ATMega88 (the micro I happened to have laying around in a DIP package). Considering that the code is pretty much portable to the 168 I had no reason not to give it a try while waiting on my Digikey order to come in.
Everything went well, the interface is simple. Only real speed bumps were missing the pullup on MISO and trying 500KHz (works great at 125KHz). Easily fixed problems. After having it working on my bench I crammed all the electronics into the PS controller (had to removed the rumble motors). Slapped a battery pack and a transmitter socket on the back and it works great. (I use the LINX TXM/RXM-916-ES chips and have them on surfboards, the sockets allow me to have multiple projects share radio gear to save $$)
Currently the rover uses tank controls (one joystick for each tread) and a trigger for the headlights. I hope to write some code for "arcade mode" contol so that I can use one joystick for moving the rover and the other for moving my wireless camera on a gimbal (already assembled, but not integrated yet). I even have enough buttons for other fun things like perhaps a coil gun. Every tank needs a weapon :)
Photos available here
Blurry video of it in action. One of these days I'll buy a linux friendly camera that takes good video.
Schematics: