On this enterprise, I will current you learn the way to generate a PWM signal using 8051 Microcontroller and likewise a PWM based DC Motor Tempo Administration using Microcontroller.

Introduction

You’ll need to administration the rate of DC motor in numerous functions, the place precision and security are necessary. Proper right here we’ll use a method known as PWM (Pulse Width Modulation) to control the rate of DC motor.

We’re capable of receive velocity administration of DC motor using mechanical or electrical strategies nonetheless they require big dimension {{hardware}} to implement nonetheless a Microcontroller based system provides a easy choice to administration the rate of DC motor.

Earlier, now we now have already seen learn the way to administration the rate of DC motor using PWM with out Microcontroller. Proper right here, we do the equivalent experiment by using a microcontroller.

For that perform, proper right here we’ll use 8051 controller to supply PWM wave. By varied the width of this PWM wave, we are going to administration the rate of DC motor. In 8051 microcontroller, the timers are used to generate the PWM wave.

On this text we’ll see learn the way to generate a PWM Signal using timers in 8051 Mocrocontroller and likewise learn the way to administration the rate of DC motor using tthat PWM signal.

PWM Based DC Motor Tempo Administration using Microcontroller Circuit Principle

The heart of this enterprise is the 8051 Microcontroller. Whenever you’ve obtained labored with any variant of the 8051 Microcontroller, you might don’t forget that 8051 doesn’t have a faithful PWM circuitry to permit PWM Mode. So, to have the ability to generate a PWM Signal, now we now have make use of Timers and alter the I/O pins ON and OFF using the timers.

On this enterprise, I will make use of Timer0 in 8051 Microcontroller along with Timer Interrupt to supply the PWM Signal.

Moreover Study the Related Publish – How Stepper Motor Driver Circuit Works using 8051 Microcontroller?

Tips about Generate PWM in 8051 Microcontroller?

Most fashionable microcontrollers like AVR (Arduino, as an example), ARM, PIC, and so forth. have a faithful PWM {{hardware}} and pins to activate PWM mode instantly. Nonetheless, 8051 Microcontrollers do not have this provision. So, learn the way to generate PWM in 8051 Microcontroller?

For this now we now have to utilize Timers and Interrupts in 8051 Microcontroller. The Timer0 of 8051 is configured in Mode0. By fastidiously adjusting the Extreme and Low ranges, we are going to preserve a relentless interval of the signal.

Circuit Diagram of PWM Based DC Motor Tempo Administration using Microcontroller

PWM Based DC Motor Speed Control using Microcontroller Circuit Diagram

Circuit Elements

  • 8051 Microcontroller
  • 11.0592 MHz Crystal
  • Capacitors – 33pF x 2, 10µF
  • Resistors – 1KΩ x 4, 10KΩ x 2
  • 12V DC motor
  • L298N Motor Driver
  • Push Buttons x 5
  • 1KΩ x eight Pull-up Resistor Pack
  • Serial cable
  • 12V battery or adaptor
  • Connecting wires

PWM based DC Motor Tempo Administration using Microcontroller Circuit Design

The circuit consists of 1 8051 Microcontroller (and its supporting circuitry related to oscillator and reset), L298N Motor Driver Module, a DC Motor and a few push buttons.

A 12V DC Motor is said to the L298N Motor Driver Module at its OUT1 and OUT2 Pins. The IN1 and IN2 pins of the motor driver are associated to +5V (VCC) and GND. The EN1 pin of the Motor driver is said to Port0 Pin P0.0.

Four Push Buttons are associated to Port0 Pins P0.4, P0.5, P0.6 and P0.7.   

Often, we are going to interface switches to the micro controller in two configurations; one is Pull-up configuration and the other is pull-down configuration.

Pull-up configuration: In pull up configuration, the microcontroller pin is pulled HIGH to LOGIC 1 and the button is said to GND. When button is pressed, microcontroller pin receives LOGIC 0

Pull-down configuration: In pull down configuration, the microcontroller pin pulled all the way in which right down to LOGIC Zero and the button is said to VCC. When button is pressed, microcontroller pin receives LOGIC 1.

In our circuit we’re using pull up configuration. So, we now have to check for logic Zero to have the ability to know whether or not or not the button  is pressed or not.

PWM Based DC Motor Speed Control using Microcontroller Image 2

Code

The code for the enterprise is given beneath.

Tips about Operate the Circuit?

  1. Be a part of 12V battery or adaptor to the occasion board.
  2. Swap on the supply.
  3. Burn hex file to the 8051 controller with the help of programmer.
  4. Make the required connections as per the circuit diagram.
  5. Now change on the supply and press change 1. Chances are you’ll observe the begins rotating nonetheless at solely 40% functionality.
  6. For many who press change 2, the motor runs with barely bigger than half the rate (60% obligation cycle).
  7. Pressing change three will make the motor to rotate at full velocity (100% obligation cycle).
  8. To stop the motor, press change 4. 

Advantages

  • Using this PWM approach, we are going to save the power.

Functions

  • Utilized in industries to control the rate of motors.
  • Utilized in procuring malls.
  • We’re in a position to make use of this concept to control the sunshine depth.

Provide

LEAVE A REPLY

Please enter your comment!
Please enter your name here