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

DD-Wheel with Hoverboard Motor

Discussion in 'Direct Drive Wheels' started by Benu, Jan 21, 2019.

  1. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    So, I did it and I've now got it working with a 1000ppr ABI encoder.

    Tuned VESC a bit more to get rid of some serious "cogging" I had - turned out to be an encoder setup issue. It is better now, smoother; problem is, it's too damn smooth. At 100% force on MMoS (and no filtering) it is less powerful than my old DFGT on Assetto Corsa.

    Would you mind sharing your settings in terms of PWM/VESC PPM? What PWM frequency; PPM control by Current or Duty Cycle?

    I'm using PWM 0-50-100 at 2.8kHz and Duty Cycle control on VESC, because when I use Current it becomes noisy, motor hot and coggy as hell. Undriveable, basically.

    Thanks in advance.
  2. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    try to use the custom firmware that I use, it's stronger even in my mmos only 25% pwm using pwm & dir
  3. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    Interesting; do you mean a VESC firmware that allows control via PWM & Dir?
  4. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    • Like Like x 1
  5. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
  6. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    I use the frequency at 4.2kHz
  7. marccohn

    marccohn New Member

    Joined:
    May 5, 2020
    Messages:
    26
    Balance:
    301Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    Arduino
    Over the weekend I hooked my VESC back up and now remember why I shelved it. Audibly noisy in Current Control and undrivable. Same as you.

    Duty Cycle worked pretty well, noise quiets down, plenty of power, but too coggy. I did drive with it a bit and realized that the torque was not linear at all. (I guess that makes sense, based on the control method). I couldn't feel any forces build as i went through a corner, or drop off as i got close to cornering limits. Kind of fun to feel every bump and rumble strip, but not very realistic in terms of car control. Put it back on the shelf and went back the hoverboard control board.

    Sorry, don't have specifics of what I would call my best setup, but I do recall I boosted the Current Max values way up to 50A. I am using a battery, instead of a power supply, so no worry about tripping the Power supply.

    PWM set up was with the wizard. Maxed out settings on EMC app, turned to each "hard stop" which sent a Max and MIN PWM signal and saved. EMC is using RC style PWM output. As a mater of fact, first tested VESC using an RC transmitter and reciever to drive the wheel and set up the wizard.

    Definitely need to turn the ramping times to zero as any smoothing of the PWM signal is just hiding real control signals.

    Good Luck
  8. marccohn

    marccohn New Member

    Joined:
    May 5, 2020
    Messages:
    26
    Balance:
    301Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    Arduino
    How would you say this combination is working? What level of "Cogginess"? Does the motor get hot? Any issues?
  9. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    now I don't use the hoverboard motor anymore, I prefer to use ac servo, ac servo runs very smoothly and is very responsive I can feel everything on the circuit and it feels very realistic compared to a hoverboard motor. I don't feel any cogging.
  10. marccohn

    marccohn New Member

    Joined:
    May 5, 2020
    Messages:
    26
    Balance:
    301Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    Arduino
    What motor specifically do you use?
  11. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    I use this servo for testing, but it is very hot as it is only 2 Ampere, I will replace it with a bigger 700w

    Attached Files:

  12. Psszemek

    Psszemek New Member

    Joined:
    Apr 22, 2020
    Messages:
    5
    Balance:
    45Coins
    Ratings:
    +0 / 0 / -0
    Hi

    If any of you had problems with faulty ESC B04 board try to install new motor profiler. It will also update board firmware. Now I got my motor profiled without any problems.

    Now I have a question, I messaged Benu on August about the firmware but didn't get any response, also in his profile you can see he was last seen on august this year. Does anyone could share the firmware or help how to set up everything in motor workbench for use with STM32 board?
  13. Da3vr

    Da3vr New Member

    Joined:
    Nov 18, 2020
    Messages:
    5
    Balance:
    53Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    DC motor
    YES. This worked for me first try on the new version of Motor Profiler (5.4.5) after a firmware update. I'll have to play with the software now and get everything set-up, but it detects fine and runs to ~160 or so RPM at 12.75V with my optical encoder.

    I will also need to find a firmware solution to run from MMOS, but at least now I know it's viable to use the G431 control board from here on out for FOC! Thanks for the tip, the new firmware was the answer for me.
  14. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    Redid the wiring, because I was having some connections fail due to the small STM32 pins. Also hooked up a quick shifter to be able to actually drive it.

    [​IMG]


    After a couple of hours of settings tests, I got it back to a point where it works strongly using Duty Cycle control. I had some dumb errors:
    • Low current settings - using 12V for now, so had to bump the max setting up to 20A and Absolute Max to 40A
    • Low PID ERPM - the standard 15000/4000 works better
    • LUT file on Assetto Corsa for the Logitech wheel (!!)
    • FFB inverted (turning right, the controller would apply torque to the right instead of the left to counteract my efforts) - solved using the setting available on Assetto Corsa.
    Didn't actually drive it properly (was late for christmas dinner :)), so I can't realy speak about how realistic the feeling is. I'll be back home before the year's end, so I'll give it some proper testing and go from there.

    @Adilrepas , I did try the PWM+Dir firmware, but since I had other issues (see above) I had no success. Will try it again later on. For future reference, the origins of that code can be found here: https://www.racingfr.net/wbb/index....os-vesc-création-d-un-firmware-ffb-pour-vesc/
    • Like Like x 1
  15. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    @marccohn , as I still have the hoverboard controller, I think I might as well give it a try as well. From what I see, the PWM it expects is a sort of 0-50-100, right?
    • Optimistic Optimistic x 1
  16. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    yes I got the code from the site, and asked the person who customizes it to help me set the vesc software
    yes I got the code from the site, and asked the person who customizes it to help me set the vesc software, did you remove the filter resistor in vesc?
  17. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    @NPinto you must install an encoder with a 1:1 ratio
  18. marccohn

    marccohn New Member

    Joined:
    May 5, 2020
    Messages:
    26
    Balance:
    301Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    Arduino
    Yes, the PWM for the hacked hoverboard firmware is 0-50-100. It expects a signal matching an RC servo.
  19. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    Well, within a couple of corners it's clear to see what you mean in terms of lacking realistic feedback, @marccohn .

    I've gone back to Current control and figure it must be a problem with the observer position and FOC setup. While the Encoder position is spot on in the realtime charts, the Observer position is all over the place. From what I understand, this seems to wreak havoc on the FOC calculations.

    @Adilrepas, do you have any hints in terms of the FOC setup? My encoder setup seems to be correct, as the realtime graph is spot on from 0 to 359 when turning the wheel.

    Thanks.
  20. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    Now we're talking. :)



    After realising that the voltage was dropping to 9V in Current control mode I went ahead and bought a 48V 600W PSU. Now it sits stable at 32V once driving.

    @marccohn, I'm using Vincent Manoukian's firmware that @Adilrepas posted earlier, but I believe the ticket was changing the FOC calculation. With help from Vincent himself, I'm now using 3500us as the time period for Kp, Ki and Gain calculation, which gives me much lower (and way better) results.

    There're still some things to do, as the VESC still trips on the safety features from time to time, but this is some nice progress.
    • Like Like x 2