What type of optocoupler (sinking vs sourcing output) would be most advisable to purchase to use in switching a 12V circuit on with a 5V circuit? Both would function the same way, correct? Meaning 5V HIGH then 12V HIGH, 5V LOW then 12V LOW, just changing with side of the circuit the switching takes place on. Is one (NPN or PNP) the de facto standard (either east/west or in general) or suffer thermally or speed-wise relative to the other?
Exactly what are you trying to do ?
Do not start a new thread for every variation of your topic.
Please review the posting hints presented in the "How to get the best out of the forum" post, linked at the head of every forum category.
Convert arbitrary 5V Arduino GPIO signal to 12V for generic PLC-style automation control as intact as possible (without loosing frequency range) - continous control for light, motor, solenoid, etc.
an NPN transistor, driven by an MCU GPIO pin, with the load as opto-coupler, fed from the +12V.
Check out, how to use NPN transistors as a driver for GPIO pins from an MCU.
BTW:
what does mean?:
Is one (NPN or PNP) the de facto standard (either east/west or in general) or suffer thermally or speed-wise relative to the other?
PNP and NPN are two two different kinds of "normal" transistors. Speed and thermally - they "suffer" in a similar way - check their datasheets.
Do you think really, one is used more often in the East, the other more in the West?
Upps!
Transistors (and different types and technology) do not have a political meaning (I hope!).
Both are used in a similar way, by the same numbers, in all parts of devices - world wide. PNP vs. NPN stands just for the type ("how the base would control the on-state", "how to connect Emitter and Collector in a schematics"). And both types are important in any application, world wide - in the same way for their intended use.
Why do you open another thread?
Specify what load you want to drive to get more useful answers.
Because different countries have different grounding conventions, whether the anode or cathode side is tied to common ground and leaving the other side for switching.
Basically, I want something like this
,except in a standard PCB size and with enough of a bare PCB "lip" past the screw terminals on the edge to slot into a standard sized DIN rail holder, and preferably with a common ground pin (as opposed to one for each input channel) on the input 3.3/5V side. I want paired + and - output terminals so that there is no need to mess around with calling N-switched lone + (without corresponding -) outputs positive and creating a need to supply negative power inputs (Vcc out). The number of channels on each board doesn't really matter to me as long as any arbitrary number of board can just be lined up on the rail as needed.
What is the load?
I think I may have figured out an alternative mounting/wiring solution that will allow use of the off the shelf drivers. Thank you all for your assistance.
Are you trying to switch 12V PLC inputs with 3.3V? If so are the inputs HIGH true (sinking, connect 12+ to turn on). OR, LOW true (sourcing, connect to COM (ground)) to turn on?
Switching 12V outputs on the N-channel with 5V input. Everything is working. I will just use an terminal adapter. Thank you.
To help the flow of this thread and for others who might have your quieries, can you please tell/show us what you finally have that works in your project.?
Knowing exactly what your solution is may help others.
Thanks.. Tom...