24C3

I had the fortune this year of being able to attend 24C3, the 24th annual Chaos Computer Congress. The conference was a lot of fun–probably the first time in a long time (at least since chumby started) that I got to sit down and just hack for a couple of days on fun projects…in between going to really interesting and stimulating talks, and enjoying Berlin’s nightclub scene. C-base was quite fun (DJ Vela played a great set), and there’s no closing time in Berlin: one club we visited had a line-up that went to 10 AM (I gave out around 6 AM…).

I had the privilege of sitting at a table in the Hackcenter with a group of console hackers that were scary smart and doing very cool things that shall remain unnamed, at least until they are ready to disclose their fascinating findings. It’s quite humbling and inspiring to watch them work. I also got a chance to chat with some silicon hackers that presented a great talk about reversing CRYPTO-1. It’s always a pleasure to be exposed to so many brilliant minds and osmotically absorb knowledge and techniques by just being around them–but that’s one of the reasons you go to a conference, after all.

The table I was sitting at had a half dozen Xbox360’s brought in by tmbinc and ole, set up as a Linux cluster. People had a lot of fun hacking the boxes.

While a lot of American hackers drink Red Bull, it seems the drink of choice by German hackers is “Clubmate”, pronounced “cloob mah-tay”. It’s an herbal energy drink that’s a bit of an acquired taste, but it definitely “works”.

I decided to play with phidgets while I was at 24c3; a few months ago a chumby user mentioned it in the forum and I bought an 8/8/8 interface board (8 analog, 8 digital in, 8 digital out) and a few of the 3052 solid state relay boards (there’s also a 3051 relay board for those who want to control lights and appliances). Of course, “spare time” never happened, but the Hackcenter in 24c3 was the perfect place to steal away for a couple days and play with one of my favorite pastimes, namely robotics.

Cross-compiling the basic Linux phidgets driver was fairly straightforward; I just had to modify the makefile to explicitly use arm-linux-gcc instead of the default host compiler. I then copied the libphidget21.so onto the chumby root file system–not quite as easy, as it’s a cramfs read only filesystem. Since I didn’t have my full chumby development environment on hand, I grabbed one of the chumby OTA update distribution filesystems, mounted it as a loopback volume, tar copied the contents out, added the library files, and then regenerated the cramfs filesystem. It’s a lot of work if you’re not comfortable with Linux; an easier way to handle this is to just statically link your binaries against libphidget21.a.

Compiling the phidget example file was a bit more difficult. The standard header set for the phidget examples were missing some files that I needed, which took me a while to figure out. Instead of onion-peeling to try and figure out exactly which header files were missing, I just pasted in a whole pile of them and finally it worked.

The other key thing you need to do on the chumby is to mount the usbfs filesystem–this would have taken me forever to figure out if tmbinc hadn’t chimed in–using the command “mount -t usbfs null /proc/bus/usb/” did the trick.

After doing all this, I was able to run the ifkit.c example file (contained inside the phidgets driver tree) and observe the 8/8/8 sensor board returning interesting results.

The next step was to get the phidget to actually do something. So, I went across the street to the MediaMarkt shopping mall and bought a random RC toy car while grabbing a bite to eat. Ole and I pondered for a while about the best way to connect the phidget to the RC car. The steering mechanism for the car didn’t use a servo motor as I had suspected, it actually used an underdriven DC motor that relies on its stall current to force the wheels left or right. My guess is that the motor controller board in the car did a PWM or had a current limit built into it to prevent the motor from burning out. Driving this full tilt with a simple solid state relay was almost sure to cause trouble, so we decided to take the remote controller circuit board out of its case and wire the solid state relays across the slide-switch terminals that the RC controller used to control front/back and left/right directions. So the control path was like this: chumby application -> phidget driver -> USB -> phidget board -> solid state relay -> RC controller switches -> modulated to 27 MHz -> transmitted over a distance of 1″ -> demodulated -> motor driver -> motors. It’s a bit like IM’ing someone in the same room with you, but hey, people do it sometimes. We mounted the phidget controller board and the RC controller inside the housing of the RC car, so you couldn’t see the hack–all you saw was a USB cable coming out of the car body, and then this was plugged into the chumby, which was taped to the car’s hood.

That’s what the initial assembly looked like at this point; we used an Energizer ER-PHOTO battery pack (mentioned in the previous blog post) to power the extra electronics. Plenty of duct tape was used, which is charmingly referred to by Germans who don’t know the English term for it as “that silvery tape that MacGyver uses”.

Of course, driving around an RC car via a chumby with a serial debug cable connected to it is really lame. Fortunately, I had a second chumby (actually, it was tmbinc’s chumby), so I wrote a quick server/client protocol that establishes a UDP connection between the two chumbys over the WiFi link that allowed me to stream basic commands to the car (basic meaning, a single 32-bit unsigned int containing a bit vector of commands). Ole then suggested that it would be really cool to use the accelerometer in the chumby to control the driving of the RC car by tilting the chumby, so I hacked up the server to transmit the pitch and roll of the chumby in degrees to the client. I also used the the bend switch as a “zeroing” function, so that if you squeeze the chumby, the car immediately stops and the relative “zero tilt” position is recalibrated.

