Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on What Sine-Wave Oscillator can be controlled with a microcontroller?

Parent

What Sine-Wave Oscillator can be controlled with a microcontroller?

+1
−4

I need a Sine Wave Oscillator circuit that can allow me to control its frequency with a microcontroller. Until now all the topologies that I have found if the frequency is changed, a change in the circuit component is mandatory here is some topologies: :
Courtesy of TEXAS INSTRUMENTS

For now am going to be using Arduino as a microcontroller, some forums suggest the use of AD9850 module but I couldn't find it :( .

The frequency range that I am aiming is from 10 Hz to 10 MHz pure stable sinusoidal wave. And the amplitude of 10 Vpp ,1 mA , -28 dBc (if my calculation is correct), the two ways that i can think of to control the circuit is with the help of a digital potentiometer or a DAC of 8 bit or 12 bit.

Edite:
So i have found this circuit which is based on Varactor a VCO;



My question is why we need a DC isn't the AC enough?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

3 comment threads

Can't find AD9850 <-- you didn't look very far then!! (1 comment)
Quote: "Until now all the topologies that I have found if the frequency is changed, a change in the c... (3 comments)
Specs? (2 comments)
Post
+0
−2
pure stable sinusoidal wave

This is impossible. Forget it. Go home.

No matter what you do, there will always be some noise added to the sine wave. Some random noise and some harmonic distortion are inevitable.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

" How accurate does this "sine wave" need to be? " (16 comments)
" How accurate does this "sine wave" need to be? "
deleted user wrote almost 2 years ago · edited almost 2 years ago

" Go home " from the legendary Olin Lathrop seriously I don't know what to say.

Lundin‭ wrote almost 2 years ago

deleted user As with everything-electronics, you need to specify a necessary accuracy (in frequency and amplitude both). There exist no electronic components without error margins and a specified accuracy. Just as in mechanics there are no exact lengths but only lengths with allowed tolerances.

Olin Lathrop‭ wrote almost 2 years ago

@Freewill: I asked you several questions, but you only answered one of them, and then with an impossible value. We tried to help, but you wouldn't cooperate and do your part. If you want to continue, carefully read the questions I posed in the comment titled "Specs?", then specifically answer each one.

deleted user wrote almost 2 years ago · edited almost 2 years ago

Olin Lathrop‭ I mentioned before in another question if you remember that i am a fascinated hobbyist of electronics that mean my knowledge about electronics is limited but that didn't stoped me to do an enormous effort to go and search for the SPECS you asked me for for example THD to show you that am not giving to any of the members of that community a home work and I learned about decibels and other stuff, and yes, I have some issues asking correctly my question, but in the end, I finished by giving all information necessary to get helped: frequency range, amplitude, current, harmonic's level and the "accuracy" and all those information only two of them is important the frequency range and noise level to define which topology may fulfil my needs. After all that said I wasn't expecting from you a wise adult man in your age to treat me the way you did,...

deleted user wrote almost 2 years ago

..Am not going to teach how to communicate with people because this is not the place but am going to ask you politely please to don't answer in the future any of my question neither your friend Andy I guess because my dignity above all.

LvW‭ wrote almost 2 years ago · edited almost 2 years ago

I think, when a "hobbyist of electronics" uses a wording like "pure stable sinewave" he is referring to a sinusoidal output "as clean as possible" - in contrast to other oscillators (which, I think, should better be called "generators") producing squarewaves or other signal forms. At least, this was my understanding of the original question from Freewill. So - no need for a long (harsh) discussion.

Olin Lathrop‭ wrote almost 2 years ago

I finished by giving all information necessary to get helped: - No you didn't. That's the problem.

frequency range - Yes, that's useful. That was clear in the question, so I didn't ask about it further.

amplitude, current - Those don't matter, because that would just be an issue for an amplifier following the oscillator. I asked about the accuracy requirement of amplitude, because the oscillator topology can matter to what can be achieved. I never asked anything about current.

harmonic's level - You never answered that, or gave any other spec about noise content other than to say "pure sine wave", which is no spec at all.

only two of them is important - I don't ask for specs for my entertainment. If someone asks, consider it important. If you knew enough to decide what specs are important, you probably wouldn't need to ask the question in the first place.

deleted user wrote almost 2 years ago

@LvW‭ "as clean as possible" exactly, it was wrong to ask for accuracy because who want an inaccurate circuit, information or anything in life that's my personal opinion ofcause.

LvW‭ wrote almost 2 years ago · edited almost 2 years ago

@Olin Lathrop: Of course, I know that a phrase like "as clean as possible" says nothing. On the other hand, a "hobbyist of electronics" has certainly not a good feeling for "what is possible". Therefore, one should explain to him (and that`s what I have always done in similar situations) why the oscillation amplitude is rising continuously and that it must be artificially "soft-limiited" with diodes, thermistors, etc. And this has consequences in terms of THD. (I think this could be more efficient than simply to say: Go home).

Olin Lathrop‭ wrote almost 2 years ago

who want an inaccurate circuit - The point is all circuits are inaccurate. You will always get an inaccurate circuit. The important question is then how inaccurate is tolerable. There is a wide spectrum of tradeoff between the various performance characteristics of a sine wave generator. Different topologies favor different tradeoffs. Maybe its for an audio test application where low distortion is important, but it's OK to take seconds to adjust to and stabilize to a new frequency. If you want to play a tune with this oscillator, then hopping in frequency quickly is important, but a few dB in amplitude variation less so. Depending on the purpose, harmonic distortion may not matter much (consider greeting cards that play tunes when you open them).

In engineering, nothing is ever perfect and all parameters are tradeoffs against each other. This is why knowing what really matters - with quantifiable specs - is important.

LvW‭ wrote almost 2 years ago

I agree to everything Olin L. has stated. Moreover, all commonly used formulas are (and must be) "inaccurate". Typical example: The often used closed-loop gain expressions for opamps (-R2/R1 or (1+R2/R1)) are only approximations because many secondary effects are neglected (input/output impedances, finite and frequency-dependent open-loop gain,...). And it is a challenging task for an engineer to know and to decide under which operational conditions such and similar neglections may be allowed or not.

Lundin‭ wrote almost 2 years ago

If the accuracy isn't important, why not just pull a number like 1ppm out of a hat and be done with it? And there are numerous valid reasons why the accuracy would be important. For example you could just hook a MCU PWM output to a RC filter and there you go - it's a sine wave.

deleted user wrote almost 2 years ago · edited almost 2 years ago

@Lundin‭ can you answer this question for me please: "How accurate does this "sine wave" need to be?"

Olin Lathrop‭ wrote almost 2 years ago

@Freewill Only you can answer that question. We don't know your application and therefore how tolerant it is to noise on the sine wave. This is one of the questions we've been asking you all along.

If you can't quantify the parameters we asked for, you can at least explain how you intend to use this oscillator. We can then pick some specs that seem reasonable for the application, and maybe propose a topology. But, so far you have refused to provide any guidance whatsoever. Currently the answer can be anything from a PWM output of a micro with an RC filter, to a cesium beam frequency standard.

deleted user wrote almost 2 years ago

@Lundin‭: "you could just hook a MCU PWM output to a RC filter and there you go - it's a sine wave.", as i mentioned in my question "if the frequency is changed, a change in the circuit component is mandatory" ;) .