3-30V (Sinking/Sourcing) to Arduino Input

danadak

Joined Mar 10, 2018
4,057
r=5v-(0.2v+3.6v)/20ma
r=60ohms

so I need 2.0mA through the base of the transistor
OR 200ua/30% = 666uA though the TLP290 input

Rin290 = 3 - (Vledin290) / 666 uA = (3 - 1.4) / 666 uA
=`2.4K
Correct

wattage for Rin290 = (30max-1.4)x666uA
=~20mW
No. P = E^2 / R = (30 - 1.4)^2/2400 = .34W


Regards, Dana.
 

Thread Starter

jonfarrugia

Joined Feb 19, 2010
71
My wattage is still to high! Even if I set the opto for a 2ma draw at 3v, it goes to 40ma with a 30v supply which would put the resistor to over 1 Watt!

Any other ideas? Maybe I should remove the LED and transistor altogether and just connect the optocoupler directly to the arduino input.
 

Thread Starter

jonfarrugia

Joined Feb 19, 2010
71
danadak, there appears to be some error in the way we have been calculating the required current through the TLP290

r=5v-(0.2v+3.6v)/20ma
r=60ohms

so I need 2.0mA through the base of the transistor
OR 200ua/30% = 666uA though the TLP290 input
Should be 2mA/.3 =6.66mA


Rin290 = 3 - (Vledin290) / 6.6 mA = (3 - 1.4) / 6.6 mA
=`242 ohm

No. P = E^2 / R = (30 - 1.4)^2/242 = 3.4W

This wont work!
 

danadak

Joined Mar 10, 2018
4,057
I concur, I was a decade off on sat base current needed for 2N3904. Thanks for
rescuing me.

For sure the wide range Vin and need to design for worst case a problem.

The better option is get a higher CTR coupler, or one binned for higher CTR.

I've been working on a circuit that would take a field digital input ranging from 3-30
Can you desfcribe this a little deeper, is it a DC signal or AC ? If latter freq ?


Regards, Dana.
 
Last edited:

Thread Starter

jonfarrugia

Joined Feb 19, 2010
71
What opto coupler do you suggest? I need it in smd format. I'm not stuck on the tlp290. I can use anyone.

As for the input signal, it will be a pure DC signal ranging from 3 to 30v.
The plan is to have ten of these circuits on a board. 5 of them will have one side of the field input connected together. The other 5 will also have one side connected together too. This will allow the inputs to be used as either positive signal trigger by placing 0v on the common terminal and 3 to 30 v on any of the other 5 signal inputs. Or You can use negative signals by placing 3 to 30v on the common terminal and then use 0v on any of the 5 inputs.
Just trying to make a digital input board capable of a wide range of signal options.
 

danadak

Joined Mar 10, 2018
4,057
One solution is to build a series current source with the input
to limit the current to 6.6 mA. The power still has to be dropped,
could possibly be a TO224 package or adjustable LDO with a
small heatsink on it.

upload_2019-5-7_12-22-55.png

I will look at the numbers ...

Regards, Dana.
 

danadak

Joined Mar 10, 2018
4,057
Here is a sim that seems to work, two diodes to right the input side are your coupler
input.

Missing is the negative polarity case input, and the diode in series with each LM317 for
reverse polarity.

There are LDO parts out there that can take reverse battery, you could eliminate
the need for series diode at input to the regulators, eg. just use two regulators
in parallel, but back to back, for each polarity case. And as R to set current for
each one. At 2 mA I think you can get away TO92 type packages so very little
Pdiss involved.

The other topic is LDO stability, need for ceramic bypass cap, you will have to
experiment with this.

The 290 LED starting to turn on < 2V, you can find LDOs whose reference
V is lower to move the current curve to left or right.

upload_2019-5-7_14-45-6.png

Regards, Dana.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
One thing I did not look at. For those LDOs that take battery reversal
at input, can they also take reversal at output. I suspect no, so you will
need diodes to protect the reverse polarity regulator idled.

Regards, Dana..
 

Thread Starter

jonfarrugia

Joined Feb 19, 2010
71
Thanks SensaCell! With the new configuration, I can achieve a higher input voltage if required. With 10ma through the opto-coupler and a 30% transfer I can get 3ma into the base of the transistor. So with 3ma into the base of the transistor, I can get ~30ma through the transistor. If I use a 60ohm resistor on the LED, I should be capable of getting 20ma through it.

Does this look like it will work now?
 

Attachments

Sensacell

Joined Jun 19, 2012
3,432
The current regulators don't like reverse voltage.

You could add a tiny Schottky bridge rectifier in front of the current regulator, this would also allow for a greater selection of optocouplers as it would no longer need to have back-to-back LED's to work with both polarities.
 

danadak

Joined Mar 10, 2018
4,057
Here is a lower cost solution than LDO. Pick JFET for worst case Idss min. LED turnon seems
to be around 2.5V.

Top curve is Vdrain JFET, next is Jfet drain current, last Jfet power.

Pick JFET to have min Idss of 2 mA, also make sure spread (max) is reasonable
so Jfet power stays low. JFET make sure it has 50V Vbr. Diodes ordinary silicon
should be fine.

upload_2019-5-8_5-7-28.png


Regards, Dana.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
If you have transients that exceed 30V use a TVS diode Jfet drain to ground.

Or move it inside bridge, eg. across field source. That would protect eveything
downstream. Use a MOV design guide to do selection.


Regards, Dana.
 
Last edited:

Sensacell

Joined Jun 19, 2012
3,432
It's going to take a lot more than 3 V to turn this thing on.

Add up all the voltage drops.

Vled in the opto 1.2V
White LED 3.2V
Bridge rect 1.2 V
The current reg needs about 1.8V to start some current flowing....

7.4 Volts.

You could make things easier on yourself if you keep the White LED current down to a few mA, 20 ma is total overkill for an indicator light.
Stick to the previous circuit, with say 1-3 mA of LED current.
 

dendad

Joined Feb 20, 2016
4,452
the bridge and current diode and opto LED all in series will need a minimum input volts of around 7 V as stated earlier.
You cannot add much in series with the opto input as you want a 3V minimum working voltage. You do need to take the voltage drop of your extra bits into account.

You could try this.
The 270R needs to be a 5Watt one and the back to back 2V Zeners limit the volts to the opto LEDs to about 2.7V max, and the 47R limits the current to around 20mA max. The LED current will be about 5mA at 3V, if I got my calcs right. It is very early morning (or very late night) here so they may be off a bit ;)


3-30VinOpto.jpg

EDIT:
Try to test for the minimum current the opto needs to switche in your circuit, then double it for a safety margin. Calculate the resistors then to suit to limit the dissipation when running on 30V.
You may find a single resistor is all you need if it can be scaled to just switch on 3V input, and still be below the max 50mA LED current at 30V. Keep an eye on the dissipation.

For example, a 620R 2Watt series resistor will give around 2mA LED current at 3V, and a bit under the max 50mA at 30V. That may just do the job.
 
Last edited:

Sensacell

Joined Jun 19, 2012
3,432
Does it have to work with an AC input?

If you can field select the input wiring for the correct polarity, then a single diode in series with the regulator would work nicely.

Then it should start to turn on 3~3.6 V
 
Top