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

Direct Drive Stepper Sim Wheel

Discussion in 'DIY peripherals' started by psndu, Apr 29, 2019.

  1. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino
    Hi All .Its been several Months since I discovered the world of DIY simulators and as of now I 've build a traditional sim wheel rig with a DC motor based on racingfr's firmware for arduino leonardo . It was working great actually it was the best wheel for me at the time but with time i realized the wheel is still missing those finer details from the games .So after a long research being a budget guy i had only two options

    1. DC motor sim wheel with more Power.(i only have one dc motor)
    2.Direct drive Wheel with Stepper Motor (got lots of nema24 s)

    Since my aim was the finer details and being more of a software guy (it was a nightmare building those gears for my first wheel) the obvious choice was the Stepper. Thanks to the great post 'Son of Open Sim wheel'
    by RufusDufus I had a great starting point. Before you read further i reccommend you to go through his thread because I won't be explaining the basics.So Let's start.


    COMPONENTS

    Stepper Motor

    Since I'm still experimenting i'm using a nema17 .The major requirement is the motor should have at least 1.8 degrees per step .

    Encoder

    at least a 2000 ppr(points per revolution) encoder . I'm using a scrapped optical encoder from a printer .

    20190428_181234.jpg


    Software
    the Racingfr's wheelConfig which is ported for arduino leonardo .Also the MMos firmware for stm32 can also be used ,they both has the same outputs for pwm /dir which i'll be using in my controller.

    Theory and application notes

    Theory in Simple terms is 'Closed loop current control of stepper motor' .
    A general Stepper motor is rotated by excitation of its two windings in sequence of steps .each step makes the motor rotor turn 1.8 degrees .being open loop after each step we don't know if the rotor has moved 1.8 deg so after each step a delay is maintained allowing the rotor to move its angle.the stepvise movement in stepper we see is due to the rest time which the rotor spent at rest waiting for the next step to occur.So by applying closed loop control we find the no. of encoder positions the rotor moves for each step .Then when one step is applied we can continue to monitor the encoder and apply the next step just before the rotor completes its motion so that rotor never gets a chance to rest and we will not see or feel the steps.The reason to go with current control is to archive better torque control .

    1. L6506 current controller and DM001 application note for microstepping ( thanks to Nerd+'s post on SOSW thread )

    2.A Simple Algorithm for Closed-Loop Control of Stepping Motors (Research paper).

    3. atmega328 pin change interrupts and input capture ( for pwm/dir and encoder capturing)



    PROGRESS SO FAR

    After working nonstop for like three weeks I think I got it to work with some minor issues ,may be due to my lazy encoder placement.But in overall It is ok I guess. I still have everything in prototype mode and will post the necessary files when they are ready.

    The prototype (the red driver is an a4988 driver(my first try) and it was't used in the project)

    on left end is the L6506 set in fast decay mode
    on right end is the dual H bridge for driving the stepper.
    Arduino leonardo is for the RacingFr's AiWave firmware and uno for the handling pwm and controlling the stepper

    20190428_181151.jpg
    • Like Like x 2
  2. ahoenksiluman

    ahoenksiluman Member

    Joined:
    Nov 13, 2017
    Messages:
    91
    Location:
    indonesia
    Balance:
    89Coins
    Ratings:
    +46 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    interesting project....

    why you dont try dual hbridge modul L298N..??
  3. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino
    I did use the l298 but since its transistor switched the internal losses are much higher .And it was always running hot .
  4. ahoenksiluman

    ahoenksiluman Member

    Joined:
    Nov 13, 2017
    Messages:
    91
    Location:
    indonesia
    Balance:
    89Coins
    Ratings:
    +46 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    what type is your photoelectric for your encoder..??

    are u using regular photoelectric for printer disk..??
  5. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino
    No complete unit is taken from a printer
  6. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino
    Centering Demo .

    • Useful Useful x 1
  7. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino
    Its Almost Ready Now.Need to move to a bigger motor for further testing.

    Test with Euro Truck Simulator (Sorry for the sound ,it was raining)
    • Like Like x 1
  8. llluis

    llluis Active Member Gold Contributor

    Joined:
    Mar 30, 2017
    Messages:
    164
    Location:
    Quebec
    Balance:
    1,630Coins
    Ratings:
    +103 / 1 / -0
    My Motion Simulator:
    6DOF
    Your H bridge is rated for how much current?

    My Nema34 is rated at 5A (13Nm).
    Nema42 can be 6A (22Nm) or 8A (30Nm).

    If the bridge can handle that it would be very interesting.
  9. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino

    It uses mosfets rated at 12Amps continuous .Since we are switching to control the current they will do more than 20Amps .But the issue is the motor ,I'm trying to find a nema34 at least let's see.
  10. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino
    new Setup with nema23 .still testing at 12v 1Amps
    • Like Like x 1
  11. ahoenksiluman

    ahoenksiluman Member

    Joined:
    Nov 13, 2017
    Messages:
    91
    Location:
    indonesia
    Balance:
    89Coins
    Ratings:
    +46 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino, Motion platform
    you should test it with wheelcheck (step log 1, 2 and 3) and share the log file, that would be interesting...
    • Agree Agree x 1
    • Funny Funny x 1
  12. psndu

    psndu Envizzion

    Joined:
    Apr 22, 2019
    Messages:
    9
    Location:
    Sri Lanka
    Balance:
    192Coins
    Ratings:
    +5 / 0 / -0
    My Motion Simulator:
    Arduino
    Thanx I'll do it. But i accidentally damaged the encoder disk .So I'll Have to pause the project for a while.
  13. Kosta100

    Kosta100 New Member

    Joined:
    Aug 24, 2019
    Messages:
    2
    Balance:
    23Coins
    Ratings:
    +0 / 0 / -0
    I am also trying to build a dd wheel using a nema 34 stepper motor. My plan is to use tb6600 or something similar and replase its pot, which is used for current limiting, for a digital one. I have aquestion for you, do I need to control both torque and rpm, or just torque?
  14. Kosta100

    Kosta100 New Member

    Joined:
    Aug 24, 2019
    Messages:
    2
    Balance:
    23Coins
    Ratings:
    +0 / 0 / -0
    Also why is your wheel shaking so much?
  15. Ben Xie

    Ben Xie New Member

    Joined:
    Nov 26, 2019
    Messages:
    7
    Balance:
    70Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino, 6DOF
    Can you feel the steps in the stepper motor? Is it smooth? I was thinking of doing the same thing.

    Thanks!
    • Informative Informative x 1
  16. HCR Mad Bull

    HCR Mad Bull Member

    Joined:
    Jan 15, 2020
    Messages:
    57
    Balance:
    439Coins
    Ratings:
    +12 / 1 / -0
    My Motion Simulator:
    DC motor, AC motor
    Hello, I'm very interested in this, do you have any updates for us with this project?
  17. tassault

    tassault New Member

    Joined:
    May 3, 2020
    Messages:
    5
    Balance:
    78Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, Arduino
    Hi, Can you share your wiring configuration and the code for Arduino please ?
  18. PMonteiro

    PMonteiro New Member

    Joined:
    Oct 10, 2020
    Messages:
    1
    Balance:
    40Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino
    I am trying to build using L298N, but something is running bad and i dont know what. I am using the "ffbwheel.0.16.leonardo.hex" on a leonardo. But I dont know the correct way to connect the driver, neither about my encoder config (using NY-20 + 1k resistor to A and B, connceted to Vcc). But something is running bad. Didnt see ffb working. Not yet.
    When i connect usb, motor starts low speed (tonone direction) and stop. Dont see it working no more.