Skip to content

GNSS-powered, seven-segment table clock

License

Notifications You must be signed in to change notification settings

Tosainu/gnss-7-seg-clock

Repository files navigation

GNSS Seven-segment Clock

GNSS-powered, seven-segment table clock.

gnss-7-seg-clock-github.mov

Full video: https://www.youtube.com/watch?v=Y1P_iDvq4bk

Firmware

Usage

Pre-build firmware files are available on the release page. Thanks to the RP2040 Bootrom, flashing the firmware requires no special tool. Connect the board to the PC using the USB-C cable, while holding the BOOT button (SW2). Once the RPI-RP2 drive appears on the PC, copy gnss-7-seg-clock.uf2 there. The board will automatically be rebooted as soon as it finishes writing to Flash.

  • The board displays --.--.-- until it obtains the time information.
  • Press SW3 to change the display contents:
    1. Time: hh.mm.ss
    2. Date: YY.MM.DD
    3. Configuring time zone (time offset): [-]hh.mm
      • SW4: + 30 min
      • SW5: - 30 min

Build

The firmware is written in the Rust programming language with the Embassy framework. In order to build the firmware, you first need to prepare the Rust toolchain. Please refer to the official guide.

Next, install the linker helper flip-link. Alternatively, remove this line to use the default linker.

$ cargo install --locked flip-link

Lastly, run the command below to build the firmware. You can find the ELF file ./target/thumbv6m-none-eabi/release/gnss-7-seg-clock afterward.

$ cargo build --release

If the debug probe is attached to the board and probe-rs is installed on your PC, cargo run can be used to load firmware to the board.

$ cargo run --release

# to run test apps in crates/gnss-7-seg-clock/examples/
$ cargo run --release --example gnss-uart-pipe

Schematic and PCB

Important

I'm new to circuits and PCB designs. Any feedback and advice are welcome! (✿ゝ◡╹)ノ

I designed the Rev.A board with KiCad v8.0.8 (Linux/macOS) and their official libraries. You can find the KiCad project files in the hardware/ directory. You can also find the rendered schematic (PDF) and Gerber files on the release page.

DSC_7465

DSC_7464 Please do not take a close look at 43-44 pins of RP2040! (ignorable solder bridge)

Parts

Note

Tolerances were set by just referring to several existing designs. Some of them might be insufficient or overkill.

Reference Value Parts Qty
C1, C2, C4-C10, C14, C17-C19 MLCC, 0.1uF, 10%, 6.3V, X5R, M1005 13
C3, C11 MLCC, 1uF, 20%, 6.3V, X5R, M1005 2
C12, C13 MLCC, 10uF, 10%, 6.3V, X7R, M2012 2
C15, C16 MLCC, 15pF, 5%, 50V, C0G/NP0, M1005 2
C20 MLCC, 10000pF, 10%, 16V, X7R, M1005 1
C21 MLCC, 47pF, 5%, 50V, C0G/NP0, M1005 1
D1 Bidirectional TVS, M1005 Littelfuse PESD0402-140 1
D2-D7 LED, M1005 6
J1 USB-C Receptacle GCT USB4105-GF-A 1
J2 SMA Receptacle, Edge Mount Molex 732511153 1
J3 Pin header, 01x03, P2.54 mm 1
L1 Inductor, 27nH, 5%, M1005 Murata LQG15HS27NJ02D 1
R1-R3 Resistor, 2.2kOhm, 1%, 1/16W, M1005 3
R4, R5, R12, R14-R16 Resistor, 10kOhm, 1%, 1/16W, M1005 6
R6, R7 Resistor, 5.1kOhm, 1%, 1/16W, M1005 2
R8, R9 Resistor, 27Ohm, 1%, 1/16W, M1005 2
R10, R13 Resistor, 1kOhm, 1%, 1/16W, M1005 2
R11 Resistor, 10Ohm, 5%, 1/4W, M1005 1
R17-R22 Resistor, 470Ohm, 1%, 1/16W, M1005 6
SW1-SW5 Tactile Switch C&K PTS810 5
U1-U6 7-segment LED, Common-Anode, 3.81 mm 6
U7-U9 16-ch LED sink driver, SOIC-24W TI TLC5925IDWR 3
U10 MCU Raspberry Pi RP2040 1
U11 LDO, 3.3V, 500 mA, SOT-23-5 TI TLV75533PDBVR 1
U12 SQPI NOR Flash, 32M-bit, SOIC-8 Winbond W25Q32JVSS 1
U13 GNSS Receiver u-blox MAX-M10S 1
Y1 Crystal, 12MHz Abracon ABM8-272-T3 1
GNSS Active Antenna u-blox ANN-MB5 1

Seven-segment LEDs

U1-U6 are seven-segment LEDs, the essential components in this design. While selecting them, I was surprised about the poor availability of seven-segment LEDs, especially the larger models (> 1″). I wanted to use Kingbright SA15-11GWA initially. However, due to the availability and price, I selected WENRUN LSD150BAG-101, even though I had to use a different store from other parts.

Unfortunately, LSD150BAG-101 is not a drop-in replacement for SA15-11GWA. They have a different pitch for the vertical direction: 40.64mm (SA15-11GWA) and 40.00mm (LSD150BAG-101). Since I wanted to have some flexibility in the design, I made the footprint that uses the oval pad so that can use both types of seven-segment LEDs.

Screenshot_2025-02-01-122517

The forward voltage also has to be taken into account for U1-U6. Vf should be smaller than the USB VBUS. For instance, high-luminance types are not suitable in general.

Driving Seven-segment LEDs with Fewer Pins

U7, U8, and U9 are 16-ch shift registers specialized for the LED, TI TLC5925IDWR. Thanks to this three-cascading configuration, it can drive six seven-segment LEDs (48x LED segments) only by five pins.

TLC5925 determines the output currents based on an external resistor between the R-EXT pin and GND. R1, R2, and R3 are the current-set resistors for U7, U8, and U9 respectively. With the 2.2kOhm resistor, the output would be (1.21 / 2,200) * 18 = 9.9mA.

LDO and Capacitors

U11 is the 3.3V LDO, TI TLV75533PDBVR (TLV755P-series). I'm hoping it works nicely with an AC adapter/wall charger as well as a PC because of its good PSRR in wide-range frequencies.

C12 and C13 are the input and output capacitors for the LDO. According to the datasheet, TLV755P requires a 1uF+ input capacitor and a 0.47uF+ output capacitor while considering the DC bias characteristics of a capacitor. Based on this, I selected 10uF/6.3V MLCC.

RF Circuitry for MAX-M10S

sparkfun/SparkFun_u-blox_MAX-M10S is very good material as well as the MAX-M10S Integration manual. For the RF part, I imitated SparkFun's board and filled in parts values based on the reference design mentioned in the integration manual. Here are the parts correspondences between this board and the MAX-M10S reference design:

This board Reference design Use
C20 C14 RF Bias-T Capacitor
C21 C18 DC Block Capacitor1
L1 L3 RF Bias-T Inductor
R11 R8 Antenna supervisor current limiter/shunt resistor

D1 is the ESD-protection TVS which is only in the SparkFun's board. Since I have no confidence in finding compatible parts, I used the same TVS Littelfuse PESD0402-140 in this design.

License

The project is licensed under the MIT license unless otherwise stated.

PCD design files, specifically the files under the hardware/ directory are licensed under the CC BY-SA 4.0 license. Please note that:

This project is inspired by Kello version 4.

Footnotes

  1. Apparently, this capacitor can be removed as my design doesn't have an external SAW filter. The built-in DC-block capacitor of the module is sufficient.