Did you miss the bit in my original post that said that we wanted to avoid WiFi? Some of these devices will be in the middle of the Model Town, where an antenna would be completely out of place. Others will be the wrong side of substantial buildings, so we would have to use repeaters etc - more unsightly antennas.DougieLawson wrote:Get an ESP8266 or RPiZW running as the remote servers.
You'll have those ESP8266s or RPiZWs running as MQTT data aquisition publishers and an MQTT subscriber on the master. You can also run MQTT with the publisher on the master and subscribers on the remotes to send command and control messages back the other way. The remotes are going to need 5V power, but you'll gain with not having over length 1-wire, SPI and I²C sensors.
MQTT is the IoT protocol. Regular 2.4GHz WiFi should be OK to run things across your model village campus (especially if you scan to find a channel that isn't full of home networks).
I have been looking into MQTT. There seems to be no reason why we shouldn't use the protocol over Ethernet, although we would need an Ethernet adaptor for each of the remote devices if they are Pi Zeros (our current thinking).DougieLawson wrote:.....running as MQTT data aquisition publishers and an MQTT subscriber on the master. You can also run MQTT with the publisher on the master and subscribers on the remotes to send command and control messages back the other way. The remotes are going to need 5V power, but you'll gain with not having over length 1-wire, SPI and I²C sensors.
MQTT is the IoT protocol.
This is what the people who make 1-wire chips have to say: https://www.maximintegrated.com/en/app- ... mvp/id/148I note that 1-wire has greater potential range than I2C or SPI, so it is a candidate for consideration. However, I've also noticed that 1-Wire on the Pi is connected via a perfectly normal GPIO pin, so probably couldn't drive much further than the other two interfaces anyway.
Has anyone used 1-wire like this? Can it be done?
I know, but we would need an antenna because the electronics are likely to be installed in a totally waterproof box which is, in turn, mounted inside a metal or concrete cubicle, or even buried.DougieLawson wrote:ESP8266s don't have an antenna. They have a funky circuit board trace. Raspberry Pi Zero Ws don't have an antenna. They have an entirely mysterious triangle shaped thing on the circuit board that does some RF magic.
Thanks I had spotted that, but my question was really about the drive capabilities of the Pi. From the link:B.Goode wrote:This is what the people who make 1-wire chips have to say: https://www.maximintegrated.com/en/app- ... mvp/id/148
If I use a Pi at one end as the master and multiple Pis as the slaves, then the key will be whether or not the 16 mA drive capability of a GPIO pin will be sufficient over 100 Metres.The master-end interface greatly influences the allowable size of a 1-Wire network. The interface must provide sufficient drive current to overcome the weight of the cable and slaves. It must also generate the 1-Wire waveform with timings that are within specification and optimized for the charge and discharge times of the network. Finally, the interface must provide a suitable impedance match to the network, so that signals are not reflected back down the line to interfere with other network slaves.
I think that you may be right Presumably it is possible, but it looks as if it we would need to respond to the master and write out the data.B.Goode wrote:Can you use an RPi as a 1-wire slave? I'd missed that implication in your description: it might be possible but the usual model discussed here has the RPi gathering data from discrete stand-alone sensors. I think you might be treading new ground here.
Thanks. That is definitely food for thought.DougieLawson wrote:This looks interesting: http://www.raspberrypioneer.com/2013/06 ... -under-15/ (if the equipment is still available) and it's definitely cheaper than the PoE Switch HAT (for £25-30). Run a few RPi1B+ machines that way.
https://www.amazon.co.uk/d/Splitters/TP ... B001PS4NWW
These PoE blocks also work if you want to avoid having to hunt down individual parts - https://www.amazon.co.uk/Raspberry-micr ... 01M1E3VC8/TerryC65 wrote:Thanks. That is definitely food for thought.DougieLawson wrote:This looks interesting: http://www.raspberrypioneer.com/2013/06 ... -under-15/ (if the equipment is still available) and it's definitely cheaper than the PoE Switch HAT (for £25-30). Run a few RPi1B+ machines that way.
https://www.amazon.co.uk/d/Splitters/TP ... B001PS4NWW
Ethernet is looking more and more attractive.
Yes. That was was triggered the original question. Of course, it's not impossible to buffer the signals to boost range, but that adds to the complexity.stevend wrote:I'm successfully using 1-wire bus with a DS2483 line interface chip over distances up to 30m or so; pretty reliable. Your 100m might be pushing it, especially if that's as the crow flies - going up and down and round things can add an amazing amount to cable lengths!
We could overcome that by putting a low-cost switch into the segment.stevend wrote:Its also worth noting that, IIRC, 100m is the maximum length of an Ethernet segment.
We recently had a brainstorming session to decide on the technology mix and have decided on Pi Zeros to interface to the sensors with a Pi 3 for the master controller and Web server. In that scenario, it makes a certain amount of sense to stick with TCP/IP for the communications.stevend wrote:If you're not moving too much data, one possibility is to use some sort of RS-485 bus, which can handle cable lengths up to 1000m at 9600 baud. It has the advantage of being rather lower power than Ethernet. It's a master-slave system (rather than the peer to peer of Ethernet), and you would need to write/adapt the comms software. You could probably use Arduinos or similar for gathering the actual sensor data.