Ground matching a signal from an isolated circuit - Page 1
Forum section: electronics / beginners

author: phuntyme
author_rank: Newbie
timestamp: November 29, 2020, 08:32:49 pm
content: I have a transducer currently in a circuit that is being driven by a 5V input and its own ground.I am building a separate circuit driven by a second power source (5V), but I need to read the output signal from the transducer in the first circuit. I don't need to amplify the range of the signal positively or negatively, but I need the signal to be as pure to its original form as possible. Additionally, I cannot disrupt the signal of the transducer as it is feeding other devices with information.This seemed to be an easy thing to do on its surface -- just use a buffer opamp configuration with unity gain as the input to my second circuit. Then I started thinking about the 2 power sources not having the same ground level. That introduces an issue with reading the signal as is, but it also raises some potential issues with powering the opamp from my second power source:What if the first circuit is operating at +10V potential vs. my second circuit? I may just get a flat 5V. Same goes for the other direction at -10V vs. my second circuit producing a flat 0V.What if the potential difference between the circuits is +4V -- I might only get +5V (clipped) and +4V as my low, which is not likely to register as low on my MCU.I do have access to the positive and negative rails of the first power source, but I cannot tie the grounds together. So then I started thinking about using an opamp in a differential configuration between the signal and the first circuit's input voltage (or it's ground). And if that might pull too much current, I could try using a buffer (powered by the first circuit's power supply) as the input to a differential opamp configuration.I tried simulating this (falstad) and it appears to work -- I am assuming a pretty bad case where the first circuit is at 11V high and 6V for its ground, relative to the second power source.I created a 60Hz square wave as my input signal that runs 11V high and 6V low. That signal is going into a buffer then into 1 input of the differential. The other input is the first power source's high voltage of 11V (passed through a buffer first).The output is the original square wave shifted to 5V high and 0V low, which is exactly what I want, but I can't help but feel I am either overlooking something in my simulation, that the simulation is too simplified and does not reflect reality in this circumstance, or my approach to solving this is more complicated than it needs to be and there are simpler methods to do exactly this.I'm having trouble figuring out what to search for so I hope the subject is accurate for what I'm looking to do.Simulation screenshot below -- link to the active simulation is here:https://tinyurl.com/y6fxdkfjThank you!

author: Manul
author_rank: Super Contributor
timestamp: November 30, 2020, 12:26:41 am
content: At first glance I do not get two things:1. If circuits are isolated, then why grounds can not be tied together?2. If circuits are not isolated, and grounds have potential difference, then what creates this difference? Is it predictable and fixed or may vary? How such situation happened?

author: phuntyme
author_rank: Newbie
timestamp: November 30, 2020, 01:24:50 am
content: This is why I jumped to the beginners section; it may be something I'm not thinking about correctly. I'll answer to the best of my knowledge/ability.1) The existing circuit is part of a vehicle and I cannot tap directly into that power source. The second circuit will be battery operated. I need to be careful not to rely on the power rail I described on the first circuit because it is part of a very expensive device that I don't want to pull too much current through, which is why I chose to isolate this on battery power.2) I'm not certain of the difference between the grounds, but if it's a possibility, I'll need to plan for it. Reliability is going to be critical.Please let me know if there's something fundamental that I'm missing.

author: Manul
author_rank: Super Contributor
timestamp: November 30, 2020, 03:33:12 am
content: Ok, so if your battery powered device is truely floating (which means it is not connected / referenced to something else), then you connect your device ground to vehicle ground and use it as common reference for signal. If you worry about signal safety, then it depends. If you can allow it (signal is not very high frequency for eg.), maybe add some series resistor to protect from shorting the signal accidentaly and things like that.If your battery device might be referenced to something else at the same time, then you need to think if it is safe. Probably it still is.As a "sanity check" imagine how you would take a multimeter and measure voltage between your vehicle ground and a device. Will it show voltage, will current be passing between these points? If you put AA battery on the seat of your car and measure voltage between car ground and AA battery terminals, will it show any voltage? Of course no. Because there is no path back, no loop for current to pass. It is just one way road, one way ticket. Current needs to go and come back to be existing. But this battery is floating, just laying down on a seat. Same logic may help to grasp over situations.Actually I often do this measurement to check that there is no voltage between two unknown grounds. No voltage means that the grounds are either the same (already connected together) or isolated from each. In both these cases it usually means, that they are safe to connect (if some conditions does not change with time).

