1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Level shift and amplifiy Pot signal

Discussion in 'Electronic and hardware generally' started by tombo, Nov 30, 2013.

  1. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,436Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
    Hi,
    i'm using cermet pots in my sim. Thgey got a rotation range somwhere between 0 and 280°. In my sim i only will use about 180° which will result in 1,6-3,5V. I can't get a mechanical solution for full pot movement so i searched around the internet how to increase my voltage electricly. I found this post http://electronics.stackexchange.com/questions/30719/analog-voltage-level-conversion-level-shift
    and build the circuit with the 2 potentiometers. Buit for me it isn't really working. I also found this circuit for 12V hall effect sensors and Opamp lm324n. http://3.bp.blogspot.com/_Yqa3j9ZhET8/SqBP73s9otI/AAAAAAAAAZ4/DhH-QrpshxA/s1600-h/circuit.png
    So did you think this will be working if i power my pots with 12 instead of 5? Sorry i'm really new to that electronics maybe someone of you got an idea or maybe demo circuit.

    Thomas
  2. value1

    value1 Nerd SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Jan 9, 2011
    Messages:
    2,184
    Location:
    Zug, Switzerland
    Balance:
    14,495Coins
    Ratings:
    +3,319 / 11 / -1
    My Motion Simulator:
    2DOF, DC motor, JRK, Joyrider
    Last edited: Nov 30, 2013
  3. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,436Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
  4. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    @tombo Do you already have a higher voltage available that you use to drive your motors like 12v or 24v?
  5. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    Since the range you mentioned currently is 1900mv, if you supply your pot with 13.15v input instead of 5, you can get a 0-5v range using the same amount of pot movement. You will need to use the lower end of the pot because that is where the voltage will start at 0 and then go to 5v. The upper end of your pot will go from 5v to 13.15. Get it? Usually you use a separate pot to adjust the input voltage to your feedback pots, but in your case, if you are using 12v somewhere, you can use it directly. That would not quite give you the full voltage range of 0-5v but it will get you close.
    • Like Like x 1
  6. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    He is a link that explains it more. I originally came up with this fix for the kangaroo controller but your situation is the same.
    Getting Started
  7. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,436Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
    Hi,
    first thanks for your grat answer, but i think my english isn't to good to understand or i'm to tired :) i'll have a look at it again. If i understand right i have to set my pot voltaage from 0-1,9V and then increase with the pot hooked up to 12v theese 1,9V to 5? I don't really understand what you mean with lower and upper end.
    or maybe you can draw a fast wireing scetch so i maybe understand?

    ps: my interface is arduino
  8. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    I assume that you have 5v going to you pots now. If you have 12v available, disconnect the pots from 5v and connect them to 12v. So the pots will now range from 0 to 12v instead of 0 to 5v. You have to use the low voltage range end of the pot where the voltage is 5v or less now. One half turn of your pot will now output 6v because you are putting 12v in. Just be careful that you don't accidentally put more than 5v into your arduino because you could burn out the input.
  9. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    Note: If your 5v and 12v sources don't already share a common ground, you must connect the negative terminals of both sources together to create one.
    • Like Like x 1
  10. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Why not use gears on the back of the motor shaft. I use 1.8 turns of a 3 turn pot because of the gears I use.
    this gives you a good range. Also decent pots make a difference in resolution.
    I probably missed the point of this thread.
    • Like Like x 1
  11. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    With the Ard sometime I have found plugging in a power supply to it helps when too much current is being drawn off it, could be the issue.
  12. tombo

    tombo Active Member

    Joined:
    Oct 5, 2013
    Messages:
    269
    Location:
    Germany
    Balance:
    2,436Coins
    Ratings:
    +246 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino
    Hi,
    i don't have found the right gears yet, or better i don't know where to buy and which are the right ones.
  13. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Check your local RC Hobby Shop.
  14. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Robs right , have a a dig around your local RC hobby shop.
    Although, heres where I got mine from http://www.jaycar.com.au/productView.asp?ID=YG2632
  15. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    One solution @tombo is to modify the Ard code and set the Max and Min in the pot, please beware a lot of the Ard code sets limits as in it wont let the pot actually reach there max and mins, this is normally done for safety concerns for the Pot.
  16. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    Gearing is the best solution in the fact that it actually increases the resolution of the feedback if you gear up. Other methods may increase the resolution but often it just shifts it. For example, setting min and max pot positions in your motor controllers code can allow you to shift a lower pot voltage range output to full range in the controller. But the pots mechanical range and voltage output stays the same so there is no improvement in resolution at all. If you pump a higher voltage than 5v into your pot to give a 0-5v output at a reduced range you may see an improvement in resolution. But since the pots mechanical range has not changed, an improvement will only be realized if your pots resolution is enough to register it.

    But gearing has its own problems you have to deal with. When using gears you are increasing the possibility of getting more backlash (slop) in your system. This can hinder resolution and response because the more slop in the system, the higher the deadband area will be. Then you have to find the correct gears that will give the desired ratio and will satisfactorily attach to both your motor and your pot (of feedback unit). You must also find a way to attach you pot to your rig so the gears maintain tight spacing between them during operation. So while gearing is another option, it is not necessarily the best and/or easiest method to implement.
    Last edited: Dec 10, 2013
  17. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Gearing might have its quirks but with the Jrk , going from a single turn pot to a mutiturn pot increases the resolution and lowers any backlash the motors may have from what we have experimented with the Jrks. Set a deadzone of 0 with 5 turns and a single turn (cheap) pot required a deadzone of 3-6.
  18. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    Technically we are both correct. Gearing will increase the slop in the system unless there is no backlash at all. But the fact that the gears are increasing the speed the system reacts negates the additional slop in the system at some point. (note: No backlash at all in the gears would mean they would wear out at a fast rate thereby creating their own backlash after some time.)
    Last edited: Dec 10, 2013
  19. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,574Coins
    Ratings:
    +1,831 / 32 / -1
    I thought maybe I should give an example to help some in understanding. Lets say your "slop" with a one turn pot without gears is "x". You want to add gearing to increase your feedback resolution. Lets say the gearing doubles the amount of slop to "2x". So for the deadband to be equal in both cases, the geared feedback pot would have to turn two revolutions instead of just one in the same time period it takes a one turn pot. If you use less than two turns of it the deadband will increase over the single turn pot. If you use more than two turns of it you will reduce the deadband.
    • Like Like x 1
    Last edited: Dec 10, 2013
  20. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,398Coins
    Ratings:
    +1,683 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Thanks for the explanation @BlazinH, spot on.

    Another point, if your motor has big backlash don't use it, as motion will be poor or the motor might oscillate back and forth through the backlash zone, not good at all.

    Backlash should be kept to a min, the big worm gears I use have a very slight backlash in them, once extended with a 65mm lever its equates to about 2mm of lost motion in 100mm of travel. Which when checked it the Jrk Utility I need a deadzone of 2, which is reasonable. But with 5:1 gearing and a good quality pot, the deadzone can be reduced to 0 and the resulting motion feel is a lot nicer, as in smoother. This is the gain in using Gearing on the pots but yes if you have too much backlash in the motors it will result in worse motion on gearing, I have to agree with that.
    Sorry we got off topic a little @tombo. All important facts when selecting a motor for motion.

    I would use a single turn pot as the Ard is a little slow in reading Analog inputs about .1ms delay in reading, muti turns will not really help. I would look more into the actual Ard code you want to use, plus If you use Prilads or Rufus's code you can set it up around what you have, as in set the min and max for the pots to suit the controller. Finish and test it, doesnt take long to test and go, no I will try a muti turn, experiment mate worth the learning curve.

    Edit: Fixed , Thanks @BlazinH .
    Last edited: Dec 11, 2013