Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

generating analog voltage using microcontroller

Status
Not open for further replies.

aruna1

Member level 1
Joined
Jun 18, 2009
Messages
40
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,602
Hi

I need to generate an analog voltage using a microcontroller (16F877A)

I have two options -

1.)Use R-2R ladder and make a 10bit DAC

2.)generate 1kHz PWM signal-->send it through a 6 pole lowpass filter-->get analog voltage relevant to duty cycle.


Since I couldn't find any DAC ics, I'm stuck with above two options (they are the only methods I know of, are there any other methods?)

I have to order some DAC ICs but it will take about 3 weeks to reach me, so untill then I have to use some method to generate voltage?

What method do you think most reliable? that is more accurate and steady?

Thank you
 

For second method, L C filter can be used for stable voltage.
 

Here is two simple examples.....................




**broken link removed**

KAK
 
Last edited by a moderator:

Here is two simple examples.....................





**broken link removed**

KAK
ya I know the method, infact it is what i stated as my second option.
 
Last edited by a moderator:

You don't need to generate PWM signal. Just generate a square signal of frequency 1KHz, then filter-out using a 4th order active filter to get a faithful sine wave. We are doing this form of simple analog voltage generator.
 

Yes. It provides better efficiency if the analog signal need big driving capability.
 

You don't need to generate PWM signal. Just generate a square signal of frequency 1KHz, then filter-out using a 4th order active filter to get a faithful sine wave. We are doing this form of simple analog voltage generator.

how could a sine wave help in my requirement? I think you misunderstood what I was saying.
 

Aruna,

If your range is 0 to 5V, you can use a DAC like MCP4912 (Microchip) which can be written through SPI. If you need higher voltage at the output, the DAC output can be amplified by a non inverting amplifier.

In case you dont want to use a DAC, you can generate a PWM, and connect a RC low pass filter to get a linear output voltage. ensure the RC time constant is greater than your PWM cycle time, otherwise you may end up getting a triangular wave.

Using a DAC will give you more accuracy. Hope this helps.

Regards,
JayantD
 

I ordered a sample DAC from TI and it will arrive next week. after all I will not need PWM :)
thank you all
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top