Skip to main content
2 of 2
added 2 characters in body
Andy aka
  • 473k
  • 29
  • 383
  • 839

I designed the ESP32 PCB with CAN and also the code for it. So you saying I should rather use Edit 2 above?

You can use either but I see no reason not to use edit 2. Maybe you have a spare UART you can use inside the ESP32 and that makes interfacing with 485 much easier. Or you can bit-bang the 485 via plenty of readily available 8 pin chips using three spare IO lines.

yes I do have a spare UART. So I just need to use a RS485 to UART converter?

Taking your slightly modified edit 2 diagram, here's how you would add a simple separate RS485 interface (if you felt it to be the right route for you): -

enter image description here

IC image from this datasheet but, there are other suppliers of very similar 485 interface chips so, don't feel limited to Maxim.

You can get isolated versions of the interface chip as well (should you be concerned about ground/earth loops). You can also get fully-full-duplex interface chips as well.

Andy aka
  • 473k
  • 29
  • 383
  • 839