Shop OBEX P1 Docs P2 Docs Learn Events
Infrared receiver troubles — Parallax Forums

Infrared receiver troubles

willthiswork89willthiswork89 Posts: 359
edited 2006-06-27 20:52 in BASIC Stamp
i bought a infrared receiver module and a highout IR led. the receiver has three pins OUT,GND,VCC

i took this and did

P7~(red-red-brown-gold)->OUT
VSS->GND
VDD->VCC

then i did

P8~(Brown-Black-Red)->anode lead
VSS-> Cathode Lead

for the IR

now after that i wrote code that folows

irDetect VAR Bit
DO
FREQOUT 7,1,38000
irDetect = IN6
DEBUG HOME, "irDetect = ", BIN1 irDetect
PAUSE 100
LOOP

it always stays 1! so whats the matter?

oh yea the reciever model number is 276-0640 and the led is 276-0143 thanks for the help!
«1

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-23 20:42
    You have some stuff hooked up to P7 and to P8 -- but then you're going to irDetect = IN6?
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-23 21:07
    no my bad its P7 and P6
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-23 23:31
    I've looked up those part numbers at radio-shack, but they don't have any data sheets to refer to.·

    I thought, the BS2/2e FREQOUT limit is 32767 kc, the other variants have higher FREQs possible.

    But then, I said, "Hey, lookit" -- if you are going to FREQOUT then you can't do anything else; you cannot FREQOUT and irDetect at the same time.· STAMP doesn't multi-task.

    You can probably set up the detector module to drive an LED when it detects the FREQOUT/IRED.


    Post Edited (PJ Allen) : 6/23/2006 11:35:15 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-24 00:37
    PJ, using the parts we sell what he posted is possible.

    OP, we cannot guarantee other parts from other manufacturers will work with the exact schematics we use.· You may need to adjust things like the resistor on the LED depending on that LED rating.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 00:42
    How can you FREQOUT AND irDetect?· I figure/d it would sit and FREQOUT for the duration specified and then go to the next instruction where it would be Detecting without any FREQOUTing.· Not so?

    Post Edit --
    Does the detector hang in a detect state long enough (delay-wise) to get snagged by the irDetect instruction?

    Post Edited (PJ Allen) : 6/24/2006 12:47:43 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-24 00:56
    PJ, that is part of it...It also has to do with a very small delay in how the detector decodes data from a carrier frequency, but yes, the bit would normally be available at the input if you do the FREQOUT and immediately read the port.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:08
    hi,thanks for the replies, the rating is 1.2Volts on the Led.. im not sure what type of resitors to use. the only part throwing me off is that it has three pins on the reciver
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:11
    willthiswork89 said...
    the only part throwing me off is that it has three pins on the reciver
    Well... It must've come with some pin-outs·on the back of the "blister-pack".· What's the story, morning glory?
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:13
    Yea

    pin 1 is OUT
    pin 2 is GND
    pin 3 is VCC

    not sure the vcc? i take it like...vdd for the vcc and the vss to the gnd then a resitor to the input
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:15
    Hmmm...

    Maybe the output needs to be "pulled up"...

    Try a 1K-10K from OUT to VCC (+5, whathaveyou) and a jumper from DET-OUT to your irDetect stamp pin.· Get it?
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:19
    mm kinda not really so the out goes to the vcc with a 1k-10k not sure what the det out is? lol sorry i feel stupid too much tech lingo for me right now
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:24
    i currently am using a 1k resitor its on the OUT and i have the OUT going to the P8, the GND going to the VDD and the VCC going to the VSS
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:25
    see attached pic
    Vcc = +V +5
    Vss = GND
    !!!
    374 x 348 - 7K
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:27
    ahh okay so there needs to be a bridge with the OUT and the VCC
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:28
    Sometimes... give it a whirl
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:34
    alright the reading is always giving 1 here ill draw up what ive tried and show you
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:35
    Do you have a voltmeter?· That'd sure help.

    [noparse][[/noparse] Anybody-else here tonight, feel free to jump in... ]

    Post Edited (PJ Allen) : 6/24/2006 1:40:01 AM GMT
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:40
    i had one its boxed up because of a move i guess i could set a normal led in where the IRLED is make sure its working(the connection) but im almost positive its the way the receiver is connect.

    thanks pj i dont mean to be a hassle at all i know im probably annoying as hell lol

    -edit

    oh yea and i also tried taking the power and the out to the same thing then briding from there but the reading stays one because its reading that voltage
    435 x 378 - 11K
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:44
    Oftentimes these have an "open-collector" output.· The paucity of data regarding this unit, esp. as it's from radio-shack, is perplexing.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:47
    You should try putting the IRED into a LOOP where it FREQOUTs for 1000 and then PAUSE 1000.· While it's doing that, with your voltmeter, you could measure the output voltage·of this detector and see if it goes HI / LO (+5 / 0) up / down.· Get me?· You'd also be able to measure the forward-voltage on the IRED to see if you have that right, too.· (BTW -- the IRED, the lead nearest the flat on·the circumference, that is the cathode [noparse][[/noparse]K]).
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:47
    they dont make datasheets or anything for it?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-24 01:47
    In your JPG you show the Vdd connection to the right side and the Vss connection to the left.· In fact they are reversed on the board, which means either your schematic is in error or you have them wired backward.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:51
    no on the wiring connection the pin VCC im guessing is the positive which goes to the VDD, the Ground in going to the Right Side or the VSS, the output is going to a 1k resitor which is going to p15, i verrified the LED is flashing by connecting a normal LED which flashed it, so im just not getting the receiver correct. i assure you the connectors are right.. i know the right side is negative left is positive and middle is straight from the battery
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:53
    P15??·
    Straight from the battery???· Homework board.
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:54
    no im talking about the BS@ microcontroller the VIN lol
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2006-06-24 01:56
    (sheewww)

    Hey, Voltmeter -- try that test I suggested, gotta get that much right.
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 01:58
    what am i testing? the output ?
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 02:01
    i think it may be at my moms house, i can assure the circuit is working by using an LED right>
  • willthiswork89willthiswork89 Posts: 359
    edited 2006-06-24 02:11
    http://www.hebeiltd.com.cn/led.datasheet/PL-IRM0101-3.pdf there is a datasheet for somthing with three pins so it must be pretty much the same setup...
  • bennettdanbennettdan Posts: 614
    edited 2006-06-24 03:02
    Why not wire a 555 timer so you can get the IR LED to pulse at 38khz then read that pulse with your basic stamp so you can take out the possablility that it is your code?

    Post Edited (bennettdan) : 6/24/2006 3:07:58 AM GMT
Sign In or Register to comment.