hi all
how we can turn on infrared led using PIC16F84A
and ir reciver "Object Detection"
hi all
how we can turn on infrared led using PIC16F84A
and ir reciver "Object Detection"
i would suggest to use something else than a 16F84 for that. At least a 16F628.
PWM to the LED, and read the receiver signal frequency. Later you compare the PWM frequency and the receiver frequency. If the receiver < PWM (by a safety margin), your iR beam have been broken, thus object detection.
Sure it's possible with grandpa f84, with a bit of pain thought!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
you cannot find anything better than this
1. http://www.rentron.com/Micro-Bot/index.htm
2. http://www.rentron.com/Micro-Bot/IR_Nav_Demo.htm
regards
like how? to generate pulses and measure them at same time ? there is many situations when you need to do something similar(control couple H-bridges + response to RF+something else) and let not forget that usually there is no more than 2 hardware pwm in most PICs, so any program solution suggestions ?. first what came to my mind is to use 2 pics, one as many pwm's generator and other for everything else.
Last edited by therian; - 9th March 2007 at 04:32.
yes you could use many different PIC or mess around a timer interrupt routine.
Depending of the wanted frequency it could work pretty well. If you're using the hardware PWM, YES you can do something else as the PWM run in background.
A timer interrupt will be a bit more tricky to implement, but doable for sure.
a 16F628, 16F88 are nice for that. for 2 or more PWM output (2 ccp module), you probably have to jump to a 28 pin device like 16F876 or many 18F.
The Bruce example is pretty nice, you just need 1 PWM and few channel, then you sample one channel by one.
Last edited by mister_e; - 9th March 2007 at 04:45.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hey, I actually asked this question a while back but it was dealing with PWM - If you do a search on PWM my post should come up. Mister E and Skimask both helped me out on it -
I actually got it working perfectly, I used the 16F877A and the two PWM modules on it to output a 38Khz wave on two IR leds - the IR receiver modules were made by Panasonic.
If the IR receiver module picks up a 38Khz signal it goes low otherwise its high. So simply put them facing the same direction and if an object is there it will reflect the IR signal.
Also I would wrap each IR led with black shrink tubing so the IR signal is more directed to a certain area.
Bookmarks