[flashvideo filename=images/remote_control1.flv /]

Above is a video (with sound) of the wifi chumby-car driving around. The room at the Hackcenter is of course kept very dark, so all you can really see is the chumby’s LCD screen going by, and you can see me tilting the other chumby around to control the direction of the car–and you can hear the motors of the RC car doing their thing. Here’s a link to the source code used by the system.

Of course, this wasn’t good enough. You could only drive the car around within visual range, but WiFi can go much further than that. If we could only find a way to see what the car was seeing…

It just so happened that tmbinc and ole brought along a complete DVB-T encoder/transmitter/receiver setup–for what reason, I’m not sure, but hey, that’s the joy of being around hardware hackers, they just have the coolest stuff on hand (Ole had a rad ERSA gas-powered soldering iron, for example). So, we soldered on a power tap to the chumby (fortunately, the DVB-T encoder could also eat the 12V supplied by the ER-PHOTO pack), and taped the DVB-T encoder onto the roof of the RC car, after wrapping it up in some protective foam. We also taped my Sony Cybershot DSC T-10 camera onto the car, which fortunately had a PAL video output that we could feed right into the assembly. We then borrowed a pair of DVB-T antennae from another hacker who “just happened” to have some of these on hand. Finally, we strapped on this super-bright battery powered flashlight that Ole had, and we were ready to rock.

The above picture was ripped from tmbinc’s blog. Click on the photo for a larger version.

Above is the car’s eye view of the world. The video was being compressed on the fly into MPEG-2 and transmitted over the air, so it was a bit laggy–about a one second delay, so driving the car took some skill to anticipate where you needed to turn before it happened.

As a final touch, we configured the chumby on the RC car to play Shoutcast streaming radio (hey, it’s still a full-featured chumby, showing widgets and playing music like it was designed to), so that as the car drove around it played some bright techno music to announce its presence.

[flashvideo filename=images/remote_techno.flv /]

Above is a video taken from the car’s-eye view, with the toe-tapping techno sound track streaming over Shoutcast to the chumby and being decoded while the chumby also handled the car driving task.

The final control paths for the system thus looked like this:

sensors -> chumby server app -> UDP packet -> 802.11 wifi transmitted over 10’s of meters -> client client app -> phidget driver -> USB -> phidget board -> solid state relay -> RC controller switches -> modulated to 27 MHz -> transmitted over a distance of 1″ -> demodulated -> motor driver -> motors

Sony DSC-T10 camera -> PAL -> DVB-T encoder -> MPEG-2 format -> DVB-T wireless transmission over 10’s of meters -> DVB-T receiver

Plus, of course, the normal widget stream coming from the chumby servers in the US via the Wifi interface as well. After all, what Wifi controlled toy car isn’t complete without streaming internet radio, Flash movies of Chuck Norris facts and “interesting” Flickr streams playing on it.

It’s a bit of a Rube Goldberg machine, but that’s the joy of abstraction (and abusing abstractions).

And that’s what I did over my Christmas holiday :-)

