PWM Generator


Posted on Feb 7, 2014

Using a triangle wave and a comparator, a pulse-width modulated signal can be created. We will use the DAC as our input signal and the resulting output signal will have a duty cycle that is proportional to the input voltage. We will then use the PWM signal to dim an LED. Build the circuit shown in Schematic 1 below. Hook up the triangle wave gener


PWM Generator
Click here to download the full size of the above Circuit.

ator to the node labeled Vtriangle  and the output of the DAC to the node labeled Vdac.  Play around with the bits of the DAC and observe how the brightness of the LED changes. Try plugging Vdac and Vtriangle into the oscilloscope and observe them as the bits on the DAC are changed. If the triangle signal is not working properly, the function generator can be used instead. Open the function generator by clicking the FGEN  icon on the instrument launcher. Change the waveform settings to be a Triangle output, 2. 53 kHz, 3. 60 Vpp, and 1. 52 V DC offset. Just like the comparator circuit from the triangle wave generator, when the positive input is lower than the negative, the output will be low. Therefore, when Vtriangle is greater than Vdac, the output is low. When the output is low, the output transistor looks like a short circuit. The forward diode voltage for a yellow LED is approximately 2V. Thus, the current through the LED can be calculated as: When V ­ ­triangle is greater than Vdac, the output is high. In the case of the LP311, when the output is high, this translates to the output transistor being off, which looks like an open circuit. If the output transistor looks like an open circuit, then no current can flow through the LED, and therefore the LED is off. Since the triangle wave is periodic and the DAC output voltage is fixed at a DC level, the current through the LED will be a square wave with a duty cycle that...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Metal detector circuit with TDA0161
    Autodrum
    240Z Headlight Relay Mod
    High Side Current Sensing for Low Side Switching
    How to Make a Cell Phone RF Signal Detector Circuit
    Simple Cat.5 Network Tester



    Top