Vary voltage and frequency of Square Wave

Click For Summary

Discussion Overview

The discussion revolves around generating a square wave using an AtMega32 microcontroller while varying both the frequency and voltage of the output signal. Participants explore various methods and components that could be utilized to achieve the desired voltage modulation alongside the frequency control.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks assistance in varying the voltage of a square wave generated by an AtMega32, expressing limited knowledge of electronics.
  • Another participant suggests using a 4 quadrants multiplier to change the amplitude of the square wave according to a control voltage, noting potential issues with noise at high attenuation levels.
  • A different participant proposes a variable gain amplifier as another option, providing a link to a specific device as an example without recommending it outright.
  • One participant later suggests using an R2R DAC as a programmable variable gain amplifier, indicating that the attenuation can be controlled by the value sent to the DAC.
  • Another participant mentions CMOS technology, recommending analog switches like the CD4051-CD4053 for creating a well-defined square wave by switching between positive and negative voltages.

Areas of Agreement / Disagreement

Participants present multiple approaches and components for achieving voltage modulation of the square wave, but there is no consensus on a single solution or method. The discussion remains open with various suggestions and ideas being explored.

Contextual Notes

Participants express varying levels of familiarity with the components and concepts discussed, indicating potential limitations in understanding or application. Specific requirements such as precision and coupling type are not fully clarified.

Etude
Messages
28
Reaction score
0
Hi!

I am using an AtMega32 to output a square wave. I am varying the frequency by toggling the output pin using Timer1.
However, I also need to vary the voltage of the wave and frankly, have no idea how to. I tried looking up google but not much of it made sense to me thanks to my limited knowledge of electronics.
Can anyone please help ? I don't have to use the micro controller so even circuit ideas are open. Can I use some kind of voltage controller to modify the wave after the square wave of the set frequency has been output from the micro controller port?
 
Engineering news on Phys.org
Look into a 4 quadrants multipliers. I used this one before:

http://www.analog-innovations.com/SED/MC1594-DataSheet.pdf

But this one is more for RF, it is just an example what you need to look for. I don't know your requirements, whether it needs to be precision, DC couple or anything. I use this a long time ago. Also the down side is when you have highest attenuation, the noise goes way up, so there is a limit of how low the gain can go.

There might be some newer ones you can use to fit your needs. Basically, it take your square wave input and change the amplitude according to a control voltage. With a 4 quad multi, you just feed from the source you have and control the amplitude with a control voltage.

Also look into variable gain amplifier something like this:

http://www.ti.com/lit/ds/symlink/lmp8358.pdf

I am not recommending these two device, just an example to give you a head start what direction to look for. Most likely they have better ones for your specific needs.

If you can take AC couple, and the frequency is in over 1MHz, then I had a design that use pin diodes that will do the trick.
 
Last edited:
Hey thnx a lot! will try understanding these :)
 
It sounds like a good place for CMOS. CMOS is analog designers dream, because it can switch right to a given voltage.

I'd suggest looking through the CD4051-CD4053 analog switches. They're cheap as dirt and twice as common. You can place your positive voltage on one input and negative on another and have a lovely square wave that's very well defined.
 

Similar threads

  • · Replies 39 ·
2
Replies
39
Views
3K
Replies
16
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 28 ·
Replies
28
Views
6K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 32 ·
2
Replies
32
Views
6K
  • · Replies 15 ·
Replies
15
Views
8K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K