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

Setting Potentiometer

Discussion in 'New users start here - FAQ' started by kimballfount, Jan 9, 2016.

  1. kimballfount

    kimballfount Member

    Joined:
    Oct 12, 2015
    Messages:
    88
    Location:
    greer,sc
    Balance:
    879Coins
    Ratings:
    +15 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino
    I'm using the SMC3 Arduino sketch to drive one of those cheap 43a chinese hbridges. I manually set the potentiometer to what seems to be the middle position and I then attach it to the back of the drive shaft of the motors gearbox. I would think that the arduino sketch would automatically assume whatever position the drive shaft (pot position) is upon starting would be the middle starting position, but it rotates like 90 degrees upon loading..What's going here? can someone get me going in the right direction? Is there something I can do in simtools to fix this?
  2. speedy

    speedy Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    1,193
    Location:
    Alexandria , Egypt
    Balance:
    7,942Coins
    Ratings:
    +1,287 / 10 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform
    you have a feedback reversed direction situation ... It seems like you accidentally switched the wires of the 5V and the ground of the pot ... if not ... try to reverse the motor's wires ...

    Why ? ...
    The pot axle should rotate with the expected motor direction to correct the error to zero if there is a tiny value ... if not well synced ... the error accumulates and increases and the motor reach the cutoff limitation stop point before real damage happens .
    • Agree Agree x 2
    • Like Like x 1
    • Informative Informative x 1
    Last edited: Jan 10, 2016
  3. kimballfount

    kimballfount Member

    Joined:
    Oct 12, 2015
    Messages:
    88
    Location:
    greer,sc
    Balance:
    879Coins
    Ratings:
    +15 / 3 / -0
    My Motion Simulator:
    2DOF, Arduino

    I have the middle pot wire going to A0 on the arduino, and the 5v wired to the breadboard going into the arduino, the motor wires seem to be wired correctly as well, but it just occurred to me that maybe the gearbox I added to the motor is changing the direction of rotation. It is safe for the device to reverse the wires going to the motor to the hbridge?
  4. speedy

    speedy Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    1,193
    Location:
    Alexandria , Egypt
    Balance:
    7,942Coins
    Ratings:
    +1,287 / 10 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform
    No , just switch the 5v and ground wires of the pot ... leave the middle wire connected to A0
    Last edited: Jan 10, 2016
  5. speedy

    speedy Well-Known Member

    Joined:
    Feb 1, 2012
    Messages:
    1,193
    Location:
    Alexandria , Egypt
    Balance:
    7,942Coins
    Ratings:
    +1,287 / 10 / -0
    My Motion Simulator:
    3DOF, AC motor, Arduino, Motion platform