Connections for Arduino UNO R3 and ESP32

Hi everyone,

I am working on my graduation project—a smart parking system—and I would like to verify my wiring before I power everything up. I am using an Arduino Uno to handle the sensor data and an ESP32 DevKit V1 (30-pin) as a Wi-Fi gateway.

Hardware Components:

Sensor: RCWL-1655 (Ultrasonic)
Microcontrollers: Arduino Uno & ESP32 DevKit V1
Voltage Divider: 1kΩ and 2kΩ resistors (for 5V to 3.3V logic conversion)

Current Wiring Setup:

  1. Sensor (RCWL-1655) to Arduino Uno:

VCC -> Arduino 5V
GND -> Arduino GND
Trig -> Arduino Digital Pin 9
Echo -> Arduino Digital Pin 10

  1. Logic Level Conversion (Arduino TX to ESP32 RX):** Since the Arduino logic is 5V and ESP32 is 3.3V, I’ve implemented a voltage divider on the Serial line:

Arduino Pin 11 (SoftwareSerial TX) connects to a1kΩ resistor.
The other end of the 1kΩ resistor connects to ESP32 Pin RX2 (GPIO 16).
A 2kΩ resistor is connected between **ESP32 Pin RX2 (GPIO 16) and Common GND.
3. Power & Common Ground:

Arduino and ESP32 share a Common Ground via the breadboard’s negative rail.
ESP32 is placed on the breadboard with one side "in the air" to allow access to the pins since it's a narrow 30-pin breadboard.
ESP32 GND and VIN are connected using Female-to-Male jumper wires.
My Questions:

  1. Does this voltage divider setup look safe for long-term use on the ESP32 RX2 pin?
  2. Are there any known issues using the RCWL-1655 at 5V while the ESP32 is powered via USB?

I’ve attached some photos of my breadboard layout for reference. Any feedback is greatly appreciated!

Thanks in advance!




I don;t understand why you need the UNO, but in any case, draw a wiring diagram by hand and then post a picture of that.

agree with @sonofcy - why use the UNO?
the ESP32 could read the transducer and transmit the information over WiFi

Not sure why you abandoned your last post...

Your interconnection between UNO R3 and ESP32 using a voltage divider is safe.

However, like oter posters, I have the same question why are you using the UNO R3; the ESP32 is enough to do your job? Your ultrasonic sensor can be operated by 3.3V of ESP32.

Ok then can you say how can i connect esp to this sensor without UNO?

Give the link of your sensor.

Cannot read the pin numbers and the siignals associated with them. Can you send this information?

See your other two topic on the same subject:

and this one:

It's an I2C sensor, so G to G, VCC to (5V or 3.3V) SCL to SCL and SDA to SDA.
Just like dozens of other I2C.

if R7 is not fitted the sensor interface defaults to GPIO with pins GND Echo Trig and VCC

code from ESP32

// --- Hardware Mapping ---
#define trig 12  //Pin 33 trigger Tx
#define echo 13  //Pin 32 echo Rx

void trigPuls();

float pulse;     //echo time duration
float dist_cm;   //distance in cm

void setup() 
{
  pinMode(trig, OUTPUT);
  pinMode(echo, INPUT);
  
  digitalWrite(trig, LOW);
  Serial.begin(115200);
}

void loop() 
{
   trigPulse();
   pulse = pulseIn(echo, HIGH, 200000);
   dist_cm = pulse/58.82;
   // 340m/s
   // 34000cm/s  
   /*
        100000 us - 17000 cm/s
             x us - 1cm
           1E6
      x = -----
          17E3
   */  
   Serial.println(String(dist_cm) + " cm");
   delay(1000);
}

void trigPulse()
{
  digitalWrite(trig, HIGH);  //Trigger Pulse HIGH
  delayMicroseconds(10);     //for 10 micro seconds
  digitalWrite(trig, LOW);   //Trigger Pulse LOW
}

e.g. using ultrasonic sensor to read river water level