robo1-228x228.jpg
logoclear.png
LDR Robot with IR and a Servo

The LDR/IR Robot is designed to seek out light and avoid obstacles. The robot uses the Light Dependent Resistor to seek out light and the Infrared Sensor to detect and avoid objects in its path. The following are instructions with pictures to show exactly how we built our robot. Your robot can be designed the way you desire and in your own order. At the end of this manual you will find some pictures of various robots built with this kit. Use your imagination and make your robot unique. Have fun!

Here is a video of the robot in action!

Here are the parts that our kit contains. Our kit can be purchased here:
http://egrobotics.com/store/index.php?route=product/product&path=59&product_id=50

You will find that not all parts have to be used.

Components:
1 x Arduino  
1 x Battery Holder
1 x Acrylic Chassis  
1 x  On/Off Switch
2 x Motor Gearbox and Wheel  
1 x Power Jack
3 x LDR  
1 x IR Receiver
12 x LED  
2 x IR LED
14 x Resistor 
1 x Servo
4 x NPN Transistor  
1 x Ping Pong Ball
4 x Diode  
2 x Screw
1 x Bread Board  
2 x Velcro
1 x Straw  
1 x Wire Pack

The tools used in this project are:
Hot Glue Gun
Scissors
Small Screwdriver
Needle Nose Pliers
Wire Stripper
Sharpie
Electrical Tape
Soldering Iron(can be done without)
 
Remove these adsRemove these ads by Signing Up

Step 1: Components and Tools

Here are the parts that our kit contains. Our kit can be purchased here:
http://egrobotics.com/store/index.php?route=product/product&path=59&product_id=50

You will find that not all parts have to be used.

Components:
1 x Arduino 
1 x Battery Holder
1 x Acrylic Chassis 
1 x  On/Off Switch
2 x Motor Gearbox and Wheel 
1 x Power Jack
3 x LDR 
1 x IR Receiver
12 x LED 
2 x IR LED
14 x Resistor
1 x Servo
4 x Transistor 
1 x Ping Pong Ball
4 x Diode 
2 x Screw
1 x Bread Board 
2 x Velcro
1 x Straw 
1 x Wire Pack

The tools used in this project are:
Hot Glue Gun
Scissors
Small Screwdriver
Needle Nose Pliers
Wire Stripper
Sharpie
Electrical Tape
Soldering Iron(can be done without)
ikochar says: Dec 13, 2012. 10:40 PM
which diode have u used here
EGRobotics (author) in reply to ikocharApr 18, 2013. 12:05 PM
Hi ikochar,

I missed your reply, sorry. In case you are still wondering we just used what we had around I believe they are 1N4007. Hope you figured something out by now though.

EG Robotics
topek_25 says: Apr 9, 2013. 8:49 PM
for step 10, where do i put the 2 diodes?
EGRobotics (author) in reply to topek_25Apr 18, 2013. 12:01 PM
Hi Topek_25,

Sorry for the late reply. Here is a quickly made picture of where the diodes go. The diodes go between the motor leads. This keeps any voltage created by the motor spinning from momentum or any other force from being a nuisance. Good Luck!

EG Robotics
diodes.jpg
ikochar says: Dec 11, 2012. 9:22 PM
it is all fine but which transistor have you used here?
EGRobotics (author) in reply to ikocharDec 12, 2012. 2:01 PM
We use 2N2222 transistors. Their only rated at around 600 - 800mA so be sure to use them through the Arduino so that it bogs down the voltage regulator instead of destroying the transistors. Have Fun!
curious06 says: Dec 9, 2012. 9:25 AM
hey i connected everything the way you described and the left wheel rotates while the right wheel doesn't..they have exactly the same kind of set up and connected to the right pins..but if i switched the left motor pin in to the right transistor the left one work, any suggestion?
EGRobotics (author) in reply to curious06Dec 10, 2012. 1:34 PM
Hi Curious

Do you have the IR and IR Sensor attached? Or just the light seeking part? If you have the IR sensor attached what code are you using and did it work before attaching the IR Sensor?

The Right transistor works because you tested plugging the left motor into it. Is that what you are saying? Did you plug the Right motor directly into the power source to ensure connections between wires and motor? If so did the motor work? if it didn't check connections at the motor especially if you used the hot glue method. Double check your diode set up on that motor as well.

Let me know if you have any more questions! also post the solution to help others in the future! Also did you buy the kit from us? if not are you using the exact same motors? You can always email us from our sites email for additional help as well!

Thanks,
EG Robotics
matt.e.jenkins says: Nov 5, 2012. 8:34 AM
This is great! It's like you read my mind are are a few weeks ahead of me. I have planned this same project almost exactly and just received all my parts. Even the ping ping ball caster, LDR, and IR. Your instructions have cleared up some details I was working out. I was building my son a robot for Christmas. Thank you so much.
EGRobotics (author) in reply to matt.e.jenkinsNov 5, 2012. 9:45 AM
Thats great! Have fun with it!
amandaghassaei says: Oct 12, 2012. 10:50 AM
great instructable! I like how you put code in each step of the process. I like your simple design, do you think it's possible to do this with out a microcontroller? have the output from the resistors drive the motors directly?
EGRobotics (author) in reply to amandaghassaeiOct 12, 2012. 2:06 PM
To have the output from the Light Dependent Resistors Drive the motor directly would not be possible because of the high resistance of the LDR.

My battery Box is 6 rechargeable AAA's so thats 1.2V * 6 = 7.2 Volts.
My LDR is putting out 1500 Ohms in Normal Light and the motor is 5 ohms. To find the amps add up the ohms = 1505.

Amps = Volts/Resistance Amps = 7.2/1505 = .0047 A which isn't enough to move our motors.
Also the voltage usage of each Volts = Amps * Resistance
Volts = .0047 * 5 = .023 Volts which also isn't enough volts.

However if there was such thing as a LDR that was like 5 or 6 Ohms when it was bright and 4 or 3 ohms when it was dark that would probably work. Instead of using a full blown micro-controller you can do like Higgs Boson did in this Instructable and use a 555 IC. Which you made me want to do now! Maybe I'll add how I did it to mine later! Thanks!
amandaghassaei in reply to EGRoboticsOct 12, 2012. 2:08 PM
what if you just use a transistor to step up the current but control the voltage with the LDR?
EGRobotics (author) in reply to amandaghassaeiOct 17, 2012. 12:54 PM
So I set up a circuit like the one below and it worked in a brighter setting. If I had some potentiometers lying around could have played with it a bit more. Lower resistance LDRs would have worked better as well. However I am interested in your opinion, how would you set it up?
Thanks!
LDRMotor.jpg
amandaghassaei in reply to EGRoboticsOct 17, 2012. 3:40 PM
yes, this is exactly what I was thinking! And yes, the high resistance of the LDRs will make the range of the voltage divider somewhat limited. There is a way to get around this: set up another transistor as an amplifier.

Start with a circuit like this one.  Set up a pot and the LDR as R1 and R2.  (You can forget about the capacitor since we are not working with an AC signal).  Then use another pot for RC.  You will need to mess around with the pots a little to figure out what gives you a signal centered around 2.5V with a good amplitude (ideally extending from 0 and 5V) from Vout.  Eventually, you should replace the pot in series with the LDR with a resistor, and you can use the RC pot to adjust sensitivity.  Then send Vout to a second transistor set up as an emitter-follower (just like what you have in the image above).  Simply connect Vout to the base of this transistor and drive the motor from the emitter.

let me know how that works!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!