# How can I change step-down my variable input voltage?

Ok so here's the deal:

I have a variable DC Voltage source from 0-10V.

I need to step that down to a variable source of 0-3V.

This 0-3V DC will be fed to an Analog to Digital converter in a microcontroller.

I know I can potentially use a Voltage Divider (using resistors) but apparently, that's not a good solution.

Op-amps don't provide a gain < 1.

So I'm just struggling as to how I can accomplish this.

The microcontroller: https://www.microchip.com/wwwproducts/en/PIC18F47K42

• How can you use a voltage of 0 to 3V as the supply voltage for a microcontroller? Your description of this doesn't make any sense. You should draw a schematic. – Elliot Alderson Mar 14 at 22:04
• @ElliotAlderson you're right I'm sorry. It's not to power the microcontroller. The application is to simulate dimming, based on the 0-10V from the DC Source the voltage must be stepped down from 0-3V. This is the voltage range readable by the uC which will determine the duty cycle of a PWM used to dim an LED. – Alee321 Mar 14 at 22:10
• A resistive divider is fine then. You might want to put an op-amp voltage follower in between the divider and ADC input to buffer things but it's not always necessary. Search this site. There are many existing answers addressing your question. – Toor Mar 14 at 22:12
• A voltage divider may be a perfectly good solution provided (a) the source impedance isn't too high and (b) you can tolerate the small energy consumption. Your question doesn't include details of either. – Transistor Mar 14 at 22:12

R divider works fine as long as R is not too high.

If you know the conversion rate and Hold Cap acquisition time EQUATION 36-1: ACQUISITION TIME EXAMPLE in the datasheet provides the formula and example of choosing R values < 10k.

Rs is the source equivalent // resistance of the R divider, R1//R2.

A resistor divider works fine as long as the source impedance is low and the ADC impedance is high (compared to the resistors used for the divider).

If your source impedance is high, use an opamp in voltage follower mode (gain = 1) before the divider. If your ADC impedance is low (unlikely) use a voltage follower after the divider.

• ADCs can have low input impedances, because those sample-and-hold circuits have a capacitor that needs to be charged! A tiny one, but it's still there. Too high a resistance can mean you need to sample for longer, slowing your reads, which may or may not be acceptable. – Hearth Mar 14 at 23:33

In addition to @Toor suggestion (voltage follower and voltage divider) and in response to OP statement

Op-amps don't provide a gain < 1.

follows my alternative configuration using a single supply difference amplifier. The output is reversed - if you do not mind correct it in software applying $$\V_o=3 - 0.3V_i\$$. • As opposed to my voltage follower suggestion, this one has better common-mode rejection at the expense of inverting the signal. – Toor Mar 14 at 23:55
• Are those resistor values correct? I think it's supposed to be more along the lines of 6.66K/3.33K, or 10K/5K or something like that. – Toor Mar 14 at 23:59
• I think that it's correct. Try to apply superposition to inputs 10 V and Vi. – Dirceu Rodrigues Jr Mar 15 at 0:18