A very Urgent Question

walid1

Jun 27, 2004
749
Joined
Jun 27, 2004
Messages
749
Hi
I built a circuit that when a person pass some red led illuminate
This signal is connected to a pic to count.
The problem is that when that person pass, the led is
Intermittent lighting glows irregular and weaken and boosted in a very short time
The pic see that several persons How can stabilize it at 5 volts
Thank you very much

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Walid,
You forgot to attach the schematic of the "person detector" that drives the LED.

I think it uses a light sensor and a comparator. The comparator must have hysteresis for it to be a snap action very fast switch. Datasheets for comparators show that hysteresis is a small amount of positive feedback.

Without hysteresis, the comparator reaches a condition where both inputs are at the same voltage then the comparator amplifies its own noise or it oscillates.

 

walid1

Jun 27, 2004
749
Joined
Jun 27, 2004
Messages
749
Hi guru
Yes I forgot to attach the schematic of the "person detector" that drives the LED
The schematic is attached below from: http://www.electronic-circuits-diagrams.com/alarmsimages/alarmsckt19.shtml

19.gif


As u see, it is a Tx and Rx
I used one IR LED and not two
I put the two units in front of each other and not beside as the designer said
My module is on until some one pass so I replace the NPN transistor by PNP one
I did not use a relay, the emitter of PNP connected directly +9V and collector connected to a RED LED through a 680 ohm resistor
The main o/p is taken from the collector point to the pic
Now, I am not interested in pic (microcontroller)
When I walk in between the two units and stop for a moment  (This possibility can happen in practice
) the LED (and so the o/p) is Intermittent lighting glows irregular
What  can  I do to change this o/p to be one short 5v pulse
Thank you guru very much

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
Hi Walid,
I think the very high supply current spikes from the 555 are interfering with the IR receiver.
A 555 creates current spikes of 400mA on the power supply. The datasheet for an LM555 warns that the current spikes can affect other ICs on the same power supply and recommends using two supply bypass capacitors at the 555.
The datasheet for the TSOP IR receiver shows a resistor that feeds it supply current which is missing in your circuit and is very important for it to avoid interference.
The datasheet for the 7805 shows a capacitor at its input and another capacitor at its output.

The circuit shows an NPN transistor that is being destroyed by high voltage spikes from the relay coil. The coil should have a diode across ir to arrest the spikes.

 

elix

Mar 25, 2007
50
Joined
Mar 25, 2007
Messages
50
that circuit needs some work, i'd trash it and start from scratch.

 

elix

Mar 25, 2007
50
Joined
Mar 25, 2007
Messages
50
sorry i should have said that differently, keep the ir diodes on without the 555, measure vo on the detector and make sure that you have the detector in a black tube away from outside light and you'll find the problem. you need a 2200uf cap in front of that regulator if your going to use a relay like that.

 

audioguru2

Apr 6, 2004
12,026
Joined
Apr 6, 2004
Messages
12,026
The IR detector is tuned to about 40kHz and doesn't work if the IR is steady. The IR must be modulated at the same frequency as the IR receiver IC is tuned to.

 

elix

Mar 25, 2007
50
Joined
Mar 25, 2007
Messages
50
he wants to change how long the led stay so you need to calculate the rc time constant, put a on capacitor on vo+ to ground, it will determine how long the transistor stays on for, also when the .47uf cap is down to .6v it's going to cause intermittent operation (a series of rapid clicks at the relay) so it needs a high value resistor going from base to ground so that it has a sharp cutoff.

 

walid1

Jun 27, 2004
749
Joined
Jun 27, 2004
Messages
749
Hi dear guru

Hi Walid,
I think the very high supply current spikes from the 555 are interfering with the IR receiver.
A 555 creates current spikes of 400mA on the power supply. The datasheet for an LM555 warns that the current spikes can affect other ICs on the same power supply and recommends using two supply bypass capacitors at the 555.
The datasheet for the TSOP IR receiver shows a resistor that feeds it supply current which is missing in your circuit and is very important for it to avoid interference.
The datasheet for the 7805 shows a capacitor at its input and another capacitor at its output.

The circuit shows an NPN transistor that is being destroyed by high voltage spikes from the relay coil. The coil should have a diode across ir to arrest the spikes.
you are absulutely true
You are wonderful,
you are the better man i have dealt with him in the electronics
you our great teacher,
thank you very much
Yes, using two supply bypass capacitors at the 555 fixed the problem
Whatever I said I will not be able to express my deep gratitude to you
naba.gif
naba.gif
naba.gif
naba.gif
naba.gif
naba.gif
 
Last edited by a moderator:

walid1

Jun 27, 2004
749
Joined
Jun 27, 2004
Messages
749
I am sorry I forgot to thank elix for his interest and involvement Thank you very much

 
Top