Let's Make Robots!

Rover (working name)

Fetch a beacon, Follow Me (beacon), and obstacle avoidance

Work in progress. I don't know if this will be 2 robots or one yet. My wife got me an OWI Robotic Arm kit and a DFRobot 4wd Chassis for christmas. I picked up some L293D motor driver shields, ultrasonic senors, IR recievers and a couple micro servos. Last night I got the arm set up to run off the motor board and set up a serial communication controller in java. I still need to put feedback pots on the arm joints to tell rotation vs pulsing the motors for 500ms per click, but for now its a fun little 6v robot arm that can run off a 4 AA battery pack and be controlled by via the computer.

UPDATE: 1/7/2014
Got the motorshield up and running on the chassis and got a decent motor test now.  The DFRobot platform performs terrible on high carpet at <6V  so it can't do skid steering very well.  I compensated by driving one side at full speed and the other at half speed to make it rotate.  You may be able to tell that this still stalls at least one motor pretty regulary on my thick carpet.  But it will work for my purposes.  The 4wd WILL drive over EVERYTHING with sufficient power.  It runs over feet and shoes etc very well and can even flip itself over very easily by running into an obstacle (no sensors yet).  Next step will be to add sensors to the base and then we'll see if i'm making one robot with an arm mounted or just a rover and second project for robotic arm.

 UPDATE 1/14/2014
I was waiting this week for my bluetooth module from adafruit.  Spent some time coding an android controller while i wated... here's a screenshot of how it will work... i can drag around the screen and it will update the direction/motor speeds.  now that i have my bluetooth module i'll be writing the serial communication code from the app.  
Rover App V1

UPDATE 1/15/2014
wired up a right angle 6pin out on a proto-shield and hooked up my bluetooth serial module (adafruit bluefruit ez-link).  Updated a motor test to allow serial control.  I configured Bluetooth Serial Controller for Android to have buttons for forward, reverse, left, right and a stop button.  Its very satisfying to drive around with bluetooth from my phone.  I did a quick test run outside on gravel, grass and concrete to see how it drove and it works amazing outside... the carpet in my living room is a bit much for turning, but outside it works great.  Will post video soon.  
I'm also considering outfitting it with a low-power laser diode i have on my work bench to mess with my new kitten tomorrow. I stress low-power because a high powered cutting laser on a robot would be crazy... or would it? (meniacal laughter).

UPDATE 1/17/2014
Uploaded 2 new videos to show the bluetooth control (still don't have the app done so just using Blutooth Serial Controller for now).  I DID end up putting the laser on it.  the cat goes crazy about it... As it turns out i really like the laser because it makes driving easier since you can see where the robot is pointing.
I also got a quick test of the Ultrasound working too.


UPDATE 1/22/2014
Nothing exciting to show for the past week.  But i did want to share my sensor rig.  This is the first time i've seen how nice having multiple breadboards is.  I can set up test circuits on them and leave them up (like the  LCD screen).  I also played with I2C and set up a port extender reading and writing to/from the arduino.  I2C Is AWESOME!  I expect to use it a lot in the future.

The photo below shows all the different types of sensors I plan on putting on the final robot.

  • 1 x Ultrasonic Distance Sensor servo mounted in the front  for obstacle avoidance/diretion determination in autonomous mode.
  • 4 x IR Digital Distance Sensors in front of each wheel/corners for small obstacle avoidance/keep from running into chair legs.
  • 4 x 38 Khz IR sensors on each side for directional IR beacon detection.


Sensor rig

The goal is to have this thing drive to a beacon (ball), pick it up with a magnet then drive to another beacon (ME) activated after the robot fetches the ball.

 I was struggling with the directional IR homing beacon sensors until i found the project page for blimpduino.  The blimpduino project uses 4 x 56khz sensors and an atmega 328 for directional beacon location.   They provide full source code and i did some tests with it.  The project references the pololu product that does the same thing, but i didn't want to spend the extra money for one of those boards.   I've been testing it with a remote control but it doesn't have very good accuracy right now.  I'll probably need to add a dedicated atmega 328 communicating on I2C.  If anyone has any thoughts on IR Homing Beacon Recievers i'd appreciate the advice.

One other note for this update: I found out this week that my 3 Year Old son can drive a bluetooth controlled robot surprisingly well! 

UPDATE 1/23/2014
I threw together this little sensor mount (head) over lunch.  I made this from a little project box i had laying around like i saw on TOBI  I have holes for the US to fit through and a hole to screw the servo horn into the servo as well as another mounting hole for the laser.  This is a prototyping head only, i plan on making a nice 
 vacuum formed enclosure.

Rover Prototype Head

 UPDATE 1/26/2014

got some code written for the head to do a proper test of the ultrasonic sensor and servo (see video).  next i need to add some leads to my protoshield to connect the head to the same board as my motor driver so i can actually use the sensor and servo while driving :).  In hind sight a different motor driver that wasn't a shield would have been much easier to work with or at least one with passthrough leads instead.  oh well live and learn...


