Converting sensor output from 3.3v to 12v

I have a control board which uses relays to control electromagnetic door locks and also processes inputs from locks microswitch (to detect open door) and some PIR sensors via optocoupler to a MCU. Those inputs are dry contacts - which means I provide 12v to the COMMON contact of microswitch. NO contact of microswitch goes to the input of 817 optocoupler and GND to the 817 GND.

This works fine, however I need to also process contact from a LD2410 presence sensor, which gives just 3.3v TTL output. I have modified the board to not feed 12v on some channels, however I have tested it, and 3.3v is not sufficient to drive the 817 (even on breadboard, not considering 50m of cable), therefore I need to either convert the 3.3v output to ideally 12V or to convert it to dry contact.

What would you recommend? The connection between control board and the sensor is about 50m of cat5e cable, I will put 12v via cable to local breakout PCB where it will be converted to 5v (which is working voltage of the sensor). Current over the loop to 817 is only about 5mA.

Should I use transistor(s)? As all 817 inputs on my board have common GND, I would need to use a high-side switching. NPN+PNP or MOSFET? If MOSFET, is one N-channel enough, or do I also need 2?

Or use some kind of level shifter? Can it shift from 3.3v up to 12v?

Or SSR? That would convert it to dry output and allow me to use the same channels on the control board instead of the need to customize them.

It is not true, because the forward voltage of 817 opto is less as 1.4v, so 3.3v is more than enough to switch it. But it could be a luck of sufficient current, that is more than probable in case of sensor output.
To resolve this you can add a logic N-mosfet to switching the optocoupler by low current sensor.

I guess it's mainly because of LED connected to the 817.

1 Like

Would KAQV214S work as SSR driven by that 3.3v? On the output side it would switch 12v DC. https://img.gme.cz/files/eshop_data/eshop_data/1/961-023/dsh.961-023.1.pdf

An MIC2981 should work. It's a high-side solenoid driver with 8 outputs so it will easily drive your optos and can handle the 12V output. Only thing is that I don't remember what it needs at the input to switch on/off. 3.3V should be fine.

And also 3K resistor. To produce a 5mA current by 3.3v voltage, you have to remove the LED and change the resistor to 300 Ohm

Yes that LED is a major issue.

Even a red one drops 1.8V, plus the 1.2V for the opto, is 3V total. If that's a blue LED your total voltage drop is closer to 4V...

Thanks for your help. I have tried with KAQV214S SSR and it works fine for my use case.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.