-
Frequency counting on the cheap.
Posted by
Codebird
on 09 Aug, 2017 07:58
-
I have recently been given an old FT101 radio tranceiver to fix up. It's mostly working, but as it does date from the 70s and the self-calibration helper is all over the place, I suspect it might be a tad off on tuning. To address this I wish to measure the frequency of every crystal and of the VFO across the full range and adjust all the trimmers back to spec. All signals to be measured are sines up to 30MHz.
I could do this if I had a frequency counter, and I could get one for £70. Not a high-end one, but a good-enough one. But I don't want to spend that much for a one-off task. I have a signal generator, but it's a cheap one and I don't trust it to be really accurate.
So, alternate plan: I got a cheap OCXO 10MHz frequency reference module, square wave output. My plan is to take my signal to be measured, square it off, run it through a divider chip (32/1 at least), then use an arduino to count pulses. Clock the arduino off the OCXO, use it's internal counter to divide the clock down to get a gate timer and call the interrupt. Alternate the gate periods between counting and writing the output to a display (serial won't work off a non-stock clock), so that the time spent outputing doesn't subtract from time spent counting.
Three chips (comparator/buffer, divider, arduino), handful of resistors and capacitors, that's it. So, experts here, tell me: Will this work? I already have everything except the OCXO, and I found one of those on ebay for £15.
-
-
Or you could go even cruder and cheaper. Find a cheap 3.58 MHz crystal and build a one transistor crystal oscillator. It should be within 1 kHz of 3.579 MHz. If the receiver is working you'll be able to hear the fundamental on 80m and harmonics on 40, 20, 15 and 10m. This can be cross-checked against the nearest point generated by the internal 100 kHz crystal calibrator (ie 3.58 should be 20 kHz below, 7.16 40 kHz below, 14.32 20 kHz above, 21.48 20 kHz below, 28.64 40 kHz above etc).
-
#2 Reply
Posted by
MosherIV
on 09 Aug, 2017 10:19
-
Hi, I am no expert in time metrology but the general consensus is that to meaure freq with confidence - you need something that will has 10 times more resolution than the thing you are measuring.
So, alternate plan: I got a cheap OCXO 10MHz frequency reference module, square wave output. My plan is to take my signal to be measured, square it off, run it through a divider chip (32/1 at least), then use an arduino to count pulses. Clock the arduino off the OCXO, use it's internal counter to divide the clock down to get a gate timer and call the interrupt. Alternate the gate periods between counting and writing the output to a display (serial won't work off a non-stock clock), so that the time spent outputing doesn't subtract from time spent counting.
1st - unless the OCXO is calibrated - it may not be exactly 10MHz.
2nd - counter/timer peripherals run independantly of the processor core, ie you should not need to do any adjustment for the ISR code. The counter should be able to latch the count value which the ISR can just read out.
3rd - you are starting with all unknowns, so how do you expect to measure with any confidence?
I am not a radio ham but when looking into GPSDOs I came accross radio ham stuff about broadcast of standard reference freq. They said that you can use them to compare with unknow freq with oscilloscope in XY mode, produces lisajou figures. If the freq is stable, the pattern is static. If the freq is moving the figure rotates. The pattern/angle is an indication of one freq to the other.
I mentioned GPSDO - GPS dissiplined Oscillator.
You could just used the 1PPS output of a GPS module as a gate to a ardunio counter, bear in mind that the 1PPS from GPS can have jitter - make sure the jitter is < 20ns.
Hope this helps
-
#3 Reply
Posted by
Ian.M
on 09 Aug, 2017 11:00
-
Many Microchip PIC18 parts can count external inputs up to 50MHz with up to 24 bit resolution in hardware. Add a D type flipflop to act as a /2 to guarantee a squarewave to meet the duty cycle requirements of the PIC for 50MHz in, and a good enough master clock source for the PIC and you can build a 7 digit frequency counter that's good up to 100MHz. It will be nearly as accurate as your clock source +/- 1 count in the last digit.
The ATmega328P used in most entry level Arduinos is less well suited to this - the 16 bit timer module doesn't have a prescaler for the external clock input (you get the low 8 bits of the 24 bit count on the PIC by clocking through what's left in the 8 bit prescaler one pulse at a time till its Timer 0 LSB flips) and the maximum input frequency for T1 is much much lower. On an Arduino you aren't going to be able to even reach double digit MHz without an external prescaler - not to mention you need to rip out that sh!tty ceramic resonator and replace it with at worst a really high quality crystal oscillator and ideally a GPS disciplined rubidium clock source.
There's an Atmel appnote that's worth a look:
AVR205: Frequency Measurement Made Easy with Atmel tinyAVR and Atmel megaAVR
-
#4 Reply
Posted by
VK5RC
on 09 Aug, 2017 11:12
-
If you are a Ham, how about your local radio club- I am sure for a few beers etc their will be a helpful member with a nice freq counter and generator
Esp for a classic FT101 (I have two!),
Do you know about the FoxTango group?
-
#5 Reply
Posted by
Kleinstein
on 09 Aug, 2017 14:07
-
The direct counting method is ok for a rather high input frequency. The resolution is limited to 1 over gate time. So one usually would avoid dividing the signal first, as this reduces the resolution.
Especially for lower frequencies one can get a better resolution form so called reciprocal counting. This can also be done with many µCs, like the Arduino, PIC18, STM32... . It usually needs the frequency to be divided down to something like less than 100 kHz (with no penalty on Resolution).
-
#6 Reply
Posted by
carl_lab
on 09 Aug, 2017 14:55
-
-
#7 Reply
Posted by
bd139
on 09 Aug, 2017 15:09
-
I built one of these for under £20:
http://www.hamradio.in/circuits/freq_counter_lcd.php. Parts from bitsbox.co.uk as they were dirt cheap.
The input is good to 35MHz even if it is a bit shit (could do with a FET follower)
It's great for radio work as it does IF offset calculation on the fly. Perfectly accurate for most alignment tasks.
You can't use the OCXO inside it as the frequency is 4MHz but you can connect the OCXO to the input and then trim the internal crystal so it reads the OCXO frequency accurately.
I have more cash now so I replaced mine with an HP5315A which I just got rid of and am replacing with the counter on a DG1022Z generator with a GPSDO reference.
-
#8 Reply
Posted by
CJay
on 09 Aug, 2017 15:16
-
-
#9 Reply
Posted by
bd139
on 09 Aug, 2017 15:19
-
That's a pretty good deal. I'm going to buy one just to play with
-
#10 Reply
Posted by
CJay
on 09 Aug, 2017 15:32
-
Dig out the manual, there's lots of bits you can configure, dual selectable IF offsets, display brightness, number of digits etc. I've had a few of them now and built them into things because they're so cheap.
-
#11 Reply
Posted by
bd139
on 09 Aug, 2017 15:40
-
-
#12 Reply
Posted by
Codebird
on 10 Aug, 2017 06:41
-
I've seen those low-cost counters with the LED display, but without a good brand or documentation I was not inclined to trust them.
I do have a DDS signal generator. My plan currently is to use the OCXO - which, even uncalibrated, is still going to be a better reference than the bog-standard crystal that uses - to calculate the appropriate correction factor for that, then use it as a reference for checking the tuning of the radio.
The radio is mostly fixed now. AM mode is completely dead, VFO is out of tune, controls need cleaning to fix crackling issues, and the clarifier just will not trim at all. But other than that, it works. Not tested transmit yet, waiting for dummy load, and I need to work out some legal mess - I can't use it as-is on a foundation license because the output in SSB is far too high, but I don't know if I can modify it for adjustable output on a foundation either. Might have to wait until I get the intermediate.
-
#13 Reply
Posted by
bd139
on 10 Aug, 2017 07:49
-
Makes sense.
I must do the license at some point. Need to find someone local who will let me just do the tests as it's pretty easy and I just want to tick the boxes, not get the whole social experience and club thing with it. The whole point of building radios is so you don't have to go somewhere to talk to someone
-
#14 Reply
Posted by
Codebird
on 10 Aug, 2017 08:59
-
The FT-101 is a bit of a problem for a foundation user. I'm going to fix it up regardless. The problem is power: It doesn't let you turn the output down on SSB mode. It's either off, or max power, which is more than ten times my license limit. I do know it can be modded for lower power operation by repurposing the AGC circuit quite easily, but the foundation license also has some rather vague limits. It says I can only use commercially available equipment, but it doesn't say anything about how far I am allowed to go in modifying that equipment.
I also still await the dummy load so I can assess the transmit side of it - if that isn't properly set up, it'll be spewing noise all over the place. Valve circuits, fun! And I can't work out why the 600V rail is currently 680V. Just a bit off.
This is turning into quite the project.
-
#15 Reply
Posted by
CJay
on 10 Aug, 2017 08:59
-
I doubt you'll find anywhere that offers exam alone, I tried and failed but the course is trivial and if you find a friendly club then it's actually quite fun (don't bother with Stockport ARC, they're distinctly unfriendly and accused me of wanting to cheat).
The main reason is that there's a practical element to it, you need to be able to demonstrate you can use a radio and make a contact as well as a couple of other hands on bits, there's a 'Morse appreciation' session too, no panic about being able to read and send but you should be able to copy down Morse and transcribe it later, they may ask you to send as well but it's trivially simple as they provide a Morse alphabet and Morse 'tree'.
The course I've just done consisted of two, two hour sessions and was very informal, if you've got Foundation Now then you'll know how simple it is, if you haven't then my copy will be going spare after my Foundation test (first weekend of September) and you're welcome to it for P&P if you'd like it.
Intermediate course starts later this year and I'm hoping to have that by the end of the year too so I can build my own kit.
Back on to the topic of the thread though, if anyone finds the 'hex' firmware for the SanJian PL-6 or PL-8 (it's hinted at being available in the HelloCQ links in the manual but they're dead) I'd really like a copy as I managed to trash one of mine, I know they're probably too cheap to mess about with but I don't like to throw out something that would work perfectly if only I could give it a 30 second 'flash'.
-
#16 Reply
Posted by
bd139
on 10 Aug, 2017 09:17
-
I've got Foundation Now sitting here and have done the mock tests on RSGB. I haven't approached my local club (yet). My experience so far is from a club night I was invited to from an old friend. I got there, found it most unfriendly, slightly drunk and rowdy and no sign of any of them using a soldering iron for the last 30 years anyway. I actually was told "why bother when you can buy something for £3k that does it all for you". Hmm. I've built three receivers so I'm not exactly a novice in that department. I'll open another thread for this however and get back on topic
-
-
I've calibrated from our WWVB 60 kHz signal, but you need to build a simple TRF receiver and, ideally, lock a higher frequency oscillator to it. You can probably get MSF, which is good to 2 parts in 10^12. With many counters it's easy to put a short antenna on the 10 MHz clock, then listen for the beat on a shortwave radio with WWV at certain times of the day when it can be received. I know WWV can be received in the Uk, though no idea when or how well. BTW, the "antenna" will be short, usually 1-2" of wire off the BNC, so the signal doesn't overwhelm the WWV signal. Put the shortwave 3-10' away.
-
#18 Reply
Posted by
cdev
on 09 Oct, 2017 21:03
-
I am thinking about getting one of the PIC based counters....
Posted a question, then saw the other posts.. Looks like I am going to get one.
-
#19 Reply
Posted by
cdev
on 09 Oct, 2017 21:18
-
Can you tap the signal chain between the exciter and final amplifier, maybe adding a QRP matching circuit based on a tuned circuit that will roll off higher frequencies in case thats what the final tank circuit was required to do.
You could then likely simply turn the power to the final off.
The FT101 series are all solid state except for the final amplifier.
---
It depends a lot on how the law is written. If the law is based on output power, in theory you could use audio limiting - really aggressive audio limiting.. and like you say, changes to the AGC.. But if the law is based on other parameters - power to the final stage might be based on the rig's capacity. In that case I wouldn't feel safe as long as the final remained on.
Hopefully you will get the more advanced license soon too.
---
Thinking about this, I think that if the law is in any way ambiguous, you could do a lot worse than to call them up and ask them. (your regulatory agency)
Cover your ass as they say.
Better safe than sorry.
The FT-101 is a bit of a problem for a foundation user. I'm going to fix it up regardless. The problem is power: It doesn't let you turn the output down on SSB mode. It's either off, or max power, which is more than ten times my license limit. I do know it can be modded for lower power operation by repurposing the AGC circuit quite easily, but the foundation license also has some rather vague limits. It says I can only use commercially available equipment, but it doesn't say anything about how far I am allowed to go in modifying that equipment.
I also still await the dummy load so I can assess the transmit side of it - if that isn't properly set up, it'll be spewing noise all over the place. Valve circuits, fun! And I can't work out why the 600V rail is currently 680V. Just a bit off.
This is turning into quite the project.
Look at the bright side.. You have your rig, and its a good one..
Its got tons of information out there on it including the service manuals..
Should you need to make a modification, its likely not a major one. You likely already have the SSB signal available somewhere.
You know there is a Yaesu list.. I forget whether its on Yahoo or Google Groups but its fairly active.
Guaranteed they likely have dealt with this issue.