Output Devices - Brushless DC Motor

For output devices, I improved on my board from "Week07: Embedded Programming" to add a Brushless DC (BLDC) motor that could be controlled via the ATTtiny44.

image

All you need is an Electronic Speed Controller (ESC) and a BLDC motor. Below are images of a small (10A) and large one (100A). It would be neat to make an electronic propulsion system with this.

<image> <image>

Only a few changes needed to be made to the board layout and design. I just had to route a VCC, GND, and Motor Control Pin for the ESC. I used Pin 0 of the ATTiny44.

<image> <image>

The hardest part this time around was the software. The standard Arduino Servo.h library did not work for the ATTiny44 so I found another Arduino library called SoftwareServo.

image As you can see, you have to call SoftwareServo::refresh() every 50ms in order to get the motor to work.

Secondy, you had to initialize the SoftwareServo.Write() to a minimum value for the motor to start. I used 40 (range is 0-180). The max the servo went was 120, shown in the Loop.

image image

And don't forget to go to Tools and select the ATTiny44 to program. Setting up the Arduino to program the ATTiny44 are found here.

image

Here is the board powering the motor and doing cool stuff. The ESC actually powers my ATTiny44. It's insane how such a small chip can control such a large motor.

<image> image

Special thanks and credit to Will Langford and Jake Read from CBA for providing motor, electronic speed controller, and software debugging help this week.