Shop OBEX P1 Docs P2 Docs Learn Events
IR over two stamps — Parallax Forums

IR over two stamps

dr hydradr hydra Posts: 212
edited 2011-11-04 08:12 in BASIC Stamp
I am looking at an old doc...BASIC Stamp 1 Application Note 11 – Infrared Communication...I planning on using the listing schematic to communicate between two stamps...however, it appears that the GP1u52x does not exist any more...on the receving end can I just use a simple infrared reciever like 350-00014 as a replacement?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-01 10:28
    Something like this or this should work ok. Keep in mind that these are 38KHz IR receivers while the GP1U52X is for 40KHz. You'll need to adjust the timing resistors on the 555 timer to compensate. I think there's a sample circuit in the "IR Remote for the BoeBot" tutorial near the end of the tutorial.
  • dr hydradr hydra Posts: 212
    edited 2011-11-02 06:58
    Mike,

    Thank you for your reply...I have a few more questions on the subject...after reading the tutorial "IR Remote for the BoeBot"...if I use a microcontroller such as the SX chip with USART hardware support...I should able to skip the 555 timer and let the USART hardware transmit the signals...is that correct? Then I would only need a IR LED and resistor for the tranmitters. Based on the 38K receiver...any baud 38000 or less should work...is that also correct?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-02 08:51
    No. The USART hardware will not generate the signal needed without the 555 timer. You need a 38KHz carrier that's gated on and off to represent the 1's and 0's of the serial data produced by the USART. You can use the microcontroller's timer to produce the 38KHz carrier ... in the case of an SX, you'd have a short interrupt routine involved. You'd then simulate a USART in software that, instead of toggling and I/O pin, would turn the timer on and off to modulate the carrier. With other microcontrollers, you can use a timer to directly generate the 38KHz carrier and again bit-bang (generate in software bit-by-bit) the serial data turning the timer on and off.

    Your Baud will need to be at most 4800, probably more like 2400. That would give you 10-15 cycles of the 38KHz carrier per bit time. The IR detector has filters in it to slow down its response to aid in noise filtering and that limits the Baud that's possible to receive.
  • dr hydradr hydra Posts: 212
    edited 2011-11-02 10:22
    Mike...thank you

    On the receiving end...can I use the USART hardware to read the signal...I am guessing, not...because the signal is going to be modulated in the carrier signal. Is that correct?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-02 12:25
    You need the IR detector to process the carrier and produce the slower on / off logic signal for the USART to process. It would be possible to do everything in software except the raw IR reception with something like the Propeller or the SX, but you need the 555 and the IR detector / demodulator with slower processors like the Stamps.

    Look in the Wikipedia for descriptions of asynchronous serial data transmission. They have nice pictures and diagrams.
  • dr hydradr hydra Posts: 212
    edited 2011-11-02 13:48
    Mike,

    One more quick question...on the receiving end...does 38k IR detector filter out the modulation and show
    only on and off signals?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-02 16:15
    Look at the documentation for the IR detector. It shows a block diagram for the internals of the detector.

    Yes, the whole purpose of the IR detector is to take in a modulated 38KHz IR signal, amplify it, detect the 38KHz carrier, and output a logic signal (on / off) with the signal on when a 38KHz carrier is seen and off when the carrier isn't seen.
  • dr hydradr hydra Posts: 212
    edited 2011-11-03 11:28
    Mike.


    I think I got it...one last question...so on the IR detector end...that microcontroller chip should be able to use the RX pin and USART hardware and read the signal. The only hardware needed to read the signal would be the 38K IR detector...this works because the IR dectector outputs a on when a 38KHz carrier is seen and off when the carrier isn't seen...therefore, the signal to the microcontroller is just the original signal that the USART hardware can read...just like it had been sent through a wire connection...right
  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-04 08:12
    Yes, except that there's no USART hardware. All of the Stamps and the Propeller do their asynchronous serial I/O in software although the software is hidden in the case of the Stamps ... it's part of the Basic interpreter code which is built-into the Stamp. As far as you're concerned it could just as well be made out of hardware.
Sign In or Register to comment.