Introduction: James - Your First Arduino Robot

For more Robotics Tutorials see my website here: http://www.duino-robotics.com/
For awesome videos about robots and 3D printing go here: http://www.youtube.com/channel/UC340dy5bmr6sLpyRh5qYwrg


Edit:
Thank you so much everyone for voting for James in the Toy Contest! He got first place and I won a $500 Shapeways voucher! Expect to see more robot instructables from me in the future! :D


So you want to make a robot? Don't know where to start? How about you learn how to make a robot with me and make James!
James was made as part of a Robotics Class I teach to a few high school students.

I called him James in memory of my late Grandfather James Manning Edwards who passed away 14-3-2013. He loved teaching and helping kids and died doing what he loved, hopefully this James will carry on that legacy.

Step 1: Gather Your Components and Tools

For this build we will be using the Arduino Uno with a Prototyping Shield. You could use whichever Arduino you want with its own Prototyping Shield or Breadboard.

If you are looking to buy this Prototyping Shield search on ebay for “arduino prototype shield uno” and you should see it. Alternatively you can buy a similar looking one from Core Electronics: http://tinyurl.com/brxjx5h

Step 2: Planning

On a piece of paper sketch out a rough sketch of the shape you want your robot body to have. It is always best to have an idea of what you want your robot to look like before you begin its construction.

Next you will want to sketch the shape of the robot body onto the protective sheet of the acrylic, this can be done easily with a pencil. If you do not have acrylic you could use; balsa wood, ply-board, foam-core, cardboard plastic containers or even food containers! You will also need to mark out where you want your servo to go. To cut out the hole for the servo drill four holes on each corner where you want to put the servo, this is to allow the blade of the saw to be easily maneuverered, preventing finger loss.

Step 3: Arduino Mounting Holes

The Arduino will be attached to the robot body using M3 screws and spacers so you will also mark where the mounting holes are on the Arduino so they can be drilled out. Once all of this has been done cut out the robot shape on a bandsaw, if you don’t have a bandsaw you can use a coping saw.

Step 4: Ultrasonic Mounting Bracket


Step 5: Drivetrain

If you would like to learn more about DC Motors and Servos and how to use them with Arduino watch my tutorial below:

Step 6: Checkpoint

So far this is what my robot looks like.

Step 7: Attaching the Arduino

Step 8: Wiring the Motor Driver

To learn more about the L293D Motor Driver Chip and how to use it with Arduino watch my tutorial below:

Step 9: Connecting the Ultrasonic Sensor

If you would like to learn more about the HC-SR04 ultrasonic sensor and how to use it with Arduino watch my tutorial below:

Step 10: Power

Step 11: Code

Here is some basic code to get you started. I strongly encourage you to edit it and make it better once you have learned how it works.
To make the use of the ultrasonic sensor easier I have used the new ping library.

Step 12: Finished!


Upload the test code and that’s it! You have made your first robot!

Comments

author
Poketech+Guy made it!(author)2016-11-13

what is the servo's pin?? where should i connect it??

author
TaseenR1 made it!(author)2016-07-27
Is the Arduino Uno R3 ATmega328P ATMEGA16U2 Compatible with Prototype Prototyping Shield ProtoShield For Arduino UNO R3 1PCS With mini Breadboard KG305 . is there any specification for the motor driver?




author
miniscientist made it!(author)2016-01-15

this is an edited code for people using a adafruit motor shield which is easier to use

james_edited.ino
author
RickyB36 made it!(author)2016-06-22

Can you help me for the wiring please i use the adafruit when my driver get supply from 9v batteries and my arduino get supply from my laptop it's running well but when i change the supply to my arduino with 9v batteries it's not running well so please help just send me the wiring to my email rickyramadhan.rb@gmail.com

author
MohamedS232 made it!(author)2016-04-26

hi where is the final code please?

author
biliron made it!(author)2016-05-04

https://dl.dropboxusercontent.com/u/44961937/James_basic_code.ino

author
GauravJ18 made it!(author)2016-02-24

hey, its a nice tutorial. Having a prob i.e I have got two DC GEARBOX motors and I need to make the drivetrain now. But, not getting how to fix them out to make work. Please help me performing this task. Waiting for a quick reply.

TIA

author
moerlien999 made it!(author)2016-01-24

Thanks for the help. I used your ideas and other inspirations to build mine. Great instruct able. I did find using a cell phone rechargeable battery pack saves some steps and I can just use the usb cable that I used to transfer the sketch with to connect it.

image.jpegimage.jpegimage.jpeg
author
miniscientist made it!(author)2016-01-15

this is an edited code for people using a adafruit motor shield which is easier to use

james_edited.ino
author
miniscientist made it!(author)2016-01-15

this is an edited code for people using a adafruit motor shield which is easier to use

james_edited.ino
author
miniscientist made it!(author)2016-01-15

this is an edited code for people using a adafruit motor shield which is easier to use

james_edited.ino
author
ElectronicsWithMark made it!(author)2015-12-19

May I know where the ultrasonic sensor is hooked up?

author
DenisR9 made it!(author)2015-12-05

The ultrasonic sensor is constantly at zero. Any help?

author
Slk_Stephane made it!(author)2015-09-11

THE CODE FOR THIS!!!

james_basic_code.ino
author
westsoccer made it!(author)2015-06-28

can you send me better pictures of the wiring it is really hard to see where each wire is connected to. My email is awesomezozo03@gmail.com. Thanks

author
Slk_Stephane made it!(author)2015-09-11

