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.)
Remove these ads by
Signing UpStep 1: Materials
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.)













































Visit Our Store »
Go Pro Today »




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 :)
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 ~.~
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.
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.
I'm rusty but the resistors are either acting for biasing or to limit the current, maybe both.
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.
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.
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.
The rest of the time the readings should be different. That is how the robot decides which direction to go.
it is an rc car and is using the arduino motor shield which has an H-bridge.
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.
i don't really know the problem, the left and right turning codes have worled otherwise in non-sensor tests.
i really want this to work, it is my first arduino robot, so i am kinda a noob.
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.
also i was using the makershield, and now a full sized breadboard to maximize the space between the two sensors but has not helped,
anybody know the problem or how to fix it,
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.
any help will be greatly appreciated
How were you able to connect the Protoboard to the motors?
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?
I appreciate any help I can get
Thank you.
http://www.ladyada.net/make/mshield/index.html here it is.
SensorDifference = abs(SensorRight = SensorLeft);
should have - instead of =, like this:
SensorDifference = abs(SensorRight - SensorLeft);
it was wonderful to c ur robot
can u give me more details about how to connect the components in bread board
my id is kaifarun@gmail.com
help me friend