Alright, i got all the components that I needed. now i just have to assemble them. The fun-est part.
The sensor is assembled now, but i don’t know if it works. The basic atom is returning nothing but 1023 from the A/D pin. At first I thought one of the LED’s was backwards. But I switched it around and same thing.
Edit: well, i guess im going to have to face it now. my atom has gone nuts and is giving me random values with nothing connected.
its alive. real AI. LOL
well it is a 10-bit a/d so 1023 is just returning 5V on the input pin. this could be because you are driving it to 5v or if there is a pull-up resistor.
wowy post the schematic of what you are building and pictures of your assembly so we can take a look at it for you and see if there is something amiss.
It’s a pretty simple sensor so i doubt i made any mistakes.
Oh, and i managed to find a smaller capacitor. same specs.
http://www.majhost.com/gallery/DarthToa/Robots/circ.png
everything is connected exactly as it should be. The receiver LED is supposed to return a value depending on how much IR light it receives. am i missing something?
According to the diagram, A 50K trim pot is used to calibrate the circuit. This acts as a voltage divider and also adjusts the sensitivity. Do you have this installed somewhere else ?
No. I asked if the resistor, capacitor and LED’s were all i needed. I do have an old pot from a servo. would that work?
If the pot that you have is in the range of 47K-56K it will work just fine.
I really don’t know what the specs are. I just took it from an old HS-422 servo.
Usually the value is written on the pot. If it’s not then you will need a multimeter to verify the value.
Ok there’s a 5KE written on the bottom of it. I guess it’s not the right kind of pot.
Do you happen to have any spare resistors in the range from 10K to 47K ?
You can you these to replace the pot for testing the unit. Then you can replace them with the pot.
From the results that you are having it looks like you have the Rx diode connected the wrong way. Have a look at the diode and observe the plastic near the pins. The plastic on the cathode of the diode should be straight-even. The plastic on the anode should be Round.
I do have a bunch of old resistors lying around so i should take a look at those.
Yes the LED is connected properly. i thought it wasn’t at first because i forgot how to connect it but i actually had it right.
I found a 10k ohm resister so I tried it. still get 1023 from basic atom. The only conclusion one might come to is that the sensor works, the basic atom doesn’t.
Edit: oh i forgot. I have another pic.
http://www.majhost.com/gallery/DarthToa/Robots/img_2948.png
you can tell the light is being emitted from the sensor.
How did you connect the resistor? It should be connected across the capacitor.
Please double check the polarity of the of the receiving sensor.
Also cover the receiving led with a black covering and see what happens.
Across the resistor? I have no idea. Here’s how i wired the receiver.
majhost.com/gallery/DarthToa/Robots/led.bmp
I have tried putting black tape over the emitter and the receiver.
According to your diagram, you have the 10k resistor connected in the wrong place. Connect it across-in parallel with the capacitor
Like this?
http://www.majhost.com/gallery/DarthToa/Robots/led2.jpg
Sorry for all the questions. It’s been a really long time since i’ve read about electronics so i forgot all about how to connect everything.
Yes
OMG thanks tolisn! it works! I get less ambient lighting too if I put black tape over the receiver.
Here is a pic of the finished sensor.
http://www.majhost.com/gallery/DarthToa/Robots/irsensor.png