3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Ard-e: The robot with an Arduino as a brain

Step 6Making Ard-e see, or at least go towards the brightest light

Making Ard-e see, or at least go towards the brightest light
«
  • DSCF2103.jpg
  • DSCF2102.jpg
To make Ard-e have the sense of sight all you need is a few light sensors. I bought a pack of cadmium sulfide photocells from RadioShack for like 3 dollars. A lot of night lights have these that you can steal and the little outside solar lights are possible sources of these photocells too. I didn't have any of these laying around so I bit the bullet and bought them.

So these photocells change their resistance from around 10K to 100K ohms. I made up a little excel spreadsheet to figure out the possible values it would output if i hooked it up as a voltage divider. I got around 30K as providing the greatest difference from high resistance to low. I found some 39K resistors and figured they would work fine.

I just stuck them into the breadboard bent them forward and started testing out programs to make it seek out the brightest light. I ended up writing a program that reads the value from both sensors and if they are different by 8 it turns towards the one that is reading a higher value of light hitting it. I also used the 9V battery between the two sensors to block some of the light from spilling over and affecting the readings of the second photocell when Ard-e was turned one way.

Here is a video of Ard-e following the light from a flashlight that I was shining at him then veering off and going towards the light coming from the door. The quality of the video is really bad because the readings of the sensors get all screwy if alot of background light is present.



Now on to making Ard-e smell and hear.
« Previous StepDownload PDFView All StepsNext Step »
1 comment
Jun 27, 2010. 6:09 AMChowmix12 says:
where's the actual code for the light seeking behavior?
Jun 30, 2010. 7:50 PMChowmix12 says:
Also, try making adjustable eyes. Use solid core wires soldered onto the two LDR pins and then twist the wires together. there bendy yet they hold their shape. i found that the best way to get them to work is pointing them upwards, bent slightly away from each other...
Jun 29, 2010. 3:24 PMChowmix12 says:
i tried the first method with the cds cells connected to analog pins 1 and 2. the analog pins had 10k ohm resitors going to ground and the other end of the cds cell went to +5v. I'll PM the code for what i used, I got excellent behavior, very accurate. BTW, i used a l298hn chip instead of the l239d, because i was able to sample it. You should change the code for the l239d, and I dont mind if you post it on the I'ble for others to use.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
18
Followers
3
Author:imadami