Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:08 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite DCF77 Signal Locator

Author Message
DrifterNL

Regular Member

Joined: 27/09/2018
Location: Netherlands
Posts: 58
Posted: 05:12pm 02 Mar 2023
Copy link to clipboard 
Print this post

PilotPirx's post "PicoMite DCF77 Decoder" reminded me that I once wrote software, for an other microcontroller system, to help locate the DCF77 signal and thus help in aiming the antenna.
I rewrote my software and tweaked it some for the PicoMite.
The signal from the DCF77 module is connected to GP7.


'PicoMite DCF Signal Locater
'Connect signal from DCF77 module to GP7
'Turn the antenna slowly to find the signal
'Signal is shown as a bar graph
'and counter going up to 100

Option explicit

SetPin gp7, fin

Const SG = 1, SB = 5, SD = 1
Dim integer signal, signal_quality, bar_graph
signal_quality = 0

start:
Pause Max(100 - signal_quality, 50)
signal = Pin(gp7)
If signal = 1 Then
  signal_quality = Min(signal_quality + SG , 100)
ElseIf signal > 1 Then
  signal_quality = Max(signal_quality - SB, 0)
   Else
      signal_quality = Max(signal_quality - SD, 0)
EndIf
For bar_graph = 0 To signal_quality / 5
If bar_graph > 0 Then Print "#";
Next
Print signal_quality;
If (signal = 0) And (signal_quality > 80) Then
  Print " DCF DATA"
Else
  Print " "
EndIf
GoTo start            

Floating Point Keeps Sinking Me!
Back To Integer So I Don't Get Injured.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 05:24pm 02 Mar 2023
Copy link to clipboard 
Print this post

Hi DrifterNL,

Always nice to see this type of tool that helps people set up a system. But looking at the code I estimate the dcf77 module outputs digital data and you use a frequency measurement to see how many digital edges are ib tje datastream?

Please explain how this works?

Volhout
PicomiteVGA PETSCII ROBOTS
 
DrifterNL

Regular Member

Joined: 27/09/2018
Location: Netherlands
Posts: 58
Posted: 07:08pm 02 Mar 2023
Copy link to clipboard 
Print this post

Hi Volhout,

If the DCF77 antenna is aimed relatively correctly the DCF77 module outputs a 1Hz signal.
If the antenna isn't aimed correctly the output is a random Hz.

The software basically increments the value in signal_quality if the signal on GP7 is 1Hz and decrements the value if the signal is other than 1Hz.
The longer the signal is good (1Hz) the higher the value up to 100.
The longer the signal is bad (<>1Hz) the lower the value down to 0.
This value is used to print a bar graph and a number between 0 and 100.
Edited 2024-03-21 08:15 by DrifterNL
Floating Point Keeps Sinking Me!
Back To Integer So I Don't Get Injured.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025