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

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

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    119Coins
    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. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,548
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,106Coins
    Ratings:
    +10,777 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  3. Max hud

    Max hud New Member

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    119Coins
    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
  4. Dschadu

    Dschadu Active Member

    Joined:
    Jan 2, 2017
    Messages:
    109
    Location:
    Germany
    Balance:
    1,933Coins
    Ratings:
    +143 / 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
  5. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,548
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,106Coins
    Ratings:
    +10,777 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Informative Informative x 1
  6. Max hud

    Max hud New Member

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    119Coins
    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.
  7. Max hud

    Max hud New Member

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    119Coins
    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
  8. Max hud

    Max hud New Member

    Joined:
    Mar 8, 2020
    Messages:
    18
    Balance:
    119Coins
    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
  9. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,548
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    145,106Coins
    Ratings:
    +10,777 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    • Informative Informative x 1
  10. Max hud

    Max hud New Member

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