Instrument Bus - Page 1
Forum section: electronics / general

author: sub
author_rank: Regular Contributor
timestamp: October 28, 2011, 11:52:50 am
content: Does anyone have any thoughts on bus choices for connecting bench instruments? Ethernet and CAN seem too expensive and complicated to use on small stuff, while I2C doesn't seem to be used so much for interconnection (difficulty in buffering?). Does anyone have any experience using I2C between devices, or would I be better to just bite the bullet and use RS-485 or somesuch?My plan here is to knock together some programmable power supplies and signal generators in the hope of doing automated measurement.

author: Unknown
author_rank: Unknown
timestamp: October 28, 2011, 12:02:08 pm
content: Ethernet has the advantage of galvanic separation. For connection to a computer, USB is the obvious solution. You can dedicate a micro to communication and let it talk I2C to your measurement hardware if you want. If you plan to use off-the-shelf software (eg. Labview), sticking to interfaces supported by this software is a good idea.I2C is inter-IC bus, i.e. designed for connecting ICs within one piece of equipment. The open drain output is quite sensitive to capacitive loading, limiting the cable length. I would probably use something designed for longer connections like RS-485. Try to stick to standard pin-outs and protocols, this makes interoperability and debugging much easier. Debugging communication is much easier if one of the sides is known working, which is hard with custom interfaces.

author: ejeffrey
author_rank: Super Contributor
timestamp: October 28, 2011, 12:07:38 pm
content: USB, generally via USB to serial adapter chips. If you need long range or multiple hosts, include ethernet, but don't omit USB.I2C and CAN are really more suitable for communication within an instrument, and they don't have standardized physical connectors.

author: sub
author_rank: Regular Contributor
timestamp: October 28, 2011, 12:48:43 pm
content: USB is a bit tricky though in that one need either shell out for a USB-serial chip (fairly expensive when your BOM is around the $15 mark) or get a PID somehow and then work with USB directly (fairly cheap, though not without its difficulty). I'm almost inclined towards the lazy option of just using 5V RS232 everywhere, and decoding/shifting it as necessary to connect it to the PC.Obviously one would need something else for high-bandwidth measurements, but at that point an ethernet interface probably isn't cripplingly expensive.

author: ejeffrey
author_rank: Super Contributor
timestamp: October 28, 2011, 01:30:21 pm
content: Well, when you connect to a computer, you are going to need a USB to serial adapter anyway, because modern computers aren't going to have enough serial ports to be useful. A USB serial chip is expensive, but cheaper than an external adapter and gets you power, too. For lower power devices that could save you an extra power supply, which will more than make up for the cost. For internal communication, I would use I2C rather than 5V RS232.Is your BOM really $15 when you include enclosure, power supply, cables, and connectors? Or does that just count the PCB and the components mounted on it? These costs tend to dominate in really simple devices. If you can increase the integration level somewhat, you get more bang for your buck out of the mechanical and power components, and also reduce the fraction of the cost spend on USB to serial adapters. You loose some flexibility by including more in a single instrument, but also reduce complexity and cable clutter.This is all very generally speaking, if you can provide some specifics of what you would like to build, how you want to use it, and how many units you plan to make, we might be able to help more.Finally, when looking at the cost of the USB to serial converter, remember that it is allowing you to completely eliminate the cost of front panel displays and controls. A few dollars spent making sure that you can talk to it easily is money well spent.

author: Jon Chandler
author_rank: Frequent Contributor
timestamp: October 28, 2011, 06:46:14 pm
content: Quote from: sub on October 28, 2011, 12:48:43 pmIf you're making instruments for you own use, you can use any PID you want. The only danger is you'll happen to buy something that actually has one of the PIDs you've used and you'll have a conflict.Microchip will provide you PIDs for use with their USB-enabled micros. The only limitation is that if you go over 10,000 units, you'll have to buy your own.

author: sub
author_rank: Regular Contributor
timestamp: October 28, 2011, 11:10:27 pm
content: QuoteWill they provide this for hobbyists? If so then I should be golden.QuoteI was looking at $10+connectors+enclosure. A quick calculation suggests that for a little Itead board I can get a couple of bits of laser-cut plastic to cover it for a on the a couple of dollars per unit, and so I think $15 is reasonable if I'm willing to forego binding posts for some other form of output connector.

author: amspire
author_rank: Super Contributor
timestamp: October 29, 2011, 12:42:01 am
content: You could just buy a bunch of Nokia ca-42 USB to serial cables, change the end connector and connect then straight into serial ports on the instrument micros (or by optocoupler if you need isolation).They use a Prolific USB to serial chip.http://www.ebay.com.au/itm/NEW-Genuine-Nokia-Connectivity-Adapter-Cable-CA-42-/270744246399?pt=AU_MobilePhoneAccessories&hash=item3f099d587fWorks out at under $3 per instrument plus the cost of the connector to the instrument.Richard

author: joelby
author_rank: Frequent Contributor
timestamp: October 29, 2011, 07:46:34 am
content: If you're planning to integrate this with commercial, possibly older test equipment, you could consider adding a GPIB interface.

author: Bored@Work
author_rank: Super Contributor
timestamp: October 29, 2011, 08:23:25 am
content: Quote from: joelby on October 29, 2011, 07:46:34 am$15 wouldn't even buy him a single GPIB cable.