I'd like to run my Arduino from the PC USB port, but I want to do some measurements without having the PC ground connected to the board ground. My first thought was to opto-isolate the USB port, since it's only two signal lines, and running the board off a battery.
The small 8-DIP optoisolators like the Fairchild 6N137 are rated for 10 Mbit/sec (50 nsec rise/fall time). These parts are pretty cheap at $1 each. Would this work? I could not find any USB optoisolators sold for much less than $200 so I'm guessing it isn't as simple as I was thinking. Has anyone tried it?
I could use a RF solution like WiFi, XBee etc. but I'd rather avoid the cost, complexity, and RF transmitter next to my low-voltage measurement.
...or maybe a better way is to just use an old-fashioned RS232 type serial link, I know I can optoisolate that.
Isolating USB is hard because you can't add any (non-trivial) amount of capacitance. The 6N137 adds 60pF of capacitance (already over spec) and the open-collector nature of the 6N137 pretty much nixes that part.
How about this Analog Devices part:
It's not $1 but it's not $200 either
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons
I'm guessing it isn't as simple as I was thinking.
The signals are also differential and bi-directional.
Isolating after the serial conversion would be much easier, if your testing doesn't need to include the USB interface itself.
Wow! Thanks for that info. Looking at the ADI part, I see that USB isolation is quite involved. I'd be tempted to get their demo board, around $50 except I see that they are actually using RF transformers, and they need RF chokes to limit noise etc. I'm trying to get away from noise so I think low-tech opto-isolators on plain serial lines is the right way to go.
If you are dealing with serial port data rates (115,200 kb/s or so), it's easy and reliable and inexpensive to convert RS-232-to-TTL levels (and back) with opto-isolators.
I have used them for development of power metering modules that get power directly from the AC mains and are connected in-line between the mains and a load, and, therefore, simply must be isolated from PC grounds (for functional reasons as well as for human and device safety). After development, the (wireless) modules are self-contained with no external connections other than UL-approved plugs to the mains and to the monitored appliance. (These modules are not Arduino-based but that doesn't affect the isolation considerations with which we are concerned.)
I also use an isolation transformer for such a module while it is under development so that I can connect a (non-isolated, safety-grounded) 'scope in such a way as to minimize endangerment of life and limb (and of the 'scope). It still requires care, and this kind of development is not recommended for the inexperienced and/or faint-hearted designer. See Footnote.
Regards,
Dave
Footnote:
The isolation transformer is fused. We never start testing without a supply of extra fuses on hand. Stuff happens, no matter how careful you try to be.
Furthermore...
I tell my colleagues that I will stand by the fire extinguisher while they probe the device under test, but I don't do mouth-to-mouth. Period. Full stop.
For simple isolation from AC main power, a small AC output wall wart might be used. In the past I've had a discussion about using the internals of a $4 multimeter as a switchable interface for the arduino for data collection.