I want to build very easy circuit to change -10;10V sine wave to 0;3.3 for ADC in my MCU. I know that I must reduce the amplitude and change offset.
This circuit would be perfect (Output: 0-3,33V), but I have only 3,3V source (from MCU) and I made another circuit (in which I have output: 0,04-2,83V):
What should I change in second circuit to have output (0-3,3V) like in first circuit? Maybe voltage stabilizer diode or op-amp? Thanks
For those who would searching the same info to their project:
I chose first circuit from this post.
I changed R11 to 110K and R12 to 22K,
In place of 2V source I put 2V voltage stabilizer (Sanyo LA5002) (between the 3.3V MCU output and R11). And it work great :)
Answer
Maybe this: For flexibility, you can exchange R2+R3 with a potentiometer as well.
simulate this circuit – Schematic created using CircuitLab
But I think, the best way is to use an operational amplifier to get enough drive for the MCU ADC and to be able to DC couple the signal. Try the following, its signal division is 0.15 (20 V to 3V Vss) -- but you can change values with R1==R3 and R2==R4 to any other ratio with R2/R1 and R4/R3. I only choose nearest values from E12 family of resistors.
$$ U_{out} = U_{in}\cdot\frac{(R_1+R_2)\cdot R_4}{(R_3+R_4)\cdot R_1} + U_{ref} - U_{minus}\cdot\frac{R_2}{R_1} $$ Here, we have \$ U_{minus} = 0\text{V}.\$ So the last term can be omitted, we get: $$ U_{out} = U_{in}\cdot\frac{(R_1+R_2)\cdot R_4}{(R_3+R_4)\cdot R_1} + U_{ref} $$ $$ U_{out} = U_{in}\cdot\frac{(R_1+R_2)\cdot R_4}{(R_3+R_4)\cdot R_1} + V2\cdot\frac{R_6}{R_5+R_6} $$ When selecting \$ R_1 = R_3 \$ and \$ R_2 = R_4 \$ also \$ R_5 = R_6\$ it simplifies to: $$ U_{out} = U_{in}\cdot\frac{R_2}{R_1} + \frac{1}{2}\cdot V2 $$
No comments:
Post a Comment