Author Topic: Instrument Bus  (Read 3323 times)

0 Members and 1 Guest are viewing this topic.

Offline sub

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Instrument Bus
« on: October 28, 2011, 10:52:50 pm »
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.
 

alm

  • Guest
Re: Instrument Bus
« Reply #1 on: October 28, 2011, 11:02:08 pm »
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.
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 1737
  • Country: us
Re: Instrument Bus
« Reply #2 on: October 28, 2011, 11:07:38 pm »
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.
 

Offline sub

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Re: Instrument Bus
« Reply #3 on: October 28, 2011, 11:48:43 pm »
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.
 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 1737
  • Country: us
Re: Instrument Bus
« Reply #4 on: October 29, 2011, 12:30:21 am »
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.
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 539
    • Throw Away PIC
Re: Instrument Bus
« Reply #5 on: October 29, 2011, 05:46:14 am »
... or get a PID somehow and then work with USB directly (fairly cheap, though not without its difficulty). 

If 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.
 

Offline sub

  • Regular Contributor
  • *
  • Posts: 107
  • Country: au
Re: Instrument Bus
« Reply #6 on: October 29, 2011, 10:10:27 am »
Quote
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.

Will they provide this for hobbyists?  If so then I should be golden.

Quote
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.
I 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.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3633
  • Country: au
Re: Instrument Bus
« Reply #7 on: October 29, 2011, 11:42:01 am »
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=item3f099d587f

Works out at under $3 per instrument plus the cost of the connector to the instrument.

Richard

 

Offline joelby

  • Frequent Contributor
  • **
  • Posts: 634
Re: Instrument Bus
« Reply #8 on: October 29, 2011, 06:46:34 pm »
If you're planning to integrate this with commercial, possibly older test equipment, you could consider adding a GPIB interface.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Instrument Bus
« Reply #9 on: October 29, 2011, 07:23:25 pm »
If you're planning to integrate this with commercial, possibly older test equipment, you could consider adding a GPIB interface.

$15 wouldn't even buy him a single GPIB cable.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf