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

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    Check post #512 in this thread. You‘ll find a rough bill of materials for the main components. Missing are the Arduino, the magnetic encoder + ring, a wheel rim, pedals, an enclosure and cabling.
    The main components can be sourced for 150€. But you need the other stuff to build a working DD-Wheel.
  2. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    Sorry, I had no intention of hijacking your thread!
    Probably the best that I start a new thread.
  3. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,782Coins
    Ratings:
    +79 / 3 / -0
    There still no tested encoder solution expect the one Benu have. As soon as I have received and tested the silicon wheel on the encoder I will report back the result. You should be able to include both the ffb and driver in the Leonardo i think.
  4. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    Next I will try the AS5311 evaluation board. The board is around 15€. Already got the magnet ring from Bomatec. They were so kind to send me a free sample.
    How is your build developing?
  5. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,782Coins
    Ratings:
    +79 / 3 / -0
    Still waiting for the encoder to arrive from China.
  6. Erik Green

    Erik Green Member

    Joined:
    Mar 22, 2019
    Messages:
    60
    Balance:
    315Coins
    Ratings:
    +13 / 1 / -0
    My Motion Simulator:
    6DOF
    Say I wanted to run both hoverboard motors to get increased torque. I assume the phases are wired in each motor in a "Y" at an internal point. So the two motors phases would have to be run in parallel. Would this be practical? I would use an external encoder for good resolution so the internal hall is not needed correct? If the hall sensor is still needed I could just use on from either motor I assume.
  7. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    You're right, the phases are "Y" wired in my hoverboard motor. But my guess is, that running two motors in parallel from the same phases of the same inverter board would not be practical. You would need two inverter boards.
    First one inverter board had to carry the load of two motors. With both motors operating in stall mode that will likely overload the inverter board. Using two inverter boards will split the load.
    Second to drive such a BLDC motor with high torque and precision you need good feedback for the rotor position. And position means where the magnets are located in relation to the coils and the three dynamically changing motor phases.
    Attaching two motors to the same phases of one inverter board will leave you with the choice which motor position you will feedback to the inverter board. The other motor will be out of sync. You may try to align the two motors to match position but even beeing slightly off, you will loose precision and therefore torque and fidelity in the DD-Wheel. Again, using two inverter boards will remedy that.

    The NucleoF303RE (and other MCUs) programmed by Motor Control Workbench is capable of driving two motors. Although I haven't tried that and you would need a different inverter board than the one I am using. The odrive might be an option for you then.
  8. Erik Green

    Erik Green Member

    Joined:
    Mar 22, 2019
    Messages:
    60
    Balance:
    315Coins
    Ratings:
    +13 / 1 / -0
    My Motion Simulator:
    6DOF
    Thanks for the detailed response. Single motor for now, for sure. Is you setup wired with the motor hall sensors feeding back to the IHM08M1 and your hi res encoder talking to the Arduino?
  9. Erik Green

    Erik Green Member

    Joined:
    Mar 22, 2019
    Messages:
    60
    Balance:
    315Coins
    Ratings:
    +13 / 1 / -0
    My Motion Simulator:
    6DOF
    To get everything straight in my head,
    the required setup to run most DC servo motors as a DD wheel is:

    - NUCLEO-F303RE (CortexM4) as the control board
    - X-NUCLEO-IHM08M1 as the inverter (10-48V and 30A max.)
    - a second hand 12V server power supply
    - a Hoverboard motor 36v 250W
    - Arduino as interface to system

    Nucleo boards use off the shelf firmware from STM to drive motor stand alone.
    Feedback from hi res encoder or internal hall?
    Torque control mode and FOC?

    Leonardo uses AIWave firmware.
    Talks to PC\Simtools via USB.
    Output from the Arduino controls the Nucleo driver with speed\position feedback from a quadrature encoder.

    How are the AIWave signals and Nucleo input configured?

    sorry if most of these questions are answered in the above posts but having a complete synopsis of the overall setup in one place would be very helpful.

    Thanks for your help and dedication.

    Erik
  10. Erik Green

    Erik Green Member

    Joined:
    Mar 22, 2019
    Messages:
    60
    Balance:
    315Coins
    Ratings:
    +13 / 1 / -0
    My Motion Simulator:
    6DOF
    As soon as my hoverboard arrives i intend to look at machining away everything we don't really need on the hub motor. Once done I will post the results.
  11. Erik Green

    Erik Green Member

    Joined:
    Mar 22, 2019
    Messages:
    60
    Balance:
    315Coins
    Ratings:
    +13 / 1 / -0
    My Motion Simulator:
    6DOF
    Darn, cannot edit posts after one minute.

    Scrolling back thru thread.....

    Custom code in motor controller to receive force and direction signal from Leonard.
    Is your code / LUT for the drive controller available?
  12. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    You are welcome!

    The hall sensors are unused in my setup. Both, the inverter board and the Arduino, are connected to the same encoder.
    The inverter supplies 5v to the encoder. A+ and B+ are then connected to the inverter and arduino. Actually last week I switches the MMos Disco board.
    Index is not used in my setup.
  13. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    To compile the code you need to setup a development environment. No problem if you are familiar with IDEs.
    If you use the same combination NucleoF303RE + X-NucleoIHM08M1 I can send you the binary I am using, to make your life easier. The binary can be flashed directly to the F303RE board. No IDE required.
    That should work if the motors we use are not too different. But no warranty on that. Use at your own risk.
  14. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    Correct
    To configure the IHM08M1 for 3-shunt + FOC mode (that's the way I use it) you have to set two jumpers (JP1, JP2), desolder 3 SMD capacitors (C3, C5, C7) on the IHM08M1 and close two solder bridges (JP5, JP6).

    As you already found out you need a custom firmware. To do that you have to setup the appropriate toolchain. ST Motor Control Workbench, ST CubeMX, PMSM FOC Library, Atollic TrueStudio.

    Only from the quadradur encoder. The hall sensor is unused.
    Yes, both.
    Yes, you can also use the MMos SW with a STMF4Disco board.
    Just three wires from Arduino/Disco to the NucleoF303RE (GND->CN10_9, PWM->CN10_29, DIR->CN10_17)
    I was planning to make a complete building plan and put it in the first post of this thread. Maybe its a good time to do that.
    The setup is "a bit" more complicated as the one @danove_b is building right now. I hope he gets the mail-ordered stuff pretty soon and we can hear how that works out.
  15. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    Except for the black tire I don't see much there is to be machined away. In fact, I was even very happy about the black tire. I used that to bolt/screw my selfmade wheel rim to the motor. So far I had no clever idea on an alternative way. But the screws in the black tire fix the wheel rim rock solid to the motor.
  16. Erik Green

    Erik Green Member

    Joined:
    Mar 22, 2019
    Messages:
    60
    Balance:
    315Coins
    Ratings:
    +13 / 1 / -0
    My Motion Simulator:
    6DOF
    Can the Disco board handle higher encoder input rates?
  17. Benu

    Benu Member

    Joined:
    Mar 19, 2018
    Messages:
    128
    Location:
    Germany
    Balance:
    1,295Coins
    Ratings:
    +42 / 2 / -0
    The Disco board runs at 168MHz. That should be plenty to outperform the Arduino. No problems with the 1440 ppr of my setup.
  18. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,782Coins
    Ratings:
    +79 / 3 / -0
    My encoder has finally arrived, but I'm quite busy with other things right now. But I had some time last night to make some 3D models of my idea. I have a friend that owns a 3D printer, so I will let him print out the parts for me.

    https://drive.google.com/file/d/1QQZzddYlPAdKtIhIfDXO-eUTtXwAIVxr/view?usp=sharing

    https://drive.google.com/file/d/1x9vzXdp7nORpudrRC2wVSIKmK0n3sbU4/view?usp=sharing
    https://drive.google.com/file/d/1u5y_XHIYZfQ5dA0B_r1KJ0VEfnTxovAk/view?usp=sharing
    https://drive.google.com/file/d/18q0S3k79aIKJgj7m4YRvrQDiUlJ0VlnS/view?usp=sharing

    I'm kind on new to this 3D drawing stuff, but it should work I think.
    Last edited: Apr 13, 2019
  19. MarcoMade

    MarcoMade Active Member

    Joined:
    Jan 3, 2018
    Messages:
    150
    Occupation:
    Tecnico pc hardware/software MadeFix
    Location:
    italy
    Balance:
    157Coins
    Ratings:
    +63 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    I apologize, but was an electric bike wheel motor thought?
    they have gears inside it that are possibly removable.
    I had started the construction using a 500w brushless controller, but it deceived the acceleration ramp by reversing the direction.
    maybe with your controller you have more luck ..
  20. danove_b

    danove_b Active Member

    Joined:
    Nov 11, 2017
    Messages:
    209
    Location:
    Sweden
    Balance:
    1,782Coins
    Ratings:
    +79 / 3 / -0
    I actually think that you cannot find anymore suitable motor (for the price) than the hoverboard motor for this application. The "pancake" motor has by it's construction high torque, and the lack of reaching 1000:s of rpm/min doesn't matter at all.