There is a video (Tutorial #7) and at 10:20 the wiring starts.

author
westsoccer made it!(author)2015-08-02

no Slk_Stephane did you?

author
Slk_Stephane made it!(author)2015-09-10

no

author
Slk_Stephane made it!(author)2015-06-30

Did you get any help

author
Dirruk made it!(author)2015-09-04

Made it! Well, sort of... I left the servo out and used the turn left and turn right option to scan. But it worked! This was my first arcuino project and I think I can give this robot a feature to measure its own battery charge and auto-dock when it gets hungry now. If it works I'll make an instructable too!

author
indianSuperman made it!(author)2015-08-07

I'm looking for a website or article that can help me learn more about the basics of Arduino robotics, I don't want to go into building one just yet, can someone help me out? Thanks!

author
nodoubtman made it!(author)2015-07-21

error on the download code page.

thank you!

Marc.

author
Vince+A.R made it!(author)2015-07-20

Please post the code... The link of the code isn't working, thanks^-^

author
swiftquail made it!(author)2015-07-04

can i make it with a 3-pin ping.

author
Slk_Stephane made it!(author)2015-06-28

Can someone please help me wire it up

author
westsoccer made it!(author)2015-06-27

can you please put the code in the comments? I am new to coding and im having trouble figuring it out.

author
T0BY made it!(author)2015-06-26

This is a lovely project which you have described beautifully! I look forward to trying it out myself.

author
RiyaVader made it!(author)2015-05-08

Thank you for your tutorial! My Mimibot is ready. \(^_^)/

IMAG4164.jpgIMAG4166.jpgIMG_20150509_010057.jpg
author
amildileep made it!(author)2015-05-28

Hii am amil ...how to make robott..pls give me some idea to make it...how created the program...pls help me and shear to me u r idea .to make a new project. amild1993@gmail.com my mail id...

author
sami2000 made it!(author)2015-05-21

hey why dont use fritzing for wiring

author
raptorcow made it!(author)2015-05-21

Will it work with a 74hc59n chip?

author
raptorcow made it!(author)2015-05-13

Im getting this error

avrdude: verification error, first mismatch at byte 0x0000

0x62 != 0x0c

avrdude: verification error; content mismatch

author
AfrizalC made it!(author)2015-05-10

hello sir, i want to make a search tool avoider robot voice signals, no one knows its C program code.?
please help

author
wmada made it!(author)2015-05-06

anyone who needs a step by step walkthru look on youtube. komicbookkid228 a video that will walk you thru whole process

author
wmada made it!(author)2015-04-29

msg me at jmaderer1@gmail.com

author
raptorcow made it!(author)2015-05-04

I emailed you. I had emailed you 5 days ago but I missed the j copying the address...

author
wmada made it!(author)2015-04-29

@raptorcow email me and i can help ya out. i got no help from this instructable. took me weeks of playing around. parms videos help alot as do letsmakerobots.com

author
raptorcow made it!(author)2015-04-29

I messaged you.

author
wmada made it!(author)2015-04-29

mission success thanks parm .. robot sometimes.hits wall need to fix

author
raptorcow made it!(author)2015-04-28

Could take a clear picture of where each of the brown wires go. This Instructables pictures are horrible. I need an aerial shot or at least a clear focused shot of the wiring steps.

author
raptorcow made it!(author)2015-04-28

I need to see where the brown wires come back to the bread board. I can see where they connect but the image cuts off the top of them so i cant see where they come from. Some one please do this

author
wmada made it!(author)2015-04-26

why does only one motor spin? im usibg dc motor

author
wmada made it!(author)2015-04-25

honestly can someone help me out.... i cant get this working. does anyone have a diagram maybe that would help me out. is the code working? i can get servo working and thats it. i built another robot but it doesnt have servo

author
wmada made it!(author)2015-04-23

i am soooo frusterated i rebuilt it and still motors dont turn. i tested n they work... what am i doing wrong. im using 9v battery directly into arduino and a 4 pack of aa energizers hook to pin 8 n ground wtf

author
raptorcow made it!(author)2015-04-21

Can someone make a schematic of the wiring? Also can I just use a http://osepp.com/products/shield-arduino-compatible/motor-servo-shield/

instead of all this wiring on the breadboard

author
ThinhN1 made it!(author)2015-04-18

code ???

mail: truongthinhnguyen10@gmail.com

thanks.

author
ChaitanyaS made it!(author)2015-04-14

how much torque is requred to move the body of robot i planning to buy gearmotors for the purpose but no understanding which one to buy i have options to buy

1: 200 rpm with 1kg /cm torque

2:3.5 rpm with 3kg/cm

author
wmada made it!(author)2015-04-10

i am.using 74hc595n is that the issue

author
wmada made it!(author)2015-04-10

k seriously guys fml robot still will not move.... do i need more batteries..or am i missing something... the pic on this instructable shows wires on the breadboard which i have no clue is that my problem

author
wmada made it!(author)2015-04-10

can anyone tell me why my motors wont spin. ive rebuilt and rebuilt the code for the motors r pin 3 n 6 11 n 14. could i not have enough power? plz help this robot is killn me

temp_-984707957.jpgtemp_1317178412.jpgtemp_-808777027.jpgtemp_-1917781219.jpgtemp_516630065.jpgtemp_-1211208866.jpg

About This Instructable

253,014views

773favorites

License:

Bio: Robot fanatic.YouTuber. Robotics teacher.
More by chickenparmi:Making an Arduino Powered Curtain AutomationArduino Powered Jack-O'-lanternToilet Paper Roll Spooky Eyes
Add instructable to: