opto-isolator wiring

skyflyer

Well-Known Member
Joined
26 Jan 2011
Messages
1,433
Location
Worcester, UK
Visit site
I want to use an opto-isolator to protect a piece of electonic kit from the CANbus (NMEA2000) backbone to which it is attached.
I don't really 'get' anything beyond plain DC so am struggling with the circuit that is required.

The isolator has two 'pins' on each side of the chip. However i suspect its a little more complex (involving resistors and capacitors and spurs to ground and so on, ) than simply connecting it directly into the circuit!

Can anyone give me a simple circuit diagram?
 
We would need to know the part number on the chip for more details on what it is driven with.
A typical chip has an LED on the input. This must be driven by a resistor current limiter from the data line.
The output is typically a transistor whose conduction varies with the light from the LED. So must be fed with a DC voltage via a dropping resistor across which the data pulses appear. So are your data input pulses pos going? if so you want pos going pulses out meaning you take the output from the transistor emitter with resistor rather than collector. more detail please olewill
 
This is going to be tricky.
NMEA 2000 uses a standard where each connected device can be (is) both transmitter and receiver and has only 1 pair of data wires carrying a balanced signal. This means that equipment must be able to switch off its transmit side to free the signal bus.

If you only want to protect a receiver, its doable, but if your device is either Tx or Tx/Rx you will best buy 2 CANBus interface ics, wire themback to back and opto isolate between.

See http://www.interfacebus.com/NMEA-2000_Standard.html for NMEA 2000 description, note in the image 2 Tx top left and top right both driving the bus.

For suitable interface ics see the bottom of that page.
Note that both Rx and dormant Tx are high impedance so any direct connection (without interface ic) must use an amplifier to drive the input of an opto isolator.

I'm sorry, this is significantly beyond DC


edit add:

If none of the electronic whizzes here already have a circuit or dont come up with one, I could do so.
 
Last edited:
Significantly beyond DC - don't I know it!

So more detail:
This is the circuit. Its an Arduino Due outputting through its CAN ports and an MCP2562 CANbus transceiver.
2s62dm8.png

Essentially the device is converting an NMEA0183 wind signal to NMEA2000 to feed to my (new) NMEA2000 a/pilot.
So the most important thing being that I don't trash the new kit! hence the desire for an O/I
The O/I I bought was pennies so if it is wrong I am happy to throw it and buy the right one.
Of course it inverts the signal but this can be dealt with in the Arduino or by using 2 O/Is back to back I guess
This is the diagram for the O/I - so only two pins on the transistor side
28b8r34.png

The N2K network will have a power feed from the other end so no need for that but I take your point that there must be some form of power on the right hand side of the circuit for the chip to switch on and off?
The full data sheet for the MCP2562 is here if that helps
https://maplindownloads.s3-eu-west-1.amazonaws.com/YY62-8022.pdf
 
I want to use an opto-isolator to protect a piece of electonic kit from the CANbus (NMEA2000) backbone to which it is attached.
I don't really 'get' anything beyond plain DC so am struggling with the circuit that is required.

The isolator has two 'pins' on each side of the chip. However i suspect its a little more complex (involving resistors and capacitors and spurs to ground and so on, ) than simply connecting it directly into the circuit!

Can anyone give me a simple circuit diagram?

It's normal to place the isolation between the controller (in your case the Arduino) and the CAN transceiver (MCP2562).
That means you need an additional, isolated power supply for the transceiver and one side of the optos.
I'm not familiar with NMEA2000 wiring; but if the NMEA bus has a power supply cable then you could use that.
Alternatively, look at isolated DC-DC converters but be aware that most are not regulated.
BUT; you will simply move the risk from a faulty Arduino PSU to the transceiver PSU.

Here's an example schematic; it's not one of mine so I can't endorse it but it does show the basics.
http://www.triangledigital.com/man2020f/pictures/ch7/cktcan.gif
Note that +5Vcan and 0Vcan are supplied by a separate regulator which gets its power from the CAN BUS connector.

Here's a commercial offering, but it still needs external PSU.
http://www.peak-system.com/PCAN-Optoadapter.215.0.html?&L=1
 
Top