Arduino Nano Based Microbot
Arduino Nano Based Microbot
Living
Outside
Play
Technology
Workshop
Table of Contents
Arduino Nano based Microbot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Step 7: Customize it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
Author:PaulMakesThings PaulMakesThings
I'm a mechanical engineering student at UWM. Currently I work on research projects for materials testing, I develop automated testing machines. I have an
interest in robotics and like to work with microcontrollers.
These and other additions can be mixed to make your own custom micro robot
For the basic platform the following supplies are needed:
an Arduino nano
a small rechargeable battery
a pair of 9 g servos, modified for continuous rotation
part of a Tamiya track set
a 40 pin dip socket
a rubber eraser
some zip ties
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
Image Notes
1. This is the side-exiting wire from step 1
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
//---------------------------Start Code
#include <Servo.h>//Loads commands to create Servo objects which generate PWM signals
Servo leftDrive; // create servo object to control a servo
Servo rightDrive; //another servo object for the left side
void setup()
{
leftDrive.attach(11); // attaches the servo on pin 9 to the servo object
rightDrive.attach(10); // attaches the servo on pin 9 to the servo object
}
void loop()
{
//here put commands which drive the servos
//use the commands
//rightDrive.write(any number 0-180);
//leftDrive.write(any number 0 to 180);
//to set the servos turning 0 is full one way, 180 is full the other, 90 should be near stop
//which way is forward depends on your servos
}
//end code ------------------------------------So that gives you an idea how simple this can be.
Here is a basic code example for just driving around in a square. Note that the video was with the delays set to 600, which resulted in a triangle, 450 gives you more of a
square. (code starts after this line):
//-----------------------------------------------------------------------------------------#include <Servo.h>//Loads commands to create Servo objects which generate PWM signals
Servo leftDrive; // create servo object to control a servo
Servo rightDrive; //another servo object for the left side
int pos = 0; // variable to store the servo position
void setup()
{
leftDrive.attach(11); // attaches the servo on pin 9 to the servo object
rightDrive.attach(10); // attaches the servo on pin 9 to the servo object
}
void loop()
{
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
Step 7: Customize it
The idea I'm sharing here is how I made a compact simple to control robotic platform. I feel that showing you what to do with it exactly would not have much of a point,
you can do whatever you like with it.
That said, I'll make some suggestions of how you could expand this robot without reinventing the wheel. Other Instructables are suggested to get into the low level details
of these features, and links are provided to buy them where available. I didn't make these Instructables, but they will integrate nicely, that's the great thing about an online
community after all:
Gripper
The easiest way to add a gripper is with another micro servo, one that isn't modified for continuous rotation. You would add its control to code simply by attaching another
servo, and giving it a position command, as seen in step 6.
Here is an example which would fit right on:
http://www.instructables.com/id/How-to-make-a-robot-gripper/
The same method could be used to add a scoop or other manipulator as well.
If you want to just buy one, something like this would work nicely:
Jameco 1.3 inch gripper
Radio Control
A fun thing to add to any robot, there are piles of tutorials on how to do this with an Arduino.
You can do it with blue-tooth (easy but expensive)
http://www.instructables.com/id/how-to-Control-arduino-by-bluetooth-from-PC-pock/
Or you could use an XBee (easy, and less expensive)
Since the XBee is wider than the Arduino nano, and can't plug into it, I would actually suggest setting it over the nano and wiring it in around it.
Examples of the code needed are widely availible, heres an XBee library for arduino .
Of course, you could get an XBee/Arduino nano board, like this one from robotshop, and your robot would have a swanky tail.
You can do it with a bare transmitter receiver (cheapest, but requires knowing what you are doing):
http://www.robotshop.com/productinfo.aspx?pc=RB-Ons-02&lang=en-US
Detect movement (PIR)
This is actually remarkably easy, a PIR sensor compares the infrared map of its environment with one it has built over time. So it detects changes. They can be found for
$10 at several stores including sparkfun and robotshop
These have everything integrated, and the output pin goes high for a few seconds when motion is detected. All you do is give it power from the battery and connect the
output to an input pin on the Arduino. Then set an interrupt or check the state of the pin. As seen on the customization of the platform above. This lets your robot react
when someone approaches.
Ultrasonic Range finding
Ultrasonic range finders are an inexpensive way detect the distance in one direction with decent reliability in the range of about 0.1 to 10 meters. They tick out ultrasonic
pulses at about 10Hz and detect how long they take to return. Most pick up obstacles in a conical span, so they can be fooled by things that aren't really in the way. It's
no LADAR or computer vision, but it costs 1/1000 as much.
This is also on the robot customization shown here. I used an HC-SR04 range finder and this library . I just got that from ebay for $6.
There is also support for the PING range finder: http://arduino.cc/en/Tutorial/Ping
And even if you use the cheaper one I used, this may help you understand how it works
GPS
If you want to give your robot a sense of its/his/her place in the world, there is example code to use a parallax GPS module on Arduino Playground here .
Future Steps
I'm planning a few fun projects with these. One will be to add wireless cameras, remote control, and little grippers, and then make tiny obstacle courses for them to
explore in teams.
Another fun project would be to mount a Kinect on the roof and make a bunch of these with wireless act as a swarm in formation.
In general I'm going to use these as a basis for lots of projects, and I will be going into more detail about possible add-ons in that way. I would be very pleased to see this
used in other Instructables and expanded. After all, sometimes you want to use a robot, but don't want to write about developing the basic stuff.
http://www.instructables.com/id/Arduino-Nano-based-Microbot/
Related Instructables
Carlitos'
Projects:
Wireless
SpeechControlled
Arduino Robot
by RobotShop
Remote
Controlled
Arduino Robot
using Wixel
Transceivers
(Photos) by
techbitar
Brookstone
Simple Arduino Rover by djsures
Robotics
Platform! by
CalcProgrammer1
Arduino-based
robot with IR
radar by
techbitar
Arduino
Examples #2
Use an Arduino
as a FTDI
Programmer by
qazwsx755
Comments
1 comments
Add Comment
axeman911 says:
http://www.instructables.com/id/Arduino-Nano-based-Microbot/