Multiple voltage to microcontroller design.

Status
Not open for further replies.
Yes, you can do that. The optocoupler LED is operated by passing current through it, as you have seen, the voltage isn't important as long as it is high enough for the LED to operate (Vf = 1.2V) as you would limit the current flowing into the LED with a resistor anyway. The solution is to use a 'constant current generator'. This is a circuit that adapts it's apparent resistance so the same current flows through it regardless of the voltage you apply across it. A constant current generator in series with the LED makes the current through it stay the same whether you apply 5V, 24V or anything else within it's component ratings. Now you have the good news, here's the bad bit - the CC generator itself drops some voltage so your minimum is no longer Vf but Vf plus the drop in the generator. As space is important, I would suggest you look at the LM334 IC which in TO-92 package has 3 pins, you wire it in series with the optocoupler input and add a resistor across two of it's pins to set the current you want. It's minimum voltage drop is 1V which limits the lowest voltage you can detect to around 2.2V but it's maximum is 40V so it extends well beyond the voltage you are interested in.

Brian.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…