1. 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!
  2. 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
  3. 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

Potentiometer conflict with Arduino

Discussion in 'DIY Motion Simulator Building Q&A / FAQ' started by Max hud, Jun 21, 2020.

  1. Max hud

    Max hud New Member Gold Contributor

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    106Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Hi everyone, I was finished building my seat mover and went into testing. At first it worked well in LFS then after a while, the motors were not responding anymore.
    After a few diagnostic I noticed the 10k potentiometer we're not working properly only when wired to the arduino. When connected they range from 0 ohm to 2.8k then slowly goes to 1.8k when turning the knob in the same direction at all time. When isolated from the arduino they range from their expected 0 to ~9.9k ohm.
    Has anyone ever encountered this problem?
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    14,982
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    110,520Coins
    Ratings:
    +8,957 / 43 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  4. Max hud

    Max hud New Member Gold Contributor

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    106Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I guess it's another faulty fake motomonster. I have 4k ohm between the 5v and gnd port, I believe that's not an normal reading. Anyone can confirm? 71xHcZQe54L._AC_SL1000_.jpg
  5. Dschadu

    Dschadu Member

    Joined:
    Jan 2, 2017
    Messages:
    30
    Location:
    Germany
    Balance:
    295Coins
    Ratings:
    +49 / 1 / -0
    You cannot measure resistance while the resistor is connected. You have to disconnect it. Otherwise you measure everything that is connected to it. The current search's its way through your board and you get a wrong reading.
    The described behaviour therefore is normal.
    • Agree Agree x 1
  6. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    14,982
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    110,520Coins
    Ratings:
    +8,957 / 43 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Informative Informative x 1
  7. Max hud

    Max hud New Member Gold Contributor

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    106Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thank you for your help, rookie mistake! I'm gonna check the wiring tonight, must be a bad solder somewhere then.

    I had previously check the MM when I received it. It was working as expected, I'm gonna have to figure this out on my own.

    Thanks again for the quick replies.
  8. Max hud

    Max hud New Member Gold Contributor

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    106Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    After many tests, I can confirm the problem was the non-authentic arduino. Turns out, as soon as I plugged the 5v from the arduino board to the pot, I got the varying reading on the pots. After all this, I don't even read any resistance from the pots when the 5v is connected but pots work fine on their own.

    This will teach me from buying the cheapest hardware possible. If it can help anyone starting out a new project: the cheapest solution in this case is to buy the right stuff outright and avoid buying twice.
    • Informative Informative x 1
  9. Max hud

    Max hud New Member Gold Contributor

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    106Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I got a new arduino; that was not the issue.
    I believe the potentiometer reading are fine because when I turn a centered pot clockwise, the motor moves but when I turn the pot CCW from its centered position, the motors won't go in the other way. Basically, both motors will only turn on one side.
    Also when turning pot CCW, I don't see the red direction LED light up on the motomonster. Any ideas ?

    Edit: Ok now both motors lock up in one direction and pots won't change anything. I know the arduino code used to work, I'm pretty sure the 2nd arduino is good (as was the first one), wiring should be ok as I use to make this setup work with 2 wiper motors (recently bought 2 motor from Pgsaw ).
    Is it another damn faulty MotoMonster ? I can see it outputs 12v in one direction but testing the other rotation is now impossible.

    Edit#2: I just notice the 5v on the MM outputs 2v, that would change the V reading of the arduino after the pot (I guess the arduino reads V value instead of ohm?) and cause my problem. I'm no electrical engineer, is that good reasoning?

    Edit#3: Alright so everything unplugged, the Dir led still won't turn off. I'm off to buy another motor controller. I've had no luck with 2 MM so I'm going JRK.
    On the pololu site, it says they have a more recent motor controller than Jrk12,would you recommend trying these out and would these be a good choice (available in canada and close by)?
    20200627_182220.jpg
    Last edited: Jun 28, 2020
  10. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    14,982
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    110,520Coins
    Ratings:
    +8,957 / 43 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Informative Informative x 1
  11. Max hud

    Max hud New Member Gold Contributor

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    106Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Last edited: Jun 28, 2020