TheRadioBoard

Forum for the homemade radio builder. Newbies and Experts and everyone else are welcome here!
It is currently Thu Jul 24, 2014 12:15 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Oct 17, 2012 2:08 pm 
Offline

Joined: Sun Feb 28, 2010 2:12 pm
Posts: 1455
I'm interested in building a frequency counter circuit that allows me to remember a particular frequency and to indicate how much the oscillator has drifted from that frequency, for a sort of manual huff-and-puff approach. I imagine operation would be something like: tune oscillator to desired frequency and press the "memory" key. After that, the counter remembers the current frequency and changes to display +0 Hz. If the oscillator drifts up 100 Hz, the display would show +100 Hz, to allow the operator to manually pull it back down to +0 Hz.

I've seen some PIC frequency counter circuits and program code that maybe could be modified, but I have no experience with PIC programming or circuits, so I don't know what to look for in such circuits. Does anyone have a suggestion for an applicable and easy circuit (PIC-based or otherwise) that could be made to work as described above?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 17, 2012 8:37 pm 
Offline

Joined: Tue Mar 06, 2012 5:40 pm
Posts: 98
As someone who grew programming in asm on the glorious Motorola 68K, I find PIC asm plain terrible to learn and use.
I believe the frequency counter below is one of the few written in C and still capable of measuring frequencies up to some megahertz.
http://www.enide.net/webcms/index.php?p ... freq-meter
That code should be easy to modify in order to get the functions you need.

All other PIC based freq counters I could find so far are either slow (hundreds of KHz max) or asm coded and hard to modify.
A different approach to ease programming on the uC side would imply some fast external counter or programmable logic chip that leaves the critical work out of the uC. So far I could not find anything that does the job of a chain of 74xxx counters in a single chip i2c addressable counter, and sadly know nothing about programmable logic.

Hope the link helps.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2012 12:13 am 
Offline

Joined: Sat Mar 14, 2009 11:22 pm
Posts: 16
Location: Fort Worth, TX
Hi qrp gaijin

I have had good luck with the inexpensive frequency counter boards from ebay seller sunillakhani. These boards do not have a memory function but would let you manually compare original and drifted frequencies. There are two versions. The simpler one does NOT provide 100Hz resolution above 10MHz.

I use one of these boards as a general purpose frequency counter and with a homebrew shortwave regen receiver. I use another with an old Hammarlund receiver. DXing is a lot more fun with an accurate readout. My ancient BC-221 frequency meter is feeling neglected.

The FLL (frequency lock loop) version provides voltage output for a varactor huff and puff circuit (parts not included). It has a promised +/-7.5Hz lock but I have not tried this function yet. I have found that a simple FET source-follower buffer circuit between an oscillator and the counter is needed in some applications, particularly to prevent noise injection into the receiver.

These boards are available as kits or wired for a few dollars more. Shipping from India to the USA is a bit slow--over two weeks. I have no connection with nor have I communicated with this seller, so research carefully if you should decide to buy.

Good luck with your frequency memory project and tell us more about it. I enjoy reading your posts and I am following your large-element loop project.

Steve


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 28, 2012 11:27 pm 
Offline

Joined: Sun Jul 15, 2007 2:28 pm
Posts: 569
Location: Akershus, Norway
6gv5 wrote:
All other PIC based freq counters I could find so far are either slow (hundreds of KHz max) or asm coded and hard to modify.

I'm probably misunderstand something, but I can't figure out what you really wrote there, because even a simple pic counter reaches several tenths of megahertz before it wimps out. it will count as fast as the internal logic allows it to. Is it real time counting you mean?

Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 29, 2012 1:23 am 
Offline

Joined: Sun Apr 08, 2007 8:02 am
Posts: 1448
Location: Saskatoon
As someone who grew up programming a DEC PDP-8e, I'm right at home programming PICs. :P

The architecture is remarkably similar, and I suspect that the designers at Microchip had more than just a rudimentary knowledge of the PDP-8.

I agree that assembly language isn't everyone's cup of tea, but you can rely on a library of existing code that is readily available. For example Microchip Application Note 592 gives a circuit and complete program code for an autoranging 50 MHz frequency counter:

http://ww1.microchip.com/downloads/en/A ... 00592d.pdf

I used a simplified version of this code when I built my Nixie digital dial. I included additional code to subtract the IF offset.
http://theradioboard.com/rb/viewtopic.php?t=734
http://theradioboard.com/rb/viewtopic.php?t=2264


Top
 Profile  
 
 Post subject: Eureaka!
PostPosted: Thu Nov 08, 2012 11:01 am 
Offline

Joined: Sun Feb 28, 2010 2:12 pm
Posts: 1455
Eureaka! I've got it! I have found the ideal frequency counter solution for my particular situation.

I have a TI DSP unit, the C5535 eZdsp development kit. It has a nice glow-in-the-dark LED display (able to show 2 lines of text, approximately 96x16 pixels I think) and is programmable in C. It has stereo in and stereo out.

Now, if only we could make a frequency counter that outputs some sort of audio signal, and if I could get the eZdsp to read that audio signal and convert it back to a digital display, I'd have a nice little stand-alone, glow-in-the-dark frequency counter that's programmable in C and can support all the features I need like IF offset or a memory function and drift indicator.

So, how to make a frequency counter that outputs decodable audio? My synapses were crackling as I considered crazy schemes like a binary frequency counter that fed its binary output into a parallel-to-serial chip, that then would be clocked by a signal from the eZdsp and would in turn generate a series of audio tones indicating the state of each bit, audio tones that would then need to be decoded in software... complicated, but not impossible.

Then I suddenly remembered seeing a recent PA2OHH page that described a soundcard-based frequency counter:

http://www.qsl.net/pa2ohh/11freqcnt1.htm

This uses a pre-scaler to divide the RF frequency to create an AF signal, which is then measured in software and multiplied by the previous division factor to reconstruct the original RF frequency. Brilliant!

The PA2OHH idea provides the last piece of the puzzle. If the idea works on a PC, it must work on the DSP unit as well. And, since the DSP has stereo microphone inputs, I can use one audio channel for the frequency counter, and one audio channel for signal processing of the receiver audio! Woo-hoo! A frequency counter and DSP in one small box.

Can't wait to start.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 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:  
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maël Soucaze.