Arduino-Android General Purpose Robot
The robot will think using a cheap smartphone(<80€) and use gps, accellerometer and compass data from the phone to command arduino through bluetooth or host usb cable.
Current features:
- Can be drived using text messages over bluetooth
- supports differential steering with old chassis and car like steering with current frame
- Commands are given like 'a9' to go up at full speed and 'a0' to go up as slow as possible
- Servo steering and differential drive allows for steeper turns
- accepts commands like 'l9' to do a 60" turn to left and 'r0' to turn right 5"
- commands are not sequential by default, allow real time corrections, 10ms latency
- android app features buttons and command by tilting the smartphone
- Can be driven by an i'mSpa Smartwatch using text or inclination
The chassis is salvaged from a 2wheel differential drive robot and a old wire-controlled toy car. It can be controlled by any Android smartphone using a custom bluetooth chat app and can send back data to Android about the ultrasonic sensor, temperature and light.
The original goal was to have a smartphone make use OpenCV to detect features on the environment and plan next action. The robot it's commanded by tilting and android phone. This project is intended for research purpose, to lower costs of future robots and how to make a smarter robot. The ultimate goal is to make a general purpose robot which can be autonomous and report to the user.
Arduino source code
https://github.com/ValerioCietto/Arduino-Repo/blob/master/Robot.ino
In the attachment there is the Android app
- weight 870g
- max load 1.5kg
- max speed 15km/h
- battery 20A 7.6V NiMh
Instead of rigid phases in the development i'm using goals as milestones, because there is not a well defined way to go, and i often find fun spin off results.
13-3-2014
bought Arduino clone kit from Amazon (25€)
14-4-2014 --- 6-5-2014
Learnt how to use servos, photoresistors, terrain humidity sensor using nails, stepper motors, led and power up motors
Start 12-5-2014
Salvaged wheels, motors and plastic case from an old wire-controlled car
15-5-2014
Bought Arduino motor shield original and Bluetooth shield unassembled
First try with simple program on Arduino (go forward 3 sec, go backward 1 sec)
17-5-2014
Assembled Bluetooth shied and learnt how to solder thanks to a friend
Bluetooth powers on but doesn't work
Demo video made by sticking a smartphone to robot and moving it around by hand
23-5-2014
Test with HC-SR04. Tutorials don't get exact results,
Horrible readings by powering HC-SR04 with 3.3 instead of 5v
Bluetooth is still a mistery
25-5-2014
Temperature D18B20 sensor heats too much
Bluetooth connects with phone but doesn't talk with arduino
improved reading from HC-SR04 from 2m to 4m, accuracy from 2cm to 0.5cm
ordered a 2wheel chassis for the robot
28-5-2014
robot stop going forward if HC-SR04 read less than 5cm
Extensive reading of wikipedia about Bluetooth
26-6-2014
finally arrived the 2wheel chassis(2 weeks late and no tracking)
understood schematics of bluetooth shield
Bluetooth works!
12-7-2014
Bluetooth chat app with sequential commands to arduino
31-8-2014
Added support for HC-SR04 (still need to be calibrated with a real ruler)
code here https://github.com/ValerioCietto/Arduino-Repo/blob/master/Robot.ino
2-9-2014
Learnt how to use HC05 bluetooth module.
quick comparative table with previous bluetooth module
HC05 | RN42 |
4-10€ | 24-36€ |
need 4 cables | arduino shield+2 jumpers |
popular and available | retired from original shop |
9m range | 12m range |
slave or master | slave or master |
Same functionality, but way cheaper and smaller size!
Bluetooth will be used only for a quick connection with the Android phone, which will do the heavy networking job over wifi or 3G.
4-9-2014
fork bluetoothChat.apk into bluetoothCommander, and removed accellerometer control(but still listening). First original try of openCV at detecting floor and merge with GPScontroller to get a precise location with GPS or a loose location with wifi/3G.
5-9-2014
Published Bluetooth commander on Github https://github.com/ValerioCietto/Robotics
It should get GPS data periodically but still doesn't work well.
8-9-2014
i'm going to redesign the lower part of the robot, moving the two battery packs under the main hull to save space and to make it more compact. Making it smaller allows me to bring it in my backpack and thinker with it when i'm done programming.
14-9-2014
re engineered chassis! Now battery stay under the lower board. Servo steering is now fixed with DAS(a kind of sculpting clay) which is really heavy, but it's easy and cheap. DAS will be hard within 2 or 3 days.
Meanwhile i got more expert on OpenCV, getting a working Blob detection using a 5px blur added to the example. Smurf land was a funny experiment i got by switching red and blue:)
I will eventually need custom plastic parts for the robot, so i will try to make a 3d printer by october.
code of the brain android app is here!
29-9-2014
Now it mounts HC-05 instead of RN42 as bluetooth chip!
I tried steering with a servo, but the servo heats up or moves too fast breaking the steering mechanism.
The reduced height allows me to bring it in the backpack without damages, but i have to disconect jumpers on the motor shield.
The batteries under the chassis are useful as it's more stable and easy to switch (4+4NiMh @2500mAh).
With the extended body it weights 950g and has a max payload of 1800g, but i plan to build another chassis for outdoor.
Robot completed as it achieved useful status
After some test on the field i decided to set this as complete, as i can't improve it without completely redesign the body of the robot, which i plan to left as it is.
Right now even if it doesn't get to be autonomous i can be controlled by any smartphone, and has enough space on to carry a small payload and can be easily controlled just by tilting any Android phone.
It somewhat achieved a symbol status as i bring it often in the university lab and use it to push trash bins, pass notes, have fun and ask for coffee(with a note and some money it in).
Seeing this small bot many other students wanted to learn how to use Android and arduino and many are offering help to make a bigger, stronger one :D
App controlled using arduino uno, android