A Useful General Purpose Oscillator.

Anything not specifically related to NBTV, but at least of some technical nature that might be of interest to NBTV members. Items for sale and links to retailers do not belong here.

Moderators: Dave Moll, Steve Anderson

A Useful General Purpose Oscillator.

Postby Steve Anderson » Sun May 31, 2020 3:28 pm

Working with and/or building electronic circuits requires a number of 'tools'. Aside from the usual cutters, soldering irons and so on, more active 'tools' are required. These include a multimeter, power supplies, an oscilloscope...and so it goes on.

A source of basic signals is always handy, just sine and square say. I've been using for years a rather crappy signal generator which really could do with replacing. A decent and moderately accurate signal generator doesn't come cheap. But here's my embryonic idea...

There's a small module available from many internet traders called a HC-SR08. This is a complete sine and square waveform generator which outputs both simultaneously at any frequency between 0.0291Hz and 40MHz in 0.0291Hz increments. The average price is around US$16-20.
HC-SR08.jpg
HC-SR08.jpg (17.12 KiB) Viewed 11721 times

However it needs an interface to translate what you and I can understand to it's logic instructions.

The increment is derived from the crystal oscillator frequency (125MHz) divided by 2^32, or 0.0291Hz. The inverse of 0.0291 is 34.3597..., so if you wanted 1000Hz, multiply that by 34.3597... then fire it at the HC-SR08 module and you'll get 1000Hz out.

Well, actually you won't, it'll be 999.9924Hz as 1000 will not divide by 0.0291 and yield an integer result. The error is -7.6ppm (parts per million) less than 0.001%. I think I can live with that! At the price these are the error in the crystal oscillator frequency is probably greater than that. So here's my draft (or is that daft) idea...

The micro does all the multiplication and translation, ASCII digits in - frequency out, You could use a PC with a terminal program to set the frequency or a keypad that generates ASCII - few of them around though. The micro is in a 14-pin DIP package, so it's no harder to wire up than a 7400.

The sine wave distortion is quoted as -50db (0.3%) at 40MHz and improves at lower frequencies. The reason for the mention of "To LF Generator" is if you need a low-distortion source for testing or designing Hi-Fi gear...I'll probably not bother.

Anyway, more to come in due course...I plan to also compliment this with a True RMS meter. Some multimeters say they they are True RMS, but look at the specs carefully, often they become inaccurate at quite low frequencies, say above 1000Hz. They're primarily designed to just measure 50 or 60Hz, not audio or higher. There are exceptions (some Flukes), but at a price!

Steve A.

PDF for the HC-SR08 attached...
HC-SR08.pdf
(5.91 MiB) Downloaded 388 times
Attachments
AD9850 DDS Frequeny Source 1v04.gif
AD9850 DDS Frequeny Source 1v04.gif (18.48 KiB) Viewed 11721 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Mon Jun 01, 2020 5:01 pm

What would be a useful addition is output buffering or amplification. This would hopefully isolate the HC-SR08 from errant external voltages that could zap it. Something like a 74HC244 for the logic outputs(s) and a separate linear amplifier for the sine wave output(s) allowing level setting. Something to consider in the near future...though the design would be dependent on the frequencies required. For me can't see much requirement for above 10MHz, but that could change...

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Thu Jun 18, 2020 4:56 pm

An initial board layout, it's so simple. Though it doesn't include the output buffering I mentioned before, more to come....notice the amount of green traces, all earth/0V, almost, but not quite a ground-plane...

There is enough space with a bit of shuffling around on this small board that if you wanted to use true RS232 you could add a MAX232 chip along with its four caps...

Better resolution next time...

Steve A.
Attachments
AD9850 DDS Frequeny Source 1v04 board 1.gif
AD9850 DDS Frequeny Source 1v04 board 1.gif (16.44 KiB) Viewed 11627 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Harry Dalek » Thu Jun 18, 2020 9:46 pm

I think this could be used for a replacement for a crystal clock say on your multi system ramp generator if you wanted say the 180 line German system or 240 line baird 405 line i see its uses here very much so . instead of trying to find the right crystal .
Keep on with it Steve interesting
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5363
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Fri Jun 19, 2020 1:12 pm

It's simply an oscillator which you can set to any frequency from 0.0291Hz (one cycle in 34.36 seconds) up to 40MHz, with both sine and square-wave outputs - and their inverse. The sine output is 1.024V p-p (362mV RMS), the square is 5V TTL levels. It can be digitally FM modulated up to several MHz if using the parallel interface, somewhat less if using the serial input as here. Also phase modulation, but only 32 phase settings (11.25 degrees per step). Neither of which I intend to use here.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Fri Jun 19, 2020 2:52 pm

Harry Dalek wrote:I think this could be used for a replacement for a crystal clock say on your multi system ramp generator...

Yep it sure could. It would eliminate all of those dividers, the switching and you wouldn't be limited to integer divisions of the crystal frequency. By using the internal EEPROM of the micro you could store frequently used frequencies and recall them when needed. They can be changed anytime you wish...I'll look into this...with this micro you could store 64 frequencies in the EEPROM as well as having the external control to set any frequency you need.

At the moment I'm only thinking of using this for integer frequencies, the lowest being 1Hz, then 2Hz, 3Hz, 4Hz and so on...at very low frequencies it's absolute accuracy is limited to the 0.0291Hz increment value, so you couldn't get 12.5Hz (the NBTV frame rate) out of it[1], but if you used 125Hz and divided that by 10 with half a 7490 you'd get your 12.5Hz. Or 1250Hz and divide by 100 using the whole 7490. You could even build-in the 7490 into the device to permanently provide LF signal with a resolution of 0.01Hz. Of course the logic output only, not the sine-wave.

