Jump to content

  • Log In with Google      Sign In   
  • Create Account


Moving a variable in a equation question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 blewisjr   Members   -  Reputation: 611

Like
0Likes
Like

Posted 15 March 2013 - 09:54 AM

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?



Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9387

Like
1Likes
Like

Posted 15 March 2013 - 10:08 AM

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)

#3 blewisjr   Members   -  Reputation: 611

Like
0Likes
Like

Posted 15 March 2013 - 10:17 AM

Doh stupid mistake on my part thanks a bunch!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS