I started a new thread based on a comment by Gilles on Doug's talking FS-4A thread.
YES, the frequency counter in my FS-4B is less than desirable.? This is due to the ceramic resonator that is the time base on the cheap Arduino Nano boards. The resonator has quite a warm up drift but after its temperature is fully warmed, it is "pretty" stable.? Since a counter needs a stable gate signal, this is a problem.
I found that you can provide an external clock signal to the Nano board rather simply.? See attached photo. If you lift the two ATMega pins on the corner and solder a fine jumper to the second pin, you can supply an external 16MHz clock without an changes to the fuses or Arduino code.? 0-3.3V or 0-5V squarewave is what you want to apply.? To get accurate frequency counting, it needs to be exactly 16.0000MHz and stable.
I was able to find a small $3.50USD clock chip at Mouser with temp compensation AND a voltage controlled freq trim pin.? Unfortunately they don't have these anymore and I haven't been able to find them anywhere else.? You could make your own with a crystal and a trimmer cap... maybe use a logic gate oscillator or a transistor? Maybe you can bring out two jumpers and get the ATMega into crystal oscillator mode by itself?
My workaround was a "calibrate" mode in the FS-5B code.. not ideal but after warmup it works pretty well.
I have also been looking for? a substitute for the Nano.? I thought I found it in the STM32 boards which have a crystal, are very advanced over the ATMega but unfortunately their software includes the FreeRTOS real time operating system with random interrupts to look for task switching.? The frequency counter works great most of the time until the random interrupt corrupts... bummer.? Nobody seems to know how to shut down the RTOS... especially me. NOTE: the Nano did have a similar problem with the millisecond counter interrupting but I did figure out how to stop that during freq counts. If anyone knows a good cheap little computer board like the Nano but with a crystal and available freq counter code, let me know.
My FS-5 in both my R-4B (frankenstein!) and T-4XB have great stable counters using Nanos, so it is possible. 73, Gary WB6OGD
|
I wonder if the Nano could run at some other frequency?? I suppose it could invalidate some of the timing functions but, other than that, I wonder if it would work with some other, more common(?), clock.
Thanks, Barry - N4BUQ
toggle quoted message
Show quoted text
From: "GARY WINBLAD" <garywinblad@...> To: "DRAKE-RADIO" <[email protected]> Sent: Saturday, May 13, 2023 3:49:57 PM Subject: [DRAKE-RADIO] FS-4B (with frequency counter)
I started a new thread based on a comment by Gilles on Doug's talking FS-4A thread.
YES, the frequency counter in my FS-4B is less than desirable.? This is due to the ceramic resonator that is the time base on the cheap Arduino Nano boards. The resonator has quite a warm up drift but after its temperature is fully warmed, it is "pretty" stable.? Since a counter needs a stable gate signal, this is a problem.
I found that you can provide an external clock signal to the Nano board rather simply.? See attached photo. If you lift the two ATMega pins on the corner and solder a fine jumper to the second pin, you can supply an external 16MHz clock without an changes to the fuses or Arduino code.? 0-3.3V or 0-5V squarewave is what you want to apply.? To get accurate frequency counting, it needs to be exactly 16.0000MHz and stable.
I was able to find a small $3.50USD clock chip at Mouser with temp compensation AND a voltage controlled freq trim pin.? Unfortunately they don't have these anymore and I haven't been able to find them anywhere else.? You could make your own with a crystal and a trimmer cap... maybe use a logic gate oscillator or a transistor? Maybe you can bring out two jumpers and get the ATMega into crystal oscillator mode by itself?
My workaround was a "calibrate" mode in the FS-5B code.. not ideal but after warmup it works pretty well.
I have also been looking for? a substitute for the Nano.? I thought I found it in the STM32 boards which have a crystal, are very advanced over the ATMega but unfortunately their software includes the FreeRTOS real time operating system with random interrupts to look for task switching.? The frequency counter works great most of the time until the random interrupt corrupts... bummer.? Nobody seems to know how to shut down the RTOS... especially me. NOTE: the Nano did have a similar problem with the millisecond counter interrupting but I did figure out how to stop that during freq counts. If anyone knows a good cheap little computer board like the Nano but with a crystal and available freq counter code, let me know.
My FS-5 in both my R-4B (frankenstein!) and T-4XB have great stable counters using Nanos, so it is possible. 73, Gary WB6OGD
|
Barry,
I have thought about that...
They can run up to 20MHz but you have to burn in another bootloader so you can still load over
USB.? Might not be that hard but my eyes started glazing over a few years ago when I looked
into it.
It would be better to run at 20MHz (or something faster than 16) so the freq counter could count
higher, at 16MHz it is limited to about 6.4MHz as I recall...
73,
Gary
WB6OGD
?
toggle quoted message
Show quoted text
On 05/13/2023 3:44 PM PDT n4buq <n4buq@...> wrote:
?
?
I wonder if the Nano could run at some other frequency?? I suppose it could invalidate some of the timing functions but, other than that, I wonder if it would work with some other, more common(?), clock.
?
Thanks,
Barry - N4BUQ
?
From: "GARY WINBLAD" <garywinblad@...>
To: "DRAKE-RADIO" <[email protected]>
Sent: Saturday, May 13, 2023 3:49:57 PM
Subject: [DRAKE-RADIO] FS-4B (with frequency counter)
I started a new thread based on a comment by Gilles on Doug's talking FS-4A thread.
YES, the frequency counter in my FS-4B is less than desirable.? This is due to the ceramic resonator that is the time base on the cheap Arduino Nano boards.
The resonator has quite a warm up drift but after its temperature is fully warmed, it is "pretty" stable.? Since a counter needs a stable gate signal, this is a problem.
I found that you can provide an external clock signal to the Nano board rather simply.? See attached photo.
If you lift the two ATMega pins on the corner and solder a fine jumper to the second pin, you can supply an external 16MHz clock without an changes to the fuses
or Arduino code.? 0-3.3V or 0-5V squarewave is what you want to apply.? To get accurate frequency counting, it needs to be exactly 16.0000MHz and stable.
I was able to find a small $3.50USD clock chip at Mouser with temp compensation AND a voltage controlled freq trim pin.? Unfortunately they don't have these anymore
and I haven't been able to find them anywhere else.? You could make your own with a crystal and a trimmer cap... maybe use a logic gate oscillator or a transistor?
Maybe you can bring out two jumpers and get the ATMega into crystal oscillator mode by itself?
My workaround was a "calibrate" mode in the FS-5B code.. not ideal but after warmup it works pretty well.
I have also been looking for? a substitute for the Nano.? I thought I found it in the STM32 boards which have a crystal, are very advanced over the ATMega but
unfortunately their software includes the FreeRTOS real time operating system with random interrupts to look for task switching.? The frequency counter works
great most of the time until the random interrupt corrupts... bummer.? Nobody seems to know how to shut down the RTOS... especially me.
NOTE: the Nano did have a similar problem with the millisecond counter interrupting but I did figure out how to stop that during freq counts.
If anyone knows a good cheap little computer board like the Nano but with a crystal and available freq counter code, let me know.
My FS-5 in both my R-4B (frankenstein!) and T-4XB have great stable counters using Nanos, so it is possible.
73,
Gary
WB6OGD
|
Hi Gary,
Do you have some Arduino code somewhere showing how to use it as a counter?
I am also wondering if you would be better off connecting an accurate clock (such as the 1pps on a GPS module or from an OXCO) then using interupts to gate the frequency input. I have built an Arduino based WSPR generator designed by W3PM some years ago and it is accurate to less than 1 part in 10Million.
Cheers, Peter - VK2AN
|
Peter, See the Files section for $14 Homebrew FS-4B
That version has the frequency counter.? I tuses an ATMega internal Timer for the one second gate. The code came from an Arduino library, I didn't write it.
I believe the 1PPS is not that accurate by itself but it corrects over time.? My GPS based frequency standard corrects over something like a minute and a half. But, give it a try, maybe that could be a solution.
But too, for a digital dial, you want faster response than 1 second..? I use a 100ms gate for 10Hz resolution, that works well for me.
73, Gary WB6OGD
?
|
Hi Garry
Why doesn't your solution use an external clock oscillator with a 16mHz OCXO like this
features are
Specification: Operating voltage: + 5V dc / +/- 5% Operating current: 20mA (MAX) Output waveform: TTL/CMOS Duty Cycle: 40/60% Frequency Stability Vs Temp: +/- 0.2ppm (-10~+60C) Size: 20.8x13.2x15mm Aging: +/- 0.1ppm/year. Input voltage: DC6V-10V
73 Gilles
Gilles F1BFU since 1969GQRPClub 15889?QRP ARCI 16979
??Le vieux monde se meurt, le nouveau monde tarde ¨¤ appara?tre et dans ce clair-obscur surgissent les monstres¡??? Antonio Gramsci (1891-1937)
toggle quoted message
Show quoted text
I started a new thread based on a comment by Gilles on Doug's talking FS-4A thread.
YES, the frequency counter in my FS-4B is less than desirable.? This is due to the ceramic resonator that is the time base on the cheap Arduino Nano boards. The resonator has quite a warm up drift but after its temperature is fully warmed, it is "pretty" stable.? Since a counter needs a stable gate signal, this is a problem.
I found that you can provide an external clock signal to the Nano board rather simply.? See attached photo. If you lift the two ATMega pins on the corner and solder a fine jumper to the second pin, you can supply an external 16MHz clock without an changes to the fuses or Arduino code.? 0-3.3V or 0-5V squarewave is what you want to apply.? To get accurate frequency counting, it needs to be exactly 16.0000MHz and stable.
I was able to find a small $3.50USD clock chip at Mouser with temp compensation AND a voltage controlled freq trim pin.? Unfortunately they don't have these anymore and I haven't been able to find them anywhere else.? You could make your own with a crystal and a trimmer cap... maybe use a logic gate oscillator or a transistor? Maybe you can bring out two jumpers and get the ATMega into crystal oscillator mode by itself?
My workaround was a "calibrate" mode in the FS-5B code.. not ideal but after warmup it works pretty well.
I have also been looking for? a substitute for the Nano.? I thought I found it in the STM32 boards which have a crystal, are very advanced over the ATMega but? unfortunately their software includes the FreeRTOS real time operating system with random interrupts to look for task switching.? The frequency counter works great most of the time until the random interrupt corrupts... bummer.? Nobody seems to know how to shut down the RTOS... especially me. NOTE: the Nano did have a similar problem with the millisecond counter interrupting but I did figure out how to stop that during freq counts. If anyone knows a good cheap little computer board like the Nano but with a crystal and available freq counter code, let me know.
My FS-5 in both my R-4B (frankenstein!) and T-4XB have great stable counters using Nanos, so it is possible. 73,
|
Gilles, The main reason is because I have a better solution for my project.? See photo, the small silver device in the lower left corner under the 25K trimpot. There hasn't been much interest in the frequency counter is another reason.
BUT, the one you show might work.? The problem is it might be stable but it is not adjustable to exactly 16.0000000MHz so your count will still not be correct.? BUT, see that little white dot on the main oscillator??? That MIGHT be a sticker and under it might be a trimmer!?? MIGHT.
There are some chinese vendors on ebay that sell just that part (which may be all that is needed) and one or two indicated they could make them 16MHz. 73, Gary WB6OGD
|
Gary
Yes some have a hole that allows access to fine tuning. it can be supplied for the frequency of 16 mHz or it is necessary to upgrade the frequency of the Nano from 16 to 20 mHz.
73
 Gilles F1BFU since 1969 GQRPClub 15889? QRP ARCI 16979