UPDATE 1/30/2014

wrote a java application to interpret the sensor data and display it as a sonar like screen.  watch the video The laser (originally for playing with cats) is callibrated (roughly) to be at the edge of where the US measures on the java interface.  so if something is touched by the laser it should show up on the screen.

Comment viewing options

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

I have two, they are currently available from Maplin in the UK at a reduced price of GBP 29.99 complete with usb interface and Windows software.

I have the same 4WD and I'm looking for a solution to either remove rear motors with simple axis or implement some differential with a second motor driver to have real control on the 4 motors.

by the way, I'm looking for a cheap arm to test those kind of setup, I'll have a look at this model.

I just got bluetooth control set up and running on my little friend tonight and decided to take him outside for a minute to see how he'd do on gravel, grass and concrete.  Those wheels worked amazingly outdoors compared to the over-traction on the carpet.


looks like I have to bring my Gary to fresh air :)

I watched your app video and:

1) looks very useful

2) yeah yeepee! hurraayyy! I'm not alone to do java stuff around this nasty C bastard called Arduino ;)

At some point, could you share some details on your java app?

First, I'll warn you:  I am not a java developer, but one of my goals for 2014 is to get better at Java, since its the one language in the top 10 programming languages i have the least experience with.

bascially my arduino is sending data like this:


where each point corresponds to a servo rotation.

Then the java reads it using the rxtx library.

import java.awt.event.*;
import java.awt.geom.*;
import javax.swing.*;
import java.awt.*;
import java.util.*;

public class SensorOutput extends JPanel {

       ArrayList<Ellipse2D> dangerCircles = new ArrayList<Ellipse2D>();

ArrayList<Ellipse2D> innerCircles = new ArrayList<Ellipse2D>();

ArrayList<Ellipse2D> midCircles = new ArrayList<Ellipse2D>();

int maxDistance = 195;

int minDistance = 65;

int midDistance = 130;

int dangerDistance =12;

private static final long serialVersionUID = 1L;

Ellipse2D.Double circle;


    public SensorOutput(int radius, String d)


    circle = new Ellipse2D.Double(0, 0, radius, radius);



    d=d.replace("{", "").replace("}", "").replace("\n", "").replace("\r", "");

    String[] distances = d.split(",");


    int centerX=150;

    int centerY=150;


    for(int i = 0; i<distances.length;i++ ) {

    double angle=i*3+180;



    int distance=Integer.parseInt(distances[i])*2;

    int dis=distance;




    int tX=(int) Math.round(Math.cos(angle)*dis)+centerX;

int tY=(int) Math.round(Math.sin(angle)*dis)+centerY;


dangerCircles.add(new Ellipse2D.Double(tX-5, tY-5, 10, 10));


else if(distance<=minDistance){

innerCircles.add(new Ellipse2D.Double(tX-5, tY-5, 10, 10));


else if(distance<=maxDistance){

midCircles.add(new Ellipse2D.Double(tX-5, tY-5, 10, 10));







    public Dimension getPreferredSize()


         //Rectangle bounds = circle.getBounds();

        return new Dimension(300, 300);



    public void paintComponent(Graphics g)



        Graphics2D g2 = (Graphics2D) g;


        circle.setFrame(0, 0, 300, 300);


        g2.setStroke(new BasicStroke(1));


        Line2D.Double line = new Line2D.Double(0,150,300,150);



        //Draw outer points first


        for (Ellipse2D circleX: midCircles) {


            g2.setStroke(new BasicStroke(1));




        //Draw mid-range points


        for (Ellipse2D circleX: innerCircles) {





        //Draw ultra-close points


        for (Ellipse2D circleX: dangerCircles) {






I have another thread to listen for the serial data to feed to this class, and a timer on my main class to build and update the jFrame/Panels.
I'll post full source code to download once i finish my android app.  Let me know if you have any questions about the code or if you have any issues implementing it. 

No problem about code quality, I prefer people sharing often what they have than perfectionnist than never contribute for that bad reason :)

I'll give a try at it with Golo Lang (made by friends) which is another JVM language. Java is my daily tool, so this language is close enough to be comfortable, but not to close to mix work and hobby ;)


Thanks a lot.

is to have it as a key/value array instead of just values so it can map in either direction.  So the data would look something like:


where the key is the degrees and the value is the distance.  that way it can go in either direction sweeping back and forth and update in "real time"

I am always happy to share what i create.  

Also i code in a bunch of languages professionally (mostly web) and i can say personally i don't really mind doing what i love for a hobby and profession.  Its one of the benefits of being a programmer and loving programming... i actually get to do what i love all day every day.  Code the boring stuff for the suits and then code the awesome stuff i want to build for me. :)