Navigation Bar

Thursday, March 29, 2012

Amazing Obstacle Sensing Robot Mod

We love all of our products but every once and a while a tech savvy customer will come along with a 3rd party modification that is just too cool to not tell you about. Kevin Nichols has modified our OWI-536 All Terrain Robot to move on its own while automatically sensing and reacting to its surroundings. Check out the video below. 

Kevin gives a how to below:

This is the code for the yellow robot that I made with an arduino and motor shield. It is not the best code in the world, nor is it finished. I put explanations off to the side. They will not affect the way your robot works. They always have // before them so the arduino knows to ignore them. 

Also note, this code is setup to work with the EZ-1 sonor sensor that we have for sale. It is a great sensor and it is very accurate, however it has a few problems. When the robot is aimed at a hard surface and is at more than a 45 degree angle to it, the sound will just bounce off and the sensor will not see the echo. I plan to change the sonor sensor to an IR distance sensor. If you do the same, or use a different sensor to measure distance, you will have to change the code to make it work.

"//This code is setup to work with an arduino uno with a sparkfun Motor shield and a EZ-1 Sonor sensor. Change the code as nessasary to work with the componets you are using.
//This is still a work in progress, and the robot will not preform flawlessly.

#include <Servo.h> //Tells the arduino that there will be a servo on it and to load the servo library

Servo pan; //The name of the servo
int pwr_r = 3; //speed control for right power hookup A on pin 3
int pwr_l = 11; //speed control for left power hookup B on pin 11
int dir_r = 12; //Direction control for right motor A - LOW = foward, HIGH = Reverse on my robot, yours might be different on pin 12
int dir_l = 13; //Direction control for left motor B - LOW = foward, HIGH = Reverse on my robot, yours might be different on pin 13
int button = 2; //on off switch located on pin 2
int val = 0; //variable for current button status
int old_val = 0; //variable for old button status
int state = 0; //go = 1, no go = 0 this int is used with the button to turn the robot on and off
int dis = 0; //sensor reading

int Lspd = 255; //These int will be used to control the motor speed for the Left and Right motors.
int Rspd = 255; //The number can be anywhere from 0 to 255, with 0 being no speed and 255 max speed

int straight = 87; //These int are the numbers that the servo will use to look left and right. 
int left = 50; //87 is what my servo needed to look straight, and the other numbers were for left and right
int right = 130; // change them as nessasary to get your servo to work right. The number can be from 0 to 180.

int Sdis = 0; //These 3 int are just place holders to store the mesurment distance from the sensor.
int Ldis = 0;
int Rdis = 0;

