-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very wrong frequency generated (1.6kHz instead of 60kHz) #1
Comments
Interesting, maybe Rasbperry Pi changed the frequency of various internal oscillators between versions ? You find the base assumptions of the various osciallator frequencies here: This chooses from various oscillators that would be best, I think it uses the 216Mhz HDMI frequency for 77.5kHz. If it is only a few kHz, this sounds like the oscillator is on a frequency in the few Mhz range. Is HDMI enabled on the Pi ? If not, maybe they have a different oscillator in place ? You probably find that setting in I have only tested this with a Rapsberry Pi 3 and a Raspberry Pi Zero W so far. Do you have a picture of the scope-trace on GPIO4 output ? |
You can also try to comment out the |
Thanks! |
I took a guess based on the rounded ratio of 1.611kHz and 60kHz and changed line 120 to { 7, 5.8e6 } and bingo 60kHz generated and my clocks set. rapidly. |
Wonderful, glad you got your watch setting. I leave this bug open for now as we need to find a definitive source somewhere that describes the clock-sources for the older Pi you have, so that things can be automatically switched in this code. For now, I added a reference to this bug in the README. |
Sounds OK to me. If I come across the information needed I'll report the details here. |
Hi Henner and Steve |
I still try to understand in which case this happens. Did you have connected a monitor by any chance? I suspect that might influence the hdmi oscillator. |
Yes, the monitor was connected at the time. |
I am running a RaspberryPi 3B+ with the latest Raspbian (ver 4.19.66-v7+) and using the -s wwvb option (I'm in the U.S.A.) the square waves generated on the GPIO pins 4 and 17 are exactly 1.6114 KHz or 1611.4 Hz. Hmmmm.... I was using an external HDMI display so I removed the display and tried re-booting the unit headless and now So having the HDMI display hooked up must grab and set the divider frequency and prevent you from setting it to what you want. Conclusion: Run the unit headless and VNC into it. Hope this helps. John N8OBJ |
I have a Rasperry Pi 3 model B+. Now I see in the console :getting 77500.227 Hz, and on my scope I see 77.74Khz Cheers, |
Greetings! But there is one problem ... This is even most likely a feature of the watch, or something else, I don’t know ... But, if I run this program at night, when the clock synchronizes in automatic mode, they cannot receive the signal and are not synchronized. The arrow shows RX and does not indicate H (high), M (middle) or L (low) level of signal. Watch: citizen eco drive e650 Maybe someone faced a similar problem. I would really appreciate answers. |
you probably want to open a separate issue with this as it doesn't fit the frequency topic. |
-s JJY60 on a Pi 2b+ (code 000d from I have tried variants of:
Citizen eco drive U680, GMT+10 so set to expect JJY on 40khz or 60khz I am waiting for a Pi W+ to arrive this week. I will then also test setting my watch to a different timezone and the other encodings (MSF or WWV) so I can narrow down if this is e.g. the JJY encoding. The Android "make RF happen by blasting sound on the headphones" apps work fine. I can set my watch from this hack, so I know the basic 40/60khz signal reception in that form of modulation is working fine. |
Could you measure the frequency somehow ? Some multimeters have a frequency measure if you don't have an oscilloscope. Assuming that it might be correct, try some more windings with your coil (also check out the video of this youtuber who added some amplification to it https://www.youtube.com/watch?v=6SHGAEhnsYk ) |
I don't have a multimeter to hand with this, nor a scope. I hope to get my
meter from work later this week.
Until then, I got "rx M" during this, so I believe I have carrier.
I want to get a pi zero W in the loop so I don't have the confounding
problem of being on older h/w which has noted issues with clock frequency
…On Mon, Aug 17, 2020 at 1:52 PM Henner Zeller ***@***.***> wrote:
Could you measure the frequency somehow ? Some multimeters have a
frequency measure if you don't have an oscilloscope.
Assuming that it might be correct, try some more windings with your coil
(also check out the video of this youtuber who added some amplification to
it https://www.youtube.com/watch?v=6SHGAEhnsYk )
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABORQ7H6XL2EB3ELHYP4FHDSBCSPTANCNFSM4FVGLEFQ>
.
|
I got a pi zero W. I get "L" for low on a citizen watch during sync and then "no" at end. Its using JPN config. If I switch to WWVB and make my watch think its in CHI(cago) it says "H" during sync and works fine setting the clock. I want to try MSF next, but this suggests the pi zero W headless is making 60khz fine, its the encoding for JJY which isn't quite right |
I have tried some alternate positioning on the antenna I made from 2mm stiff copper wire, and I can now get sync on JJY at 40Khz. So, I think you can disregard me: the sensitivity issues are mixed, the encoding worked at the lower frequency, so I do not think I have clear debug on this and probably, this is a side issue and not good evidence of a systematic problem one way or another. And thank you for writing this code and providing guidance on how to construct an Antenna on a Pi Zero W! |
I too had 1.6KHz instead of 60KHz with -s WWVB
I can confirm this code edit was needed on a Pi Zero W r1.1 with Raspberry Pi OS 32-bit (Lite) dated 2021-03-04 updated 2021-05-09. There was no HDMI screen connected. Martin |
Did anybody get it working successfully on Raspberry Pi 3 Model B? Oscilloscope shows very low frequency (~36 Hz) when running with JJY60 profile. No monitor or any other peripheral connected except network cable. After commenting line with Thanks! |
I've had the same problem of low DCF77 frequency with a Raspberry Pi 3 Model B Rev 1.2. I missed at first the HDMI frequency explanation because JJY40 worked perfectly well and no monitor was attached. I've got a hint by changing But why HDMI clock was wrong without monitor ? It was because I had Putting this parameter to zero and rebooting the Pi finally solves the issue : I can now use HDMI clock in an headless Raspberry pi. Alternatively, as said above, if you need to use an HDMI monitor, commenting line 117 |
If someone knows a way to auto-detect the 'hdmi-is-enabled-of-sorts' - situation in the |
The command Without hdmi :
With hdmi :
|
Interesting problem! I've spent the weekend investigating ways to detect if HDMI is enabled and connected (I have some test applications for Raspberry Pi OS v9 and v12 - as they differ). However, thinking about this problem more, I realised that maybe it is just better to remove the HDMI source all together if the error in carrier frequency generated isn't large/much of a problem. So I wrote a small test app to generate all the clock frequencies and errors (copying relevant code from
Results are:
Based on this, only clock source 1 is needed, and in-fact the HDMI source is only useful for carrier frequencies above 216MHz/4096 = ~52.7Khz. So I propose to remove all the clock choosing code and just use source 1. However, if you disagree, I'd happily add my HDMI detection code in a pull request, although I fear it will add to the code complexity & testing/validation will also be complex. |
… connected for example fixes the following issue: hzeller#1 without the fix frequency is wrong using 19.2 Mhz timer
Hello H,
Many thanks for this project. I was looking for exactly this for my Casio watch since I moved countries.
It built fine and appears to run but generates very low frequencies on my RPi model B+ v1.2. I'm not 100% sure what Pi you are using so it could well be you have a different model.
Using './txtempus -s MSF' insead of 60kHz, my 'scope shows only 1.611kHz and of course no devices work. Same with WWVB option. Trying the DCF77 produces 2.081kHz instead of 77.5kHz.
Would you have any ideas?
'guv.
The text was updated successfully, but these errors were encountered: