MC4X5A Universal Motor Controller Revision.0 / 4.May.07 MC4X5A is a Motor Controller based on 4 separate half-bridge drivers capable of driving -4V @ 5A each. Peak current can be larger. The controller is equipped with a powerfully STM3 M4, RS485, temp sensors, end stops, resolver, hall sensors, current sensors and voltage/bemf sensors to support a wide variety of applications. Solenoid Driver DC Motor Driver Stepper Motor Driver Brushless 3-Phase Motor Driver Content STM3F405RG, 3-bit ARM M4, 68Mhz RISC MCU Mb Flash, 9Kb SRAM SWD Adapter 3 status led s. 4 separate half-bridge drivers supporting -4V @5A each. All with current sensors and BEMF sensors. High Speed RS-X/RS485 Hall sensors with separate leds. Input Voltage Sensor. x Temperature sensors. x End Stops x Resolver input. Separate 3.3V «stay-alive» supercap. Adapter for battery or capacitors. Size 80 x 40mm. Height depending on adapter board.
MC4X5A Top Side Annotation # Description BasicPI SWD connector with SWD, Reset, Boot 3.3V & UART. STM3F405RG. 3 bit ARM MCU w/mbflash, 9KbSRAM and M4 floating point support. Can be replaced with STM3F05RB. 3 Status leds. 4 Test points or external connection to all BEMF, Current and PWM signals. 5 Current shunts. 6 4 x Half Bridge PWM output. 7 Power Input -4V 8.7 pitch Jumper for V/4V Input 9.54 pitch power adapter for battery, capacitor and break resistors. 0 3.3V Super capacitor. Power Led. Hall Sensor Leds. 3 Hall Sensor Connector. 4 Temperature Sensor Connector. Shown on top here, but can be mounted inwards on the back for sensors between the HEXFET s. 5 Temperature Sensor. 6 Resolver input. Basically an analogue pin with 6V suppression diode. 7 End point connector. 8 End point connector. 9 RS-485 Connector 0 Terminal jumper for RS-485.
MC4X5A Back Side Annotation # Description 4 xm Mounting holes for external mounting. 4 x M mounting holes for Battery/Capacitor adapter board. 3 extra M Mounting holes for heatsink. Must share mounting holes with the adapter board. 4 8 x HEXFET s mounted on the back with M screw holes to fit small heatsink.
Capacitor Adapter Board The Capacitor Adapter Board is basically a specialized vero board designed to add hole through capacitors as needed. This needs to be adapted to the motor in use. Functional Block Diagram
6OSC_OUT 5OSC_IN Schematics MCU +3V Q 3 8MHz 0K R39 SWD Pin Pin 3Pin3 4Pin4 5Pin5 0K R3 +3V D S K R4 D S K R4 D0 S3 K R40 TIM8-CHN TIM3-CH TIM3-CH TIM3-CH3 SWD Pin Pin Pin3 Pin4 3 Pin5 4 5 +3V BEMFADC4 CSenseADC4 BEMFADC3 CSenseADC3 BEMFADC CSenseADC BEMFADC CSenseADC DCADC PWML HALLADC HALLADC TempADC TempADC HALL3ADC ResolverIn +3V X VBAT PC3 3 PC4/OSC3_IN 4 PC5/OSC3_OUT 8 PC0/ADC0 9 PC/ADC 0 PC/ADC/MISO PC3/ADC3/MOSI 4 PA0/ADC0/TX4/PWM 5 PA/RX4/ADC/PWM 6 PA/ADC/TX/PWM 7 PA3/ADC3/RX/PWM 0 PA4/ADC4/DAC/NSS/NSS PA5/ADC5/DAC/SCK/PWM PA6/ADC6/MISO/PWM 3 PA7/ADC7/MOSI/PWM 4 PC4/ADC4 5 PC5/ADC5 6 PB0/PWM/ADC8 7 PB/ADC9/PWM 8 PB/BOOT 9 PB0/SCK/SCL/TX3/PWM 30 PB/SDA/RX3/PWM 46 49 60 7NRST SWDIO SWCLK BOOT0 STM3F405Rx VCAP VCAP VSS VSSA VSS 47 3 63 8 64 48 3 3 9 VDD VDD VDD VDDA VDD PB/NSS/CANRX/ PB3/SCK/CANTX/PWM 33 PB4/MISO/PWM 34 PB5/MOSI/PWM 35 PC6/TX6/PWM 36 PC7/RX6/PWM 37 PC8/PWM 38 PC9/SDA3/PWM 39 PA8/SCL3/PWM 40 PA9/TX/PWM 4 PA0/RX/PWM 4 PA/CANRX/PWM 43 PA/CANTX 44 PA5/NSS3/NSS 45 PC0/TX4/TX3/SCK3 50 PC/RX4/RX3/MISO3 5 PC/TX5/MOSI3 5 PD/RX5/PWM 53 PB3/SCK3/SCK/PWM 54 PB4/MISO3/MISO/PWM 55 PB5/CANRX/MOSI/MOSI3 56 PB6/TX/SCL/CANTX/PWM 57 PB7/SDA/RX/PWM 58 PB8/CANRX/SCL/PWM 59 PB9/NSS/CANTX/SCL/PWM 6 6 PWML PWM3L PWM4L PWMH EP EP PWMH PWM3H PWM4H ETHINT ETHReset ETHCS RS485DE ETHSCLK ETHMOSI ETHMISO RS485Tx RS485Rx TIM-CHN TIM-CHN TIM-CH3N TIM8-CH TIM-CH TIM-CH TIM-CH3.uF C9.uF C0 The schematics above show the MCU itself. An 8Mhz Murata ceramic x-tal, SWD connector and 3 x LED s. The MCU connection points are listed in the table below. X-Tal Pin 5 & 6 Ceramic Murata with a small all-in-one 3mm package is used to save space. Using a ceramic crystal is much better than the internal RF crystal, but not as accurate as a proper crystal. VCAP Pin 3 & 47 connected to a.uf capacitor. SWD 7 NRST 48 SWDIO 49 SWCLK 60 BOOT0 9 TX3 30 RX3 PWM w/sensors 37 PWMH PC6 TIM8-CH PWML PA5 TIM8-CHN 6 BEMFADC PA - ADC 7 CSenseADC PA3 - ADC3 PWM w/sensors 4 PWMH PA8 - TIM-CH This must be replaced with 0Ohm resistors for STM3F05Rx.
34 PWML PB3 - TIM-CHN
4 BEMFADC PA0 - ADC0 5 CSenseADC PA - ADC PWM3 w/sensors 4 PWM3H PA9 TIM-CH 35 PWM3L PB4 TIM-CHN 0 BEMFADC3 PC - ADC CSenseADC3 PC3 - ADC3 PWM4 w/sensors 43 PWM4H PA0 - TIM-CH3 36 PWM4L PB5 - TIM-CH3N 8 BEMFADC4 PC0 - ADC0 9 CSenseADC4 PC - ADC HALL Sensors HALLADC PA6 TIM3 CH / ADC6 3 HALLADC PA7 TIM3 CH / ADC7 6 HALL3ADC PB0 TIM3 CH3 / ADC8 Voltage In Sensor 0 DCADC PA4 - ADC4 Resolver 7 ResolverIn PB ADC9 / PWM Temperature 5 TempADC PC5 - ADC5 Temperature 4 TempADC PC4 - ADC4 End point 38 EP PC7 End point 39 EP PC8 Ethernet 44 ETHINT PA 45 ETHReset PA 50 ETHCS PA5 55 ETHSCLK PB3 SPI or 3 56 ETHMOSI PB4 SPI or 3 57 ETHMISO PB5 SPI or 3 RS-485 54 RS485DE PD 58 RS485Tx PB6 TX 59 RS385Rx PB7 RX Spare SPI 5 SCK3 PC0 5 MISO3 PC 53 MOSI3 PC Spare CAN 6 CANRX PB8 6 CANTX PB9 Spare 33 PB 40 PC9 8 PB
PWM Driver This show the schematics for PWM and associated current sensor, BEMF Sensors, connectors and protection logic. PWMH CSenseADC PWML BEMFADC X8 Pin Pin 3 Pin3 4 Pin4 PWMH CSenseADC PWML BEMFADC 5 D4 4 D3 3 D D X GND ESDA6VSC5 PWM Driver,,3 & 4 are identical, so only PWM Driver is annotated here. The Gate Driver shown are IR03S, but the actual circuit will be using IR0S. IR0,IR0 & IR03 are pin compatible and identical with exception of input logic. IR0 is better suited for
connection to a modern PWM driver, while IR03 can use a combined input line as it invert the LIN. T & T are IRF786 rated at 30V, A. These are HEXFET s in SO8 packages that have a large range of pin-compatible alternatives. R is the 0.00 currents shunt that is measured by the zero-drift current sensor INA0. R6 & C5 form a low-pass filter to remove as much noise as possible. INA0 is pin compatible with a range of sensors using different amplifications. R0, R & C8 is a current splitter & low pass filter for BEMF sensing. X8 is the.7 pitch connector making signals available for scopes etc. X is a 6.V suppression diode used on all signals connected to the MCU for protection. RS485 Classic RS485 transceiver based on MAX3485. This is a 3.3V version of the more known MAX485.
Hall Sensors Hall sensors have a separate connector that provided 3.3V & GND out and 3 x Hall Sensor s in. The Led s will light up as the sensor input s are low. The capacitors and suppression diodes should prevent pulses. Hall sensors are connected to Timer 3, channel, &3 where they can be counted directly by the timer logic.
Temperature Sensor Temperature Sensor & are identical, only # is annotated here. This is a basic current splitter with the temperature sensor as the nd, variable resistor. The intention is that one (or both) sensors are located between the HEXFET s and the heatsink. This illustrate the suppression diodes for Temperature sensor, and DC Voltage Sensor. DC Voltage Sensor s DC Voltage Sensor is a classic voltage splitter with a low pass filter and suppression diode connected to an ADC. By design this should drop several seconds before the 3.3V to the MCU drops out due to the supercap on the 3.3V PSU. This gives us the capability to monitor power drops that otherwise would reboot the MCU.
End Point & Resolver Endpoint, Endpoint and Resolver uses the same design with a connector consisting of the signal, 3.3V and GND. The only added logic is the suppression diode. PSU The PSU provides 3 voltages. () is the raw input voltage used on the motor. This must be -4V. () is the V used on the Gate Driver logic provided either by direct input or by using the DC-DC converter. (3) is a 3.3V PSU provided by a classic LM7. A supercap on the 3.3V (roght top) will function as a battery and keep the MCU alive a few seconds after a power drop. The adapter (bottom) allows an external battery, capacitor or break resistor to be connected.
Jumpers are added to support input voltages as low as.v from LIPO batteries. The circuit can support 30V if you replace the X6 suppression diode that otherwise will activate at ca 7V.
BOM C 00nF PWM page C0 VCAP.uF MCU page C 4.7nF Page 4 C 4.7nF Page 4 C3 4.7nF Page 4 C4.nF Page 4 C5 00uF Page 5 C 00nF PWM page C6 0,5uF Page 5 C7 uf Page 5 C8.nF Page 4 C9.nF Page 4 C3 00nF PWM3 page C30.nF Page 4 C3.nF Page 4 C4 00nF PWM4 page C5.nF Page 4 C6.nF Page 4 C7.nF Page 4 C8.nF Page 4 C9 VCAP.uF MCU page D USM PWM page D0 Led MCU page D Led MCU page D Led MCU page D USM PWM page D3 USM PWM3 page D4 USM PWM4 page D5 Hall sensor Led Page 4 D6 Hall sensor Led Page 4 D7 Hall sensor Led Page 4 D8 40V A TVS Diode Page 5 D9 Power Led Page 5 J 4 x Motor Screw Connector Page J0 3 pin.54 pitch connector Page 4 J 3 pin.54 pitch connector Page 4 J3 pin.54 pitch connector Page 4 J x Screw comnnector Page J3 4 pin.54 pitch connector Page 3 J4.54 pitch male pin header Page
J6.7 pitch jumper Page 3 J7 5 pin.54 pitch connector Page 4 J8 pin.54 pitch connector Page 4 J9 3 pin.54 pitch connector Page 4 L 47uH A Page 5 Q 8 Mhz Murata x-tal MCU page R mohm Shunt Resistor PWM page R0 0K bias Page 3 R 0 Ohm Terminator Page 3 R 0K bias Page 3 R3 mohm Shunt Resistor PWM page R4 mohm Shunt Resistor PWM3 page R5 mohm Shunt Resistor PWM4 page R6 0K Page 4 R7 0K Page 4 R8 0K Page 4 R9 0K Page 4 R 47 PWM page R0 M Page 4 R 00K Page 4 R M Page 4 R3 00K Page 4 R4 M Page 4 R5 00K Page 4 R6 M Page 4 R7 00K Page 4 R8.K Led Resistor Page 4 R9.K Led Resistor Page 4 R3 47 PWM page R30 M Page 4 R3 0K Pull-Down MCU page R3 K Page 5 R33 4,7K Page 5 R34.K Led Resistor Page 5 R35 M Page 4 R36.K Led Resistor Page 4 R37 00K Page 4 R38 M Page 4 R39 0K Pull-Up MCU page R4 47 PWM page R40.K Led resistor MCU page R4.K Led resistor MCU page
R4.K Led resistor MCU page R5 47 PWM page R6 47 PWM3 page R7 47 PWM3 page R8 47 PWM4 page R9 47 PWM4 page S IR03S PWM page S IR03S PWM page S3 IR03S PWM3 page S4 IR03S PWM4 page SWD.7 pitch Connector MCU page SWD.7 pitch Connector MCU page T IRF786 PWM page T IRF786 PWM page T3 IRF786 PWM page T4 IRF786 PWM page T5 IRF786 PWM3 page T6 IRF786 PWM3 page T7 IRF786 PWM4 page T8 IRF786 PWM4 page U STM3F405RG MCU page U MAX3485 Page 3 U3 LM7 Page 5 X0.7 pitch Male Header Page X.7 pitch Male Header Page X ESDA6VSC5 Page X3 ESDA6VSC5 Page X4 ESDA6VSC5 Page 4 X5 LMR406 Page 5 X6 P4SMA7A Page 7V Suppression diode X7 ESDA6VSC5 Page 4 X8 ESDA6VSC5 Page 4 X9 4+ V Suppression Diode Page 5 X ESDA6VSC5 Page X0 Supercap Page 5 X V.7 pitch Jumper Page 5 X 30V.7 pitch Jumper Page 5 X3 ESDA6VSC5 Page X4 INA0 Page 4 X5 INA0 Page 4 X6 INA0 Page 4 X7 INA0 Page 4
X8.7 pitch Male Header Page X9.7 pitch Male Header Page