Skip to main content
robot

How to build a subjective camera robot car with Raspberry Pi & Arduino

Introduction:

The idea behind this project is howt build a web-based (mobile devices enabled) wireless remote controlled robot with subjective camera from scratch with Raspberry Pi & Arduino. We will use Raspberry Pi for camera, WiFi and user interface and Arduino to control servos, sensors and motors. The comunication between Raspberry Pi and Arduino will be done via GPIO serial TX/RX (/dev/ttyAMA0).

Car robot with PiCam. Prespective.
Car robot with PiCam. Prespective.

What do we need to build the robot?

Components list:

Schematics:

 

cameraRobot Schematics
cameraRobot Schematics

Component details:

Here you can take a look at component details:

 

Tilt & Pan with Servos detail
Tilt & Pan with Servos detail

 

Raspberry Pi / Arduino and Level Converter
Raspberry Pi / Arduino and Level Converter
Sensor and Servos connections
Sensor and Servos connections
Battery and USB Output Converter Module
Battery and USB Output Converter Module
Motors and voltage regulator
Motors and voltage regulator
Transversal detail overview
Transversal detail overview

Software:

Software is divided in two sections, Raspberry Pi Software and Arduino Software.

For Raspberry Pi we must thanks to dawnrobotics SD Image for their Pi Camera robot , we made a small modifications at the robot_web_server.py file to allow serial comunication with Arduino Nano instead of the dawnrobotics driver.

As we are using slightly modified version of downrobots image, as they say:

The Raspberry Pi is configured to act as a WiFi access point, so connect to the new wireless network that should appear called ‘CameraRobot’. The password for the network is ‘Raspberry’.

Note: Very occasionally the WiFi dongle on the Pi won’t get an IP address (known bug) and so you won’t be able to connect to the network (your device will spend ages authenticating and getting an ip address). This problem is usually resolved by turning the robot off and on again.

The robot is controlled with a web interface which means it should hopefully be accessible from the widest range of devices possible. The web interface does use HTML5 however, so you’ll need to use an up to date browser. We found that Chrome works well on all the platforms we’ve tested it on.

To control the robot type the IP address 192.168.42.1 into the address bar.

 

For the Arduino Nano section, we must thanks to @JordiBinefa and @electronicscat for their e-cat library.

Video:

4 thoughts to “How to build a subjective camera robot car with Raspberry Pi & Arduino”

  1. I want to use the Arduino uno instead of the nano and I also don’t want to use the ultrasonic sensor. Will it be possible and do I control the drone via computer.

    P.s Please excuse my very small electronic knowledge

  2. Ferran, this is genius, I will have to try make this myself. I will have to order the sensors though I can’t find them locally. Thanks for the code, this will save me alot of time!

Leave a Reply

%d bloggers like this: