View previous topic :: View next topic |
Author |
Message |
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
Vary the Amplitude of an AC Reference signal |
Posted: Thu Dec 29, 2005 1:35 pm |
|
|
What would be the easiest way to use a PIC to vary the amplitude of an AC sin wave that is about 8Vpp and 1KHz? I need to vary the amplitude in at least 256 steps. I thought digital potentiometers might do it but I am not ANALOG enough to come up with a clean design. I always want the reference signal at 1:1 and I want to create another wave, in phase that has a varying amplitude. I will then need another wave 90 out of phase that I can also vary the amplitude. Thanks. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Dec 29, 2005 3:02 pm |
|
|
Do you want to create all these signals with the PIC ?
or
Does the main signal come from an external device and
you want to create derivative signals from it, under control
of the PIC ? |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Thu Dec 29, 2005 3:15 pm |
|
|
The digital pot idea is definately the way to go to vary the amplitude of an existing sine wave. If you read the datasheet and app notes it shouldn't be too hard to figure out how to do it. The only hairy part is the 8V. You may have to divide it down first with a fixed resistor, then adjust it, then amplify it back up to 8V. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Thu Dec 29, 2005 3:32 pm |
|
|
There are two ways, I could use the reference that is always present, or I could create the two other waves independant of the reference. I don't think they need to be in synch with the reference, just the same frequency. |
|
|
Ttelmah Guest
|
|
Posted: Thu Dec 29, 2005 4:03 pm |
|
|
8vp-p, should be 'do able', by some of the standard digi-pots. The analog devices, AD5290 for example, supports +/-15v on the analog connections, and gives the required 256 steps. These are about twice the cost of some of the lower voltage versions, but for this application, would be the 'easiest' solution.
Best Wishes |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Fri Dec 30, 2005 8:17 am |
|
|
The AD5290 looks good. Thanks for the help. |
|
|
|