Commuter ControllerRequirementsThree phase brushless DC motor control
Hall sensor (3) and Sensorless (pedal first) control modes (requires comparators on phase voltages)
Sine control mode? (requires 2 phase currents) (provide for on CPU board but don't implement on FET board)
Pulse by Pulse Current Limit (Battery shunt trip in hardware)
Protection from overcurrent, overtemperature and (if practical) shorted motor to hall wires
Open Hardware and Software
Components through-hole if possible, SMT if necessary
Size - approx 4x3x2 inches (finalize during PCB layout)
Modular two board design, plug between boards
FET board has all High Voltage and HV I/O, can be various versions for different performance levels
Control board contains micro and low voltage I/O - can be used with any FET boards, standardized module
First FET board design for moderate performance, six TO247 FETs (allow spacing for TO264 as well?)
Battery up to 16S LiFePO4 3.7V or 14S LiPo 4.2V
Battery Voltage: 24-60V (18-65V max)
Current limits have long term, short term, and time to long term limits (10s?)
FET Temperature thresholds ramp current limits down (full to 100C, derate to zero at 150C?)
Battery Current (pulse by pulse limited): adjustable, max ~50A? (shunt spec)
Phase Current (pulse by pulse limited): adjustable, max ~100A?
Capacitor bus ripple voltage <0.5V??
PWM Freq: adjustable 15-30khz, nominal 20khz
Interfaces - Throttle, eBrake, regenControl, serial I/O, extra I/Os for speed switches, status LEDs, etc??
Multidrop optically isolated serial I/O bus can be used for multiple purposes including programming and
- handlebar displays and controls as well as BMS communications plus
- connect multiple slave controllers for multi motor installations
Ebrake goes direct to FET drive disable to insure safety (and micro motion abort input)
Precharge Cap bank capability designed in (charging R on FET board, second HV input)
FET heatsink temperature monitoring
CA type display for serial - see master
controller below
Reprogrammable without opening box (via serial cable)
Tools open or free
DesignUse at least 75V rated parts (FET, Cap, 12V Regulator). Leave 20% or better margins to working values (60V).
FETs: 6 x IRFP4368 TO247 (75V, 1.5 mOhm@195A, 20nF 500nC gate)
HV Capacitors: 75+V (0.1,1,10,100)?uF low ESR per FET pair, use set of caps for frequency response (analyze)
12V Capacitors: (0.1,1.0,10)? per driver 20V low ESR, plus one 100uF tantalum? (analyze)
FET Drivers: NCP5181PG or NCP5181-D or LT4444 or ? (2A) through hole unless no room then smt?
Battery Current Shunt: 50A/50mV? 4 terminal, good temp coeff
Battery Current Limit: hardware shunt to comparator vs DAC setpoint, programmable limit
Phase Current: Measure 2 phases NOT, calculated, limit settable in software, limit to 100A max? (eventually base on measured performance)
Microprocessor: ATMega32M1 in TQFP32 with BLDC motor support hardware on-chip, 32K code, etc
Pre-Regulator: Not required until V > 72V for this 12V regulator
12V Regulator: switching 17..72V (75V max) to 12V at 500mA? (Innoline R-78HB12-0.5)
Final Regulator: 5V linear low quiescent current
Serial Interface: optically isolated, pinout compatible w USB adapter (FTDI TTL-232R) or Master
Controller (see below)
Two small stacked mating pc boards: FET board, Control board, joined by connector near center on non-component sides
FET Board: FETs/drivers/capacitors/shunt/12V reg/temp sensor, Phases out, Power SW connector
Control Board: Micro, 5V Reg, Low Voltage I/O, programming, hall inputs, serial, throttle, ebrake, regen, speed, brakelight output, etc
Board Interconnect: 24 pin, 12x2 row, 4 gnd, 2*+12, 2 shunt differentials, 6 gate drives, 3 phase samples, heatsink temperature, +V sample, ebrake, 6 spare?? (provide for 2*2 phase current diff inputs)
Precharge: two HV inputs, one for regulator feeds caps through built in charge resistor, another direct
FET board: preferably 4 layer, 3oz copper (design so middle layers V+ and GND can be left out on prototype?)
Control board: 2 layer, 1oz copper
Boardsize: Nominal is 2.5 x 3.8, will be adjusted to fit design and box
Box: aluminum extruded, use for heatsink, design boards to fit, FETs bolt to it for heatsink ?? (select box) OR use heatsinks and panels to make box
Schematic Capture and PCB Layout tools: KICAD ?
PCB Manuf - BatchPCB for prototypes and small runs, Phoenix Gold for larger runs?
Software NotesLow side Commutation and High side PWM for standard BLDC control to begin, then
Use Synchronous rectification (complementary PWM on high side driver saves power in FET)
Hall effect health monitoring and automatic disable of sensor mode (becomes pedal first)
Hall sensor auto-failure interpolation (go to mode 2)
Mode 0: Sensored/Sensorless auto transitions at 5MPH mode (standard)
Mode 1: Hall sensor mode (the usual)
Mode 2: Sensorless mode (pedal first)
Sine commutation mode uses PWM to all three phases (use time interpolation of halls, only one need be working, start with sensored mode and transition to sine) SKIP
Adjustable motor timing (test, mostly for high RPM motors)
Fuel gauge (coulomb counting)
Proportional regenerative braking (separate input or button/throttle)
Adjustable top speed limit
Adjustable power, current, acceleration limits
Several parameter sets (modes)
Cruise control, gain, etc
Voltage detection autosets LVC from table lookup?
Per cell LVC with appropriate BMS communication or ebrake BMS input
Throttle modes including battery current, phase current/torque, blended
Throttle range calibration mode
Throttle fail detect and lockout, prevent start on high throttle
Hall and phase order diagnostic mode
Various diagnostics
Monitor program to facilitate serial programming (only monitor need be programmed via ISP)
Gcc-AVR toolchain
Python for server side software as needed
Companion Master Controller and ReadoutTo maintain a System Design this portion of the system is selected and documented here.
This Master
Controller not Required to use the Motor
Controller, but this facilitates communicating with the
controller and reducing wiring on the bike. It provides readouts such as speed, current, battery gauge and logs information for later analysis.
RequirementsHandle control and display functions for the ebike System, motor
controller and BMS
Off the shelf AVR based module to use same development tool chain, open tools, etc
Display, visible day and night
User Interface (buttons, encoder, etc)
Beeper
Red LED?
Multidrop serial I/O to communicate with
Controller(s) and BMS
Inputs suitable for Throttle, ebrake, regen, speed, etc optionally to reduce wiring through bike
Ebrake goes direct to
controller also for safety
Runs on 12V from
controller?
DesignCommercial Product: ATMega128 Development Terminal (Olimex, Sparkfun $59)
Housing: (tbd - select)
Handlebar Mount: (tbd ?)
Features of this "Olimex ATMega128 Development Terminal" available from Sparkfun et al:
ATMega128 CPU with 128K program flash
Serial w TTL levels
RS232 DB9 interface jack w RS232 levels
16 char 2 line LCD display with LED backlight
Five pushbuttons
Buzzer
5V regulator 78L05, 12VDC input
16mhz xtal osc
Relay w 10A contacts for ? 12V accessories?? power to
controller logic???
Various input and output pins, ADCs etc
more features not mentioned here...
References
http://www.atmel.com/dyn/products/produ ... rt_id=4307 ATMega32M1 data, app notes