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

    OZHEAT Active Member

    Joined:
    Oct 26, 2015
    Messages:
    208
    Location:
    Australia
    Balance:
    2,458Coins
    Ratings:
    +105 / 6 / -0
    My Motion Simulator:
    3DOF, DC motor
    Had time to work on the motor today and have mounted an 2400 line optical encoder on the motor today, might still make a cover for it to keep dust out later but will do for now.
    Due to the IHM08M1 board being not available, I have being looking at different driver boards and I think I will just use the original hoverboard controller.
    I was going to try reprogram the uc but have being having problems using the ST motor control workbench, it may be that the uc is not a ST product and actually a GD32f103.
    So I might just remove the gd32f103 and use a STM32f407 discovery board as the motor controller, hopefully motor control workbench will play ball better with the ST uc.

    @Benu How have you got the pwm signal from the ffb board to interact with the motor controller?
    I was thinking either to measure the actual pulse length or convert pwm to an analog voltage with pulse length being preferable.
    It would be even better if the ffb controller would pass the current value directly to the motor controller without any conversion, would be a lot faster.
  2. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +41 / 2 / -0
    Using the original driver board would be great!
    My first attempt to the Hoverboard DD-Wheel was to use the original hard- and software. I tried to mimik the balance sensors and sent the driver board direction and speed/torque commands. That worked up to a degree. In the end I was not able to get the results I needed. My guess is the driver software has internal checks to prevent accidents with the hoverboard and my signas were to erratic to pass these checks.
    So yes, a new driver software is most likely needed.

    Another option could be to build your own IHM08M1. You find gerber files for the whole driver board on the IHM08M1 product page.

    To process the PWM+DIR signal from the FFB board I use a timer on the F303RE. That way I measure the pulse length.
    When you installed motor control workbench you probably have CubeMX installed too. You will find a working example at
    C:\Users\<your_username>\STM32Cube\Repository\STM32Cube_FW_F3_V1.10.0\Projects\STM32F303RE-Nucleo\Examples\TIM\TIM_PWMInput\Src
    Depending on the firmware version installed the folder "STM32Cube_FW_F3_V1.10.0" may have a different name.
  3. danove_b

    danove_b Active Member

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

    https://github.com/fernandoigor/BRWheel/tree/alphatest

    This is a modified early version of the Aiwave code by user Fernando Igor. It should be possible to include code for the bldc motor.
    • Useful Useful x 1
  4. wannabeaflyer2

    wannabeaflyer2 Well-Known Member

    Joined:
    Jun 12, 2015
    Messages:
    724
    Location:
    london uk
    Balance:
    8,286Coins
    Ratings:
    +950 / 7 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform, 6DOF
    Hi @danove_b , can i ask where you got this https://photos.app.goo.gl/nw899RNqkwEj77cB7 PCB shiled from ?

    is this custom made of am i able top buy this off the shelf as it were, still trying to get hold of the STM IHM08M1 adapter for my STM32 , so would be great to have an alternative , and being a newbie i am trying to understand the system, where is the FOC / Torque control circuit located ? is it fed from the BLDC driver stage current sensing section ,

    Reason for asking mainly because i have both leonardo and STM 32 Interfaces working as Prototypes for Brushed DC motor option, and saw the PCB above so looking to see how i could locate the control signals from the IHNoo7 controller and feed them into say three IFX007T ( set up as Half bridges for each phase ) to bypass the Driver stage on the IHMoo7 and so give me a sort of hybrid Controller type contoller (because the driver stage of the IHMOO7 can only handle a few amps)

    i need to confirm that this Controller has FOC and if so how can o make use of it for torque current feedback and uprate the driver stage if possible ...Crazy idea but some guys at work can help with the connection to PCB once i find out whats needed . Cheers
  5. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,792Coins
    Ratings:
    +79 / 3 / -0
    The PCB is made by me for a completely different project. I'm just used it to test my idea. About current feedback, I'm pretty sure that's not necessary for this application. The motor is in stall mode all the time, and then the current is proportional to the voltage. If you also are satisfied with that you can just use 2 x ibt-2 that someone suggested earlier.
    • Informative Informative x 1
  6. johnmiller85

    johnmiller85 New Member

    Joined:
    Jun 24, 2019
    Messages:
    4
    Balance:
    92Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    DC motor, AC motor
    Great work. As a beginner, you have done an awesome project. Thank you.
  7. RSP

    RSP New Member

    Joined:
    Apr 26, 2019
    Messages:
    19
    Balance:
    131Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    DC motor
    Hi guys, sorry for my bad in these days I receive my 10 inch hoverboard wheel with a 350w motor and I try to use the IBT_2 for controll the motor like suggest @danove_b . I have a STM32 and use Mmos set to PWM(H-BRIDGE) as interface to the board and connect the pin like the project with MY1020 (Brush-motor). The problem is that the motor is in stall mode all the time and it's produce a small force when I rotate the encoder to 900 degrees the motor lock immediately like a true sterring wheel and then if I rotate the encoder in the other sense the motor return in his stall mode. First I use the hall sensor like a encoder but don't work the steering lock with my encoder works and I use two IBT_2 then I try with three IBT_2 one for phases and it's the same problem of stall mode all the time.I try different frequency in Mmos but the motor have the same problem. When I use RFRwheeltest and put the minimum force in Mmos to 3% the motor moves and then it return in stall mode. I attached a link of my work: https://drive.google.com/drive/folders/1mpiiB-54IC0ox19TH7jdAYaqu4d7rlcN?usp=sharing .
  8. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,792Coins
    Ratings:
    +79 / 3 / -0
    It is confirmed that the mmos cannot control a BLDC motor directly even if there are some schematics with pins defined for it. You need additional software to operate a BLDC motor.
    • Like Like x 1
  9. RSP

    RSP New Member

    Joined:
    Apr 26, 2019
    Messages:
    19
    Balance:
    131Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    DC motor
    If I use Arduino and IBT_2 with AIWAVE I obtain the same result?
  10. wannabeaflyer2

    wannabeaflyer2 Well-Known Member

    Joined:
    Jun 12, 2015
    Messages:
    724
    Location:
    london uk
    Balance:
    8,286Coins
    Ratings:
    +950 / 7 / -0
    My Motion Simulator:
    2DOF, Arduino, Motion platform, 6DOF
    Hi @RSP nice work , i have built 2 test setups fir Brushed motor DD FFB wheel and would like to try to get my Hoverboard motor setup working for test comparison . may i ask if you have even a basic connection diagram for you hover board motor test, i realize it not a fully working system yet , but as i cant get hold of the ST 11MH08 id like to experiment with the BTS7960 option . the description you posted above #146 sound like an option i could investigate ..
  11. RSP

    RSP New Member

    Joined:
    Apr 26, 2019
    Messages:
    19
    Balance:
    131Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    DC motor

    Hi sorry for the horrible draw there are two options to connect three IBT or two. I try without connect to the 5v but only connect the GND the IBT and the wheel works with Assetto Corsa but not works well with RFRwheeltest or Wheelcheck.
    With the 5v disconnected the motor don't go in stall mode and works in the simulator (for this setup I try only with two IBT but things is the same result with three). What do you things about this @danove_b ?

    Attached Files:

    • Informative Informative x 1
    • Useful Useful x 1
  12. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    RSP, Can U make pls the step test? But not that for the linearity.
  13. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,792Coins
    Ratings:
    +79 / 3 / -0
    Yea, you still need code for the BLDC. The hoverboard motor is a 3 phase. You try to control it with 2 phase.
  14. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    May be just a hardware? )
  15. BiT0

    BiT0 Member

    Joined:
    Mar 13, 2019
    Messages:
    37
    Balance:
    227Coins
    Ratings:
    +6 / 0 / -0
    Hello,
    still working on the project with the IFX007 shield but since I am using more hoverboard motors for another project the dual IBT2 option is interesting because it is cheaper.
    Please can someone with more knowledge than me give a schematic of the Arduino/IBT2s connection?
  16. RSP

    RSP New Member

    Joined:
    Apr 26, 2019
    Messages:
    19
    Balance:
    131Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    DC motor
  17. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +41 / 2 / -0
    @RSP @BiT0 @wannabeaflyer2
    As @danove_b explained you cannot directly feed the output of the AIWave Arduino or the STMDiscovery FFB board to the IBT2s or the IFX007 to drive a BLDC.

    The PWM output on the AIWave Arduino or the STMDiscovery boards is designed to control brushed DC motors. Brushed DC motors have two wires leading to the motor coils. With the clever arrangement of brushes and contacts inside the motor the amplified control signal from the FFB boards drives the motor. One H-Bridge (IBT2) is sufficient for the two motor phases. The direction signal of the FFB board tells the IBT2 which side to activate and by that what polarity the motor wires get.

    A brushless DC motor on the other hand has three wires leading to the motor coils. But there is no clever arrangement of brushes and contacts to guide the current into the correct direction within the coils. That has to be done externally. That is why danove_b is programming an Arduino to direct the right amount of current, in the correct polarity to the coil(s). I am using the currently not available combination F303RE/IHM08M1 for that purpose.

    An overview of a simple control method for a BLDC can be found here. They also show basic schematics for a driver board. But you still need a controller board to send the correct PWM signals to the three 1/2 H-Bridges of the driver. The shown control method is not a good one to build a DD-Wheel.

    A more sophisticated control method is space vector pulse width modulation or field oriented control. You find a link to a good description in post #3 of this thread. SVPW/FOC leads to higher torque and smoother movement off the motor. The F303RE/IHM08M1 combo is using that method and danove_b is adapting that method for his build.
    • Informative Informative x 1
  18. RSP

    RSP New Member

    Joined:
    Apr 26, 2019
    Messages:
    19
    Balance:
    131Coins
    Ratings:
    +6 / 0 / -0
    My Motion Simulator:
    DC motor
    Thank for yout explain this is only an experiment and I know that this type of motor require FOC or SVPWM to controll the three phases. Or trapeziodal wave but FOC is the best method to obtain the maximum performance of the motor.
    • Like Like x 1
  19. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    391
    Balance:
    2,216Coins
    Ratings:
    +115 / 2 / -0
    i.m. how the stm32 blds pins were tested to tell they are not suited for the blds? One can make a wrong connection, simply put, even for the dc motor, and tell the same thing, according to the ibt2 datasheet for example. Also will need not 2, but 4 pwms for the separate half bridges, or for the 4 separate mosfets, you know)
    Does the stm really doesn't provide the pwms according to the blds pins that are marked for that?) And just a hardware point, and not the stm code.

    P.S. Simply 3 half bridges. If I get it right, ibt's were used as a full bridge connection instead of that. That will not go ofcourse by that. What do u want then?) But may be wrong on that, but have a doubt that stm mmos do not make the pwms outputs for blds.

    [​IMG]
    [​IMG]
    Last edited: Jul 3, 2019
  20. BiT0

    BiT0 Member

    Joined:
    Mar 13, 2019
    Messages:
    37
    Balance:
    227Coins
    Ratings:
    +6 / 0 / -0
    Yes Benu I do know all of that but thank you to clarify .

    ATM I am using STM/MMOS to feed an Arduino with the IFX007 shield.
    The code running on the arduino uses the stored table approach of danove_b.

    BTW when it will satisfactory I am very willing to try to use the git code you posted to incorporate the bldc control code. Running with a single board.

    My question was about using not a single IBT but two, to handle the 3-phase like danove_b pointed few posts above. That would be a cheaper (about half price) solution compared to my IFX007 shield.
    Was asking about a trustable schematics for the wiring of the Arduino (withe the bldc control software not the AIWave) and the two IBTs