Interfacing the ESP32S3 with some 5V sensors
Posted: Sun Aug 04, 2024 8:23 pm
Hello,
I migrating an old Arduino project to ESP32S, this concurrently uses 5V sensors for everything. I wonder if these sensors can be all hooked up or need TTL conversion, here is the list:
1, HC-SR04 Ultrasonic Sensor, According to this tutorial this sensor can be hooked up no problem to the ESP32s:
https://randomnerdtutorials.com/esp32-h ... c-arduino/
The sensor itself needs to be operated from 5V otherwise it malfunctions. The thing about these sensors is when you operate them from 5V there will be 5V on their digital pin as well if I connect it to the ESP32 then the voltage goes down to 3.3V level, I'm not sure that regardless what that guide claims connecting this is healthy for the micro...
2, Regular 4 channel relay boards, again these have to be operated from 5V otherwise the relays can be flaky (don't always pull in or don't pull in at all) however this does not put high voltage on the pins as it's opto isolated
3, Rain droplet sensors: https://esp32io.com/tutorials/esp32-rain-sensor
Again the article claims it can be connected directly to the micro but I noticed the same thing if you operate these from 5V there will be 5V on the digital pins
The bottom line is: is connecting 5V to the regular analog/digital pins of the ESP32s3 damages the device any way or it can handle it?
Thanks for the guidance
I migrating an old Arduino project to ESP32S, this concurrently uses 5V sensors for everything. I wonder if these sensors can be all hooked up or need TTL conversion, here is the list:
1, HC-SR04 Ultrasonic Sensor, According to this tutorial this sensor can be hooked up no problem to the ESP32s:
https://randomnerdtutorials.com/esp32-h ... c-arduino/
The sensor itself needs to be operated from 5V otherwise it malfunctions. The thing about these sensors is when you operate them from 5V there will be 5V on their digital pin as well if I connect it to the ESP32 then the voltage goes down to 3.3V level, I'm not sure that regardless what that guide claims connecting this is healthy for the micro...
2, Regular 4 channel relay boards, again these have to be operated from 5V otherwise the relays can be flaky (don't always pull in or don't pull in at all) however this does not put high voltage on the pins as it's opto isolated
3, Rain droplet sensors: https://esp32io.com/tutorials/esp32-rain-sensor
Again the article claims it can be connected directly to the micro but I noticed the same thing if you operate these from 5V there will be 5V on the digital pins
The bottom line is: is connecting 5V to the regular analog/digital pins of the ESP32s3 damages the device any way or it can handle it?
Thanks for the guidance