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).
What do we need to build the robot?
- 1 Robot Chasis, you can use any 2 or 4 wheels robot, for this example I’m using this from dfrobot: http://www.dfrobot.com/index.php?route=product/product&path=37_69&product_id=97
- 1 Raspberry Pi (I’m using A+ model)
- 1 PiCam with a case
- Pan & Tilt kit like this: http://tienda.bricogeek.com/accesorios-robotica/522-kit-pan-tilt.html
- 1 Mini Servo for Pan & tilt
- 1 Servo
- 1 WiFi Dongle
- 1 Ultrasonic Sensor like http://www.micropik.com/PDF/HCSR04.pdf
- 1 Arduino Nano
- 1 Battery Pack and Battery Holder (minimum of 5V and 3000mA)
- 1 Motor Driver Controller Module (like http://www.banggood.com/2Pcs-L9110S-H-Bridge-Stepper-Motor-Dual-DC-Driver-Controller-Module-p-944585.html)
- 1 Nano e-cat (http://electronics.cat/php/common/index.php?lang=es&page=101)
- 1 H Module Adapter (http://electronics.cat/php/common/index.php?lang=en&page=520)
- 1 Multifunctional board (http://binefa.cat/blog/wp-content/uploads/2014/12/0523_01.jpg)
- 1 Adjustable voltage regulator (http://www.banggood.com/XL6009-Step-Up-Boost-Voltage-Power-Supply-Module-Converter-Regulator-p-916222.html)
- 1 USB Output Converter Module (http://www.banggood.com/DC-7V-24V-To-DC-5V-3A-USB-Output-Converter-Step-Down-Module-KIS3R33S-p-912110.html)
- 1 Logic Level Converter Module (https://www.adafruit.com/products/757)
- 4 1uF Capacitors for motors
- Jumpers, wires, soldering iron, etc…
Here you can take a look at component details:
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.