??Chacun a raison de son propre point de vue, mais il n¡¯est pas impossible que tout le monde ai tort?? Gandhi
toggle quoted message
Show quoted text
Gilles, The main reason is because I have a better solution for my project.? See photo, the small silver device in the lower left corner under the 25K trimpot. There hasn't been much interest in the frequency counter is another reason.
BUT, the one you show might work.? The problem is it might be stable but it is not adjustable to exactly 16.0000000MHz so your count will still not be correct.? BUT, see that little white dot on the main oscillator??? That MIGHT be a sticker and under it might be a trimmer!?? MIGHT.
There are some chinese vendors on ebay that sell just that part (which may be all that is needed) and one or two indicated they could make them 16MHz.
|
You want 16MHz..? Like I said in a previous post, it MAY be possible to change the Arduino
to 20MHz but you don't really want the hassle.
There are a lot of 20MHz TCXOs available but 16MHz is rare.
73,
Gary
WB6OGD
?
toggle quoted message
Show quoted text
On 05/14/2023 7:24 AM PDT F1BFU - Fr - 79 <gilles.f1bfu@...> wrote:
?
?
Gary
?
Yes some have a hole that allows access to fine tuning.
it can be supplied for the frequency of 16 mHz or it is necessary to upgrade the frequency of the Nano from 16 to 20 mHz.
?
?
73
Gilles F1BFU since 1969
GQRPClub 15889?
QRP ARCI 16979
?
??Chacun a raison de son propre point de vue, mais il n¡¯est pas impossible que tout le monde ai tort??
Gandhi
Gilles,
The main reason is because I have a better solution for my project.? See photo, the small silver device in the lower left corner under the 25K trimpot.
There hasn't been much interest in the frequency counter is another reason.
BUT, the one you show might work.? The problem is it might be stable but it is not adjustable to exactly 16.0000000MHz so your count will still not
be correct.? BUT, see that little white dot on the main oscillator??? That MIGHT be a sticker and under it might be a trimmer!?? MIGHT.
There are some chinese vendors on ebay that sell just that part (which may be all that is needed) and one or two indicated they could make them 16MHz.
|
Hi Gary
Where can I find the source code for the FS-5B version?
T3 Gilles
 Gilles F1BFU since 1969 GQRPClub 15889? QRP ARCI 16979
