0
\$\begingroup\$

I want to measure voltage presence when an LED lights up (i.e. the IC_Output goes LOW, LED is common anode).

The -Ve of LED is connected using a 1k resistor to the output of an IC and +Ve to VCC.

  • Instead of adding a separate voltage divider, can I just add one resistor in series with the 1k resistor?
  • How will this affect the brightness of the LED?

original circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

modified circuit:

schematic

simulate this circuit

\$\endgroup\$
  • \$\begingroup\$ Please draw schematics using the schematic editor of what and how you want to measure. \$\endgroup\$ – Huisman Feb 26 at 15:28
  • \$\begingroup\$ Are you sure about Vcc? And are you using a multi-coloured LED? For a single coloured LED, common anode does not make any sense... Anyway, the LED will influence the voltage divider in a very non-linear way. Better seperate the voltage divider and the LED and its serial resistor. \$\endgroup\$ – Huisman Feb 26 at 15:38
  • \$\begingroup\$ @Huisman, The led is a custom made 7 segment display. Here I have mentioned only one of its segment. By using voltage divider, I only want to measure high and low states, not the actual voltage so slight variations are not a problem. \$\endgroup\$ – Electric_90 Feb 26 at 15:40
1
\$\begingroup\$

Based on what you have drawn

It seems that you want to measure the forward voltage, Vf of the LED segments. Since your LED segment cathodes are connected to ground you only need to measure the anode voltage with your ADC.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Measuring the forward voltage, Vf, of an LED.

Based on what you have written

I want to measure voltage presence when an led lights up (i.e. the ic_output goes LOW, led is common anode). The -ve of led is connected using a 1k resistor to the output of an IC and +ve to VCC.

schematic

simulate this circuit

Figure 2. Measurement for a common anode LED.

This assumes that the LED anode is at the same voltage as the ADC Vmax.

  • Turn the LED off by switching the GPIO high or disabling it.
  • Measure the ADC voltage. This should be close to 1023 counts (on a 10-bit ADC).
  • Turn the LED on by switching the GPIO low.
  • Measure the ADC voltage.
  • Subract reading 2 from reading 1. The result is the Vf. Convert that from counts to volts.
\$\endgroup\$
  • \$\begingroup\$ What difference does a resistor make when it is in parallel with a led? i.e how will the brightness of led get affected by R2 in the 2nd circuit mentioned in the question ? \$\endgroup\$ – Electric_90 Feb 26 at 16:55
  • 1
    \$\begingroup\$ It will shunt current away from the LED resulting in dimmer LED and wasted power. You would only do it if you had a good reason such as you couldn't vary R1 in your circuit, for example. \$\endgroup\$ – Transistor Feb 26 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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