I got pretty tired of coding recently and had to switch my brain to something as distant from USB protocol as possible. Also, I’ve being planning a quadcopter build for which I need a motor controller less basic than PPM-driven R/C electronic speed controller AKA ESC. I needed something fast, reliable and scalable and at the same time not too hard to understand. After studying several existing open source designs I decided to make my own. This article is a status report of testing the initial prototype of sensorless brushless DC motor controller.
The prototype can be seen in the middle of the title picture (click on it to make it bigger). The green board contains a controller ( Allegro A4960 ) plus power stage – 6 N-type MOSFETS. In addition to performing typical control functions – setting speed and direction of 3-phase brushless sensorless DC motor, this controller also has a tachometer and fault indicator outputs as well as number of configuration registers available via SPI interface. The controller IC consists of 2 main functional blocks – a logical interface and power bridge driver. The former is compatible with 3.3V and 5V logic and the latter is specified in 5.5V-50V range (startup is possible from as low as 6V), making it suitable for projects ranging from 2S LiPo-powered models to electric scooter drives.
Here is a brief explanation of controller operation. First of all, both logic and motor voltages must be present. Then, a RUN bit must be set to “1″ in RUN register using SPI – this is a safety feature which prevents uncontrolled start-ups. After that, when PWM signal is present, controller initiates start-up sequence commutating motor windings in open loop. When sensorless commutation is achieved, current to the motor is supplied according to PWM duty cycle.
Open loop start-up can be tricky, especially if a motor is heavily loaded. Even though I have had no issues starting several different motors on the bench using default power-up settings, if necessary start-up hold, timing, and ramp settings can be changed. Overall, 3 config registers are allocated for start-up parameters. Other 3 config registers hold less useful blank time, dead time, as well as current limit and internal PWM values.
The RUN register contains some very interesting settings. First of all, it holds RUN, DIR and BRAKE bits used for start/stop, direction change and braking. It is also possible to route different diagnostic signals to DIAG output pin. The most useful part of this register is phase advance angle setting. Adjusting its value according to speed/load conditions can significantly increase motor power output.
In addition to all this A4960 IC provides extensive diagnostic. Loss of sync, two-level high case temperature flags, gate drive undervoltage, as well as MOSFET faults are recorded in Diagnostic register and can be used to stop the controller. Also, other situations which can be harmful for power bridge are tracked and if something bad happens controller switches to fail-safe mode.
All this plus a number of other features make this controller ideal for builders implementing advanced motor control. I had a lot of fun playing with settings while observing how they change the motor behaviour. The first prototype is performing very well, delivering good power while staying cool. At the moment, I don’t have any numbers – I learned very quickly that a propeller makes poor (and painful) bench load and is hard to make measurements. I’m now waiting for parts to make a proper load and re-routing the board to fix the errors and add features – aiming at 100A/phase.
No related posts.