Tweeting Race Car

Revision as of 18:13, 29 October 2010 by Brentp (talk | contribs) (done for now)

The tweeting Race Car

LabRat1, the turbo crap-can Miata tweets autonomously while on the race track!

Follow http://twitter.com/ASL_LabRat1 here to watch our live feed on October 30th 2010 at the ChumpCar World Series at Portland International Raceway

Watch this page too for updated pictures from the event

LabRat! nose small.jpg

What it Does

LabRat1 tweets Info, statistics and commentary as it turns laps around a race course! It's specialty is handling endurance racing where many laps are turned and several driver changes occur!

What it tweets

  • Race driver change notification (via text message commands). Talks about the finished driver's stint and announces the new driver
  • Report Last lap time and lap counts by driver (Using GPS coordinates and start/finish line detection logic)
  • Report Top speed for driver and team (via GPS velocity)
  • Report peak Cornering, Acceleration, braking GForce by driver and by team (via Accelerometer)

Fun stuff

We'd thought it would be neat to make the race car a bit interactive. Here's what we've done for this race:

  • Via a twitter @mention or via direct text message it can change the color on an RGB rope light. The Rope light decorates the top of LabRat1 for night-time racing fun! This is made possible via RaceCapture programmable PWM outputs. Why?? Because its fun!!

To change the color while LabRat1 is racing, tweet at the car (or send DM) using the following format

@ASL_LabRat1 color <theColor> Where <theColor> is either red , green, blue, white, off or a RGB hex code like 7f007f

(Note, we're using twext to forward mentions to RaceCapture- this service seems a bit laggy. If we're following you, a direct message seems to work much faster!

Ingredients

RaceCapture Bench Demo

RaceCapture Bench Demonstration Left to right: RaceCapture, Accelerometer Module, Cellular Modem, GPS Module; Top; RGB rope Light and Mosfet board

Here's how we designed it

Building a tweeting race car is both easy and surprisingly tricky:

GPS line parsing, Cell Modem communications, Not flooding twitter with 100's of messages due to buggy code, Fighting with the Atmel Sam7s PWM channel configuration (still scratching my head on that), and dealing with FreeRTOS stack overflows are just a few of the challenges. :) Oh, and a less-than-efficient firmware uploading mechanism (Atmel SAM-BA). But we digress.

Here's what we used:

RaceCapture

RaceCapture is our in-beta-testing Data Acquisition and control system. It has 32 channels of inputs and outputs driven by a 32 bit ARM processor. Learn More

Narobo DroneCell

For cellular network connectivity, we chose this neat module from Narobo Narobo. It connects to RaceCapture via one of two available serial ports

GPS

For GPS we're using a 32 channel 5Hz GPS smart module made by SanJose Navigation. More Info

RGB LED rope Light

From LED Light we purchased a length of RGB LED light, bodged together a Mosfet amplifer board from Radio Shack (bleah!) and connected it to 3 PWM channels on Race Capture.

Accelerometer + Gyro Module

We're using a custom built RaceCapture#4_axis_Accelerometer_.2F_Gyro_module 3 axis accelerometer + Gyro connected to Race Capture via the SPI expansion port.

Firmware

  • FreeRTOS Lightweight, Real time Operating System
  • Lua Scripting Runtime
  • 1000s of lines of Last minute, late night hacking code! (Thank you to my friend Vadim, for the critical help!) Software development consumed about one frenetic week.

Future

In store for next event is:

  • LED message board where you can tweet messages to other cars and/or spectators
  • Engine sensor reporting (temp, pressures, etc)
  • Bigger personality and more interactivity