Important note: this is an active Propeller community project. The source code and documentation is hosted by member Stephen Moraco on his GitHub page. Recognize Mr. Moraco through his Buy Me a Coffee or Patreon accounts. Hardware, motors, and electronics come from Parallax. Documentation for our hardware is on each product page.
A Complete BLDC “System” of Motors, Electronics and Source Code is Now Ready
The reality of using Hoverboard motors in your robot is here — and a whole lot easier with our complete system of source code, hardware, and applications designed for the Propeller 2 Multicore Microcontroller. The Hoverboard motors are incredibly efficient, powerful, and quiet\. At first glance, you may wonder “where’s the motor?” as it’s actually built into the wheel hub with only a single moving part.
Today, we’re opening this to a wider audience of early adopters who are ready to build a larger robot. Our BLDC system is a target application for the Propeller 2 Multicore Microcontroller, making use of the P2’s Smart Pin PWM capability, a cog to run the motor, and another cog to manage the user interface. The blending of these parallel tasks into the P2’s architecture is a natural fit, with complexities of time-slicing, interrupts, and external circuitry not part of the challenge. The code base can easily be maintained for many years, making design-in the natural choice.
Our code and hardware provide a low-level closed-loop control system with easy high-level commands. Control the speed, direction, ramping and distance to each motor within 4 degrees of the desired position. Look a little deeper and you’ll see that in PASM2, we control the motor’s three high-voltage lines and use the three hall-effect lines to identify the motor’s phase. Comparing the setpoint to the phase, we modulate the power to obtain the desired speed or position in a PID loop.
We believe that this is the most open, accessible, and useful control system created for Hoverboard motors. Like everything we offer, it will only evolve and improve over time thanks to you, our customers.
Three Control Interfaces Available
The source code setup supports three types of interfaces where you may control direction, power distance, speed, and ramping using the same base-level objects:
- Propeller 2 as Main Controller where your entire robotic application requirements with sensors, logic, and runs on the Propeller 2.
- Serial Interface for RPI, Arduino, BASIC Stamp, etc if you want to use something more familiar than the Propeller 2 to control your overall application. Developer progress video shown below.
- FlySky Remote Control SBUS object from Jon McPhalen. Connect the FlySky receiver to the Propeller 2 and control the robot platform with an R/C interface. A progress video below shows the recent status of this demo (the code has since been improved to eliminate the issues you will see with a change of direction).
Documentation and Source Code Downloads
- The documentation and source code for the project is located on the P2 BLDC GitHub. You’ll find that this landing page answers most questions and directs you to the correct resources. Use the GitHub issues tool to make comments or request changes (alternatively, you could post in our forums on the BLDC thread).
- Downloading code archives from GitHub can be a challenge if you’re not familiar with the platform. Mr. Moraco has kindly provided the archives in a simple releases page you may access here.
Hardware Requirements from Parallax
Our BLDC system has several applications but we imagine many users will initially build a three-wheeled test platform of some kind. If your prior large robot experience involved DC gear motors and 12V batteries, there’s enough new stuff introduced with the higher power motors, LiPo batteries (and their chargers) and control electronics that a prototype would be a practical step for early adopters with the following hardware:
- Propeller 2 Developer Starter Bundle or Propeller 2 Mini Starter Bundle
- Universal Motor Driver P2 Add-on Board (#64010) (requires one for each motor)
- Heavy Duty Caster Wheel Kit (#64080)
- 6.5″ Hub Motors with Encoders and Mounting Blocks Bundle (two of each part) or the individual pieces if you prefer:
We’re providing the building blocks for this system (unlike the Arlo, which was an all-inclusive kit). Your physical layout of the electronics might look like this image below shown with RPi, and involve sourcing some components from a few places in our current early adopter phase. This includes a LiPo battery (and charger), connectors, a DC-DC converter for the microcontroller, etc. The additional electronics you might need are well detailed and the platform design files are also available. You can even order the platform shown from www.sendcutsend.com.
This project has been in development for two years and you’ll find progress work across our social media and YouTube channels. This will also be helpful:
- Forum thread for the BLDC Control System
- Propeller 2 Live Forum Early Adopter Series Video About BLDC Controller (older development work, from a year ago)
- News Post “Build a Heavy-Duty Robot Using 6.5″ Hub Motors and Propeller 2 Control System“