Let's Make Robots!

Arduino-Android General Purpose Robot

App controlled using arduino uno, android
BluetoothChat1.tar.gz79.37 KB

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 smartphone can use OpenCV to detect features on the environment and plan next action. The robot will accept commands trough 3G or Wifi, using a web based interface. 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
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.

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
Bought Arduino motor shield original and Bluetooth shield unassembled
First try with simple program on Arduino (go forward 3 sec, go backward 1 sec)
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
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
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
robot stop going forward if HC-SR04 read less than 5cm
Extensive reading of wikipedia about Bluetooth
finally arrived the 2wheel chassis(2 weeks late and no tracking)
understood schematics of bluetooth shield
Bluetooth works!
Bluetooth chat app with sequential commands to arduino
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
Learnt how to use HC05 bluetooth module.
quick comparative table with previous bluetooth module

need 4 cablesarduino shield+2 jumpers
popular and availableretired from original shop
9m range12m 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.

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.
Published Bluetooth commander on Github https://github.com/ValerioCietto/Robotics
It should get GPS data periodically but still doesn't work well.
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.
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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Nice project, man. Good job!

This is really cool!

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.

Can't wait!

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

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

(Get it? Phone-y?)  Anyway, bad wordplay aside, I'm interested in hearing more about how text messages control it.  Any code snippets on the recieving end you could post?  How about video?

SMS are by far the easiest to listen to, are saved into memory and work with little band, but aren't cheap for me;unlimited sms cost 15€ vs 10€ for 3Gb of web traffic. I understood how Telegram works since it has an open source client. However i have trouble at compiling it due to bugs in Android Studio, and poor documentation.

Telegram is a great instant messaging app, but relies on a closed source server network, so it may disrupt the service and i have to build another app.

So while i search a more reliable system, i try to make the system as autonomous as possible so that it's worth to send a sms to start it up and the maybe use a web session.


Looking forward to your build blog!

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

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.