Maker Pro
Maker Pro

How to make a Voltage Controlled Oscillator

F

F. Bertolazzi

PeterD:
Funny, when they did the exact same thing in the US, no one said a
word of protest... Sad, isn't it!

Yes, it's sad that Europeans behave that stupidly, without taking example
from the more responsible and sensible US citizens.
 
F

F. Bertolazzi

John Fields:

By no means.
Moreover, we've been the United States of America for 230 years or so
and our system, in that scant time, has allowed us to become the most
powerful nation on Earth.
Exactly.

Strange, but now that you've finally gotten around to following our
example and are becoming the United States of Europe, you seem to
think it's something you thought up and aren't following anyone's
example!

Well, on this I have to disagree. When the US was formed the population was
relatively homogeneous, no history, one language and one money.
It's rather different from putting together different people with different
historie.

Our model is more the USSR, and it shows.
 
F

F. Bertolazzi

Jan Panteltje:
Na, if you call GWBush and his clan of murders 'resposible' and 'sensible',
then anything goes :)

I don't remember having called G. W. Bush in any way.

He did good things, such a starting a war in Iraq to keep the terrorists
busy down there, following the example of Clinton in ex-Jugoslavia, that
started a useless war just to keep the nascent EU busy and divided.

Unluckily he followed Clinton also in the reckless monetary policy
concocted by Greenspan.
 
F

F. Bertolazzi

Jan Panteltje:
Since WW 2 US has invaded more then 44 countries.

Until XVIth century Holland invaded entire continents, trading slaves.
No way, Russia is much more powerful

ROTFL. How? Where? Well, in gas starved Europe it has his way, and in the
Middle East is still sewing war, but, other than that...
Maybe in the long ago past, when you could still reach the moon with German technology,
but these days the only power is the power of the dollar printing presses.
Soon it will cost more in energy to print the dollars than what they can buy in oil.

Geez, you came out straight from a soviet.
Europe has been united many times in the past,
for example the Romans, de Karolingen ( http://nl.wikipedia.org/wiki/Karolingen ), Napoleon.

All empires put together with democratic elections voted by an homogeneous
populace. :D
Just as it fell apart at times, so will the US.

I can't see why in the world.
US already had one civil war.
We all know Texas will go back to Mechico, and Californiaaa will be a kingdom
with king Arnold Schwarzenegger.
Larkin Enterprises will be the biggest company...

Netherlands, the country of free pot...
 
C

Cem Uzunoglu

Does the uC not have an internal timer/oscillator circuit? It's the
best way to go:
http://myweb.msoe.edu/williamstm/Solfeg_Fast.mp3

Heheh, I recorded this song from an 8MHz uC, but the song file was
written for 4MHz. Sounds a little strange, overclocked. The correctly
formatted song file plays in tune at a reasonable tempo, of course.

I have the AVR code used for this player, if that's any help.

Tim

This one is probably implemented with delay's (or if in assembly "nop"
loops), so it is monophonic. I will have to juggle 3 channels of output,
so I'll try to implement it on an interrupt. But thank you for your
offer :)

Cem
 
F

F. Bertolazzi

Cem Uzunoglu:
This one is probably implemented with delay's (or if in assembly "nop"
loops), so it is monophonic. I will have to juggle 3 channels of output,
so I'll try to implement it on an interrupt.

Are you familiar with Atmel's AVR controllers? Even the smallest ones have
at least one 16-bit PWM output. To change note, you simply have to load a
16-bit compare register. Take a look at the $1 ATtiny24 and his USI, that
would allow you to control even more than 3 devices by sending them only
note and duration.
 
T

Tim Williams

F. Bertolazzi said:
Cem Uzunoglu:


Are you familiar with Atmel's AVR controllers? Even the smallest ones
have
at least one 16-bit PWM output. To change note, you simply have to load
a
16-bit compare register. Take a look at the $1 ATtiny24 and his USI,
that
would allow you to control even more than 3 devices by sending them only
note and duration.

Yup! Actually, in my particular use, I was already using the 16 bit
timer, so the tone generator uses one of the 8 bit timers. With
prescaler, it acts more like a 10-16 bit timer, so the pitch accuracy is
still excellent.

The program only interrupts on note changes, so it takes very little
computing power overall.

It is somewhat memory intensive (maybe 1kB/min for typical songs), and
would benefit from a packed music format.

