Notice: Will be testing how to share the graphs at the begging of the topic and updating accordingly. Visual graphs are available and will replace the previous visual schematic. It is a large project including controlling every aspect of the home in an off grid environment. There are many code versions but ultimately the Arduino Mega 2560 will hold the base structure of the environment up as it would an index to guide the project.
Feel free to ask questions if a part of the project is something you might have wored with an have insight on. This is also considered theoretical until the final compilation is compiled without error. Got fresh set of duponts to give it another go and thought I would share the path after spending weeks figuring out the best way to implement a large network.
Thanks. The CAN bus will be implemented in many ways. But I m not sure if all the data would require a can bus and converter at each hub to link to each device peripherals.
Some Protocols should be CAN but it must be configured in a decoder and encoder to handle multiple networks in just one Can. How would you you implement a CAN network for the entire Home System? This has me thinking of trying to convert Can Wireless adapters for vehicle tracking with esp32 lol... Not even sure that is possible, but I have to research the process of formatting in CAN. I like the noise cancellation that happens. Was getting noise on compilations of the Nextion portion.
It is not that hard but it takes time. I have about 10 nodes on the bench currently. For long term reliability they are built on PCBs. My existing hardwired 24VDC system is being replaced. 24VDC will power the system and the nodes and associated relays. My nodes can have as many I/O as wanted. Each node is a master and slave.
When a switch gets closed it sends a message, any thing interested uses that information. You can also query the status of the switch. Each node is generally a China nano with a CAN board and Gary Fowlers Library. I can have upto 64 nodes on one bus. I am currently working on my "TimeKeeper" it does UDP etc and is the master clock but each node has a RTC as well and32K x 8 FRAM for nonvolatile storage. I use the IDE for the node address and have 8 bytes to work with for data etc.
Saw one of the Can boards. They look pretty interesting. I wonder if down the road the wifi boards will have a low level powered option like BLE. Anyhow I wanted to ask... Does the CAN system work primarily well for you due it being on its own network without wifi?
Absolutely. I am working the first WiFi and that is to get UDP, nothing else. There are a lot of problems with WiFi and security so I selected to not use WiFi. My existing system is over 24 years old and no WiFi.
You probably have several CAN systems, they are in CARs.
That is where the idea for me is coming from to whip out that old CanBus car monitor and take it apart... thinking its an ESP model since it gives off a wifi hotspot. Will be cool the take it apart. Studying the conversion of data into CAN Data has been rough but it seems the protocols are interchangeable with a board that's meant to do so.
Part of the system has to be partly 24v. The sprinkler and most HVAC stuff is 24V. Thats the main focus though. Lucky to have step up isolators from 3v3 to 24 and so on.
The situation with the CAN data being more secure is that the data itself is encoded ony to be able to be translated by the end user software. I wanted to figure out who makes a coding platform as its a real nice touch to make a protocol that calls up pages of data just from small bit of information, which makes the whole ordeal more robust.
The protocol is up to you. There is no requirement on the CAN bus. Be careful with the ID as it also controls priority. All of it is in the lower priority, leaving it open for higher priority messages.
In the CAN protocol, priority is determined by the identifier (ID) assigned to each message; lower numerical IDs have higher priority. When multiple nodes attempt to send messages simultaneously, the message with the lowest ID wins the bus arbitration and is transmitted first.
Here is what I am working with.
Bit 9-11 101 = Command
110 = Keep Alive
111 = Response
Bit 5-8 0 Target/Responder Address Upper 65536 Max // Zeros
0 β β β
0 β β β
0 β β β
Bit 1-4 0 Target/Responder Address Lower 256 Max // Covers all
0 β β β
0 β β β
0 β β β
Hopefully this helps. I am in the process of redefining all of it.
The picture shows 6 microcontrollers. If this is your complete full blown system I would take CAN-BUS. The ESP32 have already inbuild CAN-BUS-controllers. You just need the tranceiver-chip like ADJ1050
So how many "aspects" do you estimate will it be in the full blown version?
20?
200?
2000?
Items like light-switches, radioator-valves, refrigerator, person-presence-sensors etc. etc. etc. that shall all be connected in this network?
And are you sure that you want to build them all by yourself?
For such a large house-automation-system I would consider using ready to use components based on the ZigBee-, or Z-Wave-standard. Or if it shall be wire-based KNX or modBus-RTU.
Doing it all from scratch will take a lot of time.