0
\$\begingroup\$

I am a beginner in embedded systems and I want to create a self-powered system with sensors to measure temperature, humidity, river depth, and rainfall. I have chosen the following sensors:

  • HC-SR04 for depth measurement
  • DHT22 for temperature and humidity
  • FC-37 for rain detection

The microcontroller I am using is the ESP32.

I am facing a challenge with powering these sensors because the HC-SR04 requires 5V. While I read that I could use the same power source for both the ESP32 and the sensors, I learned that the ESP32's inputs do not support 5V signals from the sensor. Therefore, I would need to use level shifters.

Can anyone suggest a solution for powering these sensors and managing the voltage levels?

I welcome any reading materials or resources that could help.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Also it's good manners to try to solve the problem yourself first. Please draw a schematic with all the connections you are planning on. Read the datasheets and try to add level shifters where you need them. If you have questions in the process we're here to help. \$\endgroup\$
    – Drew
    Commented Aug 4 at 15:44
  • \$\begingroup\$ Note to EE.SE site members: This question got migrated to us, but that was about 6 weeks after it was originally asked. || The OP doesn't have an account on this site (yet?) so they won't get notified of any comments (or answers) which are posted here and we can't @Keeper the OP. || They were last seen on the original site over a month ago. So at this stage, it seems possible this is a zombie question which the OP has given up on. || While you can answer the question or post clarification requests in comments, it's unknown whether the OP is still interested, or will ever return. \$\endgroup\$
    – SamGibson
    Commented Sep 15 at 16:41
  • \$\begingroup\$ There are 3.3V versions of the HC-SR04, see sparkfun.com/products/24049 for instance \$\endgroup\$
    – jcaron
    Commented Nov 8 at 23:19

1 Answer 1

0
\$\begingroup\$

there is a ViN pin in ESP 32.use that it take voltage directly from USB power supply

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.