Tim
 
F

F. Bertolazzi

Tim Williams:
Yup! Actually, in my particular use, I was already using the 16 bit
timer, so the tone generator uses one of the 8 bit timers. With
prescaler, it acts more like a 10-16 bit timer, so the pitch accuracy is
still excellent.

Thanks for the useful info.

But I narrowly convinced Cem to use only 7 octaves, and for that interval
16 bit + prescaler may turn out to be barely sufficient.
It is somewhat memory intensive (maybe 1kB/min for typical songs), and
would benefit from a packed music format.

Why? You had only one timer available?
 
T

Tim Williams

F. Bertolazzi said:
Why? You had only one timer available?

Well, it only needs one timer, but more to the point of data, that's
because of the format I chose.

Oops, I lied -- it does "almost" no computing during a note. It does
perform an interrupt and decrement every timer reset. I suppose if you
used two timers, you could remove that as well.

Tim
 
P

Paul Keinanen

Hello all,

What is the simplest VCO that can be done with off-the-shelf components?
It doesn't have to be very fast. Audio range is fine.

If you need a linear sweep from 20 Hz to 20 kHz, the traditional
approach would be to use a 100 kHz crystal oscillator and a VCO with a
tuning range of 100.020 kHz to 120.000 kHz and mix those two
frequencies down and do some low pass filtering.

A more modern approach would be to use a simple processor (PIC etc.)
with 32768 Hz interrupt rate (watch crystal) and using the NCO
principle, generate any frequency between 0 and 16 kHz.
 
F

F. Bertolazzi

Tim Williams:
Oops, I lied -- it does "almost" no computing during a note. It does
perform an interrupt and decrement every timer reset. I suppose if you
used two timers, you could remove that as well.

Right.
 
R

Rich Grise

Tim Williams:


Right.

In the 1970s, I made a little tune player with an 8008. I had two
overlapping timing loops, one for the note, and another for the duration.

It was just rectangular waves, not strictly "tones", but it got the job
done. ;-)

Cheers!
Rich
 
F

F. Bertolazzi

Rich Grise:
In the 1970s, I made a little tune player with an 8008. I had two
overlapping timing loops, one for the note, and another for the duration.

In 1981 I did the same with a Z80, an EPROM and the few parts you can
easily imagine. It fitted in a cigarette pack and played "Lady Jane".
It was just rectangular waves, not strictly "tones", but it got the job
done. ;-)

Mine too: the girl I made it for become my girlfriend.

Seen in retrospect, I should have saved the time & money it took.
After a couple years I found her in bed with another engineer.

Mechanical, moreover.
 
C

Cem Uzunoglu

A more modern approach would be to use a simple processor (PIC etc.)
with 32768 Hz interrupt rate (watch crystal) and using the NCO
principle, generate any frequency between 0 and 16 kHz.

What is special about that interrupt rate?
 
F

F. Bertolazzi

Cem Uzunoglu:
What is special about that interrupt rate?

The crystal is cheap and covers the audible frequency just enough.

Google "numerically controlled oscillator".

With NCO you will also be able, using much more of the otherwise unused
computational resources of the processor and a D/A, to approximate a
sinusoid or any arbitrary waveform (the higher the frequency, the lower the
resolution).
 
R

Rich Grise

Rich Grise:


In 1981 I did the same with a Z80, an EPROM and the few parts you can
easily imagine. It fitted in a cigarette pack and played "Lady Jane".


Mine too: the girl I made it for become my girlfriend.

Seen in retrospect, I should have saved the time & money it took.
After a couple years I found her in bed with another engineer.

Mechanical, moreover.

I programmed my 8008 to do the tune of "Daisy, Daisy", since this
was shortly after the release of "2001: A Space Odyssey." :)

Cheers!
Rich
 
F

F. Bertolazzi

Rich Grise:
I programmed my 8008 to do the tune of "Daisy, Daisy", since this
was shortly after the release of "2001: A Space Odyssey." :)

The retarding version? :D

I just noticed that you referred to the fifth, not the sixth processor
designed by Federico Faggin. Oops, for a second I forgot that Bell invented
the telephone.
 
F

F. Bertolazzi

Vladimir Vassilevsky:
Are you sure that was 8008 not 8080 ?

He said "seventies" and "2001 just released".

But he also did not mention "not readily available".
 
Top