Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Object Detector using PIC16F877 and GP2Y0D340K

Object Detector using PIC16F877 and GP2Y0D340K

This is to try the Sharp GP2Y0D340K infrared object detector. It is cheap, the disadvantage is that is will detect an object but it has no indication of the distance of this object. The detection range is highly reflectiveness (thus color) dependent.
A (shiny) black object was detected at 23 cm while a white object was detected at 59 cm.

The schematics are straight forward. The blue LED flashes so it is clear that the PIC is operational, the green LED indicates if an object has been detected. I didn’t know they made resistors of such small value (the data sheet calls for 1 ohm) so I had to go the shop to buy one. And of course they were out so I had so settle for 1.5 ohms which works just as fine.

The long wires in the left hand side are from the Wisp628 in-line programmer. Note that for the A version of the 16F877 (so the 16F877A) you need Xwisp version 1.08 or higher. The switch and LED on the right hand side are simply the on/off switch and thus not on the schematic. The green LED is on; meaning the sensor has detected the photographer!

The program is even simpler than the schematic. The sensor signal is reversed so the light is on when detecting something. And this time I thought I’d handle the flashing a bit different. I pretty much like the simplicity of this program.

Visit Here for more.

 

More Articles to Read

Estimating Power for ADSP-BF561 Blackfin® Processors
Estimating Power for ADSP-BF561 Blackfin® Processors
Teach Your Arduino to Switch Itself Off!
Teach Your Arduino to Switch Itself Off!
Control a tracked robot with your mind (or joystick)
Control a tracked robot with your mind (or joystick)
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
A 400W (1kW Peak) 100A electronic load using linear MOSFETs
Shirt Pocket Transceiver with the Si5351 and OLED
Shirt Pocket Transceiver with the Si5351 and OLED
All metal C930e webcam
All metal C930e webcam
The Soldering Tools That Make Your Life Easier
The Soldering Tools That Make Your Life Easier
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 c ...
App note: Operation evaluation of ultra low ON resistance MOSFET supporting quick charge for 1 cell Lithium ion battery protection
Synthesized Sidetone
Synthesized Sidetone
App note: Application precautions: Power MOSFET application notes
App note: Application precautions: Power MOSFET application notes

Top




Shares