Feed opto-isolator with 2 voltages and take the difference as output.

Hallo again!
I have a new question. Let’s say I want to take voltage measurements from two bus cables, this time one with positive voltage and other with negative.

Bus A: --------------------------------------------- (0 – 24V)
Bus B: --------------------------------------------- (-24V – 0)

The bus communication runs with a data rate of 46.875 Kbits/s.

I was thinking to use them both as input to an opto-isolator (for safety reasons and no return currents), then take from opto-isolator as output their voltage difference that will be from 0-48V and then with a voltage divider lower the voltage to 0-5V to feed the Arduino input!

Is there such an opto-isolator? If yes, can you suggest one?

Or I could use two opto isolators and then two voltage dividers in order to input Arduino with two signals and then find the voltage difference by simple programming, right?

The problem then would be to make voltage from Bus B positive. Would that be possible if I used the opto isolator there reversed (anode connected to GND and cathode to negative voltage)?

Are you expecting analog voltage output from an optoisolator?

yeap!

Are you expecting analog voltage output from an optoisolator?

yeap!

Although you can get an analog voltage out of an optoisolator, they are designed to be digital and they are very non-linear when used in non-switching applications.

To some extent you can "linearize" the output in software (make corrections for the non-linearity) but if you expect to accurately measure 0-48V through an optoisolator, I'm not holding my breath.

with a voltage divider lower the voltage to 0-5V to feed the Arduino input!

Since the input-side and output-side of an opto-isolator are... isolated... You can run one side at 48V and the other side at 5V, and since there's no electrical connection (unless you want to use a common ground), so you don't need a voltage divider on the 5V side.

Vishay have a linear optocoupler IL300

It needs an opamp on the non-isolated side. See page 2 on the data sheet.

So guys, first of all, many many thanks for your information and help!
I ended up with this circuit, what do you think? I have no experience, so I need your advice..

1. As it is the circuit now, I will have to do that for each voltage supply, so use two optocouplers and the input them to arduino.. is there also a way to import both signals in the above diagram which I don’t know?

2. If no, which will be the difference for the negative supply voltage to the above diagram?

3. Anything else I should take in mind??

Hi,

What is the application?
What is the bus protocol?
What is the analog signal on the bus?

You gave a data rate of 46.875 Kbits/s , so I would assume its a digital signal.

What is your electronics, programming, arduino, hardware experience?

Tom.......

So guys, I have to ask to forgive me.. I asked the supervisor and said that the signal is indeed digital but wanted analog input, because maybe it has not a standard high-low peaks and so in the long view could be like a analog voltage. They haven't taken an oscilloscope picture yet to show you, they are not sure, but it could be also a normal digital signal. So I'll assume it's normal digital 0-1.. We don't know the bus protocol, the company that has build it doesn't offer enough info..

Anyway, I just want a simple solution that works. I want to only check if there is voltage all the time, and if not, then for ex. a LED lights. So I don't won't to work with analog signals then..
But I really need isolation between arduino and bus.. Problem is that I need LOW input in arduino to be very near to zero and not for ex. 2.5V, because at 2.5V the system still works fine..

A friend suggested a good idea: to use an optocoupler with very small drive voltage (for example with values over 1V the LED lights) and so when it returns in the output the digital signal, the LOW will be very close to the zero I want.

Do you have a suggestion for such a optocoupler or another idea? I could use a voltage divider if the voltage input is smaller, just want small drive voltage.