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!

battery under

29-9-2014
new chassis


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


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/arduino-android-general-purpose-robot

More, more, more!

Can’t wait to see more information on this build - I’ve just upgraded my phone so now have my old Samsung Galaxy Ace which I would like to use in a project like this.

Looking forward to your

Looking forward to your build blog!

More info coming!

Just some time to upload the new version on github:) I have photos and videos of each stage of building, and in three months has changed a lot shape and goal.

You wonderful, wonderful man!

Can’t wait!

code available!

in the attachment there is the source for the app, and on github there is the sketch for arduino!
videos are still uploading on youtube

cheers buddy

Thank you very much - will give it a good look :slight_smile:

This is really cool!

This is really cool!

The building part is pretty

The building part is pretty straighforward:
Get a robot base( wheels and motors, Arduino motor shield, batteries)
Attach Arduino, HC05 or HC06 or RN42 bluetooth module
Copy arduino code from github
Get a cheap android phone or an old phone no more in use with at least android 2.2
Compile source or install apk
Mount the phone so that the camera can see the front of the robot
Enjoy!

I’m currently developing the Android app on the phone, which tracks phone sensors and camera.
All the AI will be on the robot, except for calls to Google or other API provider to get weather, maps and voice face object recognition.
I’m learning OpenCV to understand how it’s shaped the environment and detect interesting or goal features.

Nice project, man. Good job!

Nice project, man. Good job!

Hi

What sort of programs or software knowledge do you need to achieve what you have done here? Thanks…

not so much to have it to work

When i started the robot i knew how to use Java, Netbeans and Eclipse.
Knowing how to make an Android app helped much, but it’s not so hard. Arduino code is a lot of copy paste work, but you should already know as you have made an awesome caterpillar!
To start rolling you should get the android sdk bundle, which contains a fool-proof copy of Eclipse already configured to work with android.
I use also Android Studio, but it’s a lot more messy, for little advantage.
To get fast into android development it’s better to seek directly on Google “android example what you want it to do”, like “android bluetooth chat example”, which it’s the sample i built my app from.
If something seems strange just search for “javaThing api” to get ufficial info from Google.

Thanks Silux…

 

It is good to know. I might give it a try…app making…