Radio time station transmitter using the Raspberry Pi and Nvidia Jetson
=====================================================
I am living in a country where there is no [DCF77] sender nearby for my
European radio controlled wristwatch to get its time. This vintage
Junghans Mega doesn't have any buttons to set the time, so to bring it back to
life, I built my own 'transmitter', taking the [NTP] time of a Raspberry Pi
and generating a modulated signal via GPIO pins to then magnetically couple
it into the watch ferrite.
Since many other long-wave time stations around the world use similar
concepts of sending amplitude modulated time, other time services have been
added.
This program is useful if you have a clock that otherwise does not get any
reception. This magnetical coupling is very low power and only works over a few
centimeters, but **_before running this program, make sure you follow your
local laws with regard to restrictions on radio transmissions._**
### Platform
txtempus supports Raspberry Pi series and Nvidia Jetson Series (experimental).
#### Raspberry Pi
So far, it has been tested on a Pi3 and a
Pi Zero W. There has been a report of different frequencies generated with
an older Pi (Bug #1), so until we have a definitive list of available
clock sources inside these, check out that bug for a workaround.
#### Nvidia Jetson Series (experimental)
So far, it has been tested only on a Jetson Nano,
but all Jetson devices except for TX1 and TX2 (there is no available pwm pin) are supported.
### Supported Time Services
#### DCF77
The [DCF77] (Germany) signal is a 77.5kHz carrier, that is amplitude modulated
with attenuations every second of the minute except the 59th to synchronize.
The length of the attenuation (100ms and 200ms) denotes bit values 0 and 1
respectively so in each minute, 59 bits can be transferred, containing
date and time information.
The Raspberry Pi has ways to create frequencies by integer division and
fractional jitter around that, which allows us to generate a frequency
of 77500.003Hz, which is close enough. Can be chosen with `-s DCF77` option.
#### WWVB
The [WWVB] (USA) is on a 60kHz carrier, and also transmits one bit per second
with different attenuation times (200ms zero, 500ms one; 800ms sync) and
multiple synchronization bits. Use `-s WWVB` option for this one.
#### MSF
The [MSF] (United Kingdom) has yet another encoding, transferring two bits
per second. Carrier is 60kHz. Option is `-s MSF`.
#### JJY
The [JJY] (Japan) is similar to WWVB, with same timings of carrier switches,
but reversed power levels. Some bits are different. Two senders exist in Japan
with 40kHz and 60kHz carrier; their simulations can be chosen
with command line options `-s JJY40` and `-s JJY60`.
If you're in/or want to display a different time-zone, issue
[#17](https://github.com/hzeller/txtempus/issues/17) might be of interest to
you.
### Minimal External Hardware
#### Raspberry Pi
The external hardware is simple: we use the frequency output on one pin and
another pin to pull the signal to a lower level for the regular attenuation.
To operate, you need three resistors: 2x4.7kΩ and one 560Ω (precision not
critical), wired to GPIO4 and GPIO17 like so:
Schematic | Real world
-------------------------------|------------------------------
![](img/schematic-dcf77.png) |![](img/contacts-dcf77.jpg)
GPIO4 and 17 are on the inner row of the Header pin, three pins inwards on
the [Raspberry Pi GPIO]-Header.
You don't need GPIO17 and the 560Ω resistor for `MSF`, as that works with
switching the signal (on-off keying) instead of attenuating. In that case, you
can replace the sequence of two 4.7kΩ resistors with a single 10kΩ.
Now, wire a loop of wire between the open end of the one 4.7kΩ and ground - this
loop acts as coupling coil to the watch ferrite antenna.
The signal is very weak, so bring this wire-loop close to your radio
watch/clock.
In the following image, which was the first experiment, it is wrapped around
the antenna, but it is not strictly needed: anything within a few centimeters
should work.
![](img/watch-wired.jpg)
Being too close to the clock can confuse a sensitive receiver, so you might need
to experiment with the distance. If your clock/watch is not receiving, add more
turns to your transmission coil. In the picture at the bottom of the page
you see that I am using about 10-20 turns on the coil (reddish oval lying on
the Pi).
This set-up should work for most watches if you have them in close vicinity.
The antenna set-up is intentionally not optimal to just be good enough for
a local watch but hopefully not causing interference.
Further improvements of course can be done to the antenna for increased
transmission distance, such as using a ferrite, making it an LC circuit or
adding an amplifier. *Only go in this direction after familiarizing yourself
with allowances of radio transmissions in your area on your frequency of
interest.*
#### Nvidia Jetson Series (experimental)
(*Please read the external hardware for the Raspberry Pi above first.)
On Jetson, the external hardware setup is slightly different from the Raspberry Pi.
We need one "PWM Pin" for a frequency output, and one "Attenuation Pin" for modulating the signal.
These pins vary by the Jetson model. Please check the following table.
|Devices|PWM pin (Board numbering)|Attenuation pin (Board numbering)|
|-------|-------------------------|---------------------------------|
|Jetson TX1, Jetson TX2|Not supported|Not supported|
|Jetson Xavier, Clara AGX Xavier, Jetson Orin|18|16|
|Other devices|33|35|
To operate, you need three resistors: 2x4.7kΩ and one 560Ω (precision not
critical) and one NPN transistor (nearly any NPN transistor should work. I'm using KTC3198).
Here's the full schematic of the external hardware for the Jetson Series:
Schematic | Real world (Jetson Nano)
-------------------------------|------------------------------
![](img/schematic-jetson.jpg) |![](img/jetson-nano.jpg)
Like the Raspberry Pi, you don't need the Attenuation Pin and the 560Ω resistor for `MSF`,
and a wire-loop between the 4.7kΩ register and the ground acts as coupling coil. Bring this wire-loop close to your radio
watch/clock.
![](img/watch-on-wire.jpg)
### Build
```
sudo apt-get install git build-essential cmake -y
git clone https://github.com/hzeller/txtempus.git
cd txtempus
mkdir build && cd build
```
#### Rapberry Pi
```
cmake ../ # or cmake ../ -DPLATFORM=rpi
make
```
#### Nvidia Jetson Series (experimental)
Before you build txtempus on your Jetson:
- You should install [JetsonGPIO](https://github.com/pjueon/JetsonGPIO) which is a library that enables the use of Jetson's GPIOs.
- The system pinmux must be configured to connect the hardware PWM controlller(s) to the relevant pins. Read the L4T documentation for details on how to configure the pinmux.
```
cmake ../ -DPLATFORM=jetson
make
```
### Transmit!
```
sudo ./txtempus -v -s DCF77
```
With `-s`, you set the type of time signal you want to transmit.
There are a few options you can set. The `-r` option is useful to have the
program run only for the few minutes it might take for a clock to synchronize.
By default, the current system time is transmitted. The `-t` option allows
different times for testing.
```
usage: ./txtempus [options]
Options:
-s <service> : Service; one of 'DCF77', 'WWVB', 'JJY40', 'JJY60', 'MSF'
-r <minutes> : Run for limited number of minutes. (default: no limit)
-t 'YYYY-MM-DD HH:MM' : Transmit the given local time (default: now)
-z <minutes> : Transmit the time offset from local (default: 0 minutes)
-v : Verbose.
-n : Dryrun, only showing modulation envelope.
-h : This help.
```
#### Don't connect monitor (Raspberry Pi)
Don't connect a monitor to the Pi, just operate it headless.
Th
没有合适的资源?快使用搜索试试~ 我知道了~
使用RaspberryPi的DCF77、WWVB、JJY和MSF时钟LF波段信号发射器_C++_CMake_下载.zip
共28个文件
jpg:8个
cc:7个
h:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 104 浏览量
2023-04-27
10:55:23
上传
评论
收藏 1.16MB ZIP 举报
温馨提示
使用RaspberryPi的DCF77、WWVB、JJY和MSF时钟LF波段信号发射器_C++_CMake_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
使用RaspberryPi的DCF77、WWVB、JJY和MSF时钟LF波段信号发射器_C++_CMake_下载.zip (28个子文件)
txtempus-master
.editorconfig 241B
include
rpi
hardware-control-implementation.h 2KB
jetson
hardware-control-implementation.h 3KB
time-signal-source.h 4KB
hardware-control.h 2KB
carrier-power.h 943B
CMakeLists.txt 1KB
src
dcf77-source.cc 2KB
txtempus.cc 7KB
rpi-control.cc 10KB
wwvb-source.cc 2KB
msf-source.cc 3KB
jjy-source.cc 3KB
hardware-control.cc 1KB
cmake
rpi-control.cmake 42B
jetson-control.cmake 156B
img
jetson-nano.jpg 113KB
watch-wired.jpg 104KB
schematic-jetson.jpg 58KB
schematic-dcf77.png 56KB
contacts-dcf77.jpg 172KB
watch-on-wire.jpg 146KB
dcf77-video.jpg 105KB
nightstand.jpg 193KB
nightstand-with-watch.jpg 225KB
.gitignore 24B
README.md 12KB
COPYING 34KB
共 28 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- html+css+'青春献礼二十大 红色旅游助乡村'为主题的网页设计 2022年参与学校网页设计比赛时完成的
- Unity 模型布尔运算插件
- eCANtools工具,CAN资料包
- 129335283047061xiazaigongjuxiang(去重软件).apk
- Android环境检测工具,检测ksu,lsp,magisk等
- WordPress后台美化插件QuarterAdmin分享
- PCB_Project单片机绘制 (2024-5-11 22-22-13).zip
- nccl-local-repo-ubuntu2204-2.21.5-cuda12.4-1.0-1-amd64
- STM32移植LVGL源码工程 stm32移植GUI-Guider源码 LVGL移植源码
- Screenshot_20240522_084328_com.tencent.mm.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功