[1] But it would still be within 0.13% if the absolute accuracy were used. I will (in time) look at implementing fractional Hertz frequencies.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Harry Dalek » Fri Jun 19, 2020 5:43 pm

You could pretty much have every line rate used last Century i don't think there were 64 of them ,with the right CRT could have a 20th century monitor that did them all and rest what you pick your self .
I suppose some thing to think about ...even your ramp generator as is built could use it ,i didn't think of you could also do away with the 4040s i can see it would cut down on the wiring if so .
And also do away with syncing on a monitor altogether with a programmable clock if you could tweak the frequency to the hz ..
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5363
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Fri Jun 19, 2020 6:04 pm

Harry Dalek wrote:You could pretty much have every line rate used last Century i don't think there were 64 of them...

Well, it could be anything you want, even nothing to do with NBTV, the 625 line frequency at 15.625kHz for example, anything...the 405 line frequency at 10.125kHz...if +/-0.0291Hz is accurate enough up to 40MHz, here it is...
Harry Dalek wrote:...And also do away with syncing on a monitor altogether with a programmable clock if you could tweak the frequency to the hz ..

I did make a monitor some years ago (2008) which only had a frame sync, no line sync...it worked well. In both 48 and 72 line formats...pdf attached...not sure if it ever got published...today I would simplify it rather than using monostables and the like...

There is a related chip to the AD9850 (the Si5351A) which can output three totally independent frequencies (not related at all to each other) up to 200MHz with just 10 pins, but its lowest frequency is around 3500Hz, but that could be externally divided down if need be. Though there's no sine-wave output. It can also be GPS disciplined yielding incredible accuracy (atomic standard) if you need it. Somehow I doubt that here...you also lose one output with GPS disciplining.

Steve A.
Attachments
PWM CRT mon 3.pdf
(1.43 MiB) Downloaded 401 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Harry Dalek » Sat Jun 20, 2020 10:11 pm

No i have not seen that one before Steve The power supply is most of interest for the dg7 32 tube once i get around to trying that one . All very nice and explained circuit thanks for posting !.
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5363
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Sun Jun 21, 2020 12:35 pm

There's probably a few other items I put together that may not have been published for some reason. I'll have a dig around and see what I can find. Some I may have only sent to the NBTVA, some only to the BATC, and some to both. I guess I should have kept a record of who I sent what, and if they were published.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Harry Dalek » Sun Jun 21, 2020 7:41 pm

Steve Anderson wrote:There's probably a few other items I put together that may not have been published for some reason. I'll have a dig around and see what I can find. Some I may have only sent to the NBTVA, some only to the BATC, and some to both. I guess I should have kept a record of who I sent what, and if they were published.

Steve A.

Yes it's for sure of interest my end sure others as well i'm sure , if any thing those that are interested in this sort of thing would find this very useful and here's a good place to put what ever you find so please do .
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5363
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Mon Jun 22, 2020 2:52 pm

OK, I'll have a rummage around in my hard drives when I can, you never know what may turn up!

Thinking on this oscillator further, it's possible to add a standard 12-key keypad that has the usual 0-9 digits, "#" and "*" for front-panel frequency entry. Though this would require a micro with more I/O pins than the 14-pin PIC16F688. It would probably have to be a 28-pin device, though a 20-pin micro is a possibility, say a PIC16F690.

Steve A.
Attachments
4X3-FIXSIZE.jpg
4X3-FIXSIZE.jpg (23.02 KiB) Viewed 11552 times
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Harry Dalek » Mon Jun 22, 2020 4:27 pm

Steve Anderson wrote:OK, I'll have a rummage around in my hard drives when I can, you never know what may turn up!

Thinking on this oscillator further, it's possible to add a standard 12-key keypad that has the usual 0-9 digits, "#" and "*" for front-panel frequency entry. Though this would require a micro with more I/O pins than the 14-pin PIC16F688. It would probably have to be a 28-pin device, though a 20-pin micro is a possibility, say a PIC16F690.

Steve A.



I was wondering how you could program it thought well that would be a PC but i didn't think how do you change the frequency programmed on the chip ,the little keypad is a good idea for this ....i would of thought this part of it would been a kit out there as well to connect to to the oscillator sounds like it needs to be built from parts ..i am watching with interest a clock you can program at those frequencies is pretty good for what ever idea you have for it ..me its more the monitor side of things.
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5363
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: A Useful General Purpose Oscillator.

Postby Steve Anderson » Tue Jun 23, 2020 1:16 pm

My initial thought was to select the output frequency via a PC, but it is a bit cumbersome. Adding the keypad makes it a stand-alone instrument though I'll keep the PC connection for when it's required. That way you could do an automated frequency response check for example.

With just the keypad there's no indication that you've entered the correct digits, i.e. it has no display. One could be added but it increases the complexity, I'll think on it...I guess it could be optional.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5357
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: A Useful General Purpose Oscillator.

Postby Andrew Davie » Tue Jun 23, 2020 4:20 pm

Steve Anderson wrote:My initial thought was to select the output frequency via a PC, but it is a bit cumbersome. Adding the keypad makes it a stand-alone instrument though I'll keep the PC connection for when it's required. That way you could do an automated frequency response check for example.

With just the keypad there's no indication that you've entered the correct digits, i.e. it has no display. One could be added but it increases the complexity, I'll think on it...I guess it could be optional.

Steve A.



There are quite a few arduino implementations of keypad + display. Very simple and cheap.
Me, I'd go with that instead of a PIC, as I'd have to think less ;)
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Next

Return to Off Topic

Who is online

Users browsing this forum: No registered users and 3 guests