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. Chris_Beeves

    Chris_Beeves Active Member Gold Contributor

    Joined:
    May 31, 2019
    Messages:
    330
    Balance:
    1,897Coins
    Ratings:
    +230 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 4DOF
    Excellent info! I’ll try with a 2 ohm then.
  2. Roman Smoliakov

    Roman Smoliakov New Member

    Joined:
    Oct 31, 2020
    Messages:
    19
    Balance:
    155Coins
    Ratings:
    +30 / 0 / -0
    Would like to share my experience. I use AS5047 encoder and custom made controller based on stm32 and BTN8982. Here it is.

    Attached Files:

    • Like Like x 3
    • Friendly Friendly x 1
  3. Feisty

    Feisty New Member

    Joined:
    Mar 29, 2020
    Messages:
    21
    Balance:
    169Coins
    Ratings:
    +11 / 0 / -0
    My Motion Simulator:
    AC motor
    Wow very nice work! Can we have some more info/ photos? I'd like to know about how the encoder is set up and about your controller
  4. Roman Smoliakov

    Roman Smoliakov New Member

    Joined:
    Oct 31, 2020
    Messages:
    19
    Balance:
    155Coins
    Ratings:
    +30 / 0 / -0
    HI all. Here are more details.

    Starting from controller. It is custom controller based on BTN8982. I developed it from scratch. The goal was to create the cheepest BLDC controller with FOC pocibilities. So controller has three phase controll with inline current sensing and optional forth BTN8982 for braking resistor pocibilities. Here is open project at easyeda

    Firmware. I use software which I build from scratch. It does not have all I would like to implement in it? but already works as FFB device and controlls motor using space vector modulation with physical feedback from encoder. Now I work on true FOC control with both position and current feedback. Now wheel works in Automobilista2, rFactor, Project Cars 2, Racerom and AC. ACC stucks at loading track when wheel is connected. Investigating it.

    What about motor - there were minimum modifications done. Hole in wheel body, shaft was cut alittle bit to free cpace for 3d printed mount. It is secured to stand using standard 16mm linear shaft support.
    • Winner Winner x 1
  5. Gh0st

    Gh0st New Member

    Joined:
    Oct 25, 2020
    Messages:
    1
    Balance:
    40Coins
    Ratings:
    +0 / 0 / -0
    Hello everybody,
    I really love this project and I’d like to replicate it!
    I bought the B-G431B-ESC1 board and an encoder (6000ppr) but so far I haven’t had any luck in having the motor spinning (7pole rc one just for testing).
    I’m able to profile the motor and play with it in the motor profiler but as soon as I build a firmware using the motor workbench the motor does not starts.
    When I try to start the motor, the controller shows that the speed increase but the motor does not spin and than restart over and over.
    Did any of you had a similar experience?

    Thank you very much
  6. Chris_Beeves

    Chris_Beeves Active Member Gold Contributor

    Joined:
    May 31, 2019
    Messages:
    330
    Balance:
    1,897Coins
    Ratings:
    +230 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 4DOF
    Hey guys!
    I know it has been discussed before, but did anyone find a permanent solution for the problem when the ESC boots up but there is no force? Sometimes I have to reset my PSU 3-4 times before the motor "starts". Tried with a capacitor over the power input, but it doesn't make a difference.

    I haven't made my own FW. Just used Benu's and I never had issues with it if the motor passed profiling.
    Well, a few times when I had the phase wires mixed up. That doesn't make a difference in the profiler, but very much so in the actual FW. Maybe that could be your issue?
  7. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,792Coins
    Ratings:
    +79 / 3 / -0


    I do some movement directly after the alignment, and I have never had that problem since. I run this just before the while loop. It's very simple, just moves the wheel a little to the right, and then back to the left.

    void Startup(){

    uint32_t wait = HAL_GetTick();

    while(HAL_GetTick() < wait + 500);

    MC_AcknowledgeFaultMotor1();

    wait = HAL_GetTick();
    while(HAL_GetTick() < wait + 500);

    if (!MC_AlignEncoderMotor1()) {
    Error_Handler();
    }

    while (MC_GetSTMStateMotor1() != IDLE) {
    //HAL_Delay(100);
    }

    // Start motor in torque mode
    MC_ProgramTorqueRampMotor1(0, 0);


    if (!MC_StartMotor1()) {
    Error_Handler();
    }
    while (MC_GetSTMStateMotor1() != RUN) {
    //HAL_Delay(100);
    }

    MC_ProgramTorqueRampMotor1(300, 0);

    wait = HAL_GetTick();

    while(HAL_GetTick() < wait + 500);

    MC_ProgramTorqueRampMotor1(-300, 0);

    wait = HAL_GetTick();
    while(HAL_GetTick() < wait + 400);

    }
  8. Chris_Beeves

    Chris_Beeves Active Member Gold Contributor

    Joined:
    May 31, 2019
    Messages:
    330
    Balance:
    1,897Coins
    Ratings:
    +230 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 4DOF
    Looks clean!
    I got the code compiled and ready to go from Benu, so not much I can do sw-wise.
  9. Da3vr

    Da3vr New Member

    Joined:
    Nov 18, 2020
    Messages:
    5
    Balance:
    53Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    DC motor
    This is a fantastic resource! I am stunned by what you have all accomplished so far.

    I've just read through the thread and placed and order for a B-G431B-ESC1 and resistors/MOSFET for a shunt. I was planning to build a MY1020 FFB setup, but I like the brushless motor idea much better. I have an adjustable power supply that should give me 24V and outputs 400W (supposedly) from my G27 MMOS rebuild.

    I will obtain a used hoverboard from local listings and join you all shortly!
    • Like Like x 1
  10. NPinto

    NPinto New Member

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

    First time poster, long time reader. :)

    For the last few months I've been toying with the idea of a DIY FFB Wheel, as the very used DFGT is starting to act up. Started designing it with the MY10xx motors but I much rather prefer this hoverboard solution!

    I found @marccohn 's VESC solution to be the cleanest, but thank you all for the very interesting debates and different solutions that got me to understand the whole concept way better.

    I'm starting to set things up and was wondering, @marccohn , did you get to try using the encoder with the VESC?

    Thanks in advance,

    Nuno
  11. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    So, this was faster than anticipated. :)

    As it stands, I have a working FFB wheel. Took me a while to figure out a couple of things (pull-up resistors for the encoder; correct pulse lengths for the VESC PWM control), but it now works accurately.

    One of the first tryouts, using pedals and shifter from the old trusty DFGT:


    Paid a little hommage to @danove_b on the encoder wheel using some scraps I had lying around, but in the end I think I'll prefer the GT2 belt solution.

    [​IMG]

    Thanks again to all that have broke ground on this solution. Highly appreciated!

    And now, off to design and print a bucket load of parts.
    • Like Like x 1
  12. Chris_Beeves

    Chris_Beeves Active Member Gold Contributor

    Joined:
    May 31, 2019
    Messages:
    330
    Balance:
    1,897Coins
    Ratings:
    +230 / 2 / -0
    My Motion Simulator:
    DC motor, Arduino, Motion platform, 4DOF
    Wow, nice job!
    Did you have to desolder the filter components on the encoder inputs? What kind of VESC are you using?
    • Like Like x 1
  13. NPinto

    NPinto New Member

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

    Not yet, I'm keeping that task to the later stages. Since it's possibly destructive (I'm not big on SMD desoldering/soldering), I'll use the hall sensors until I have everything else more or less complete.

    As for the VESC, I'm using a Flipsky FSECS 4.12. Can't post links yet, but here's a photo:

    [​IMG]
    • Like Like x 1
  14. NPinto

    NPinto New Member

    Joined:
    May 3, 2020
    Messages:
    12
    Balance:
    71Coins
    Ratings:
    +5 / 1 / -0
    My Motion Simulator:
    DC motor, Arduino
    BTW, all of this using the hoverboard's 24v battery and MMoS on a STM32F4 Discovery.
  15. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    Can you share setting in vesc software
  16. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    i also use vesc v4. 12 but i have a problem what pwm input is used in the vesc software
  17. marccohn

    marccohn New Member

    Joined:
    May 5, 2020
    Messages:
    26
    Balance:
    301Coins
    Ratings:
    +9 / 0 / -0
    My Motion Simulator:
    Arduino
    I never got the encoder working with VESC. Instructs to remove filter caps scared me. I'm not convinced that the encoder will provide any advantage over the halls for motor control. Torque jitter might be a function of the motor design, not the accuracy of the control loop.

    Let me know if you try it and get better results.
  18. Adilrepas

    Adilrepas New Member

    Joined:
    Aug 16, 2018
    Messages:
    17
    Balance:
    177Coins
    Ratings:
    +10 / 0 / -0
    My Motion Simulator:
    DC motor
    Test ac servo
    Vesc+mmos
    Output mmos Pwm+dir
    Remove resistor filter in vesc
    • Like Like x 3
  19. NPinto

    NPinto New Member

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

    @marccohn , I ended up doing it a couple of nights ago... without checking if VESC could handle an encoder that lacks index output, like mine. Turns out it doesn't, so I am now waiting for a new encoder to arrive.

    Hopefully next weekend I'll get back to it.
  20. Da3vr

    Da3vr New Member

    Joined:
    Nov 18, 2020
    Messages:
    5
    Balance:
    53Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    DC motor
    I think I will need to try the VESC solution. I simply cannot get either of the two G431B ESC1 units I have to get through the motor profiler. I can feel that they are outputting current to the BLDC motor as I can clearly feel the pole pairs, but motor profiler fails. Bo4 units.

    Suggestions welcome since I will have to buy a different motor controller at this point, which I will use with an Omron encoder at 1000 ppr.