Hi all,

    Professor is too much honor, Michael ! I’m just a enthusiastic user of the Lectron system 😆

    Today, we’re going to do some more experiments with the PWM to study it’s behavior.

    I think everybody’s familiar with an astable multivibrator ? If not i’d like to refer to the manual included with the start system page 12 and page 152 where you can find all details.

    The differences between the manual and the circuit proposed here, is that the left and the right sides are symetrical, which means that when setting the 250K potentiometer in the center position, the output is a 50% duty cycle square wave.

    You can see in the schematic that the collector of the transistor at the left is connected via a resistor of 3,9K with the battery.

    The transistor at the right of the astable multivibrator is connected via 2 resistors of 2,2K and 1,5K in series, giving a total resistance of 3,7K which is a close value to the 3,9K.

    So, we can say that both transistors work exactly the same way.

    You may have noticed that the output of the transistor at the right is connected to an emitter follower circuit driving the lamp. This has the property of having a high input impedance. This causes almost no load on our astable multibirator.

    Now, let’s change both capacitors into 10µF. The top capacitor has the + at the left. The bottom capacitor has the + at the right. Now, you can clearly distinguish  the on and off behavior of the duty cycle when adjusting the 250K potentiometer.

    Now, let’s change the bottom capacitor into a 0,1µF and the top capacitor into 47nF.

    You see that our lamp doesn’t flicker anymore and that the dimming is very noticeable.

    The principle of PWM is used to translate the digital output of a microcontroller into an analogue signal. The next experiment will show you how.

    Let’s build the circuit according to following diagram :

    PWM to analogue

    Before you turn the power on, adjust the 250K potentiometer completely counter clockwise.

    You see that the lamp is barely on and the meter deflects a small amount.

    Now, when you turn the potentiometer, the lamp gradually lights and the meter deflects more.

    Stop turning the potentiometer till the meter reaches “6”.

    Till now, the meter is fed by a pulsating square wave. Since the meter needle is somewhat slow in it’s movement and the frequency of the oscillator is high enough, it doesn’t swing from left to right.

    Let’s now push the left switch. You’ll see that the meter indicates a higher voltage.

    When you press the right switch, the meter even reaches a higher value.

    By adding a capacitor, we create a low pass filter. By choosing the correct value of the resistor and capacitor, our circuit will perform at it’s best. We can say that the 10µF capacitor suits best here.

    The next graph visualizes the PWM versus output signal

    PWM analogue graph

    This kind of circuit is often used where a microcontroller with PWM output can control analogue devices such as lamps, motors, etc.

    It’s quite possible that the brightness and/or color of the led light bulbs in your house use this kind of circuit.

    Don’t be afraid to experiment with this circuit. Here are some hints :

    • Try different values for the capacitors (pay attention to the + and -)
    • Connect the 100K resistor of the right transistor in the astable circuit directly to the voltage rail instead of the 250K potentiometer. Turn the potentiometer and see what happens !
    • Do you think the speed of the multivibrator affects the meter deflection ? Check it out while pushing one of the 2 switches !

    Happy experimenting 😆