18 Responses to “24C3”

  1. esther says:

    ‘quite fun’ is pretty understated – i think c-base was pure awesomeness ;)

    and congrats to your chumby-bot (guess the club mate played a major role in its development)!

  2. grey says:

    Hah, nice amalgam project!

    And welcome to the world of Club Mate; sadly once I acquired the taste for it last year finding a reasonable facsimile in the states has proved to be challenging. The best I’ve found is the Canadian Sol Mate ( http://www.drinksolmate.com/ ) which is almost identical but organic, and without a neat Guy Fawkes looking mascot. I’ve had a helluva time finding it with any kind of regularity. Glad you had a good time though, I was @ 23c3 and loved it hopefully I can make it back on alternating years.

  3. […] I was reading about Bunnie’s lastest robotic contraption that was built using a chumby, phidgets, RC vehicle, cam, DVB-T Modulator, and more! Thought I’d share. […]

  4. ole says:

    I’m still smiling thinking back on constructing chumby-bot :)
    Especially the “interesting” flicr stream, and the one time bunnie standing with the rc-car in his hands with all these wires and ducttape on it asking: “do you think there might be a problem getting this on the plane?”

    ole.

  5. RoboChumby says:

    […] Plus, of course, the normal widget stream coming from the chumby servers in the US via the Wifi interface as well. After all, what Wifi controlled toy car isn’t complete without streaming internet radio, Flash movies of Chuck Norris facts and “interesting” Flickr streams playing on it. RoboChumby – Link. […]

  6. Phil says:

    It looks like the MALP from SG1…kinda…use your imagination OK

  7. […] Que tal plugar um Chumby num carro de rádio-controle? Ficou bem… gambiarrentamente bonito, aliás. […]

  8. Myself says:

    That is hilarious! It reminds me of some of the absurdities entered in the Anything but Ethernet contest each spring, one of which went like this (if memory serves):

    User pushes key –> soundboard app plays one of 26 different pokemon sounds out the speaker –> audio –> speech recognition app on another machine identifies the sound, runs corresponding batch file –> batch file echoes a character out the serial port –> rs232 –> microcontroller uses a lookup table to find values corresponding to the character, and outputs two PWM values –> PWM on copper –> R/C airplane transmitter –> RF to the other side of the table –> R/C receiver outputs PWM to servos –> servos move arms of little cardboard “semaphore man” with colored flags on his hands –> let’s call this “spatially modulated light” –> camera receives the image –> firewire –> java image recognition software on another laptop looks for color blocks in the right places on screen, decodes to a letter –> java sends the resulting letter over infrared –> lego mindstorms RCX controller gets the letter, looks up the bitmask, and –> drives x/y motors, and a glow-plug from the R/C plane engine, to heat spots in thermal paper and “print” the letter

    All told, it took about 45 seconds per character, and had an error rate around 30% (all in the audio step), but that was good enough to win. That was the 2004 competition, I believe.

    The 2007 winning entry involved a T1 circuit running over a few feet of barbed wire, and other silliness, but not to this level. I’m really hoping the guy with the model trains gets his thing working for this year’s contest…

    You know my favorite thing in the whole writeup above? The Q-tips in the photo. If you asked a dozen people to name things they might see in pictures of a hacker event, batteries and energy drinks and plush penguins and soldering irons would probably get mentioned, but I don’t know if Q-tips would. It’s especially amusing to me because my current box of them was bought while traveling, as I’d failed to pack any in my luggage.

  9. […] Related: The XO in Darfur XO vs. Macbook Air Using the Chumby to build a robot car Published in: Creative Resistance, Worcester | on January 28th, 2008 | Permanent Link to “Worcester Gadget Fiesta” […]

  10. Vin says:

    Need help with a wifi controlled robot. Want to know how to convert the signal coming from the wifi module I’m planning to buy (EZL-80c by Sollae Systems). How do I controll servo motors using this module from a computer.

    thx.

  11. Ben Nguyen says:

    This might be of interest to the readers of this!
    http://www.ottawarobotics.org/robomagellan.shtml

  12. […] Ja, man kann den Chumby auch durchaus in ein mobiles Gerät verwandeln, wie man auf diesem Bild bei engadget.com sehen kann. Wer es nachmachen will, findet hier die genaue Anleitung. […]

  13. David Bovill says:

    Hi – I’m looking to create a DVT-B TV Station on an estate in London – want to broadcast over the communal aerial – or over the air. been searching for DVT-B encoders and getting nowhere – any suggestions who to contact where to look?

    Looking later to give a loving and permanent home to moveable and static broadcast hacks in the gardens around the block – so if you ever get around to wanting a retirement home / studd farm for RoboChumby….

  14. […] popular public links >> 24c3 cstoneweb raquo 24c3 Saved by basman69 on Wed 22-10-2008 Thoughts about some 24C3 sessions Saved by hchsia on Tue 21-10-2008 24C3 Saved by mjdegooijer on Tue 21-10-2008 DAVIX – A Look Behind the Scene Saved by tvmaly on Sun 19-10-2008 Ruby on Rails开发应注意的安全问题 Saved by p3r24 on Thu 16-10-2008 Video of the Tor-presentation at 24c3 is now available Saved by XshamanXkingXfanzzzX on Wed 15-10-2008 Comment on HITBSecConf2008-Dubai “Penetration Testing SCADA”… Saved by roboperson on Mon 13-10-2008 Wetware Hacking Saved by adampieniazek on Mon 06-10-2008 ubicomp-rg #3 all about location error estimation and 24c3 … Saved by ixluvxashley on Sat 20-9-2008 24C3 and Media Saved by deliciogik on Thu 18-9-2008 VicaCopter will hover above your home and eat your pets Saved by iaintait on Wed 17-9-2008 Gesehen: Programming DNA vom 24C3 Saved by nurasto on Sat 13-9-2008 tmbinc – Wii hacked it! Saved by jeroencoumans on Sun 07-9-2008 FOSS Bridge Presentation at the 24c3 – Video and Slideshow Saved by liberryin on Sat 06-9-2008 [sehr frühe Version, Alpha?]Wii ISO Loader Saved by ericpan on Sat 06-9-2008 free anti virus download Hacker conference videos Filed under … Saved by obeone on Sat 23-8-2008 24C3 howto: fake fingerprints… Saved by omegerard on Fri 22-8-2008 […]

  15. Games Car says:

    What Kinda of Car do you drive?