I am a programmer trying to build a circuit with limited EE knowledge. With so many options(at least being new to this), just want to make sure I am going down the right path.
What I am trying to build is a master device with a RaspberryPi and many plug and play slaves(relays and sensors with very small amounts of data transfer). Seems like using modbus/rs485/pic/75176(LTC485) would be the best solution.
- Consumer device, so component costs matter and an off the shelf product won't work.
- The more devices I can connect the better. (My understanding is Modbus can do 250 devices by default, but I can do a double register(16bit) to get 65k tho bandwidth will probably cut that in at least half which is fine)
- Slaves can be repeated many times. ie 10 of the same temperature sensors. I'm understanding that I don't necesarily have to define the slave id in modbus and can define it on the fly. Please correct me if I am wrong since I can't ask a consumer to set the ID manually if there is more than 1.
- I need the consumer (true end user no corporate) to just plug a device in and have the system recognize what it is and be able to uniquely identify it.
- True real time is not needed, a few second delay isn't a big deal.
- Everything will be a call from the master to get data from the slave. Nothing originating from the slaves.
- Plan on using a standard rj45 cable with a max distance of 100m since that's what they are rated for (cheap simple standard).
- Lastly, I do plan on having a wireless option in the future, so if any of it can mesh well, that's a bonus.
I found this example that seems like what I am looking for. Doing my code in c++, but should be easy to convert. https://docs.google.com/document/d/1YN4BeXw4zrb2dlk9HcTDxd-E5vxNjVN8wcSF4Q86yz0/
Again, I have much to learn, but tired of going down a bunch of wrong paths, so any advice would be great.
Thanks ahead of time.