hotshot_amer
- Nov 14, 2011
- 1
- Joined
- Nov 14, 2011
- Messages
- 1
What I'm trying to pursue here is a Digital Voltmeter implemented in C using a freescale HCS12 micro-controller. I'm going to be using the embedded analog2digital(ATD) converter as an input from a power supply.
Problem:
My constraint here is that the voltage going into the ATD must be between 0V & 5V. So, basically I have a range of voltages from the power supply (ranging from -10V to +10V) that needs to be measured but stepped down on a linear scale before it goes into the micro-controller. The Vout vs. Vin (y-axis/x-axis respectively) equation is:
y = (1/4)x + 2.5
So far, I followed the procedure to design an opamp based on the line equation from my book (Op-amps for everyone), got the resistances for R1 and R2 with the following equation:
R2 = [ m/(b/Vref) ] * R1
Chose standard values: R1 -> 9.8 Kohm R2-> 4.9 Kohm
When I proceeded to calculate values for Rf, I ended up with the following equation in terms of Rf and Rg.
Rf = -0.248986 * Rg
Asked my professor about this and he told me use a two stage op-amp configuration. Can somebody help me design this?
Problem:
My constraint here is that the voltage going into the ATD must be between 0V & 5V. So, basically I have a range of voltages from the power supply (ranging from -10V to +10V) that needs to be measured but stepped down on a linear scale before it goes into the micro-controller. The Vout vs. Vin (y-axis/x-axis respectively) equation is:
y = (1/4)x + 2.5
So far, I followed the procedure to design an opamp based on the line equation from my book (Op-amps for everyone), got the resistances for R1 and R2 with the following equation:
R2 = [ m/(b/Vref) ] * R1
Chose standard values: R1 -> 9.8 Kohm R2-> 4.9 Kohm
When I proceeded to calculate values for Rf, I ended up with the following equation in terms of Rf and Rg.
Rf = -0.248986 * Rg
Asked my professor about this and he told me use a two stage op-amp configuration. Can somebody help me design this?