Register 3 Posted September 5, 2013 Share Posted September 5, 2013 Hi,My project is an home automation network. The first aim was to regulate the two heaters I got in my business place. So I made a first PoC with an arduino nano and a rapsberry. The nano sends to the RPi temperature from one side of the room and the a RPI log it along with it's own temperature measurement (the 2 based on DS18B20). Communications between the two is done by 2 RF24 modules, the Raspberry got one 433 transmitter to send order to 2 Chacon switch plug onto which the heaters are connected.On the raspberry I got a Python module logging the temperature in files and a web site in php to display temp graphs with d3.js.As everything was ok, and with some advices from HackSpark.fr shop owner I switched to the MSP430 platform. Got now three sensors, 2 soldered and one on a bread board, communicating with one Rpi. Now for the future : Challenge 1Part 1At the moment I'm using ManiacBug library for Energia, and use the RF24 auto ack with the sensors writing to the same pipe (they write every 10 seconds but should at last write once a minute) so there are few packet packet collision, but to avoid this problem, and as I want more than 5 sensors, I'm gonna have to manage some network addresses and the management packet acknowledgements.Which strategy for address assignment ? I would like to have the more flexible solution. So the sensor have to register themselves to the logger (RPi) so the loggers (in case several sensor networks) had to have the same physical address (on the RF24) as for each sensors. At init the sensors call the logger and register themselves. If there are several logger reachable, you have to accept the new sensor on the logger side. When the logger accept a new sensor it send back to the sensor a 'local' address for the network it manages. The security concerns are not taken into account in my near future plan.The addresses must be unique (managed by the logger) they are compose by the network id and the sensor address, so the logger or networks must have unique ids and not two long has the payload is only 32 bytes on the RF24... The user have to manage the link between physical sensors and logical assignments ( 0x02f = the one in the garage) in case of replacement or complete reset of an existing sensor.Part 2One of my plan is to monitor plants soil in pot moisture (for exemple). So the wireless is less interesting as the pot may be near each other or need 2 sensor due to their size. What i want to achieve is to have one transmitter with several wired sensor hooked to it. The perfect solution is to have the possibility to daisy chain the sensors. So here to I should have a unique "address" for each sensor had to the network.The goal is to identify each sensor across the network and to have the possibility to request or command them. I'm wondering which way to go, the easiest the better ;-), implementing OneWire sensors (i need distance, moisture, flow...) as i already have OneWire ds18b20 or I2C... The wired sensor need to measure and transmit it with a stable address (keep it if it switch off) but it doesn't not to have to bee an hardware one, should be assigned on network registering. The address of the wired sensors are sub address of the sensor. Or they could be considered has 'top' address and the wireless sensor they are attached to have to manage is packets and for attached sensor. Challenge 2 The protocol : the transmission packet themselves. It has to be the more flexible possible, clear string one will be too long, for the moment I use a struct but it's to restricting if the protocol must evolve... And now the fun part : the images :-) The Wip version The soldered version The logger with its screen : date, hour and three temp. The graphs bluehash 1 Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.