TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139250 times)
  2. FAT32 Library (71746 times)
  3. Network Ethernet Library (57120 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28074 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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: v.savic

Last Updated: 2016-02-19

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Motor Control

Downloaded: 2006 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]

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]

Injection System Behavior - State Machine (SM)

0

This example present ability of the system modeled by SM to easily execute different tasks by injecting behavior. It is based on BYTE field transition matrix (TM) which stores information about system behavior. If we change and inject TM into the SM, system behavior is changed. This example present generic solution for state machine based systems.

[Learn More]