Optocouplers and CTR

Thread Starter

dandy1

Joined Sep 30, 2017
178
You have a diode blocking the current into the gate. (Put a diode between base and emitter, anode to emitter, cathode to base, because transistors don't like their emitter-base junctions reverse biassed.
That's the idea of the diode, to block positive voltage only allow negative thru
 

Ian0

Joined Aug 7, 2020
13,131
That's the idea of the diode, to block positive voltage only allow negative thru
Then you need a PNP transistor, with its emitter connected to +3.3V.
Alternatively, stick with the NPN transistor and put a resistor between base and 3.3V to turn it on most of the time, then the negative pulse turns it off. You get a positive going pulse at the collector corresponding with the negative pulse from the ignition.
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
Then you need a PNP transistor, with its emitter connected to +3.3V.
Alternatively, stick with the NPN transistor and put a resistor between base and 3.3V to turn it on most of the time, then the negative pulse turns it off. You get a positive going pulse at the collector corresponding with the negative pulse from the ignition.
Thanks for the ideas, Does this mean that both transistors are constantly conducting? even without signal
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
Can I get a more precise definition of the input signal than was provided by the ambiguous scope trace?
I Will try to get a clearer picture tomorrow, I'm new to scopes but this is a very cheap 'christmas cracker' variety - don't hold your breath
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
I have a question, what is the power source for the mcu?
buck converter fed by LA battery, have had it running off that setup without issue - yet! Although i am a little concerned when the charge coil reaches 17/18 volt but i think that is down to a low state of charge.
 

Thread Starter

dandy1

Joined Sep 30, 2017
178
So I've tried out all the circuits suggested an here's what I think.

The optocoupler looked promising and with a lot of tweaking with resistors I did manage to get some decent results but this is at the disadvantage to NOT knowing how much current is really being supplied to the opto. If the Signal was a steady voltage then I would have definitely gone the opto route but I can not be certain of the possible degradation in the opto.

Both NPN and PNP circuits worked as intended and I see no reason In not using them other than they will constantly draw power - albeit small - may not be suitable for battery operations.

The circuit I have decided to go with is:
1.png
Reason being is that its simple, doesn't use power when off and its not influenced by the size of the resistors (5-200K tested).

This was a suggestion from my other thread and will be carried on there:
https://forum.allaboutcircuits.com/threads/how-to-process-a-funky-signal.195402/
 
Top