??Chacun a raison de son propre point de vue, mais il n¡¯est pas impossible que tout le monde ai tort?? Gandhi
toggle quoted message
Show quoted text
You want 16MHz..? Like I said in a previous post, it MAY be possible to change the Arduino
to 20MHz but you don't really want the hassle.
There are a lot of 20MHz TCXOs available but 16MHz is rare.
73,
Gary
WB6OGD
?
?
?
Gary
?
Yes some have a hole that allows access to fine tuning.
it can be supplied for the frequency of 16 mHz or it is necessary to upgrade the frequency of the Nano from 16 to 20 mHz.
?
<screenshot_9036.png>
?
73
<73.gif>
Gilles F1BFU since 1969
GQRPClub 15889?
QRP ARCI 16979
?
??Chacun a raison de son propre point de vue, mais il n¡¯est pas impossible que tout le monde ai tort??
Gandhi
Gilles,
The main reason is because I have a better solution for my project.? See photo, the small silver device in the lower left corner under the 25K trimpot.
There hasn't been much interest in the frequency counter is another reason.
BUT, the one you show might work.? The problem is it might be stable but it is not adjustable to exactly 16.0000000MHz so your count will still not
be correct.? BUT, see that little white dot on the main oscillator??? That MIGHT be a sticker and under it might be a trimmer!?? MIGHT.
There are some chinese vendors on ebay that sell just that part (which may be all that is needed) and one or two indicated they could make them 16MHz.
|
I can send it to you, BUT.. It is totally un-supported. ?I am not sure I understand it at this point. It is a two part system, one in the rx, one in the tx, talking over a one wire bus. I posted the basics of the system a while back. Let me know if you really want the code. BTW, I really like the way it¡¯s working for me now. 73, Gary? WB6OGD?
toggle quoted message
Show quoted text
On May 14, 2023, at 11:50 AM, Gilles Delpech <gilles.f1bfu@...> wrote:
? Hi Gary
Where can I find the source code for the FS-5B version?
T3 Gilles
<73.gif> Gilles F1BFU since 1969 GQRPClub 15889? QRP ARCI 16979
??Chacun a raison de son propre point de vue, mais il n¡¯est pas impossible que tout le monde ai tort?? Gandhi
You want 16MHz..? Like I said in a previous post, it MAY be possible to change the Arduino
to 20MHz but you don't really want the hassle.
There are a lot of 20MHz TCXOs available but 16MHz is rare.
73,
Gary
WB6OGD
?
?
?
Gary
?
Yes some have a hole that allows access to fine tuning.
it can be supplied for the frequency of 16 mHz or it is necessary to upgrade the frequency of the Nano from 16 to 20 mHz.
?
<screenshot_9036.png>
?
73
<73.gif>
Gilles F1BFU since 1969
GQRPClub 15889?
QRP ARCI 16979
?
??Chacun a raison de son propre point de vue, mais il n¡¯est pas impossible que tout le monde ai tort??
Gandhi
Gilles,
The main reason is because I have a better solution for my project.? See photo, the small silver device in the lower left corner under the 25K trimpot.
There hasn't been much interest in the frequency counter is another reason.
BUT, the one you show might work.? The problem is it might be stable but it is not adjustable to exactly 16.0000000MHz so your count will still not
be correct.? BUT, see that little white dot on the main oscillator??? That MIGHT be a sticker and under it might be a trimmer!?? MIGHT.
There are some chinese vendors on ebay that sell just that part (which may be all that is needed) and one or two indicated they could make them 16MHz.
|
?I used ?Arduino UNOs in my two FS-4B systems which gives reasonable stability with a real ?XTAL can on the UNO.
?
The frequency counter code for the FS-4B is a really some software magic that cascades two 16 bit counters in the Arduino.
The upper bound for the counter code is about 6 MHz or so. ?I suspect that hardware ?dividing the Drake PTO frequency by two or three before feeding it to the software counter may result in a better result. The resulting counter frequency can be easily upscaled in software.
The main objective of this project was simplicity and cost effectiveness. ¡? -- 73, Bernie. VE3FWF Real?radios glow in the dark
|
Very good Bernie.? I had forgotten UNO does have an xtal.? Are you using my "cal" mode to get it exactly on frequency? Since it is a fudge, how well does it keep it over the PTO range?
The ATMega328 has a clocked counter input so it is limited to 6.4MHz with the 16MHz main clock.? Which is fine since the PTO is 5.5MHz max. It would be good if the counter could go to 35MHz so we could just read the INJ line...? PICs can do that, an outboard PIC is what I have considered.
I don't see how dividing and then multiplying would help...?
73, Gary WB6OGD
?
|