Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Industrial Universal Digital Input Schematic For MicroC.

Not open for further replies.


Full Member level 6
Mar 27, 2002
Reaction score
Trophy points
Activity points
digital input schematic

I'm building an universal control module with MCU/RS485/Relays etc.
I need some help with input modules. I would like to interface
digital inputs ( up to 24Volts and passive switches) to my microcontroller.

First one is easy with optocoupler but, how can I make this circuit
compatible with both types of inputs with same contacts?

I've to provide supply for passive swithes. What is the rule for optoisolating? I think I'll need to build a different power supply for
input side of optocoupler.

We plan to use this module in factory and it should be reliable of course.

Waiting for your ideas...


universal input schematic

A different power supply, for auxiliary signaling is usually to be use in such cases.
Don't forget, that even if you use optocouplers, you only break the possible ground loops, but still there is a path for high frequency noise trough this optocouplers. Design your inputs with this in mind. Use RC snubers, varistor protections etc after optocouplers, and good EMI shielding. Also, it is advisable to use optocouplers for the outputs (between the I/O line of MCU and relays) and supply voltage to the relays coil from a different power suply. Also RC snubers on the relays contacts are advisable. Even so, you can have problems if you switch high inductance loads.

optocoupler input circuit

Hi marie65

Please explain which noises pass through input optocouplers.

and if possible give some sch on this designs.


industrial input circuit

Trough the parasit capacity of the optocoupler, high frequency noise could easily pass. For example spikes produced by contacts, short impulses electromagnetically induced in the wires etc. The usual mistake done when you design an opto input is to "forget" about this (usually due the lack of space on the PCB) and not add a simple RC filter and a clamping diode, after the optocoupler. This will limit disturbing current on the input pin and protect from a possible latch up of your IC.

Not open for further replies.

Part and Inventory Search

Welcome to