PIC18 Pulse Width Modulation (PWM) DC Motor Speed Controller with the RPM Counter Project

Equipped with sophisticated Enhanced Capture/Compare/PWM (ECCP) peripheral the Microchip PIC18F14K50 microcontroller could produce up to four PWM channels output. The enhanced PWM (Pulse Width Modulation) mode in ECCP peripheral is capable to drive the full bridge DC Motor circuit directly both in forward or reverse direction. It also could generate single PWM output on the selectable PIC18F14K50 pins when it configured in pulse steering mode. In this tutorial we will take advantage of PIC18F14K50 pulse steering mode to drive the DC Motor and at the same time we will build the RPM (Rotation per Minute) counter to observe the PWM effect on the DC Motor speed and display it on the 2Γ—16 LCD.PIC18 Pulse Width Modulation (PWM) DC Motor Speed Controller with the RPM Counter Project

The PWM and RPM Counter Project

On this project we will use the HITEC C PRO PIC18 MCU Family Version 9.63PL3 and Microchip MPLAB IDE version 8.40 as our development tools platform. This project also serves as the learning tools of how to use many of the Microchip PIC18 advanced peripherals simultaneously to accomplish the project goal. You could see the complete project demonstrated on the video at the end of this tutorial; Ok now let’s list down all the project interesting features:

  • Using Advanced 8-bit Microchip PIC18F14K50 microcontroller with PICJazz 20PIN development board
  • Driving the HD44780U 2Γ—16 LCD in 4-bit data mode
  • Use DC Motor taken from discarded dual shock PS2 Playstation joystick and the Tamiya racing car tire for measuring the DC Motor RPM
  • Simple and easy to build RPM sensor with the infra red reflective object sensor
  • Use the ADC peripheral to read the trimport value for adjusting the DC Motor Speed and display the PWM duty cycle on the LCD
  • Use the PIC18F14K50 external interrupt and 16-bit TIMER0 counter to measure the RPM and display it on the LCD.

Schematic PIC18 Pulse Width Modulation (PWM) DC Motor Speed Controller with the RPM Counter Project

For more detail: PIC18 Pulse Width Modulation (PWM) DC Motor Speed Controller with the RPM Counter Project


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.