author: jdutky
author_rank: Regular Contributor
timestamp: November 30, 2020, 08:13:14 am
content: A number of solutions leap to mind:1. differential signaling: send not just the 0V/+5V signal, but two signals, one being the inverse of the other. The receiver measures the difference between the two signals.2. encoded/modulated signaling: send the signal on a modulated carrier. This would require some significant hardware support, but it's exactly what any radio does; the transmitter and the receivers do not share a common ground, but they can transmit and receive signals anyway.3. optical signaling: use a diode and a phototransistor with a length of optical fiber. This is basically a modulated signal (the modulation is turning the diode on and off) and similarly doesn't require the transmitter or receiver to have a common reference voltage. Optical fiber can be difficult to work with, depending on what you use. The glass fiber, specifically, doesn't like being bent below a minimum radius, and if you do bend it below that radius, it's permanently broken. I'm not sure, but there might be plastic fiber that can be used for relatively short runs, and that is more forgiving of mishandling.Also, if you are running this signal any distance in an electrically noisy environment you will need to consider how to filter out the noise, and keep it from damaging the devices at either end of the wire.-- Jeff Dutky

author: phuntyme
author_rank: Newbie
timestamp: November 30, 2020, 10:53:37 pm
content: Thanks for the replies!To give a little more information/constraints, I cannot modify the first circuit (the source of the signal) in any way for legal reasons. For the same reasons, I cannot tie directly into the vehicle's power source. The most I can get away with is adding a 3-pin port to my panel that will have a positive lead, negative/ground lead, and the signal with all 3 of these routed from the equipment already installed for reading the transducer's values. The device I am designing must be removable.One fundamental electronics question: If I were to connect a battery's ground to the ground used by the source signal, could that damage the equipment it's connected to? In my mind, the answer is likely no, because the 5V battery's positive potential would then just be +5V above the new ground level. If I wanted to be ultra careful, could I add an opamp buffer between the source ground and the battery's ground? Ideally, I want as little current from the source equipment as possible.Relatedly, is there a way I could force the ground of my second power source to match the existing equipment ground rather than them "meeting in middle" in some way? From what I understand, if I were to use something like a buffer, the first power source would not be impacted; the ground of my second power source would be forced to match the first source.As for the alternate solutions, these are great. I think the first one is probably the easiest to implement and is closest to what I was envisioning with the differential I put in my initial post. In my case, I was measuring vs. the source's positive rail, but doing it vs. the inverse is a neat way I hadn't thought of to avoid using the positive/negative leads of the source at all, though I suppose they would still be needed as a reference for the signal.I think solution 2 is more complex than is needed here, but I understand the point for bringing up the idea in principle.Solution 3 is interesting though -- not using the optical fiber per say, but using an optically isolated FET. That way, my device would just be translating the on/off pulses of light inside the IC into high/low signals to my MCU. As long as it can switch quickly enough for the transducer's signals, which will be no more than 150Hz. I don't know if that would be a problem.Currently the transducer is already wired to a piece of equipment, so if I tap into that equipment for my inputs (which is going to be a short run), I should be fine with regards to noise.I think the best solution so far is Solution 1 with an added buffer for the incoming signal, but I'm open to hearing other ideas or approaches to looking at this scenario.