void setup(){
pinMode(pwr_l, OUTPUT); //This it setting up the pins to their proper 
pinMode(pwr_r, OUTPUT); //input output settings. 
pinMode(dir_l, OUTPUT); //The sensor is attached to an analog pin, so it does not 
pinMode(dir_r, OUTPUT); // need to be told to be an input. It is set that way automaticaly
pinMode(button, INPUT); 
pan.attach(5); //this attaches the servo to pin number 5

digitalWrite(dir_l, HIGH); //Sets the motor direction to high, which is foward 
digitalWrite(dir_r, HIGH); //on my chassis, your might need to be set to low if it goes backwards
analogWrite(pwr_l, 0); //makes sure that the motors dont go anywhere when you first turn it on
analogWrite(pwr_r, 0);


void loop(){ //Start of the code
pan.write(straight); //Tells the servo to look straight

val = digitalRead(button); //this section is for the button
if((val == HIGH) && (old_val == LOW)){ //it allows you to turn on or off
state = 1 - state; //the motors without unpluging it
old_val = val;

dis = ((analogRead(A0))/2); //this reads the sensor and assigns the value devided by 2 to the dis interger. Devide be 2 to make the number equal to inches

if(state == 1){ //the first If statement checks if the button was pressed, if off, robot does nothing, otherwise it does what follows
analogWrite(pwr_l, 0);
analogWrite(pwr_r, 0);
if(dis <= 10){ //checks to see if the distance is equal to or closer than 10 inches. change this number to change the distance it stops.
analogWrite(pwr_l, 0); //if it is closer than 10 inches
analogWrite(pwr_r, 0); //it stops both motors
Sdis = dis; //stores the current distance as Sdis
pan.write(left); //makes the servo look left
delay(500); //wait half a second for the servo to move
Ldis = ((analogRead(A0))/2); //makes Ldis the messured distance
delay(100); //waits agian
pan.write(right); //looks right 
delay(500); //waits for the servo
Rdis = ((analogRead(A0))/2); //makes Rdis the messured distance

if(Ldis > Rdis){ //If left is farther away, turn left and go
digitalWrite(dir_r, HIGH); 
digitalWrite(dir_l, LOW); //this makes the left side run backwards
analogWrite(pwr_l, Lspd);
analogWrite(pwr_r, Rspd);
pan.write(straight); //makes the servo look straight
delay(300); //this number affects how far it turns. the biger the number, the further it turns
if(Rdis > Ldis){ //If right is further away, turn right and go
digitalWrite(dir_l, HIGH); //this part is same as above, except it makes the robot 
digitalWrite(dir_r, LOW); //turn right instead of left
analogWrite(pwr_r, Rspd);
analogWrite(pwr_l, Lspd);
if(Rdis == Ldis){ //If both left and right are the same, like in a corner, turn around and go
digitalWrite(dir_r, HIGH); //Agian, same as above, but the delay is longer at the end, so the robot 
digitalWrite(dir_l, LOW); //has enough time to turn around. Change the delay at the end if your robot does 
analogWrite(pwr_r, Rspd); //not make it all the way around
analogWrite(pwr_l, Lspd);
}else{ //If nothing ahead, go straight
digitalWrite(dir_r, HIGH);
digitalWrite(dir_l, HIGH);
analogWrite(pwr_r, Rspd);
analogWrite(pwr_l, Lspd);

Just copy the whole quote and upload this to your arduino. I will post a tutorial on how to build the robot a bit later, just wanted to get the code out first.

I fixed the diagram for the robot. It does not show the motor controller, but that just bolts onto the arduino, so no diagram necessary. It also shows how to wire in the IR Range finder, but the EZ-1 sonar sensor is wired in the same way.

Check out the full post here.

Friday, March 23, 2012

OWI Kits Name Finalist for Space Age Award

OWI is proud to be named a finalist for's 2012 Space Age Award.We were presented with this award nomination on behalf of our new Salt Water Fuel Cell Giant Arachnoid kit, at the annual 2012 New York Toy Fair back in February of this year.

This is the first year that this award program has been established and was so well received that they will continue next year and into the foreseeable future. is a well recognized brand that is enjoyed by millions of people. OWI is very proud to be selected for this honor.

Thursday, March 22, 2012

Introduction to Robotics

The field of robotics is growing leaps and bounds. Given advances in artificial intelligence, robots are no longer restricted to heavy steel arms, soldering cards, and silicon chips. They are becoming more sophisticated, able to respond, and even able to communicate in any world language.

Types of Robots

Personal robotics trends today is on the areas of improving the robot’s ability to carry out social interactions and to sense and move in the real world. While it has proven really difficult to create robots that can move smoothly and that can learn and adapt to unexpected situations in the way humans can, researchers are making progress and many experts believe that robotics research will eventually attain these goals. Recently, Intel set up two working personal robot prototypes. One demonstrated electric field pre-touch built into a robot hand to give the robot the ability to sense, or in essence ‘to feel’, objects before it touches them. The other demonstration featured a robot that can interpret and carry out instructions as generic as “please clean this mess”.

In military and industrial robots, research is continuing in the areas of unmanned vehicles and improving the “vision” of robots. For instance, this year iRobot announced a partnership with Advanced Scientific Concepts (ASC) to apply ASC’s Flash LADAR systems. The Flash LADAR technology uses a large pulse of laser light to provide detailed information about the distance to and size of objects in an entire field of vision. Objects detected through obstacles like partially closed blinds, and multiple flashes of light used to create 3D images of the areas.

Future of robotics technology

Will the field of robotics soon advance to the point they surpass physiology and intelligence? Some futurists are predicting that in the near future, people will own lifelike domestic robots in their homes, helping them with chores and performing other essential duties. In an emergency such as a fire, flood, or tornado, the household robot could even alert sleeping homeowners and carry them out to safety.

In addition to domestic duties, robots will also be programmed to perform labor essential to the economy. Perhaps robots might even become a crime deterrent, or fight wars, or may even battle blazes. The rise of super-intelligent, self-aware, self-replicating robots is most certainly a scary supposition that could lead to the end of the world. Yet an even more sinister scientific scenario looms on the horizon: images and sensory experiences remotely implanted in the cerebral cortex via ultrasound brain wave manipulation.

Robotics from OWI Robot

One has the option of choosing preprogrammed robots that require varying skill levels of assembly from pieces that simply snap together to assembly that necessitates the use of needle-nose pliers, a soldering iron, and something called a nut driver. OWI is a trendy robotic kit company that creates everything from fully assembled robotic arm trainers to sumo robots that wrestle one another. OWI kits focus on instruction of mechanical design, concepts such as sensing and locomotion and typically the time it takes to move from robot construction to application will be less depending on the building skill level chosen. While most cannot be programmed, the OWI Robotic Arm Edge (OWI-535) has an optional interface that allows the user to connect to a personal computer. The user can program a sequence of movements that will be executed upon command.

See our educational robotics for kids