Close

Pi Car

A project log for "Solar Pi Platter"

A Li-Ion charger for Solar or USB with PMIC/RTC, 5V boost converter and USB Hub that can run Linux for only $5 more!

dan-julioDan Julio 07/02/2016 at 18:070 Comments

I built this remote control car as a demo of the Pi Platter after I found an old Sparkfun two-wheel base at my makerspace, Solid State Depot. I hacked the base so it would accept 4 control signals (Direction and PWM speed for each motor) and added a simple boost converter (battery -> 8.5VDC) to give the motors enough oomph. The Pi Platter PWM outputs are configured for 48 kHz output to control motor speed and two GPIO pins from the Pi Zero control motor direction. A Sharp IR distance sensor that I also found at SSD and Adafruit analog current monitor to measure battery current are connected to the Pi Platter analog inputs. A USB web cam, WiFi dongle and LED lamp connect to the USB ports. The ability to turn on and off individual ports is used to switch on and off the LED "headlamp".


I'm using mjpg-streamer to get relatively low latency video for display on my laptop. A custom c program provides a socket for the computer to connect for control. It's super simple with small packets (command packets to the Pi and telemetry packets back to the computer when requested). I wrote a xojo program for the Mac to display the video, telemetry and provide control. I also hacked an ancient analog joystick, adding a arduino leonardo to read the pots and create a serial stream for control. It was interesting to pick the a reasonable algorithm to convert X-Y joystick control into 2-wheel control.

Not shown on the picture above is the Adafruit inductive charger strapped onto the bottom of the car for charging (it's output connects to the Pi Platter USB input).

Here it is in action.


Eventually I'd like add an IMU so the car can understand where it is (and to make motor control much easier) and integrate opencv so it can read some signs telling it where to go. Probably will be better, also, to put this on a new base.

I'm happy to share the code or whatever to anyone who is interested. Eventually I'll document this here or on my website.

Discussions