transfer of input from remote device to local device for esp32 5V

Thread Starter

sksanthosh

Joined Jun 15, 2024
3
Hi

I run a local automation device with various sets of input from a remote device (connected via cable only)
The remote device operates on 12V DC. So the output will be +12V DC and also I am carrying and GND from there to a remote device. (distance may be 50 or 200m varies)

In the local device, I need to connect that input from the remote device to an ESP32.
I am now using several relays to pick up that input and convert it to input for ESP32 5V DC.

Even if the remote signal is having a voltage drop, I will use a 9 V or 5V DC to pick up that signal.

Now, my question is, is there any method to give that signal to my ESP32 without using relays?
Also, my consideration is the isolation of the power supply. I don't want to mix up local and remote GND's

thank you
 

Attachments

Ya’akov

Joined Jan 27, 2019
9,277
Welcome to AAC.

There are a number of ways to do what you seem to want, but your description is not of the problem you are solving but of a solution to that problem which you don’t find completely satisfactory. It would be far better to describe what this hardware is actually doing so any possible solution proposed can include that information.

Your current attempt is a common sort of mistake. You need to break down the problem into the systems involved and consider the interfaces between them. Naïvely extending the edge of one system to the next using the signals that happen to be there is a very poor design. Instead, you should consider what you are trying to accomplish from a higher level.

You have a system that generates data about its state (let’s call it REMOTE), located up to 200m from a system that consumes that data (we’ll call LOCAL). You need to get the data from REMOTE to LOCAL. You mention a constraint—a wired connection. Whether this is a real constraint born of cogent consideration or an arbitrary choice is unclear, but we can stick with it for now.

Since you are currently considering relays, it suggests the state data consists of simple, binary values. That is, there are no analog levels to transfer. Immediately this arrangement suggest using something like RS-485 serial communications to send the data.

By using a serial connection, you can use fewer wires and add new signals at any time. Serial data libraries are readily available, and the data rate can be higher than you’d be likely to need, even though you are not sending the data in parallel. This also solves the isolation problem, and optoisolated connections are easy to implement to be certain.

RS-485 will give you a data rate of up to 1mbps to 500m, much more than you are likely to be able to use. In practice, the REMOTE would periodically scan the outputs you want to extend, then send a packet containing the data to LOCAL. You could also implement a system that only sends changes, or one that works based on polling by LOCAL—or a mix of these as needed.

Without understanding what this system is meant to do, better advice is impossible—but I hope you get the idea that the communications between REMOTE and LOCAL is a separate problem that you should consider another subsystem.

Good luck on your project.
 

dendad

Joined Feb 20, 2016
4,504
Must it be cable?
As you are using ESP32 already, why not use another as the remote and utilize the wireless systems built in?
 
Hi

I run a local automation device with various sets of input from a remote device (connected via cable only)
The remote device operates on 12V DC. So the output will be +12V DC and also I am carrying and GND from there to a remote device. (distance may be 50 or 200m varies)

In the local device, I need to connect that input from the remote device to an ESP32.
I am now using several relays to pick up that input and convert it to input for ESP32 5V DC.

Even if the remote signal is having a voltage drop, I will use a 9 V or 5V DC to pick up that signal.

Now, my question is, is there any method to give that signal to my ESP32 without using relays?
Also, my consideration is the isolation of the power supply. I don't want to mix up local and remote GND's

thank you
Optocouplers or isolated DC-DC converters can be used to link a 12V DC signal from a remote device to the ESP32 without the need for relays. In order to create electrical isolation between the two circuits and avoid interference or ground loops, optocouplers employ detectors and LEDs. Although they do not offer isolation, voltage dividers reduce the voltage to an acceptable level. In order to maintain isolation between the input and output, isolated DC-DC converters transform the signal to a 5V DC signal. The ideal choice is determined by the need for electrical isolation, compatibility with different voltage levels, complexity and cost, as well as power and space requirements.
 
Top