• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Using an existing sensor

Q&A Forum › Category: ESP32 › Using an existing sensor
0 Vote Up Vote Down
Bart asked 2 years ago

I have a question about using a ESP 32 device in mt application.
The sensor I need to use runs on 12 volts DC. It contains a mechanical relay that provides the signal I need to use at 12 V. The contacts on the relay are isolated from the power to the sensor.
As I understand, the esp 32 needs no more than 3.3 V for power and as an input trigger.
Can I use a voltage regulator, attached to the power terminals of the sensor, to power the esp 32 and the common terminal of the relay to both power the esp 32 and provide the signal?

Do I need any capacitors or resistors in this circuit or would just the voltage regulator be enough?
Also, looking at Digikey’s site, what’s the difference between a shunt, linear or other voltage regulator? Which type should I use?

Does the input pin sink any current to ground?  I mean, can I use a resistor to drop the signal from 12 v to 3.3V?

1 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 2 years ago

Hello Bart,

  • Important: The ESP32 can be powered with 5V in the Vin pin or via the USB input. However, it does output in the output GPIOs a 3.3V signal to control the relay

In theory, you could drop the voltage from 12V to 5V just using a voltage regulator, but it will waste so much power and release too much heat (because they are inefficient). No, unfortunately you can’t drop the voltage using only resistors…
You could use a Step Down Buck Converter, here’s an example:

  • https://makeradvisor.com/tools/lm2577lm2596-step-down-buck-converter/

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.