← Work / Projects

Side project · 2017

Micro DC motor controller

A half-gram motor controller for a 20 g indoor RC plane with no control surfaces, just two motors steering by differential thrust. Off-the-shelf controllers were too big, so I designed one around an ATtiny85.

Role
Design, layout and firmware
When
2017, with my dad
MCU
Atmel ATtiny85
Power
1-cell LiPo (2.5–4.2 V) · 2 A motor current
The 20 g two-motor indoor foam RC plane, with the controller board and its red LED mounted on the fuselage
The 20 g two-motor plane it flies
0.5 g
Finished board weight
20 g
The whole plane, flying indoors
2 motors
Steering and climb from differential thrust, with no servos
6 pins
Of I/O on the ATtiny85, every one put to use

The idea

I’ve grown up around radio-control planes, helicopters, boats and cars. When quadcopters got small enough to fly indoors, my dad wondered whether a plane could too, with no servos or control surfaces at all: just two motors, using differential thrust to turn and throttle to climb.

Off-the-shelf controllers were bigger than they needed to be, and the 0.28 g receiver we chose needed at least 3.7 V while the battery could sag to 3 V. There was no simple existing solution, so I designed one.

Requirements

  1. Map two receiver channels to the share of battery voltage applied to two independent motors.
  2. Handle 2 A to the motors at up to 4.2 V.
  3. Run from a one-cell LiPo (2.5–4.2 V) while supplying the receiver with 500 mA at 3.7–4.2 V (4.2 V is the limit for the small servos later planes might use).
  4. Monitor battery voltage and flash an LED below a calibrated threshold.
  5. Break out spare receiver channels, and be as small and light as possible.

Design

The ATtiny85’s timer 1 offers phase-correct PWM on two pins with independent compare values, ideal for driving two MOSFETs at different duty cycles. Timer 0 times the receiver’s 50 Hz, 1–2 ms pulses, captured on edge interrupts (one on the interrupt pin, one via pin-change).

With only six I/O pins, the ISP programming pins double as I/O, and the reset pin reads battery voltage through a divider that keeps it above the 2.5 V reset threshold. A boost converter regulates the receiver and chip to 4.2 V; that section can even be snapped off and reused on its own.

In the schematic, the boost converter (an LT3467) is at top left and the two MOSFET motor outputs are at top right. The ATtiny85 sits at bottom left, with the divider feeding its reset pin (R1 and R6) at bottom right.

Schematic of the controller: LT3467 boost converter, two MOSFET motor outputs, the ATtiny85 and the receiver channel breakouts
Controller schematic

Signal path

  1. Input
    RC receiver0.28 g · 50 Hz pulses, 1–2 ms wide
  2. Decode
    Pulse timingTimer + pin-change interrupts
  3. Output
    Phase-correct PWMTwo independent channels
  4. Drive
    MOSFETs → motorsDifferential thrust
Receiver pulses to motor PWMSimplified

Result

The finished board weighs 0.5 g, with the receiver plugged in on top. The first plane to use it (pictured at the top) weighs 20 g in total and flies easily around a large basement.

Bare purple circuit board held in tweezers beside loose surface-mount parts and a pencil tip
Bare board and parts beside a pencil tip
Finished controller with the blue receiver board plugged in on top, a red LED and red and black leads
The finished board, receiver on top

Related