optoisolating ground

I need to isolate ground loops, but don't properly understand the problem. My project has 2 analog inputs and 2 Digital outputs, not including the stepper motor, which is controlled through a L293D, which I believe has inbuilt optoisolators.

Intuitively, I would run each input and output separately through optoisolators. In simple terms how should the grounds from each input and output return to the respective optoisolator.

Would a datasheet be of assistance in this case?.

http://www.isocomoptocouplers.com/CD500.HTM

Not the same part, but identical configuration. Two separate inputs are possible as far as I can tell, at pin 1 and 4.

geoland:
I need to isolate ground loops, but don't properly understand the problem. My project has 2 analog inputs and 2 Digital outputs, not including the stepper motor, which is controlled through a L293D, which I believe has inbuilt optoisolators.

The digital outputs will be easy to isolate using that device you linked to. However keep in mind that by isolating the ground that means you can't use the +5vdc or Vin voltage pins on the arduino to power anything on the output side of the isolator.

Isolating the ground for the 2 analog input pins is very difficult and can't be done easily with the device you linked to. There are analog opto and transfomer coupled analog isolators but they tend to cost >$100 as they are designed for industrial customers mostly.

The L293D motor controller does not include any kind of built-in ground isolation to the best of my knowlege. But here is a datasheet you can check over if you think otherwise. http://www.ti.com/lit/ds/symlink/l293.pdf

Intuitively, I would run each input and output separately through optoisolators. In simple terms how should the grounds from each input and output return to the respective optoisolator.

Draw something up and we can see if you understand the concept and correct applications of the isolators.

I guess my main questions to you is why you have a need to isolate the grounds between the arduino and the stuff you will be controlling with it? What problem are you trying to solve?

On second thoughts I may be getting ahead of myself with this one. In a previous post which grew to several pages and numerous issues it got to difficult to track. I think it is easier to address each issue separately in the correct forum to ne fair. And I am just getting confused :~

Using a linear wall adapter to power the board the various functions, analog and digital are problem free.

Using a switchmode supply to power the board and a TEC module the digital functions play up (timing), and analog inputs are erratic.
With several loads I would like to eliminate the use of wall adapters and use a single power supply.

Member dc42 provided a circuit layout to address the powersupply interference problems and I am yet to implement that. However the issue of ground loops was discussed and I have it in mind that I should isolate the grounds.

Perhaps this thread is a bit premature.

Yes I don't think you need opto isolators at all, just a decent power supply.

The first thing to establish is whether you have a ground loop at all. The usual way that a ground loop occurs is when two or more devices have a connection to AC mains ground, and you make a connection between those two devices (typically the "ground" or 0v connection points of those devices), but those two points are already connected to AC mains ground through their respective power cables.

Those "devices" could be:

  • mains-powered devices that you are connecting to the Ardino for the purpose of receiving data from them and/or controlling them
  • power supplies you are using to power the Arduino and/or any devices you are driving from it

A typical wall wart does not have a connection to AC mains ground (if the earth pin is missing or completely made of plastic, you can be sure of that). A typical large power supply (e.g. a laptop power supply or a computer power supply) does have a connection to AC mains ground. Any electrical device with a metal enclosure will have a connection to AC mains ground.

To test whether a ground or 0v connection that you propose to make will create a ground loop, plug both devices in but do not switch them on, and make no connections between the devices. Then use a multimeter to test whether there is already continuity between the two ground points you need to connect together.

If there is already continuity, then connecting those point together will create a ground loop, which is generally a bad thing. there are a few options:

  1. If you just need to pass a non-critical digital signal between the devices, you may get away with not making the ground connection, particularly if the two devices are plugged in to adjacent wall sockets. However, you should use a resistor in series with the signal line to prevent any transients damaging either device. You system should be tolerant of occasional interference with the digital signal.

  2. If the ground connection to one of the devices is through a power supply, you may be able to use an isolated power supply (i.e. without a connection to mains ground) or a battery instead.

  3. If the signal you are sending between the devices is digital, you could use differential drivers and receivers to send it, with no ground connection.

  4. Use optical isolation between the two devices. This is typically the best solution for passing digital signals. You need to have a source of power (typically +5v) at both the sending and receiving end.

  5. If the signal is analog then you may be able to use a transformer to avoid the need for a ground connection.

I agree GM. Not the best quality.

The SMPS has a mains ground and two sets of +ve and -ve terminals. I have the mains ground connected. Should the metal frame be grounded too? I suspect it is anyway.

I am now tapping the mains supply on the SMPS to another much smaller SMPS unit to power the Arduino board. This smaller supply does not have mains ground - previously a two pin wall adapter. This arrangement is working well with no I/O issues at all. Same if I use a linear wall adapter - 2 pin.

I have had a laptop plugged into the same dual socket as the big SMPS, and at other times a socket in another wall - no noticeable effect.

The camera is using its battery for now.

Except for the laptop, no two devices have been providing power to the system.

The only thing that made a difference was not to use the big SMPS to power the Arduino.

I am happy with things as they stand because it's all working.

It would be nice to be able to post some diagrams/images - not sure if that's a general problem at the moment?