EveryCircuit
Contact
Reviews
Home
schmobi2001
modified 6 years ago

Switchable Signal Generator

0
20
86
01:20:49
Work in progress
published 6 years ago
schmobi2001
6 years ago
Push the switch to toggle square and sine wave. Change value of the capacitor between threshold and ground pin for frequency.
schmobi2001
6 years ago
All ideas for improvements are welcome :)
hurz
6 years ago
first question, for what do you need a 100kHz signal?
schmobi2001
6 years ago
I want to have a signal generator to measure self made air coils.
schmobi2001
6 years ago
I have built this for real. But unfortunately the amplitude decreases with increasing frequency and vise versa. How can I stabilize the amplitude at any frequency?
hurz
6 years ago
good question, next question, this is what mankind tries to do over the last hundred years, good is you ask this to yourself and this opens for you many new question, but you will see how impossible with little effort a sinewave over a wide frequency range and stable amplitude and constant low THD, yes and minimal effort. Have fun to try this the next hundred years, or 10 years....
Bushmills
6 years ago
Using AGC is one way. Automatic gain control, essentially an amplifier with amplification controlled by a voltage, which is derived from in- or output signal. Increasing amplitude reduces amplification and vice versa.
Bushmills
6 years ago
I'd probably choose a different route: rather than converting rectangle to sinusoid using analog filter, which introduces your problem, a microcontroller with D-A converter might be my choice.
schmobi2001
6 years ago
Thank you for your suggestions. Unfortunately I have an arduino nano and uno but they are not capable of D-A. I guess I might look for a new arduino. I have heard some models can do analogue output.
Bushmills
6 years ago
With those you may also find it difficult to reach the 80 KHz or above when generating a reasonably accurate signal. Next level of more powerful controllers (and higher clocks) available cheaply on small boards comparable to the arduino nano are probably the STM controllers. Those have ARM cores "entry" models like F030 or F103 ready assembled for 1 € and upwards, about 2 € for the more powerful but still baseline F103 boards. Increasingly popular are now getting RISC-V based boards, but those aren't yet where AVR or STM already are.
Bushmills
6 years ago
Another method: store sinus table in an eeprom or flash, run a counter on address lines, with an D-A converter (even an R-2R resistor network would do) connected to data lines.
hurz
6 years ago
If you want more with all this effert we already have told you only at the sureface, you better buy a finished one. If you still think you can do better then whats cheap alvailable as e.g. DDS to buy, lookup in ebay, then i must call you naive. But maybe try and error is your way 😂 BTW a specifucatiin helps a lot to know whats your taget is. frequency low hig. Amplitude min max. THD in percent full range, low or high. Sinewave, triangle, rectangular pulse width. There is much more to write into a reqirement specification. But let it be that easy for a start
Bushmills
6 years ago
Purchasing a solution won't help knowing how this problem could be tackled. But it saves effort, space and time.
hurz
6 years ago
but dont be dissapointed if you are lightways away from what you want. To learn is always a good thing, but its also a good thing to listen on experienced people. Anyway, the problem must not be solved you can also see by thinking about an issue how duffucult and impossible it is to solve. Not everything must be prooven with a real hardware, many things can be seens much longer before as impossible.
schmobi2001
6 years ago
Thank you for your suggestions. I better try the arduino nano for this.
schmobi2001
6 years ago
https://circuitdigest.com/microcontroller-projects/arduino-waveform-generator
schmobi2001
6 years ago
I tried my arduino due which is DAC capable. Unfortunately even with stored sinus tables with less than 20 samples won't give me more than 30khz. Analogwrite is too slow. With the pwm library it will be faster hopefully.
hurz
6 years ago
PWM will be much much slower. PWM does need an oversampling. If you see its clocked with 32kHz, it does not result in 30kHz sinewave!! It will give you by a factor of maybe 100 less what you expect, around 300Hz (depends again on your requirements). With arduino due you are at the edge what Atmel controller can do for you. Again, write down a specification of requirements you want to reach and we are maybe able to navigate you into the right direction.
schmobi2001
6 years ago
I want to be able to produce a sine wave up to 500 khz. I think that should be sufficient. @ 2 or 3 volts.
hurz
6 years ago
suppose you build a LC oscillator which is tuneable with its C, a variable capacitor. Maby it can change its capacitance from 10pF upto 200pF so a factor of twenty, that means you are able to tune the frequency by a factor of √20 = 4.47 you end at 500kHz and will then come down to 112kHz ! After that you need to switch to another Capacitor to have another range of 4.5 down. 25kHz, 5.5kHz, 1.2kHz, 273Hz, 60.6Hz So you need seven ranges to get from 60Hz upto 500kHz. Hmmm is this what you expect to switch again and again manual the ranges??
schmobi2001
6 years ago
I guess the easiest way is to get a IC for that.

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy