Project: Pi 4 controlling collection of Zero, Zero W, or Zero 2 W if I can ever get them. Lots of sensors and solenoids on each Zero. I am thinking about the wiring. 50 to 100 metres or more from one end to the other. Solar power somewhere. If I put the Zero right out near the edge, I need lots of power cable and Ethernet or Pi Zero with really good Wifi. I will most likely use Zero W closer to the middle, to handle WiFi range, with longer wires out to the sensors.
That brings up the question of wiring for the sensors. Of I2C and the alternatives, what is most reliable over wires 10 to 30 metres for things like temperature sensors?
What is the best wire over these distances?
What I want is reliability up to 30 metres. I am looking at wires in https://www.jaycar.com.au/cables-connec ... rity-desc# and have no idea what would fit each protocol when used for more than the metre you experiment with on a workbench.
-
- Posts: 6972
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Wire length and type for Zero to i2C etc
The I2C standard specifies a max bus capacitance (CBUS MAX) of 400 pF for both Standard Mode and Fast Mode and specifies 550 pF for Fast Mode Plus.
So consider this when thinking of 50 to 100m of wire.
So consider this when thinking of 50 to 100m of wire.
Re: Wire length and type for Zero to i2C etc
I2C was designed for connections inside a system, not long wires.
You could maybe use an i2c extender.
Otherwise the DS18B20 1-wire temperature sensors can work on long wires. One problem with those is that there are many cheap clones which aren't accurate and often have identical "unique" serial numbers.
Or mount something like some Picos (W?) nearer the sensors to take the readings and send them to the Pi.
You could maybe use an i2c extender.
Otherwise the DS18B20 1-wire temperature sensors can work on long wires. One problem with those is that there are many cheap clones which aren't accurate and often have identical "unique" serial numbers.
Or mount something like some Picos (W?) nearer the sensors to take the readings and send them to the Pi.
Unreadable squiggle
Re: Wire length and type for Zero to i2C etc
That is the stuff I do not know how to measure and have not found specified for wire. Are there better protocols for longer wire? None of the stuff need be sub second response.max bus capacitance (CBUS MAX) of 400 pF
Re: Wire length and type for Zero to i2C etc
I am now reading 1 wire protocol: https://hub.packtpub.com/raspberry-pi-and-1-wire/
-
- Posts: 6972
- Joined: Tue Jun 30, 2015 1:35 pm
Re: Wire length and type for Zero to i2C etc
here a cat6 i.e. https://www.mouser.com/pdfdocs/AmphenolPCDCat6Cable.PDF
Capacitance (1kHz) for the cable only is 50nf/km nom.. Unbalanced it is 1600 pf/km max.
No need to measure, calculate from the spec values.
Think of an interface which was designed for long wire lenghts. What instantly comes ro my mind is DMX512 (based on RS485). In therory this would be good for 1.2km without repeater.
With one wire you will hit the same problems as with I2C ...
Thanks to 6by9 there is this https://github.com/6by9/rp2040-dmxsun