6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 10:29 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Fri Feb 03, 2012 3:23 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Hello!

Since i got my Eico signal generator, i made myself a device that can make clock signal out of the generators sine signal, but since the device is kinda old(100% vacuum tubes) the scale is not exactly precise so i would like to build a device that would act as a frequency counter. My idea was to make a low frequency clock using a 32.768kHz crystal and a counter which would count how many ticks there are in one low ferq. period... The low freq. signal could be 1Hz, but then if i measure 1MHz, i couldn't get a precise count since the 32.768kHz crystal is not precise(in my pic based clock project i used the crystal, but i noticed that it would gain 10 secods per day! So i had to implement a software patch that would wait half a second at the begginig of each hour for the first 21 hours). I could always approximate the frequency count but i would like to have it as precise as possible. As for the cpu i could use a 6502 in combination with a riot chip, or it would be just easier to use the Atmega8 controller... As for the display i have some fancy low voltage VFD tubes that i bought from ebay last summer.
Any suggestions how to get a precise count?
Anyway the device would be used for sbc prototyping..


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 03, 2012 5:09 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
My tip #18 in the Tip of the Day column is about using a 6522's T2 counting external pulses on PB6 for a frequency counter. T1 will be the time reference, using the φ2 frequency. If the input frequency is too high, divide it down first with an external logic IC. I don't know if it will give enough digits of precision for what you want, and of course your φ2 frequency would have to be known to be adequately accurate and stable; but it's a cheap and easy way to get a counter by doing very little extra with computer hardware you may already have. Tips #4, 11, 17, and 21 are also about using T1. (Do note that there's a trick about getting it going in free-run mode that's covered there.)


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 03, 2012 7:35 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Dajgoro wrote:
my Eico signal generator [...] the scale is not exactly precise

Bear in mind there are two issues to deal with: the accuracy of the Eico scale, of course; but also the Eico's stability.

Adding a frequency counter is a good idea, but striving to make the frequency counter extraordinarily accurate might be a misdirected effort. To some extent the Eico's frequency will vary even when you're not adjusting it; no signal generator is entirely free of drift (instability). In the case of an old, tube-type unit the drift is likely to be considerable. So it's not much use to adjust the Eico extremely accurately because the adjustment is a moving target; it'll constantly need tweaking.

Issues of accuracy and stability apply to both instruments -- the Eico you're observing, and the frequency counter you're using to do the observation. But any crystal-controlled reference probably has far, far better performance than your venerable but ancient Eico. (For best results you should leave it powered up at all times -- or at least for several hours prior to use).

-- Jeff


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 03, 2012 7:54 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
As for the Eico stability, it is not that the instability is caused only due to its electronics, but also the mechanical part, if there are vibrations, the scale also vibrates, and in some cases it shifts slightly. I once took my 12V hand drill, hooked it to the amplifier and i left the drill on the generator, i took an old transistor radio, and tuned with the frequency that the generator was generating in the fm band, and i could actually hear distorted music.
The vibration would shift the variable capacitors plates, and by doing that it would modulate the frequency...
Anyway i would not use the counter just to adjust the generator, but also for other uses, i could use it to count lots of other signals present on the sbc...
Could it be possible to somehow use more that one crystal in the resonator circuit, so that i get the average frequency, which would hopefully be more precise? Or maybe rig some sort of heater to keep the crystal to a constant temperature, or something like that?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 03, 2012 8:13 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
LOL!! You hooked up your drill to your stereo, as if it were a loudspeaker!? I love it! When I was a teenager I used to do off-the-wall stuff like that... :roll:

Quote:
Could it be possible to somehow use more that one crystal in the resonator circuit, so that i get the average frequency, which would hopefully be more precise? Or maybe rig some sort of heater to keep the crystal to a constant temperature, or something like that?

Here again there's a limit to how much accuracy will actually be useful. I suspect you would do very well simply to get one of the little packaged crystal oscillators commonly found on motherboards and video cards. These have better accuracy and stability than a discrete crystal hooked up to an oscillator you've built yourself. (But with a discrete crystal oscillator you can fine-tune the frequency within a tiny margin by adding a trim-cap. This won't cure any stability issues of course. But as a clock it could be adjusted to keep good time, assuming voltage and temperature are constant -- and no electric drills are nearby!)

-- Jeff


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 03, 2012 8:36 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
My Heathkit IM-2420 frequency counter
Image
has a crystal oven to keep the crystal (and the entire crystal oscillator) at something like 80°C, and even if you turn it "off" it's really in standby and not totally off, so you don't have to wait for hours for the crystal to get back to stability again when you turn it on. There is a tiny variable capacitor in the oscillator circuit that lets you adjust the frequency. I put an antenna on the jack on the rear which can serve as an external clock input or to export the internal clock frequency, switch-selectable, then tuned a nearby radio to 10MHz WWV and adjusted to where I got one cycle of beating every two seconds, for 0.2ppm accuracy, which is about one second every two months. However for the kind of work you want to do, I think I would just order an integrated crystal oscillator can with adequate spec.s, as Dr. Jefyll suggests.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 03, 2012 4:18 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
What about this oscillators:
http://www.ebay.com/itm/2x-MICRO-CRYSTAL-Crystals-Oscillators-32-768KHZ-SMD-m-/320715283835?pt=LH_DefaultDomain_0&hash=item4aac1edd7b


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 03, 2012 4:48 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Wow, this eBay seller seems to have little idea of what he has. It took me several tries with different search terms to find that it's made my Epson and it's just a crystal, not an oscillator. There apparently is no company called "SMicro Crystal." The Epson page on it at http://www.epsontoyocom.co.jp/english/p ... t01/mc306/ says the tolerance is +/-20ppm or 50ppm which is four seconds per day. The data sheet at http://www.epsondevice.com/docs/qd/en/D ... d=ID000663 (.pdf) says it's a crystal, not a whole oscillator.

What distributors do you have access to? Maybe we can help you find the right part from a reputable supplier.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 03, 2012 8:09 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
I am able to purchase anything online that requires Paypal, or card, and that it ships to Croatia. But if shipping costs are skyrocketing as it is usually with supplies, then i give up.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Feb 14, 2012 6:29 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
What if i just used a 20 or 16 MHz crystal instead of a 32,768KHz?
Should it be then more accurate to count frequencies up to 10MHz?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 17, 2012 4:22 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
The precision will depend on how long you count; so with either reference frequency, if you count for one second for example, you can get 1Hz precision. The accuracy will depend on the accuracy of your reference frequency, measured in parts per million (ppm), and it is independent of the frequency. That's where you'll do better buying a complete crystal oscillator. If you start with just a crystal, you may not get quite the right frequency if you don't load it correctly, and especially if you're not using it in its intended mode. It would be good if you can take it to school or work or someplace where there's a calibrated frequency counter to calibrate it against. Or in the case of a 10MHz or 20MHz (or other WWV frequency) crystal and a receiver that can receive WWV, you might be able to adjust the oscillator to slow and virtually stop the beating heard on the nearby receiver tuned to WWV. Otherwise, good oscillator design gets kind of heavy in the math; so although I can make oscillators all day, I prefer to buy ready-made ones if the operation is critical.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Feb 17, 2012 1:47 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
I do have a 27MHz oscillator taken from a old agp graphic card, but i can't find any info on it... CO-25B 27.000 NKG K4


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: