Close
0%
0%

S.O.A.R. (Scriptable Online Androidino Robot)

This is a small two wheel drive robot which is based on the Arduino and Android platforms and is Scriptable via googlescript (javascript)

Similar projects worth following
This is a two wheeled drive robot which can be accessed online via Googlescripts, spreadsheets, or other apps. It's based on Arduino and the Android platform. An Android phone communicates with the Googlescript via wifi, and the android phones sends commands to the arduino through Bluetooth. Whats unique about this is it is scriptable in real time and programmable via Googlescript which makes coding possible without even having physical access to the robot.

Evolution: I started this project learning about how the electronics (i.e. the H bridge driver) in an RC car works and wondering if I could 'hack' it do use it as a robotics platform. My first attempt at this consisted of basically the same electronics as i have now, minus the Android phone. However, the platform was based on a cheap $5 rc car that I had. What I did was connect the motors up to the motor shield and I was able to drive the rc car around that way: 

So that was version 1.0. As you can tell, the RC car was too small a platform to really do much with. During this initial build, I learned how to use the LM 317 chip to create a basic power supply board. I learned how bad I was at soldering. Finally, I learned a lot about electronics, which was really fun!

Version 2.0: The next version, is based on the DF Robot 2wd robotics kit and has basically the same electronics as the first version, plus and Android phone and will be connected to Google script via wifi and the internet. This will allow real time control remotely, or it can run in offline or autonomous mode and it is possible to store basic scripting on the android phone so the robot will no how to respond and can follow basic programs when not connected to the internet. Caution: The soldering pictured is bad. I know...The current version is below:

Overview: The Arduino takes its commands from the Android phone via the Seeduino Bluetooth shield. The Android phone connects via wifi to Googlescripts, which in turn control what commands get passed down to the Arduino microcontroller. These commands are sent to the NKC Electronics motor shield (a shield is just a circuit board made with pin-outs to fit into the headers on an Arduino).

This is a high level system diagram:

Code, schematics, and more to follow soon!

  • 1 × Arduino uno
  • 1 × Android phone
  • 2 × AA battery packs
  • 1 × NKC electronics motor shield
  • 1 × Seedstudio /Aerospace Bluetooth shield

