TOP Contributors

  1. MIKROE (2784 codes)
  2. Alcides Ramos (385 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 (139842 times)
  2. FAT32 Library (72209 times)
  3. Network Ethernet Library (57392 times)
  4. USB Device Library (47739 times)
  5. Network WiFi Library (43364 times)
  6. FT800 Library (42700 times)
  7. GSM click (29980 times)
  8. mikroSDK (28440 times)
  9. PID Library (26989 times)
  10. microSD click (26398 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: 2012 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]

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]

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]