Stream live video from an RC Car using a raspberry pi 3 b+ on wifi using a USB webcam!
This is an ongoing project and this being revision 1 - it does not support controlling the car at all. The original remote is still used to drive the car. Replacing the controls is phase 2!
I am using a Logitech C920 USB webcam to stream live video to a web browser.
A Lutema Baja HYP-R RC Car (for about $65 from amazon) was used as the base chassis
The only real challenge here is powering the raspberry pi from the RC Car battery. This car uses a 7.4 volt 1800mah battery. To bring that voltage down to 5 volts for the pi we use a LM2596 based step-down voltage regulator.
Using a multi meter, adjust the output to 5 volts. I set it to just over 5v to account for any voltage dips. This is probably not correct.
I was able to use the 3 pin JST XH connector on the battery (normally used for charging) to easily connect to the voltage converter. Then I send 5v into the raspberry pi GPIO header.
With some zip ties later and you can assemble the car shown up above. Yes that is also a twist tie holding the voltage converter onto the frame....
To view the webcam in realtime in a web browser I used mjpegstreamer from https://github.com/jacksonliam/mjpg-streamer.
After you git clone, make, make install mjpegstreamer - launch it with this command to start streaming video:
mjpg_streamer -i 'input_uvc.so -d /dev/video0 -r 1280x720 -f 15 -n' -o 'output_http.so -w /usr/local/www -p 8080'
This yields a realtime video stream that works on any web browser, desktop or mobile, with about 200ms of delay.
This is extremely driveable however the RC car is extremely fast in its defaul configuration (up to 30 mph) so it's not very practical to drive indoors. Once I replace the controls I will be able to dial down the max throttle or make it configurable to make this much easier to drive everywhere.