Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data transmission between hub and modules #2

Open
NicholasTracy opened this issue May 25, 2018 · 3 comments
Open

Data transmission between hub and modules #2

NicholasTracy opened this issue May 25, 2018 · 3 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@NicholasTracy
Copy link
Owner

I want to explore options for a communication protocol and connection between sensor modules and the hub. the hub will have 2-way communication with the modules via a long cable with universal connectors on either end.
Each sensor module will have its own AVR tiny micro in it to handle simple calculations and communications. Will need at least a ground wire and 3.3 volt supply. Each device (slave) will have a unique ID recognizable by the hub (master). Multiple slave devices will exist on one bus. Needs to be low power consumption for battery use or solar.

Possible options:

  • i2c
  • Dallas 1 Wire
  • CAN Bus

Open to suggestions!

@NicholasTracy NicholasTracy self-assigned this May 25, 2018
@NicholasTracy NicholasTracy added help wanted Extra attention is needed question Further information is requested labels May 25, 2018
@NicholasTracy
Copy link
Owner Author

Controller Area Network (CAN) Bus seems to be the way to go with this since at lower speeds the bus distance can be up to 1000 meters in length with each node being up to a foot off the bus.

All that is needed is a twisted pair cable for CAN high and CAN low. Modules would need a CAN controller such as the MCP2512 DATASHEET HERE and a CAN Transceiver like the TJA1050 DATASHEET HERE. Both of which are easy to find and relatively inexpensive to purchase, there are even breakout carrier boards for the Arduino ecosystem in case someone wants to go with breadboarding before ordering custom PCBs.

A length of shielded, 4 conductor, twisted pair cable can be used for interconnecting sensor modules to the hub(s). Would need to find a suitable cable that is UV resistant and holds up well in the weather as well as a suitable cable termination and socket. Weatherproof RJ11 connectors would be ideal as they are inexpensive and easy to terminate with a cheap crimper found at any hardware store.

@NicholasTracy
Copy link
Owner Author

NicholasTracy commented Jun 11, 2018

Further research suggests that it would be smart to implement checksum error checking.
Not sure at this time if this is compatible with or necessary with the CAN bus network. but for standard serial UART communication paths, Fletcher-16 seems to be the way to go.
here is a sample of a C Implementation of Fletcher-16
Another option would be an implementation of CRC-16 but that may not be necessary either.

As for the data bus, I think CAN is still my first choice but may move to something like RS-485.
Will wait until other parts of the design are figured out such as power supply and the distance between modules.

From here on out, I will be referring to the sensor modules as nodes and the hub as the master controller.

The Data Bus and Power Bus should use inexpensive Cat5 terminations and cabling. UV resistant Cat5 can be found and standard Cat5 cable can also be run through conduit if need be. Non-magnetic RJ45 jacks can be had for cheap and break-out boards exist as well for proto-board and bread-board constructions.

IP67 rated terminations are easy to find for RJ45 and Cat5 UTP cable. But I am slightly worried about lightning strikes on any of this equipment. Further research is needed on that.

@NicholasTracy
Copy link
Owner Author

Just found this information. this might be more useful and seems to already be implemented in a weather station system where the sensors are slaves.
RS-485 Data Communications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant