giovaniluigi
Member level 1
- Joined
- May 30, 2009
- Messages
- 32
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,626
I need to read a PWM pulse frequency from an industrial sensor with a MCU.
In order to isolate and protect the MCU port I've used an opto-coupler and to drive the LED from opto-coupler I've used a bipolar transistor.
The output from sensor then, enters into the base of transistor, which drives the opto-coupler LED, which drives the photo-transistor and finally reach to the MCU input port.
That would be the "sequence followed" by the signal:
[SENSOR] -> [BJT] -> [OPTO-COUPLER] -> [MCU]
The problem is that I have a DC offset coming from the sensor.
That small DC offset is about 1V, and it is enough to bias the BJT's base, thus the BJT is always conducting.
The signal from sensor is weak and can't drive directly the LED from opto-coupler, that is why I'm using the BJT.
I thought in using zenner diodes to solve this, but once the sensor can't provide too much current, I think that this diode may cause some problems.
I just want to recreate a simple hysteresis from a logical port.
How can I remove that offset or introduce some hysteresis in input stage of my circuit ?
In order to isolate and protect the MCU port I've used an opto-coupler and to drive the LED from opto-coupler I've used a bipolar transistor.
The output from sensor then, enters into the base of transistor, which drives the opto-coupler LED, which drives the photo-transistor and finally reach to the MCU input port.
That would be the "sequence followed" by the signal:
[SENSOR] -> [BJT] -> [OPTO-COUPLER] -> [MCU]
The problem is that I have a DC offset coming from the sensor.
That small DC offset is about 1V, and it is enough to bias the BJT's base, thus the BJT is always conducting.
The signal from sensor is weak and can't drive directly the LED from opto-coupler, that is why I'm using the BJT.
I thought in using zenner diodes to solve this, but once the sensor can't provide too much current, I think that this diode may cause some problems.
I just want to recreate a simple hysteresis from a logical port.
How can I remove that offset or introduce some hysteresis in input stage of my circuit ?