View all 10 components

  • Bandaid bot lives!!

    Eric Livesay12/16/2015 at 05:18 0 comments

    Been a long time since my last log.

    A lot has happened since.

    I lightened the load and switched to an all plastic setup using the bottom half of an old multimeter case to mount the wheels in, and a bandaid box from costco to mount the arduino, motor driver shield, new hc06 Bluetooth module, and batteries in.

    I don't have a phone that works with the Bluetooth now so I was testing things connected via Bluetooth from my MacBook.

    Here is a video of what today in my test I dubbed Band aid bot. I will make it straight and not mounted with tape crookedly but wanted to try it out real quick. Also I will get a phone that has a working Bluetooth and I can run my android program and do cool things once I get a working android phone again.

    Here's the video of me goofing around with controlling it. It runs great being lighter, I'm glad I switched from the metal frame to all plastic:

  • Found one option android phone

    Eric Livesay08/20/2014 at 04:44 0 comments

    My htc phone is an option if I can't find my lg android phone. I will have to see if I can utilize the battery from my wife's android phone.

  • More updates

    Eric Livesay08/20/2014 at 04:38 0 comments

    trying to locate my android phone.  I somehow misplaced my android phone the other day. I was able to program my Arduino some more and added the bluetooth code. I will add in this code to this project page later. I need to test out my code but first need to find my phone.

  • More details on scripting commands

    Eric Livesay07/29/2014 at 04:31 0 comments

    Scripting with s.o.a.r.:

    Controlling the robot is done via basic commands that can be strung together and interwoven with sensory input and the appropriate response command. As well, this can be combined with code that lives in the cloud via javascript to offload processing or just to allow remote control. One command can encapsulate several commands. Here are the basic commands I am thinking of to start with:

    1 go forward

    2 go backward

    3 turn left

    4 turn right

    5 say a word

    6 listen for a response

    7 take a picture

    Some of these commands would be done on the android phone and some would be done with the robot and it's microcontroller.

    With allowing responses to be part of offline script, the robot can be programmed to respond to things autonomously.

    For example:

    Command: "spin in circle"

    Turn right

    Turn right

    Turn right

    Turn right

    Command: "introduce"

    Go forward

    Say "hello"

    Response audio: "hello" - say "friendly" say "huh?"

    "Spin in circle"

    End response

    Response audio: null- say "not" say "friendly"

    Turn right

    Turn right

    Go forward

    go forward

    End response

    These types of things can be ant to be stored on the robot. They can also be stored in a google spreadsheet or other server based storage to be retrieved by others for sharing purposes. In this way a library of behaviors could be created.

    The android phone will need a command interpreter. Commands are received from the google script/ spreadsheet (at first this would probably be via polling the google spreadsheet). This architecture could be changed to interact in a more direct manner in the future but using a googlespreadsheet and googlescript that is polled by the android phone is easy and will allow for it to be easily shared.

    The command interpreter:

    The commands should come in as "immediate" or "program". This allows the command interpreter to not have to look and update any commands it can just overwrite if it has one of the same name. Possibly a linked list would be a good structure to start with when programming the interpretation of the commands because it allows for chaining the commands together. Some pseudo code for the android command interpreter is:

    For programming commands:

        //sample command previously received:
    string command="program,spin in circle,turn right, turn right, turn right";
    //load our existing linked list of commands:
    			
    ObjectInputStream oi =newObjectInputStream(newFileInputStream("save.ser"));Object listIn = oi.readObject();
    //create linked list from serialized linked list
    LinkedList ll = (Linked List) listIn;// add new elements to the linked list

    ArrayList<String> commandList=Arrays.asList(command.split(","));

    //to do: convert array list into linked list and search through existing list.// If command is the same overwrite existing list otherwise add commands to the list

    //the trick is some commands may be existing linked lists and if so we will need to overwrite then
    //serialize linked list again:		
    ObjectOutputStream oo =newObjectOutputStream(newFileOutputStream("save.ser"));
                    oo.writeObject(ll);
                    oo.close();//this is all pseudo code and not complete or working 
    // will spawn many questions I'm sure and I haven't written the actual interpreter that sends commands to arduino or to android routines just idea of serializing and deserializing a linked list with commands badicakky

  • More on interaction with google

    Eric Livesay07/25/2014 at 12:19 0 comments

    Here are some more details on how the robot will interact with google spreadsheets/forms/scripts: First, on the android app there will something like a loop or an event handler which will receive commands from , and send data/ sensory input, etc back to, the google spreadsheet or form or app.( any are possibilities- to start out I will use a spreadsheet probably to receive data.) for starters, an acknowledge signal will be passed back up to google. Also, images, sounds(maybe an audio stream), if I ever put other sensors like transducers on the robot, that data as well. The robot can receive a set of commands such as: go left, right, forward, back, up, down, take a picture(or I might have a mode where it streams pictures or video we will see). I also plan on trying to allow it to listen with the speech recognition api and send the results if what it heard back up to the cloud brain. More to come including code examples as soon as I can get a break from a giant project I have at work...

View all 5 project logs

  • 1
    Step 1

    First is to get all the components together.  This is all based on the arduino stackable shields and the android smartphone platform.

  • 2
    Step 2

    The motor shield I got by NGC Electronics needs a seperate power supply. The power supply board I used consists basically of  a basic LM 317 voltage regulator with a variable resistor, and one other resistor. This creates a voltage dividor so i can use this power supply circuit to power  a motor at anywhere from 0-5 volts.

  • 3
    Step 3

    More instructions to follow. I will probably utilize links when there are other instructions set out on the internet. For example, a lot of my work here is very similar to what Vince at Vision and Robotics has done (see link above in links section.) However the specific things I did with my power supply and the android and google platforms I will explain in the instructions and details sections as I complete more.

View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates