4
http://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/ technology workshop living food play outside Analog Output - Convert PWM to Voltage by ProvideYourOwn on August 16, 2012 Table of Contents Analog Output - Convert PWM to Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: Analog Output - Convert PWM to Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Analog Output Convert PWM to Voltage

Embed Size (px)

DESCRIPTION

Analog Output Convert PWM to Voltage

Citation preview

  • http://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/

    technology workshop living food play outside

    Analog Output - Convert PWM to Voltageby ProvideYourOwn on August 16, 2012

    Table of Contents

    Analog Output - Convert PWM to Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    Intro: Analog Output - Convert PWM to Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

  • http://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/

    Author:ProvideYourOwn ProvideYourOwn.comProvideYourOwn.com is a website devoted to people who want to make their own things and provide for their own needs. We provide information,encouragement and resources to empower people to become free from their limitations and bondage to industrialized society and its multi-nationalcorporations.

    Intro: Analog Output - Convert PWM to VoltageArduino's and other microcontrollers provide analog to digital (ADC) conversion to convert an input voltage to a digital value. You might think that they also provide theconverse which is digital to analog (DAC) conversion. This is not the case. Instead they provide pulse-width modulated (PWM) outputs (see second photo). The Arduinolibrary provides this functionality with a function called analogWrite(). The name seems to imply DAC functionality, but it just controls the PWM output. For manyapplications, such as the case of motor control, PWM is sufficient. For other applications, such as creating a linear voltage or current driver, a real DAC is needed.

    Creating a real DACFortunately, it is easy to convert a PWM output to an analog voltage level, producing a true DAC. All that is needed is a simple low-pass filter made from a resistor and aceramic capacitor. The simple RC low-pass filter shown in the third photo converts the PWM signal to a voltage proportional to the duty cycle. For the Arduino, an Rvalue = 3.9K and a C value = 0.1uF works well for most applications.

    For more details on this subject as well as calculating R & C values more suitable for your application, please consult this article .Was this a useful electronics tip? If so, please cast your vote for it in the Electronics Tips & Tricks Contest .How to vote: The voting button can be found at the top of this instructable. You can also visit the contest page and vote for other instructables as well. Multiple votes canbe cast in each contest. If you see a tip you like, please show your gratitude with a vote.

    Image Notes1. Various PWM Outputs

  • http://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/

    Image Notes1. Typical filter output2. Steady-state voltage corresponds to PWM duty cycle3. Steady-state voltage corresponds to PWM duty cycle

    Related Instructables

    Arduino AudioOutput byamandaghassaei Simple Wav

    Player UsingArduino byElecFreaks

    Stereo Audiowith Arduino byamandaghassaei Arduino Due

    Guitar ADCInput and DACOutput Mixer bymdtevans

    Arduino RCCircuit: PWM toanalog DC byDavidW10

    Lo-fi ArduinoGuitar Pedal bykylemcdonald

    Advertisements

    Comments10 comments Add Comment

    alan000 says: Jan 24, 2015. 6:54 PM REPLYCan you make it reverse. Voltage to pwm signal

    Kurt E. Clothier says: Feb 7, 2015. 1:45 AM REPLYA simple microcontroller circuit would also be very easy to use... use the ADC to measure the analog voltage input, and adjust the output PWM dutycycle accordingly.

    Smartfelly says: Feb 3, 2015. 5:19 AM REPLYI believe a 555 timer would work for that. It's not as simple as this circuit. Here's an example of using it as a PWM light dimmer.

    http://www.instructables.com/id/PWM-Lamp-Dimmer-using-NE555-Timer/

    bdrako says: Jul 30, 2014. 10:07 AM REPLYCan you make it quicker? I mean can you make time necessary for capacitor to charge smaller?

    AleixM says: Dec 1, 2014. 9:29 AM REPLYMaybe with a coil in series with the resistor and a very small cap....

    Just speculating

    tomas.ussing says: Aug 29, 2014. 2:17 AM REPLYDo remember that the 'RC-circuit" provided hereover will only provide you with a given voltaic output LEVEL, i.e. for driving a given high-impedance controller. Ifyou want to provide real power to your application via your "analogue" output, you will have to consider the current drawn by your load, and take that intoaccount when chosing resistor and capacitor -values.

    deeen says: Oct 29, 2013. 10:17 AM REPLYThanks a lot!!

    roughly says: Nov 28, 2012. 5:59 PM REPLYthis is gonna be super helpful -- thanx so much

    YakAttack says: Sep 1, 2012. 5:30 PM REPLYThanks for a quick and useful Ible...should be just what I need!

  • http://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/

    amandaghassaei says: Aug 16, 2012. 11:18 AM REPLYgreat tip! I find myself using it often.