12C508 IR Proximity Detector

AVR Project 조회 수 47041 추천 수 85 2004.04.27 10:00:26


적외선 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

◆ Introduction
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.

◆ Construction
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.

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!

List of Articles
번호 제목 글쓴이 날짜 조회 수

H/W 아이폰 충전 회로 file

  • eastsky
  • 2010-10-29
  • 조회 수 28455

iPhone Connector Info (Pin 27) USB Data (+) Pins 25 and 27 may be used in different manner. To force the iPod 5G to charge in any case, when USB Power 5 VDC (pin 23) is fed, 25 must ...

AVR Project UHF FSK PLL RF Module (NR-FPCX) file

  • eastsky
  • 2010-10-20
  • 조회 수 41619

UHF FSK PLL방식 무선 데이터 송/수신 모듈을 이용한 AVR 회로도 및 HEX 파일입니다. 기본적으로 CodeVision 에서 컴파일 한 HEX 이며, 2세트간에 10~20 Byte 이내에 데이터 송수신을 위한 회로 입니다. RF-Module ...

AVR Project Keypad & Encoder file

  • eastsky
  • 2010-10-15
  • 조회 수 32776

74HC138 을 이용한 10 * 8 Keypad 회로 입니다.. Encoder 을 사용할 때 시계방향과 반시계방향을 체크하는 방법입니다.. 여러가지가 있겠지만, 일정 시간 샘플링을 통한 방법이 가장 쉬우면서도 유효하다고 봅니다.

AVR Project JTAGICE mkII 상세 설명서 file [3]

안녕하세요 ⚑ 제가 JTAGICE mkII 상세 설명서를 얻었는데요 이 자료를 함동호님과 회원님들에게 드리려고해요. ★ 앞으로 많은 협조를 ★

H/W 스텝모터회로 - 테스트용 file

전에 스텝모터 테스트용으로 만든 회로 입니다.. 실제로 테스트 해보니 잘 돌기는 하는데... 좀 그러네요 ^^; 학교에서 테스트용으로 사용하면 좋을 듯 합니다.. 덤으로 196 모터 회로... 추가

AVR Project ATtiny26L의 AD 변환과 PWM 출력제어 file

http://www.geocities.jp/kuman2600/k2adc.html출처 : www.ipstack.co.kr 손잡이를 돌리면 모타의 회전이 바뀐다. 커다란 가변권선 저항을 직렬로 넣어 콘트롤하는 일이 있습니다. Tiny26L은 AD변환과 PWM기능이 있으므로, 가변저항으로...

AVR 강좌 AVR 관련 자료 file

http://cafe.daum.net/avrworld압축을 푸시면 아래의 자료가 있습니다.. 1. Atmega128 비트설정.pdf 2. ATMEGA 시리즈 클럭 Securit bits 설정방법.pdf 3. 코드비젼_한글메뉴얼.PDF

AVR Project Atmega16을 이용 74HC595 사용 file

http://scipia.co.kr/index.php?i_div=Its_tech_note&i_no=9이츠임베디드Atmega16을 이용 74HC595(8bit serial-in, serial or parallel-out shift register with output latches; 3-state) 사용기 입니다.. 이 자료는 이츠임베디드에...

AVR Project KLM-162CAN 을 이용한 전광판 file

http://myhome.naver.com/dolmangi/ 다른님이 만드신 전광판인데, 오래되어서 자료링크가 안되네요 ^^:   전광판 Electronic Signboard   많은 분들께서 전광판에 관심을 보여주고 계셔서 게시판을 만들었습니다. 많이 이용해...

AVR Project LED 전광판 file

http://home.wanadoo.nl/electro1/avr/dotmatrix.htm 개발자 사이트 : http://home.wanadoo.nl/electro1/avr/dotmatrix.htm 관련 사이트 : http://www.edaboard.com/ftopic58756-30.html 74H595 Shift Register App : http://www.kronosr...

AVR Project Stepper Motor Controller file

http://www.doc.ic.ac.uk/~ih/doc/stepper/control2/connect.html 새 페이지 2   Stepper Motor Controller Connection Diagrams The wires from the Logic PCB connector to the stepper motor in a TM100 Di...

AVR Project Christmas Tree file

http://www.grantronics.com.au Christmas Tree Here is a fun project to put on your Christmas Tree or in your front window to impress the neighbours. Multi-Coloured Christmas...

AVR Project Mega8 Door Bell file

http://www.microsyl.com 초인종 -줄거리 초인종은 간단해 보이나 그렇지 않다! 펄스폭변조로 정현파를 발생시키는 것은 매우 까다롭다, ATMega8의 발진으로 부터 OC1A를 출력하고 정현파 참조표로 부터 펄스폭이 정의된다. 1.8khz의...

AVR 강좌 Codevision C언어 Manual file

코드비젼 c언어 메뉴얼입니다

AVR 강좌 스텝모터 구동 및 구동회로도 file

전자부품연구원(KETI)에서 만든 기술 자료입니다 .

AVR Tool AVR OrCad9.1 Capture library file

http://www.dr-jekyll.pe.kr라이브러리 파일을 다운로드 받아서 압축을 푼후 capture\library\atmel 폴더에 넣으세요. 그리고 회로를 그릴때 add library해서 그리시면 됩니다. 라이브러리에 포함된 cpu리스트입니다. ATTINY12 ATTI...

AVR Project 12C508 IR Proximity Detector file

http://users.frii.com/dlc/robotics/projects/botproj.htm 적외선 LED와 적외선 리모콘용 수신센서를 이용한 근접센서 프로젝트입니다. 포토센서를 사용하는 방법보다 비교적 먼거리의 물체를 한개의 IR수신 IC로 감지합니다. 첨부된 ...

AVR 강좌 일반, 모터,센스, 전원회로 링크 file

** 예전 땜쟁이가 사는 곳의 링크 입니다 ** 일반회로 http://www.6k2avl.com/k_logic1.htm 모터회로 http://www.6k2avl.com/k_logic2.htm 센스회로 http://www.6k2avl.com/k_logic3.htm 전원회로 http://www.6k2avl.com/k_logic4.htm

AVR Project Led Sign with MMC Memory file

http://www.microsyl.com/     Led Sign with MMC Memory Card   History At the beginning this project was to buy a led sign to interface with my home automatisation network. This automatisation network ...

AVR Project MP3 Player file

http://www.microsyl.com/     MP3 Player History I decided to do this project for several reasons: first I like music, second I have a ton of MP3 and third I wanted to be able to listen those ...