From Sketch to Wifi Controlled Robot
by tswaehn in Circuits > Raspberry Pi
1593 Views, 21 Favorites, 0 Comments
From Sketch to Wifi Controlled Robot
This is a short guide on how to build a self balancing robot at a single weekend. We use only parts from stock.
The frame consists of rectangular plastic boards. It possible to use glue for the frame construction however we prefered aluminium brackets. Given the parts below all we needed is a drilling machine with 4mm drilling bit and a soldering iron.
For the position calculation and motion control we use the CoPiino board on top of the Raspberry Pi. The CoPiino is able to gather position data from inertial motion sensors and runs the control loop to stabilize the robot. Live data will be transmitted from the CoPiino through the serial connection to the Raspberry Pi. The onboard web server accessed via WLAN transfers control data to any web browser (tablet, laptop, PC, ... ). Equiped with a camera the Pi also transfers a FPV.
standard parts
- RaspberryPi (RSonline $24)
- Arduino / CoPiino ( arduino.cc $25 / copiino.cc $30)
- Wifi USB EDIMAX (edimax $10)
- 5V high power regulator (ebay $4)
- Motor + Wheels (ebay $6)
- Dual Motor Driver Bridge (ebay $3)
- MPU6050 Gyro + ACC (ebay $3)
additional small parts
- M3 screws, nuts and washers
- M3 x 5mm stay bolts
- diverse cables and pin headers
- cable straps
Programming
Our communication platform is the Raspberry Pi. We equiped the Pi with SD card and WLAN USB stick.
The standard raspbian OS can be configured to run as WLAN access point or WLAN ad-hoc device. A step-by-step guide can be provided.
After successfully booting the Raspberry Pi the control software (download BlueberryC for the RaspberryPi) for CoPiino needs to be installed.
Just follow the instructions on the download page.
The control software will be a web UI source code editor, compiler and programmer for the stacked CoPiino board. All functions are accessible through the web user interface.
The microcontroller on the CoPiino will be programmed like Arduino UNO. Any sketch which runs on Arduino will run CoPiino. The same applies to Arduino Shields, the connectors of CoPiino match the ones on Arduino.
Download and install the Arduino sketch from this page.