0
\$\begingroup\$

I want to be able to read the value of a potentiometer in an existing high-voltage circuit externally with a microcontroller, but am concerned how the existing circuit would affect the Arduino and conversely how the Arduino could affect the existing circuit.

Here is my first idea for how a circuit could be constructed to measure potentiometer value in an already existing circuit:

Potential circuit featuring Arduino wired to potentiometer with no supplementary components.

My worry with this circuit is that the voltage going into the potentiometer from the already existing circuit would get shorted through the Arduino, frying it in the process.

My next idea was the addition of a diode to assure voltage would go across the potentiometer and not short through Arduino itself, but I still worry in such a circuit that the 5V supplied by the Arduino would get boosted depending on voltage across the potentiometer, frying the Arduino as well.

Same circuit with a diode attached to 5V from arduino.

Will either of these circuits would work or is there a better way of going about measuring the value of a potentiometer in a given circuit externally?

\$\endgroup\$
7
  • \$\begingroup\$ Both of those circuits would fairly immediately burn your Arduino. So, instead of showing circuits that won't work (in the hope that they impart something useful to the reader), please explain what you are trying to do more technically. \$\endgroup\$
    – Andy aka
    Commented Mar 7, 2023 at 16:01
  • 1
    \$\begingroup\$ You have 40 V going to the 5 V pin on your Arduino. It won't survive that. \$\endgroup\$
    – Hearth
    Commented Mar 7, 2023 at 16:17
  • 2
    \$\begingroup\$ Neither of your circuits will work. If you want a better way, then we need more information. \$\endgroup\$
    – user319836
    Commented Mar 7, 2023 at 16:19
  • 1
    \$\begingroup\$ But you are not being very clear in what you want, as Andy points out. High voltage? 40V going to 5V. Is high voltage 40V? What is going to prevent wiper to go to high voltage? 40V will fry Arduino. You don't measure potentiometer, you measure voltage. \$\endgroup\$ Commented Mar 7, 2023 at 16:21
  • 2
    \$\begingroup\$ use a dual gang potentiometer \$\endgroup\$
    – jsotola
    Commented Mar 7, 2023 at 16:26

1 Answer 1

1
\$\begingroup\$

Assuming that what you want to do is measure the voltage at the wiper of a potentiometer that is connected to 40 VDC with an ADC that has an input range of 0 to 5 VDC what you need to do is reduce the voltage from the pot to what your ADC can handle.

You can do that in this case with a simple resistive voltage divider.

schematic

simulate this circuit – Schematic created using CircuitLab

For a 10:1 divider you want 1 part out of 10, so if the value of R3 is 10k you need a total of 100k between R2 and R3, or put another way, make R2 9 times the value of R3. This give you a range of 0 to 4 V to the ADC, if you want the full ADC range of 0 to 5 V you can adjust the divider values a bit so that 40 V in gives 5 V out, and then have your software deal with that.

A resistive divider does affect, and is affected by the rest of the circuit, the divider loads down the potentiometer, and the ADC loads down the divider. The higher the value of the pot, the higher the values in the divider need to be, and the lower the input impedance of the ADC the lower the divider values need to be. It's a trade off at best, and at worst you need to do some buffering with opamps. If there is the possibility of voltage spikes higher than 50 V on the voltage feeding the pot you also need to have some way to protect the ADC input from excess voltage.

\$\endgroup\$
1
  • \$\begingroup\$ This seems like a good solution. The potentiometer does not need to be polled frequently so briefly diverting voltage through a divider circuit like this just to get a reading seems like a good approach. Marking as solved. \$\endgroup\$ Commented Mar 7, 2023 at 16:40

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.