TOP Contributors

  1. MIKROE (2654 codes)
  2. Alcides Ramos (352 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136751 times)
  2. FAT32 Library (69955 times)
  3. Network Ethernet Library (55942 times)
  4. USB Device Library (46268 times)
  5. Network WiFi Library (41888 times)
  6. FT800 Library (41182 times)
  7. GSM click (28986 times)
  8. PID Library (26414 times)
  9. mikroSDK (26367 times)
  10. microSD click (25377 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

PWM Generator for Standard DC Motors

Rating:

0

Author: Vladimir Savić

Last Updated: 2016-02-19

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Motor Control

Downloaded: 1985 times

Followed by: 1 user

License: MIT license  

This example is related to simple PWM generator for standard DC motor.
Example is base on my previous example related to Injection System Behavior

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "PWM Generator for Standard DC Motors" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "PWM Generator for Standard DC Motors" changes.

Do you want to report abuse regarding "PWM Generator for Standard DC Motors".

  • Information
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for 8051
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog

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.

1. DCSpeedController.bin - rotation in one direction with speed regulation
2. 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 - http://www.zilsel-invent.com/uln2xxx.xhtml 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.

Standard DC Motor

Standard DC Motor

Interface between DC Motor and MCU through Device Driver and H-Bridge

View full image
State Machine Diagram

State Machine Diagram

This state machine diagram is related to: DCSpeedDirectionController.bin - rotation in both direction with speed regulation

View full image

DC Motor Controller

This video is related to: DCSpeedDirectionController.bin - rotation in both direction with speed regulation

Watch on YouTube
State Machine Diagram

State Machine Diagram

This state machine diagram is related to bin file: DC Motor Example #2. In order for file to be used remove txt extension from the end of the file name.

View full image
Device Driver - BA6209

Device Driver - BA6209

Interface between 8051 MCU and DC motor is done over integrated H-Bridge chip BA6209 - from the old VHS VCR device ;-)

View full image

DC Motor Controller

This video is related to: DC Motor Example #2 bin file

Watch on YouTube

ALSO FROM THIS AUTHOR

Embedded Robotics - Programmable Autonomous Vehicle

0

Embedded robotics project. Includes: High level architecture, standard DC and unipolar stepper motors, device drivers, H-Bridge electronics. Sensors electronics: micro switch, IR, Feedback motor control sensors. System software - finite state machine. Platform-Easy 8051 v6 SD Board AT89S8253

[Learn More]

Adjustable VF Driver REV 1.0

0

VF driver stands for variable frequency driver, signal frequency can be changed in run-time. It is a signal modulation since frequency is adjustable during run-time.

[Learn More]

Stepper Motor Controller

0

This example is related to stepper motor controller modeled by state machine. It is based on my previous example - Injection System Behavior. New version 1.0.0.2 - TM encoding modes, configurable TM priorities ...

[Learn More]