Short occurring on UART TX and RX lines
Posted: Tue Nov 23, 2021 7:09 pm
Hi, I am using a ESP32-WROOM-32D to talk to a PIC microcontroller over a UART communication. In our design we have a battery disconnect meaning we can set a GPIO pin to LOW and all of the PIC controllers will have no power going to them. Then when we want to read from our sensors we can set the GPIO to HIGH and 6v will flow to them. As soon as the power starts going to the PIC controllers there is a short and the power supply supplies 200mA (which is the max we allow). If I take off the TX and RX line on the ESP32 to the PIC microcontrollers then the short DOES NOT occur. It only occurs when the lines our connected specifically the TX line on the ESP to the RX line on the PIC.
I have tried writing a simple test case where I turn on the power wait 3 seconds turn off the power then repeat. I have tried initializing the Serial line and setting it to GPIO and the short still occurs.
Let me know if there needs to be any more information to be supplied to assist me on this problem.
Thanks for helping!
I have tried writing a simple test case where I turn on the power wait 3 seconds turn off the power then repeat. I have tried initializing the Serial line and setting it to GPIO and the short still occurs.
- #define DSP_DISCONNECT 19 //GPIO pin that controls when 3.3v flows to the LCD
- #define BATTERY_DISCONNECT 12 //Battery disconnect pin HIGH for giving power to sensors, LOW for stopping power to sensors
- void setup() {
- // Serial.begin(9600); //Commented the UART1 line out
- // while(!Serial);
- pinMode(DSP_DISCONNECT, OUTPUT); //Set 3.3v LCD power supply to output for when we need to power it
- pinMode(BATTERY_DISCONNECT, OUTPUT); //Sets the battery disconnect to output for when we need to read from the sensors
- digitalWrite(BATTERY_DISCONNECT, HIGH); //Sets Sensor power to high to the PIC controllers are getting 6v
- digitalWrite(DSP_DISCONNECT, HIGH); //Sets the LCD power to high to turn on the LCD
- }
- void loop() {
- delay(3000);
- digitalWrite(BATTERY_DISCONNECT, LOW); //Sets Sensor power to low to the PIC controllers are getting 0v
- digitalWrite(DSP_DISCONNECT, LOW); //Sets the LCD power to low to turn off the LCD
- delay(3000);
- digitalWrite(BATTERY_DISCONNECT, HIGH); //Sets Sensor power to high to the PIC controllers are getting 6v
- digitalWrite(DSP_DISCONNECT, HIGH); //Sets the LCD power to high to turn on the LCD
- }
Thanks for helping!