August 3, 20233 yr Hi Everyone, I ordered an ESP32 - TTL Board online wanting to integrate ESP with HA. I realized when unpacking it is not the exact same TTL board that @Sc00bsshowed in his video. now I am not sure how to connect the red one, there shouldn't be much difference?
August 3, 20233 yr @Scabanshi the top blue board is a well known board that's works with ESP32 , Pi Pico and other embedded controllers thar operates at 3.3V system voltage level. Note that apart from DI (or TXD) and DO (or RXD) , there is also a RE (Receive Enable) control input which controls the direction of the half-duplex working of the RS485. The red board does not have this RE input , it only has RXD and TXD , apart from the power pins. This may look ominous , but there are boards that perform internal arbitration of direction control , so external control input is not required. This should be the case with this module. You can check if it works by connecting your ESP32 TXD and ESP32 RXD lines but omitting the RE line. But you also need to make sure that this board is 3.3V compliant , and not 5V . If in doubt , check the number of the 8 pin IC on the board and report wether it is an MAX485 (5V) or MAX3485 (3.3V) , or SP485 or SP3485. the digit '3' denotes it is compliant with 3.3V. If all else fail, just get the blue board , its about R18-00 at Mantech , last time if checked. Edited August 3, 20233 yr by BritishRacingGreen
August 3, 20233 yr Author Thanks @BritishRacingGreen for the info! Much appreciated. I don't see any availability on stock anywhere online and walk in. I found this one online, but i see it says it is 5v. Can this work or should i search for the 3.3v one?
August 3, 20233 yr Mantech is walk-in , if they denote the unit price , the product is available ex-stock , but always confirm with them. here is the link https://www.mantech.co.za/ProductInfo.aspx?Item=15M8254
August 3, 20233 yr 6 minutes ago, Scabanshi said: Thanks @BritishRacingGreen for the info! Much appreciated. I don't see any availability on stock anywhere online and walk in. I found this one online, but i see it says it is 5v. Can this work or should i search for the 3.3v one? yep 5v is no good for your ESp32
August 3, 20233 yr 1 minute ago, BritishRacingGreen said: Mantech is walk-in , if they denote the unit price , the product is available ex-stock , but always confirm with them. here is the link https://www.mantech.co.za/ProductInfo.aspx?Item=15M8254 sorry this one is also 5V , my mistake.
August 3, 20233 yr 3 minutes ago, Scabanshi said: Thanks. So 5v boards re not going to work? officially the Espresif datasheet for ESP32 says its not 5V tolerant , but if you google there lots are of reports that suggest it actually is. But I cannot give you a guarantee on this. What I can suggest , is that if you don't get a 3.3V RS485 driver board, then you can use a 5V board as follows: 1. Power VCC of the RS485 module with with 5V 2. Wire the DI from the ESP32 directly to to the RS485 board . The 3.3V hi logic level will still satisfy the 5V input requirements. 3. Wire in a potential divider using 2 resistors to drop the DO output of the RS485 from 5V to 3.3v level . The actual value of the 2 resistors I have not available at the moment , but if you interested we can calculate it.
August 3, 20233 yr 1 hour ago, BritishRacingGreen said: officially the Espresif datasheet for ESP32 says its not 5V tolerant , but if you google there lots are of reports that suggest it actually is. But I cannot give you a guarantee on this. What I can suggest , is that if you don't get a 3.3V RS485 driver board, then you can use a 5V board as follows: 1. Power VCC of the RS485 module with with 5V 2. Wire the DI from the ESP32 directly to to the RS485 board . The 3.3V hi logic level will still satisfy the 5V input requirements. 3. Wire in a potential divider using 2 resistors to drop the DO output of the RS485 from 5V to 3.3v level . The actual value of the 2 resistors I have not available at the moment , but if you interested we can calculate it. Will it matter if 2 x diodes are used in series and the 5V is dropped to 3.6V?
August 3, 20233 yr Author 2 hours ago, BritishRacingGreen said: officially the Espresif datasheet for ESP32 says its not 5V tolerant , but if you google there lots are of reports that suggest it actually is. But I cannot give you a guarantee on this. What I can suggest , is that if you don't get a 3.3V RS485 driver board, then you can use a 5V board as follows: 1. Power VCC of the RS485 module with with 5V 2. Wire the DI from the ESP32 directly to to the RS485 board . The 3.3V hi logic level will still satisfy the 5V input requirements. 3. Wire in a potential divider using 2 resistors to drop the DO output of the RS485 from 5V to 3.3v level . The actual value of the 2 resistors I have not available at the moment , but if you interested we can calculate it. Ok i will definitely try it. I would want to get it sorted tomorrow. So I'll go get what is needed. If you don't mind helping me with the calculations, I want to make sure i have what is needed. Thanks
August 3, 20233 yr 3 hours ago, BritishRacingGreen said: officially the Espresif datasheet for ESP32 says its not 5V tolerant , but if you google there lots are of reports that suggest it actually is. But I cannot give you a guarantee on this. What I can suggest , is that if you don't get a 3.3V RS485 driver board, then you can use a 5V board as follows: 1. Power VCC of the RS485 module with with 5V 2. Wire the DI from the ESP32 directly to to the RS485 board . The 3.3V hi logic level will still satisfy the 5V input requirements. 3. Wire in a potential divider using 2 resistors to drop the DO output of the RS485 from 5V to 3.3v level . The actual value of the 2 resistors I have not available at the moment , but if you interested we can calculate it. I have been pulling my hair out wiring directly the above without changing the voltage level for DO. I was on the verge of buying a prebuilt rs485 to wifi. I will give this a shot tomorrow.
August 4, 20233 yr Below is a reference design for interfacing the 5V RS485 module with an ESP32 3.3V .
August 4, 20233 yr 10 hours ago, Scorp007 said: Will it matter if 2 x diodes are used in series and the 5V is dropped to 3.6V? 3.6V is above the ESP32 3.3V VCC rail. You need enough diode voltage drop so that your signal is below 3.3V but above 2.7V . The minimum high level of ESP32 input is 0.75 * VCC which is about 2.5V . So to be safe your margin should be 2.7 or higher , to give margin just in case the ESP32 VCC is hihger than 3.3 (say 3.35 or even 3.4). Also you will need a pull down resistor to ground , to maintain low when the diodes are not biased.
August 4, 20233 yr 31 minutes ago, BritishRacingGreen said: Below is a reference design for interfacing the 5V RS485 module with an ESP32 3.3V . below is the schematic of the RS485 module itself :
August 4, 20233 yr Just a note, there are 2 chips that might be of interest, MAX485 and MAX485ESA. The ESA version I believe has some protection for lightning induced transient spikes. Since VCC is effectively a pullup, you could try driving the chip with lesser voltage such as 3.3V or less, ymmv Edited August 4, 20233 yr by iiznh
August 4, 20233 yr 1 hour ago, iiznh said: Just a note, there are 2 chips that might be of interest, MAX485 and MAX485ESA. The ESA version I believe has some protection for lightning induced transient spikes. Since VCC is effectively a pullup, you could try driving the chip with lesser voltage such as 3.3V or less, ymmv Yes , the outputs driven from the ESP32 outputs to the inputs of the MAX485 is not the problem , its the MAX485 output (RO) that requires scaling down to 3v3.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.