Step 8Ard-e's robot senses: tracking how far his wheels turn and seeing IR light
To actually build the sensor I used my trusty piece of scrap metal and folded a rectangular piece of it into a U shape. I drilled a hole to mount it into the side of Ard-e and then two holes for the led and the light sensor to fit into. I mounted it onto Ard-e so that the led shines right through the center of the holes in the treads onto the light sensor. I put the light sensor on the top part of the U and then put some electrical tape around the sides of the U to block out some of the ambient light that would mess up the readings of the light sensor. I then connected the light sensors just like I connected them for making Ard-e sense where the brightest light is, as a voltage divider to an analog input (using the same input pins and resistors as the "eyes" of Ard-e). The led was soldered to a resistor sized to enable it to run off of 5V and then plugged into the power being supplied by the Arduino.
Just by moving the wheel manually and watching the values that the Arduino outputs using the Serial.print() command to the serial monitor you can get a 600 point swing on the scale of 0-1023. The low is around 200 and the high is around 800. I attempted to write a program that uses 400 as the cutoff for a low to high value and counted the times it switched from below to above 400 but it was beyond the scope of my programming abilities. I think it was because i was using too slow of a speed on the serial printing and checking of the values of both sensors and the treads were being spun pretty fast. When I tried to use a higher speed it wouldn't print at all. In retrospect I don't even need to have the values printed. I wasn't able to get the Arduino to correctly read the values coming from the sensors as the wheels were spinning but I demonstrated that it was possible to use this sensor to count the number of times that the tread interrupted the light from the LED to the light sensor. And if your a better programmer than I am you could convert this number to a distance and program Ard-e to drive to that distance.
Another of Ard-e's robot senses that would be awesome for him to have is being controlled by an old VCR remote. I found a remote in the old pile of electronics junk and found a infrared Radiation sensor at Radio Shack. All that you would need to do is hook the infrared sensor up to the +5V and Ground and then the output to an analog input on the Arduino, just as it says on the back of the box for the sensor. Again if your a much better programmer than I am you could then program the Arduino to recognize the IR signal from the remote and correlate it to making Ard-e move. If the up arrow on the remote is pressed make Ard-e drive forward, if the down arrow on the remote is pressed go backwards, etc. I bought the sensor from radio shack but haven't been able to get the Arduino to interface with it it yet.
So now Ard-e's senses are complete! Or at least as complete as I can make them. You on the other hand should get started recycling some old junk to add on as sensors for your own version of Ard-e. Now whats next for Ard-e?
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|
















































