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

App note: Infrared remote control implementation with MSP430FR4xx
App note: Infrared remote control implementation with MSP430FR4xx
Gesture Controlled Smart Home
Gesture Controlled Smart Home
Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone

Top


Shares