# Voltage divider and LED

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:

simulate this circuit – Schematic created using CircuitLab

modified circuit:

simulate this circuit

• Please draw schematics using the schematic editor of what and how you want to measure. Feb 26, 2019 at 15:28
• 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. Feb 26, 2019 at 15:38
• @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. Feb 26, 2019 at 15:40

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.

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.

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.