author: Manul
author_rank: Super Contributor
timestamp: December 03, 2020, 02:17:14 am
content: First of all, what you describe is not very clear. There is uncertainty in what the problem really is and what level of electronics knowledge you possess. That is overhelming the brain with complexity of variations and possible answers. I suggest you draw a schematic and give some more details.Anyway, I will explain what I think about such problem in general. You want to read some other device's signal with your MCU on a isolated, battery powered device. First step is to ask questions:1. What is the signal? Shape of waveform, amplitude, frequency, impedance, external noise, how important is keeping the jitter low, things like that.2. What is the input? For example, if it is MCU powered from 5V it's digital inputs will expect 0-5V logic levels, also, what is distance from source, etc.3. Based on 1 and 2, do you need any signal conditioning / conversion? For example, level shifting, schmitt trigger, etc.Based on answers to these questions define the requirements and a plan to meet them.The only options after that are to make signaling electricaly isolated or not. Isolated way would be for example using optocoupler. Non isolated way would be to just wire it directly (or through some signal conditioning / conversion circuit if needed). Often there is little point to create isolated signaling to a device which is already isolated. Furthermore, to drive optic transmittion, you would most likely need to take power from vehicle (which contradicts your requirement of not taking it) or otherwise it may load signal source too much (if you would try to drive optocoupler's LED directly from signal source).About differential ideas. If you wire a signal to an isolated device which does not share nothing else with the source device, then it IS differential. Should not be confused with differential signaling, which could be used, but seems to be not related to the main problem. There could be unequal capacitive loading on a positive and negative signal wire, but lets ignore this for a while.Why it is differential? Imagine you measure voltage with a handheld battery powered multimeter. Can you connect it's positive and negative leads to anywhere you want on a circuit? Well, yes you can. What it will measure? Potential difference between two points. It will not care about absolute potential in reference to ground. Your multimeter beeing isolated will happily "ride" any DC or AC absolute potential, while showing difference between two points. Also it does not matter what batteries and what voltages multimeter is using itself.Next example - scope. As you know, scope has it's ground lead referenced to mains earth. So you can not connect this ground lead to any point you like if the circuit you are probing is also referenced to mains earth. You will create a short. But imagine that you need to connect your scope ground lead to something which is at +10V potential. You use differential probe, which gives isolation. None of it's leads is referenced to mains earth, it just measures the difference between two probing points.Your battery device is same as a handheld multimeter or a differential probe. If it is isolated, you can connect it's internal "ground" to something which is at +10V absolute potential, nothing will happen. You can even connect it's "ground" to signal, and it's "input" to ground (you will measure inverted signal that way). In fact, you can do almost whatever you want. In all cases you will measure difference.Now the tricky part. Some circuits may be sensitive to capacitive loading. And your device (like any device) will have some capacitance to ground. It will also be picking up external noise quite well and introducing it into the circuit like antenna. For sensitive circuits you may need buffering or isolation to minimise this effect.For safety, you may want series resistor at the signal source (if it will not damage signal integrity). This may prevent damage from accidental signal shorting.

author: phuntyme
author_rank: Newbie
timestamp: December 03, 2020, 04:55:22 am
content: Thanks Manul!I just spent the past hour+ typing information about all the specifics I had, but it was getting quite long and I think it was derailing the main question I had, which I believe you already mostly answered.And using that information, I built a test rig with an old transducer with multiple battery sources to test out some things. I won't go into all the details because you've spent quite a lot of time here already. I'm happy to share it if you'd like though.Essentially, the answer is that I can connect the ground of my battery to the signal's ground reference -- the battery's positive rail will just be the potential above that new ground. The issues I was thinking about in terms of shifting the signal's ground are totally irrelevant, if I understand your response correctly, since every device on the same ground will be operating on potential differences vs. that ground anyway -- regardless of what that ground is; absolutes don't exist so my concerns don't even make sense.I can work my way through the issues of minimizing the load on the vehicle's equipment and the signal integrity now that I feel comfortable in using a common ground reference for everything. I understand there might be issues with capacitance that I'll work through on my own as well.Thanks again!