I have a small project with an ESP8266, on which on a PIO I need to retrieve the presence or absence of an external voltage, from another totally independent circuit. The voltage I need to check is under 24V. I need an isolation between both circuits. What's the best way to find out whether or not this voltage is present, and bring this information to the ESP8266?
\$\begingroup\$
\$\endgroup\$
7
-
\$\begingroup\$ Any reason you can't use a GPIO pin and a voltage divider? \$\endgroup\$– user1850479Commented Jun 23, 2023 at 12:51
-
\$\begingroup\$ Do you need electrical isolation between both circuits? \$\endgroup\$– JensCommented Jun 23, 2023 at 13:03
-
\$\begingroup\$ Yes I need an isolation between both circuits \$\endgroup\$– hervemaCommented Jun 23, 2023 at 13:19
-
\$\begingroup\$ Edit your question to include that and any other requirements. \$\endgroup\$– user1850479Commented Jun 23, 2023 at 13:33
-
\$\begingroup\$ I've found a similar question. I will use an opto-isolator / optocoupler. \$\endgroup\$– hervemaCommented Jun 23, 2023 at 13:50
|
Show 2 more comments
1 Answer
\$\begingroup\$
\$\endgroup\$
1
A simple voltage divider made of 2 resistors would be the easiest option https://ohmslawcalculator.com/voltage-divider-calculator R1=100k R2=15k you would get ~3.2V out and a current leak of 0.2mA depending on your system such a setup would work but doesnt provide protection for over voltage (maybe a diode would help? also a serie resistor to the mcu adc pin?)
-
\$\begingroup\$ Nicolas de Grave - Hi, Thanks for trying to help. Unfortunately, after you posted this answer, the OP clarified in their question that they need isolation between the measured voltage & the MCU, so a simple voltage divider is not an appropriate solution for them. The question then became a duplicate of an existing question and the OP later mentioned that as a solution. || You didn't break any rules, but as you are new here, please see the tour & help center to see the main site rules, as they differ from ones on typical forums. Thanks. \$\endgroup\$– SamGibson ♦Commented Jun 23, 2023 at 15:23