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

How to configure 360deg Potentiometers?

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Croccy, Mar 5, 2025.

  1. Croccy

    Croccy Member Gold Contributor

    Joined:
    Nov 11, 2017
    Messages:
    31
    Occupation:
    System Admin
    Location:
    Ilfracombe
    Balance:
    447Coins
    Ratings:
    +41 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi all,

    My motion sim has been out of action for quite a while, but I've now moved house so am re-building it.

    During transport one of my pots got damaged so I bought a new pair. But what I completely forgot about was the fact my original hall effect pots were 10bit 180degrees but the new ones are 12bit 360degrees.

    I've set up SMC3 and it's working, but because the pots have a greater range, the voltage difference between my rigs movement limits is lower and doesn't come close to hitting the motor limits in SMC3 even when they are set at 255.

    Is there anything I can do to tell SMC3 to expect the voltages on the input pins to be lower so I can set the limits to disable the motors before they go too far?

    Thanks.
  2. Croccy

    Croccy Member Gold Contributor

    Joined:
    Nov 11, 2017
    Messages:
    31
    Occupation:
    System Admin
    Location:
    Ilfracombe
    Balance:
    447Coins
    Ratings:
    +41 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Am I right in thinking, if I supply 2.5v to the AREF pin, and set the arduino to use external AREF, then in theory my 360degree pot would then give the same output range as a 180degree pot?

    Has anyone tried this before with SMC3? I'll give it a go in the morning and see what happens.
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,395
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    150,025Coins
    Ratings:
    +10,993 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    The 360 degree pots will work, you just reduce resolution.

    You could gear the pot 2:1.
  4. Croccy

    Croccy Member Gold Contributor

    Joined:
    Nov 11, 2017
    Messages:
    31
    Occupation:
    System Admin
    Location:
    Ilfracombe
    Balance:
    447Coins
    Ratings:
    +41 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    It's directly connected so would need a re-design, which I don't really fancy doing at the moment

    But if I set the reference voltage to 2.5v I should be able to recover the resolution as I'll be using a range of 0-2.5v to convert to 0-1024. And with this being a 12bit pot it will have more "steps" than the previous ones I had.

    I haven't seen any mention of anyone else trying this? That's either because I've got it completely wrong or I've stumbled upon something useful lol. I've just done a completely different project using DACs so had to understand the reference voltage for that project and what part it plays.

    Just in case anyone reads this in the future:

    The ardunino has a default reference voltage of 5v. So on the analog input pins, 0v to 5v maps to a digital number of 0-1024.

    Therefore if you have a 180degree 10bit pot and your rig happened to use use the full 180degree of rotation, you would get 1024 steps of resolution.

    However, if you were to simply swap this out with a 360 12bit pot, assuming your rig still used 180degree of rotation the voltage from the pots would go from 1.25V to 3.75v (half of the pots voltage range). This would convert to 512 steps of resolution.

    Now since the 12bit pot is capable of a higher resolution (4096 steps across 360 degree, or 2048 across 180) which is still more than the 1024 the Arduino is capable of. We can actually "zoom" into the required range without losing any resolution

    So if we now provide 2.5v to the ARef pin on the Arduino, we will be modifying the range so that 0-2.5v will now map to 0-1024 digital.
    We will need to re-center the pot so that it's center point is now 1.25v instead of 2.5v, but at 1.25v it will now map to 512 digital so SMC3 should work fine. And because the 12bit pot is still capable of 2048 steps over 180 degrees, we will still end up with 1024 unique steps on the Arduino digital pins.

    It's worth noting that if you were to use a 10bit 360 degree pot, the benefits of doing this would be greatly reduced as just like a digital photo, if the resolution isn't there, then you can't zoom in without it getting blocky. And a 360degree 10bit pot would only have 512 steps over 180degrees no matter what. So the only benefit would be that SMC3 tools would allow the limits to work as intended.

    ‐-‐-----------------

    All the above is currently just theory and I will be testing it out in a few hours.

    To get a 2.5v(ish) reference voltage, it should be as simple as connecting a 10k resistor between the Arduiono 3.3v pin and the Aref pin. Then setting: analogReference(EXTERNAL) in the setup section of the .ino sketch.

    Maybe I am completely overthinking this and in the real world it won't make much difference, but it may allow for slightly smoother motion for anyone that finds themselves in a similar position.

    My rig actually only utilises around 90degrees of movement. So again in theory I could "zoom" in some more and recover additional resolution by supplying a reference voltage of around 1.5v
  5. Croccy

    Croccy Member Gold Contributor

    Joined:
    Nov 11, 2017
    Messages:
    31
    Occupation:
    System Admin
    Location:
    Ilfracombe
    Balance:
    447Coins
    Ratings:
    +41 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Ok, so I have now tested this and it works. As to whether or not there is any major benefit i'm not sure. But at least in SMC3 it now looks the same as it did with my 180degree potentiometers.

    To demonstrate this, I took a screenshot showing SMC3 with my pot turned 45degrees from center with the default 5v reference voltage, and then a second screenshot showing the same amount of pot movement but with the aref adjusted (22k resistor between 3.3v and aref).

    All I added to the .ino file was the analog reference line:

    Code:
    #ifdef MODE3
    {
      analogReference(EXTERNAL);
      pinMode(8, INPUT_PULLUP);
      pinMode(9, INPUT_PULLUP);
      pinMode(10, INPUT_PULLUP);
      pinMode(11, INPUT_PULLUP);
      pinMode(12, INPUT_PULLUP);
    Going to carry on with configuration now and see how it goes when it is back up and running properly.

    Attached Files:

    • Informative Informative x 1