TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139563 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42556 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 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: 2007 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

Analog2Digital Development Board

0

Analog2Digital development board IoT Ready Development board is mainly intended to simulate embedded robotics feedback control loops by simulating analog sensors and sensors with digital output. The solution is based on two main integrated circuits: ADG (analog multiplexer) and ADC (analog 2 digital converter).

[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]

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]