On Wednesday, 6 June 2018 15:10:10 BST t...@ls83.eclipse.co.uk wrote:
> With I2C you are typically limited to just a small number of identical
> devices on the same bus, as they come preprogrammed with a 7-bit
> identifier, with the ability to change perhaps 1 or 2 of those bits (but
> if there are no spare pins available on the device, it won't be possible

Understood, but the I/O expander chips are (literally) as cheap as chips, so 
we will have one per sensor.  We only need around three or four devices on 
each Pi anyway.

> to select any address bits). 1-Wire devices come with a 64-bit
> identification code (8 bit family code, 48 bit serial number, 8 bit
> CRC). This allows multiple identical devices to hang off the same bus
> and be uniquely identified. Identification of all devices on the bus is
> via a search routine implemented in the master.

Yes, but I've yet to find a 1-wire I/O expander.

> One problem with 1-Wire is that it requires time-critical pulse
> generation and measurement. The DS2282-100 IIC to 1-Wire bridge allows
> you to avoid time-critical stuff on the master processor.

I'm not sure that I understand that.  My 1-Wire Temperature Sensors (https://
www.amazon.co.uk/gp/product/B00HCB8GLU/ref=oh_aui_detailpage_o01_s00?
ie=UTF8&psc=1) only have three wires; +3.3 V, 0 V and data.  When I connect 
them to my Pi I can read the temperature without any messing with pulse 
generation or measurement.

I can see that if we wanted to design the interface in discrete components or 
low-level logic, we would probably need to think about such things, but even 
we aren't daft enough to try that :-)  What we need is the 1-Wire interfacing 
components that are integrated into the DS18B20.

> In terms of multiplexing several Hall effect sensors, you could use a
> PISO shift register (eg 74HC165) and clock the bits out as with SPI.
> For longer distances, I'd suggest a single chip micro to read the Hall
> devices and send the data over asynchronous serial (RS232, RS485 etc).
> An MC9S08SH8 is available in DIL package and a USBDM programmer can be
> bought on Ebay for around £20.

We are happy with getting the bits into serial and have considered several 
designs.  We've got to the point of deciding the best interfacing technique at 
the moment.  Currently we are prototyping a system using I/O expander chips 
and I2C.  If that throws up problems then we'll look at SPI, 1-Wire or  
RS232/422/485 and whatever logic we need to get the bits to the bus.

-- 



                Terry Coles



-- 
Next meeting:  Bournemouth, Tuesday, 2018-07-03 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to