RS485, one wire sensors

Greetings!

I am currently working on a home automation project using an esp32 and I would like to inquire about the feasibility of using RS485 communication protocol for connecting one-wire sensors such as DHT22, HC SR501, and RCWL 0516 to the esp32. My goal is to improve the quality of the signal received from these sensors by using wires instead of wireless. Furthermore, some of the wires may need to be as long as 50 meters.

Can you please advise if it is possible to utilize RS485 for this purpose, or suggest any other alternatives that could achieve the desired outcome?

Thank you in advance for your assistance.

You would need a micro to query the sensors and translate the results into a message to transmit over RS485.

1 Like

Understood! Thank you very much

I am doing it with CAN where I can go several thousand feet. Downside I need a CAN controller at each node and I pare that with a NANO, not that expensive. In my case each Node does several things not just a sensor or solenoid.

1 Like

What does this mean? The sensors aren't sending the signals. The microprocessor connected to the sensors sends the signals. Do you mean you think that there may be a poor quality wireless connection? If so, why do you think that?

Although wireless systems are becoming increasingly popular, I prefer using a 100% wired system between sensors and the main microcontroller for greater reliability. However, I'm concerned about the possibility of noise in the system due to the cable length exceeding 50 meters. That's why I am searching for an option that uses rs485, as it is a reliable and robust communication protocol that can handle long distances and noisy environments.

Post #3 gave you the answer. RS485 is a differential signal and is in no way compatible with a 1 wire signal without a processor and conversion hardware at the far end.

1 Like

Hello gilshultz,

I hope this message finds you well. I apologize for the delayed response to your previous message. Nonetheless, I wanted to let you know that I did some research on the topic you mentioned, CAN Bus. Just to clarify, were you referring to the MCP2515 CAN?

Thank you in advance for your reply.

I believe that is the one I use, here is a picture.
image
When you connect them be sure to terminate the bus properly and check the crystal on the modules. I have come across three different crystal frequencies. Cory's library has you insert that in the initial init string. You can get it here: MCP_CAN_lib/mcp_can.h at master · coryjfowler/MCP_CAN_lib · GitHub

I was referring to CAN in general, not a specific controller. There are many devices available that are all comparable. It has been used in automotive for several decades as well industrial etc.

1 Like

Just to note that like the RS485 the CAN bus is not compatible with the 1 wire bus, and you would have to get sensors that are compatible.

1 Like

Copied! Thank you

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.