• Advertisement
Sign in to follow this  

Moving a variable in a equation question

This topic is 1772 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok this is probably a really dumb question but I have been trying to do this for a while but every time I do I keep on failing to get a - 1.

 

So here is how I got to where I am at now...

 

Vout = Voltage Output

Vref = Applied voltage

R = variable resistor

ADC = value generated by a Analog to Digital converter.

 

Vout = R / ( R + 10k ) * Vref   // Here the Voltage Output is the voltage after going through a voltage divider

 

ADC = ( Vout / Vref ) * 1023

 

so..

 

ADC = { [ R / ( R + 10k ) * Vref  ] / Vref } * 1023

 

gives us

 

ADC = [ R / ( R + 10k ) ] * 1023

 

After doing the math I am getting

 

R = 10k / (1023 / ADC)

 

The issue is with the equations I find online they are giving

 

R = 10k / (1023 / ADC - 1)

 

I can't for the life of me find where this - 1 is comming from.

 

Any thoughts?

Share this post


Link to post
Share on other sites
Advertisement
ADC = [ R / ( R + 10k ) ] * 1023

divide both sides by 1023 gives

ADC / 1023 = R / (R + 10k)

multiply both sides by (R + 10k) gives

(ADC / 1023) * (R + 10k) = R

distribute (R + 10k) gives

(ADC / 1023) * R + (ADC * 10k / 1023) = R

subtract (ADC / 1023) * R from both sides gives

ADC * 10k / 1023 = R - R * (ADC / 1023)

factor out the R

ADC * 10k / 1023 = R * (1 - (ADC / 1023))

get a lowest common denominator on the right side

ADC * 10k / 1023 = R * (1023 - ADC) / 1023

multiply both sides by 1023

ADC * 10k = R * (1023 - ADC)

divide both sides by (1023 - ADC)

R = ADC * 10k / (1023 - ADC)

divide numerator and denominator by ADC

R = 10k / ((1023 / ADC) - (ADC/ADC))

R = 10k / ((1023 / ADC) - 1)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement