Many times I have Googled for "Arduino Robot" in hopes of finding a robot to build. I end up finding many versions of a obstacle avoiding robot that uses either an infrared or a sonar range finder sensor mounted on a servo to detect objects in its way while randomly roaming the area around it. The problem with this robot is it is expensive and very advanced in some aspects for a "first robot" to make with an Arduino board. The cost of a servo is about $10, and a range finder sensor runs from about $10 - $30.

This instructable will cover how to make a light seeking robot (Photovore), and some robotics and motor control basics. This robot can be built with parts found at the nearest Radio Shack, if you already have an Arduino board and a robotic base. The cost for a five pack of CdS cells (Light dependent resistors) cost $2.99 at Radio Shack. and a 15 pack of NPN transistors (very useful later on) are also $2.99. Of all these parts, we will only need two NPN transistors and two CdS cells.

Please remember, this is my first instructable.
I really appreciate criticism, comments, questions, and suggestions.
Your feedback will help me improve this instructable and future instructables created by me.

Check out our website

Note: by posting any pictures in the comments, you are giving me full rights to the posted image (disclaimer to post robot pictures on the last step.)

If you have a robot base, with and Arduino and full motor controller, you can use it to control your robot with a computer:


Step 1: Materials

The materials you need are:
2 CdS cells
2 NPN transistors
2 current limiting resistors for the transistors (I used 1k ohm (brn - blk - red) )
2 flyback diodes. (1n4001 - 1n4003). You can scavenge these out of AC to DC converters. (shown in the third picture)
1 Arduino development board (I used a duemilinove, but an Uno, diecimila, NG, etc. will work.)
1 robot base. (Go to step 2 for more info if you don't already have one)
1 Arduino supply battery pack (usually 9 volt batteries.)
1 Motor supply battery (2-4 AA batteries work well.)
Nice robot
<p>sweet sweet banter</p>
<p>Do you mind posting the full code at the end or something like that.</p><p>That would really be helpfull!</p><p>Thanks!</p>
<p>Can you please tell me where to attach the orange and yellow cables that go under the arduino?? Email me at rcperecman@aol.com. Thanks a lot!!</p>
<p>what this robot work?</p><p>and give information about it.....</p><p>please.................................</p>
<p>what this robot work?</p><p>and give information about it.....</p><p>please.................................</p>
<p>what this robot work?</p><p>and give information about it.....</p><p>please.................................</p>
<p>what this robot work?</p><p>and give information about it.....</p><p>please.................................</p>
<p>what this robot work?</p><p>and give information about it.....</p><p>please.................................</p>
<p>what is the alternative of tamiya tracked vehicle chassis?</p>
<p>please tell me which wire to attach where.</p><p>you can mail me at ishanphansalkar@gmail.com</p><p>plz inform me.</p><p>and dude awesome project</p>
gimme da code
this is my mini project. thanks to Chowmix12 for the coding, I only made some adjustment on the LDR reading, and change where the motors connected to pin because I'm using motor driver. <br> <br>and on the top of the board I put Xbee to send the reading wirelessly to MatLab and plot some graph.
hey <br>i also wannna do a similar stuff. i want to design a robot for surveillance where the robot will be fully autonomous and it wil move for point A to point B autonomously. <br>i want u to help me in designing the autonomous motion planning system to go form one given place to the other using sensors n stuff...i m stuck pls help <br> <br>i have bought the rover system from here just for making prototype of the actual system since i got it at a good price... <br>http://danuc.com/index.php?main_page=index&amp;cPath=6 <br>http://danuc.com/index.php?main_page=index&amp;cPath=4 <br>http://danuc.com/index.php?main_page=index&amp;cPath=1 <br>http://danuc.com/index.php?main_page=index&amp;cPath=7 <br>http://danuc.com/index.php?main_page=product_info&amp;cPath=8&amp;products_id=52 <br> <br>pls reply <br>
Hi, does it crash often?
ive got a question does the code on this page work the same for arduino uno?
impressive project. this show us what wonderful robot can be built with a simple <a href="http://www.intorobotics.com/overview-of-light-sensors-used-in-robotics/" rel="nofollow">light sensor</a>
If you get lost in a cave it's light seeker to the rescue! +1 for practical application! Or you can use it to find the best spot for a light-requiring plant!
Ah! i've got it working! thank you so much!
can you transfer the code on an attiny?
Pls include some pics during assembly
Hi.. Can you please give more instructions on the assembling of hardware?
Hey great tutorial and im currently building the same thing...i have a problem though...i'm using the tamiya gearbox and instead of npn transistor, im using TIP120. however, after doing all the connection the motor just move a bit and stops. i guess it needs more torque to move forward. could you please help me out or suggest i do something?
i am not able to get the aurduino with proto shield.. :-(
what is the name of your robot base, or can you recommend where to buy one online? Instructable is awesome, thanks man.
Ahh this brings me back, My first robot was surprisingly similar :) <br> <br>I absolutely adore the Tamiya base. I remember seeing it at Fry's one day and buying it with the express intent to build a robot :) <br> <br>Never did finish the sensor package I wanted for mine so it just took a range reading on objects in front of it. Then took the last bid from that reading to decide on turning right or left. Always meant to go back and finish it but alas my cat had other plans ...... like puking on it ~.~
Hello what where the transistors and diodes and resistors for. <br /> <br />And I have a problem i cant get the same readings from both sensors they are very different i tried using 2 5k pots the change the values but they dont work well at all. I was thinking about constraining the values and mapping them to 0 - 255 but i cant figure out a code for that. I am using the LDRs for a Line Follower.
Quick speculation. <br> <br>The transistors are being used to drive the motors. The Arduino cant source enough power on its own, the transistors are acting essentially like a light switch that the Arduino can flip on and off that connects directly to the power supply. <br> <br>I'm rusty but the resistors are either acting for biasing or to limit the current, maybe both. <br> <br>A lot of times you will see both a capacitor and a diode hooked up to a DC motor, the caps help with the initial power draw that the motor can place on your supply. <br> <br>The diodes are there to prevent reverse power flow from the motors. Motors are act a lot like inductors. primarily because both are essentially wire windings. When you power an inductor it induces a magnetic field. When you stop the power flow to the inductor that field collapses and you are going to get a negative voltage spike. <br> <br>As for the sensors the question is how different are the readings and are you taking readings under the same conditions? Just to decide if they are working properly you should probably take a multimeter and get a resistance reading. First by covering the sensor then by saturating it with as much light as you can. As long as those readings are similar and within spec for the part then you are fine. <br> <br>The rest of the time the readings should be different. That is how the robot decides which direction to go. <br>
i am making a robot using your instructable, but i am using a base just like in this instructable, http://www.instructables.com/id/RC-Car-to-Robot/. <br>it is an rc car and is using the arduino motor shield which has an H-bridge. <br>over serial it appears to work fine, but when driving it's steering wheels keep turning back and forth rapidly and randomly, sometimes stopping a bit in the left turn position. <br>i don't really know the problem, the left and right turning codes have worled otherwise in non-sensor tests. <br>i really want this to work, it is my first arduino robot, so i am kinda a noob. <br>i chose the rc car as a chassis because it was easier to obtain than the tamiya, although i might get that when i have more money. <br>also i was using the makershield, and now a full sized breadboard to maximize the space between the two sensors but has not helped, <br> <br>anybody know the problem or how to fix it, <br> <br>my rc car was also modified to be switched from rc or arduino control, so it still has a rc board within its body, but the motors are connected to both the arduino and rc board. the power is from the on-board battery holder with 4 AA batteries. the power connections are to the Vin and ground screw holes on the arduino motor shield. <br> <br>any help will be greatly appreciated
You should DEFINATELY add a bluetooth module to this robot... everything is a little more fun when you have an extent of control over a device. <br>
Great tutorial for beginners- Thanks <br> <br>How were you able to connect the Protoboard to the motors? <br> <br>I am currently following this tutorial (in my spare time), and right now I have completed the base, platform, and building the protoboard. What is the next step? <br> <br>I appreciate any help I can get
Hi, did you use the gear in standard speed (58:1) or in low speed (203:1)? <br>Thank you.
hi could you provide more detail about making the suspension system on the tank? thank you
Would it affect the light sensing ability if I were to put a cover over the top?
hi guys, I want to build a robot like this but instead of any sensors, I want to pre-program a route into an Arduino, so when i turn it on, the robot follows the route I program in Arduino. Can somebody please help me with the program. I dont know where to start. I do know c++. thanks in advance.
A question.... Can an adafruit motor shield be used for this one. Is the circuit design for it the same. The Adafruit Motor Shield is an H Bridge shield used for controlling dc motors, servos and steppers. <br><br>http://www.ladyada.net/make/mshield/index.html here it is.
Yes it can! The Adafruit Motor Shield is perfect for this project!
could you post instructions on how to install the components through the adafruit.
I don't have any experience with the adafruit shield, but you should connect the motor leads to the shield, and then you will be able to control the two motors using the specific pins. look for more info on adafruit's website.
Did you have to cut the drive shafts for the dual motor to work on the tamiya Chassis kit? Or is the dual motor compatible to work with the chassis out of the box
I didn't have to cut the drive shafts for the Chassis, but i did have to make two notches in the wood Chassis for the mounting screws.
Nice robot, im thinking of making something similar. I have a question though, in the second vodio you plug something into some pins on the robot and it runs wirelessly, what is it and what are the pins?
I just noticed my first reply didn't come through.. So! The module I plugged in was a Bluetooth module. It acts just like a serial connection like the one in a USB plug. I suggest getting used to Serial connection and building up your robot to be controlled through the USB cable. Then, when you are ready, you can use a Bluetooth module. The RX of a Bluetooth Module connects to the TX pin (pin 1 on Arduino), The TX pin of the Bluetooth module goes to the RX pin (pin 0 on Arduino) . Make sure that the Bluetooth module operates at TTL levels, which is 5 volts.
Thank you, i have never used bluetooth before to connect to a computer, is there a specific module that you prefer/ Or they all the same if they operate at TLL levels.
My motor needs more current what should i do? (2A Per Motor)
Try a dedicated motor driver.
what do u mean ? i'm new to arduino..<br>
There are separate boards available which can be plugged into the arduino board and control the motors. You can search for &quot;arduino motor shield&quot; on your favourite internet search engine.
There is a bug in your code:<br> SensorDifference = abs(SensorRight = SensorLeft);<br> should have - instead of =, like this:<br> SensorDifference = abs(SensorRight - SensorLeft);

About This Instructable


247 favorites


Bio: I am a young engineer who likes to build things. My motto is Why buy, when you can Make! in 2010 I got an Arduino ... More »
More by Chowmix12: Graphing on an Arduino, the EASY WAY! Graphing values in Arduino, the EASY way! Never lose an RC BodyClip again!
Add instructable to: