555 Timer : Universal PWM Controller

91,928

149

11

Introduction: 555 Timer : Universal PWM Controller

About: I have extreme enthusiasm and interest for learning and how things work. I like to learn, manipulate, invent and then market. This has led me to learn programming, web development, mobile application developme…

Please visit my Kickstarter to purchase the assembled board or kit :

https://www.kickstarter.com/projects/jackt/univers...

Within this instructable the 555 timer is used to create a variable PWM signal that can be varied from ~5% to ~95% of the power supplied using a variable resistor.

PWM is a technique used everywhere within electronics to vary the power supplied to devices and components such as motors, LED's and fans.

Controlling the ratio a component is high (on) to the time its low (off) can vary the overall power supplied to it. For example if a motor was powered from a 12v power supply and 50% of the time the power supplied was low and 50% was high then the average voltage the motor receives is 6v making it run half as fast. The ratio of the time a component is high to low can be expressed as a percentage as in the example above and the percentage a component is high compared to low is called the duty cycle. These percentage correspond to actual times for example a 50% on to 50% off can correspond to 500ms on to 500ms off and this would create a frequency of 1 hertz. When using PWM the frequency supplied to a component needs to be high enough to where its not noticed. For example a motor is typically over a few thousands hertz as anything below and the motor wouldn't rotate smoothly. This would mean the percentages of 50% on to 50% off would correspond to say 0.25ms on to 0.25ms off which would supply 6v from 12v and a frequency of 2000 hertz which is high enough for the motor to run smoothly. The PWM signal from this board can be varied from 1hz all the way to 10khz giving it a range of possible uses from LED's to motors.

Step 1: The Circuit

The circuit diagram above doesn't contain the option to use an external power supply for the output and just uses one to keep it simple.

This circuit uses the common 555 timer to create and vary the PWM signal. The circuit uses a potentiometer to vary the output PWM signal from around 5% to 95% of the power supplied and uses a jumper to vary the frequency from around 1hz to 10khz. The jumper is used to connect the potentiometer to a different capacitor which changes the frequency of the PWM signal. The change in frequency is marked beside each capacitor and shows how it multiples by 10 as you move the jumper from left to right.

The output of the 555 timer is connected to a high current MOSFET transistor which is used for switching heavy loads such as a motor. The STF7N60M2 can switch up to 600v at 5A however any alternative can be used.

You could connect your output straight from pin 3 of the 555 however you are limited to 200mA which is why its best to use a transistor. You can control fans, motors or LED's just remember to choose the frequency that's high enough so its not noticed by the output, for example a frequency of 10hz would be noticed as a flicker when controlling LED's which is why a few hundred hertz is suitable. When controlling fans and motors you can sometimes hear a whistling sound which is the coils inside vibrating at a frequency we can hear, it causes no damage to the motor however can be annoying so an increase in frequency would remove the noise.

Step 2: How It Works

Reference to components in the circuit diagram above are mentioned to help with understanding.

This circuit uses the typical 555 timer astable arrangement to create and vary the PWM signal.

See here for a simple guide of the 555 astable arrangement : http://www.electronicsclub.info/555timer.htm

The 555 timer astable arrangement creates a square wave with time high and time low. The ratio of these times can be varied by changing R1, R2 and C1 in a typical 555 astable arrangement or R1, VR1 and a change of capacitor via the jumper (C1) within this PWM circuit.

The typical astable arrangement has two resistors R1 and R2 in series connected to a capacitor C1 to ground.

The time the square wave is high can be calculated by 0.7 x (R1+R2) x C1

The time the square was is low can be calculated by 0.7 x R2 x C1

The difference in calculations is to do with the charge and discharge time of the capacitor which triggers the output to be high or low. The link above describes this in detail.

Within the PWM circuit R1 has been picked to be a low value and for the sake of calculations is not existent.

Updating the calculations we have :

Time high : 0.7 x R2 x C1

Time low : 0.7 x R2 x C1

With the arrangement of R2 being a potentiometer the ratio of time high to low can be changed without effecting the overall frequency of the signal. For example if the potentiometer was set in the middle with 5kohms either side and C1 being constant then you end up with the time high and time low exactly the same creating a 50% on to 50% off. This would half the power supplied to a component or device. If the potentiometer was changed to 1khoms to the left and 9kohms to the right then its 10% on to 90% off.

So the potentiometer allows you to vary the width of the pules and the jumper allows you to change the capacitor from 100uF to 0.01uF allowing you to change the frequency of the output from around 1hz to 10khz.

Be the First to Share

    Recommendations

    • Big and Small Contest

      Big and Small Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make It Bridge

      Make It Bridge

    11 Comments

    0
    Edwin Steiner
    Edwin Steiner

    Tip 2 years ago on Step 2

    Thanks for the circuit! As shown it can produce huge voltage spikes due to the fast switching of the MOSFET and the inductance of the load. Two improvements: 1) Put a robust diode (e.g. 1N4001 or higher) in reverse direction in parallel with the load. Such a "flyback diode" will eliminate the largest negative voltage spikes. 2) Connect pin 3 of the 555 not directly to the gate of the MOSFET but through a resistor (e.g. 220 Ohms) and put a small capacitor (e.g. 2.2 nF) from gate to source (i.e. parallel to the gate capacitance). These components form a low-pass filter that will make the switching slower (example time constant ~ 0.5 µs) leading to more heat lost in the MOSFET but much lower switching noise.

    0
    Burnit0017
    Burnit0017

    3 years ago

    flyback diode at across the motor??

    0
    tridecagon
    tridecagon

    6 years ago

    What is the purpose of D1 and D2?

    1
    Tonyinselby
    Tonyinselby

    Reply 5 years ago

    They provide different paths for current either charging or discharging the timing capacitor. Imagine the circuit with the variable resistor replaced by two separate resistors, each connected to a diode and connected together where the slider of the variable resistor is, and it might become clearer. Sometimes diodes like this are called "steering diodes", as they steer the current one way or another.

    0
    tridecagon
    tridecagon

    Reply 5 years ago

    Okay, I think i understand now.

    0
    YkwinnoH
    YkwinnoH

    Reply 5 years ago

    Hi, have you figured this out already? Kinda was wondering the same thing :)

    0
    apollonios
    apollonios

    6 years ago

    what is the zener's voltage?

    0
    Tonyinselby
    Tonyinselby

    Reply 5 years ago

    I suspect the circuit's drawn slightly wrong. These don't need to be Zeners, just ordinary diodes. Small switching diodes such as 1N4148 might be best, but you'd be OK with general purpose diodes.

    0
    mohamed4data
    mohamed4data

    8 years ago

    Can I use a BD679 instead of mosfit

    0
    jacktrow
    jacktrow

    Reply 8 years ago on Introduction

    Yes, you can connect any type of transistor to the output of the 555 timer.

    0
    Kminek
    Kminek

    Reply 8 years ago

    if bd is bipolar then you have to mount inversely diode between motor wires like: + --¦<¦-- - because of coils inside motor.