PWM Generator for Standard DC Motors
This example is related to simple PWM generator for standard DC motor. Complete example is based on my previous example related to Injection System Behavior. PWM modulation signal is generated by transitions through state machine states. State machine has four states: Idle, PWM, Timer and Direction. Transition matrix has 17 bytes. x2Mode is used for state encoding.
Provided material for download contains two bin files related to different behavior of the system.
- DCSpeedController.bin - rotation in one direction with speed regulation.
- DCSpeedDirectionController.bin - rotation in both direction with speed regulation.
Electronics #1: beside priority encoder for external commands encoding, interface between 8051 MCU and DC motor is done over device driver BA12004 IC (replacement: ULN2XXX series - motor driver kit). To create H-Bridge for bidirectional rotation, two additional resistors are used.
Electronics #2: beside priority encoder for external commands encoding, interface between 8051 MCU and DC motor is done over integrated H-Bridge chip BA6209.