I'm looking for recommendations of a good RS485 that works over I2C, to connect to my ESP8266 (so 3.3V levels). I found a few options on Google but nothing really on this forum with near-zero option for testing in my situation I need to find a chip that works well.
I've been looking at the MAX3485 chip which looks great, requires just a few extra components, but it also requires three pins: TX, RX and one more GPIO to set send/receive.
The problem is that I really don't have the pins available - 10 out of 11 (so the GPIO and RX) are already in use by devices that really can't be moved to a port extender. So the most realistic option is to have it connect to the I2C bus.
The amount of communication is small: I basically have to be able to send temperature settings to a fridge, and maybe read the current temperature from the fridge's controller. I don't even have to listen for incoming communication other than expected replies to my requests. This fridge only has an RS485 interface available. I assume it's half duplex (two wires), as that's the standard, and nothing else specified yet.
I'm looking for recommendations of a good RS485 that works over I2C
What should that be? RS-485 is a physical layer of a UART style communication (asynchronous) while I2C is a strictly master slave synchronous serial interface.
One option you have is to use a small AVR MCU to terminate the RS-485 line and communicate with your ESP8266 by I2C. Do you know what protocol the fridge uses on the RS-485 line?
I was looking for a single chip that the ESP can connect to over I2C, and which in turn can handle the RS485 communication. Adding an AVR is possible but adds lots of extra complexity that I hoped to avoid.
In the meantime I have found a way to free some ports (moving some other stuff to the port extender, including the SS line of the SPI) so maybe not necessary this way.
I don't know anything yet about the software level - all I know is I have to use RS485 on the hardware level...
I was looking for a single chip that the ESP can connect to over I2C, and which in turn can handle the RS485 communication. Adding an AVR is possible but adds lots of extra complexity that I hoped to avoid.
Theoretically you can add an RS-485 driver chip (as the MAX485) to your I2C port extender but you probably won't reach transfer rates higher than 300-600 baud. What baud rate does your fridge use?
I'd say the easiest solution is to use a small MCU together with a MAX485. The MCU can handle the protocol on the RS-485 and you simply request the values by I2C. It adds the complexity to program two processors.
I went through my schematics again, and figured a way to move more to the port extender and managed to fit it all in... Quite a puzzle So in the end it's possible for me to use a regular MAX3485 chip for the communication.
Just curious... have you been able to communicate with your fridge? I want to read temperature readings from a Liebherr fridge with rs485, but can't find any protocol information.