Rs485 over wifi

My plan is to transfer rs485 over ESP-NOW,
My question is if it’s actually possible,
So i Will have a max485 to one arduino then transfer the rs 485 over esp-now then on the other end convert it back to rs485 with a max485, when it gets to the other end, hopefully in the exact same format as it was in the begining.

So my question is if this is even possible?
Kind Regards Emrik

RS485 is a hardware communication wiring standard - google it! Hard to put copper over wifi. I think you might be talking about serial communication. Is that correct?

Yes.

Yes the Max 485 converts rs485 to serial

So you're really talking about transmitting data serially from one device which outputs on an RS485 link, to another device which receives on an RS485 link, via ESP-NOW, whatever that is. Got it.
I assume there's a translation app involved here, so I should forgive the lack of clarity.

RS485 uses wire, wireless uses air. Why both?
Draw a block diagram showing the large picure.

The two very different methods of communication, rs485 serial and radio (ESP-NOW), can transmit bytes of data.

Please draw and post diagram of the setup, with the MCUs and various data links clearly labeled, so that we can have a better idea of what you want to do.

With ESP-NOW you can write custom code to do that, or

Make it simpler. It does not matter whether Serial data is transmitted by Rs-485 or WiFi, it is and remains Serial data (bytes or chars). What are the methods for sending data by ESP-NOW?


The top most diagram is how it's setup right now but I want to move the pc, the place where I will have the pc I don't have any possibility to connect with wires so I'm thinking to send the data between the esp8266 with esp-now
So does anyone have any idea how and where I would start?

there are no spare serial hardware serial ports on a `ESP8266
have a look at software-serial-esp8266
this is a test program I have used to test the ESP8266 SoftwareSerial on a WeMos D1 R1 ESP8266 WiFi Board

// ESP8266 SoftwareSerial test - note 9600baud
//
// see https://circuits4you.com/2016/12/14/software-serial-esp8266/

// note problems with lost character if Serial run at 115200
// Note: loopback - connecting D5 to D6 does not work

#include <SoftwareSerial.h>

#define baudrate 9600//115200//57600//38400//9600//115200

// pins Rx D5 (14) and Tx D6(12)
//SoftwareSerial mySerial(14, 12); // RX, TX
SoftwareSerial mySerial(D5, D6); // RX, TX

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {  }
  Serial.println();
  Serial.println("ESP SoftwareSerial  test!");
  // set the data rate for the SoftwareSerial port
  mySerial.begin(baudrate);//9600);
  Serial.print("Serial test - Serial 1 at  baudrate ");
  Serial.println(baudrate);
  //while(1) mySerial.write('X');  // send continuous test
}

void loop() {
  if (mySerial.available())
    Serial.write(mySerial.read());
  while (Serial.available())
    mySerial.write(Serial.read());
}

Edit: just connected a NodeMCU 8266 (pins D5 and D6) to a WeMos D1 8266 (pins D6 and D5) ran the above program on both and they communicated OK

For ESP you need a MAX3485 who is 3V3.

I find these XY-017 3.3v 5v 12v RS485 TO TTL RS485 breakout boards useful - will run off 3.3V and no RE and DE pins - receive/transmit switching is done onboard

In 99,9% I don't use BOB. I place a MAX(3)485 on my own PCB's with very short traces from µC to MAX.

last PCB used a couple of MAX13430E

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