12C508 IR Proximity Detector
적외선 LED와 적외선 리모콘용 수신센서를 이용한 근접센서 프로젝트입니다.
포토센서를 사용하는 방법보다 비교적 먼거리의 물체를 한개의 IR수신 IC로 감지합니다.
첨부된 회로도와 소스의 타겟은 PIC12C508입니다.
12C508은 IR수신센서에 내장된 캐리어주파수 38kHz와 같은 캐리어로 변조된 신호를 발생하여
수신IC의 신호를 감지하여 L, R 출력을 로직신호로 출력합니다.
용도는 Lego의 로봇제어용 근접물제 감지용 센서입니다.
-This project is inspired by the DPRG IRPROX project.
They have a pretty good PCB layout and idea.
I would like to thank them for posting their project for all of us to see and learn from,
I wouldn't have started PIC programming without them,
or at least not nearly as quickly come up to speed!
The pinout on my board allows either a five-wire
or a four-wire connection to be made the former uses a disable line if desired.
You can also put in a resistor or use a trimpot to adjust range.
The trimpot locations are very generic, most pots will fit. Be careful not to adjust pot to 0 ohms!
The IR proximity detector works very well, even in a brightly lit "noisy" environment.
Instead of modulating the IR LED for 600us and then looking for a detection,
I now look for a detection after every on/off cycle of an IR LED and count the number of hits that I get.
I also look during the 'off' cycle when none of the IR LEDs are on
and count the number of false hits that I get there.
If I get more good hits than false hits then I say its a true detection.
I then increment a counter as a sort of timer, when it passes a certain threshold, I notify a hit.
At this time I check to make sure that a minimum number of good hits has been attained.
At the same time I keep track via another time-out counter of noise hits.
When this counter passes a certain threshold it then removes any detection that has been set.
I fiddled a lot with the various threshold values for minimum number of good hits, time-out values
and divisors for updating the false hit counts, and finally settled on the ones that currently used.
I'm calling it a success and moving on to other projects! Here is the source code for the, uhm,
- DLC IR proximity detector.
- Here is the PDF documentation for this kit.
I am now selling the complete kit,
it was brought up to me that the exorbitant shipping costs
from some distributors makes a full kit a real value added. So, here it is.
The board, PIC, LEDs IR components and resistors as well as instructions are for sale for $20.00. .
I will make this in either 38KHz or 56.7KHz models.
- Contact me if you areinterested.
Bulk buys of 10 or more or robotics clubs get discounts!
Here is the circuit diagram showing the full project layout.
The newest board allows you to use any IR detector that has either the GP1U58 pinout
(cans and LiteOn module) or the Sharp IS1U60 pinout (including Panasonic 4601 or 4611)
by changing the two jumpers from position 'A' to position 'B'.
TTT Infra-Red Proximity Detector Kit Revision D2
The TTT IRPD board utilizes a PIC12C508A to modulate two IR LED’s at 38 or 56.7KHz
and look for reflections on an IR detector module.
Using the TTT IRPD with another controller is simplicity itself,
you can even use it on a BEAM robot because no computational power is required
at all from the host computer.
The IRPD requires +5V and less than 5ma total current on average,
so its not very power hungry either.
This version is small and simpler to build than previous versions.
There are five pins to connect the IRPD to your host controller, +5V, Ground, Left detect output,
Right detect output and Enable are the connections used.
The Enable pin does not need connecting unless you wish to disable the IRPD to avoid detection
by passive IR sensors.
The “I” pin is the Enable, its also known as the Inhibit pin,
and if you pull this pin low the IRPD stops broadcasting IR and stops looking for reflections.
If this pin is left high then whenever a signal is detected
when the Left IR LED is flashing the L pin will go high.
The same occurs when the Right IR LED is being flashed.
An object straight ahead will turn both outputs on.
These are the components that you get with your TTT IRPD kit:
1- TTT IRPD PC board
2- TTT IRPD programmed PIC
3- Panasonic 4602, 4612 or 4614 IR demodulator
4- 2 LiteOn 40 degree IR LEDs (will be clear, with black dot if
visible LED is also clear.)
5- 2 visible light LEDs (May be clear, red or green)
6- Assorted resistors and capacitors.
◆ Some notes for building your TTT IRPD board:
1- Two resistors are for the IR LED’s, with the 4612 and 4614 IR demodulators 1K resistors work well.
These setups will give ranges of about 12 to 18 inches.
If using the Panasonic 4602, use 470 ohm resistors. The 4602 has no metal case.
DO NOT REMOVE THE METAL CASE ON THE 4612 OR 4614.
The holes for the resistors are designed to use trimmer pots
so you will have to stand your resistors up to fit them to the board, they will not lie down.
Feel free to experiment with ranges by using trimmer pots.
Standup trimmer pots fit better on the board.
There is a pattern of 4 holes for resistors or pots for each side.
2- 1 .1uf ceramic capacitor, usually yellow
3- 1 10uf electrolytic capacitor, looks like a pop can (‘-‘ lead goes in round hole)
4- 1 5-pin header type connector is needed, many connectors will work here,
or you can wire it directly to your project.
5- 1 4.7K resistor, yellow, purple, red, gold bands, goes in spot marked 10K or 4.7K.
6- Place the black shrink tube over the IR LEDs such
that only the tip of the dome sticks out of the black tubing.
7- OPTIONAL 2 standard LEDs, short lead goes in square hole.
8- OPTIONAL 2 1K ohm resistors (brown, black, red, gold) for these LED’s, goes in spot marked 1K
9- OPTIONAL 8 pin DIP socket for the PIC12C508A
There are pads on the board to install trim pots for the IR resistors,
be careful you don't trim them down to 0 ohms when testing!
If you are using the included 1K or 470 ohm resistors they must “stand up”
on the board as there is no space for them to lie down.
You really don’t need the OPTIONAL parts and if you don’t load them your current needs drop by over half.
They are useful as “bug eyes” because they will light when something is detected on that side.
This is also useful for troubleshooting your controller if it isn’tdetecting anything.
Besides, they look cool. Install the resistors and capacitors in the board first.
You can keep them in when you turn the board over for soldering
by bending their leads away from each other. Next install the socket for the PIC.
It is an 8-pin socket and if you are new to soldering
I recommend you use this instead of soldering the chip in directly.
This way you won’t risk frying your chip! Now install the normal LED’s and the Panasonic demodulator.
Make sure that the module is centered approximately on the board,
this assures that you soldered the leads on properly. Now, solder in the IR LED’s.
Install these so that they are elevated off of the board and bent over so
that they look directly ahead at about the same height as the IR module’s face.
The normal LED’s and IR LED’s install so that the short lead that is on the flat side
of the LED goes into the square hole.
Finally, solder in the 5 pin connector, or whatever you are using there.
Your board is complete. Make VERY SURE that you have no solder shorts on your board.
◆ Troubleshooting and LED arrangement and Use
Apply power to the proper pins of the 5 pin connector.
To make sure your board has been built properly get out your trusty DVM,
put the negative test lead on pin 8 of the PIC socket and look for these voltages on these pins:
1- 5V on pin 1 of the PIC socket
2- 5V on pin 4 of the PIC socket
3- 5V on pin 6 of the PIC socket
4- around .6V or so +/- .4V on pins 5 and 7 of the PIC socket
If your board detects when nothing is there you are getting IR from the LED to the demodulator,
adjust your LEDs and/or your black shrink tubing until it works correctly.
In very rare instances the board will appear to detect at all times, no matter what you do.
If this happens then solder a small wire to the metal case of the demodulator
to ground – I use wire wrap wire.
This will solve the issue. If these all check out then remove power and install the PIC.
Make sure that the pin labeled “+” is in the square hole on the PC board.
When you apply power this time, the LED’s will light up on the side
that the board detects an object. You can adjust the angle that the board “sees” objects
by changing the angle of the IR LED’s to face somewhat away from the IR module.
The wider the angle, the further to the side it will see; but,
wider angles will enlarge the "dead zone" directly in front of the IRPD where nothing can be seen.
You can experiment with resistor values or the trim pots to the IR LED’s
to change the range at which an object is detected.
The TTT IRPD board is now ready to install into your project!
|Lego Sound Sensor|
|Sharp IR Sensor Hack|