Linear to S Curve conversion


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    May 2007
    Location
    Area 71
    Posts
    52

    Default Linear to S Curve conversion

    Greetings !
    This is my first post, I found this forum is a great place to learn from the experts

    I want to convert linear response of a pot to S curve ( see graph below )

    <img src=http://i201.photobucket.com/albums/aa306/luminas_photo/Scurve.gif>

    I appreciate any suggestion


    Jon

  2. #2
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Try to add a negative sine to your linear curve that must work. Or make a lookup table.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Silly me, I was going for a 3rd order polynomial. Doh!

    But you're right mat! Add a negative sine.



    luminas,

    Now I assume there's more information to it.
    Obviously you don't want the integer results from 0-10. I'm sure you want some decimals or something.

    Can you elaborate a little?

    Best regards,
    DT

  4. #4
    Join Date
    May 2007
    Location
    Area 71
    Posts
    52


    Did you find this post helpful? Yes | No

    Thumbs up Calculation

    Hi Darrel & Mat,


    Thanks for your great information

    I want to compensate result of an ADC input ( 0 - 1024 )
    what is the formula to do this ?


    Jon

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by luminas View Post
    Hi Darrel & Mat,
    Thanks for your great information
    I want to compensate result of an ADC input ( 0 - 1024 )
    what is the formula to do this ?
    Jon
    Look at D_T's last post...the formula is RIGHT THERE.
    D_T has already done the hard work for you.

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    ...the formula is RIGHT THERE ...
    Yeah, well, except that the range is from 0-1023 now, and PBP's SIN function takes a "Binary Radian" input (0-255), giving a result of -127 to 127. Sure, it's all there.

    But now we need to line it all up.

    Got any idea's?
    <br>
    DT

Similar Threads

  1. A/D conversion with PIC18F67J50
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 8th May 2009, 01:48
  2. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 16:26
  3. Conversion problem
    By eva in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th March 2007, 18:21
  4. Help for decimal conversion
    By eva in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th March 2007, 18:20
  5. Strange A/D conversion...
    By Christos_K in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th June 2005, 01:35

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts