INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

MATH PROBLEM

MATH PROBLEM

(OP)
OK, I HAVE HAD A LOT OF THESE MATH PROBLEMS AND AFTER I PULL A FEW HAIRS OUT I HAVE MY ANSWER. WELL THIS TIME I HAVE A BRAIN FART,STILL NO ANSWER...IF SOMEONE HAS A FORMULA FOR THIS ONE,A MILLION THANKS...I HAVE A SENSOR THE OUT PUT ADC VALUE IS FROM 574(LOW END) TO 634(HIGH END),OK THAT IS FINE. I NEED TO DISPLAY 30(LOW END TO 50(HIGH END). THE TIME BEFORE THIS I WENT FROM 0(LOW END) TO 100(HIGH END),NO PROBLEM..IS ANY MULTIPLIER OR DIVISOR GOING TO SOLVE THIS PROBLEM...

RE: MATH PROBLEM

1. Subtract the offset (574) from the ADC output.
2. Scale for the difference in span (634-574) and (50-30).
3. Add the display offset (30).
4. Display the result.

Mike Halloran
Pembroke Pines, FL, USA

RE: MATH PROBLEM

(OP)
OK MY OUTPUT IS 574 TO 634 FROM A 10BIT ADC,ONLY USING A SMALL DIFFERENCE OF THE FULL SCALE FROM 0 TO 1024...I CAN GET MY ANSWER FROM 574 TO 634 TO BE FROM 0 TO 100...STILL NOT FROM 30 TO 50..

RE: MATH PROBLEM

If you can get a 0...100 number, then just
divide it by 5 and then
add 30.

Mike Halloran
Pembroke Pines, FL, USA

RE: MATH PROBLEM

(OP)
WELL MY FRIEND YOU DID IT.....AFTER THREE HOURS MY UNIT IS RUNNING FINE ( FOR NOW)..TO SUM IT UP, AFTER YOU FIXED THE MATH PART OF MY PROBLEM,IT STILL DID NOT WANT TO WORK..MY CALCULATOR CONFIRMS THE MATH IS PERFECT,MY MICRO CONTROLLER,NOT SO...SO AFTER LOOKING THROUGH MY CODE,I FOUND I WAS MULTIPLYING MY NUMBER BY 100 FIRST THEN TRYING TO DIVIDE... THAT GAVE STRANGE RESULTS,SO I USED A FLOATING POINT MATH ROUTINE,THE NUMBERS TO THE RIGHT OF THE DECIMAL POINT VERY IMPORTANT HERE.. WELL THAT WAS THREE HOURS OF INTENSIVE LEARNING...THANKS A MILLION FOR YOUR HELP,MUCH APPRECIATED...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close