[deutsch] … The display language should be automatically selected by browser settings. If not correct, click one symbol.

FunkUsb: Radio controlled clock receiver with USB

A [Wikipedia] DCF77 time signal receiver with USB connection.

FunkUsb emulating a serial interface (COM port)

This is done using CDC USB class and works with Windows 2000 to 7, 32 or 64 bit, and with Linux. Should also work with Windows 98, Me, and MacOS.

Impulsion

Most widely spread DCF77 radio-controlled clock receiver are connected via the serial port. Today's laptops require some USB to serial solutions for connecting such equipment.

Occasionally, radio-controlled alarm clocks get out of work, but the DCF77 receiving module is still intact. But why making a voltage shifter for connecting a serial port when there is a nice USB solution there? Here, a small 8-pin ATtiny45 is sufficient, filled with smart firmware called [extern] V-USB and [extern] AVR-CDC. With this firmware combination, the DCF77 receiver creates a serial port and is fully compatible to old-style true-serial-port ones. No software adaption is necessary.

Function

The signal received should stimulate all five input “pins” of the emulated serial port. Therefore, software settings are no more critical.

However, one line will not work at all, and another one not within “Funkuhr.exe”. DCD, DSR and RI will work. RxD and CTS won't work. The receiver has to be activated using any of the three output “pins” of the emulated serial port. However, one of these lines will not work at all. TxD and DTR will work. RTS doesn't work.

The software installation procedure below is for Windows (2k, 2k3, XP, Vista, 7). Linux and Mac users should know what to do.

Circuitry

The microcontroller and the DCF77 receiver will be fed by regulated 3.3 V. The internal 16.5 MHz oscillator is used for clocking, synchronized by SOF pulses onto the DATA– wire of USB by the host computer.

                           TPS71533DCKR
                             5╔═════╗4
3P3 ───┬────────────────────┬─╢O G I╟───┬── 5P (1)
      +│ 4,7µF              │ ╚╤═╤═╤╝   │
      ═╧═ ┌─────────────────┼────┘2     │
      ═╤═ │ 1╔═════╗╔═════╗8│ ╔═════╗   ▼ LED yellow
       ├──┘  ╢     ╚╝     ╟─┴─╢1,5kΩ╟─┐ ┬
       │    2║            ║7  ╠═════╣ │ │
SIG ───┼─────╢            ╟───╢ 47Ω ╟─┴─┼── D- (2)
       │    3║            ║6  ╠═════╣   │
ENA ───┼─────╢            ╟───╢ 47Ω ╟───┼── D+ (3)
       │    4║            ║5  ╠═════╣   │
       ├─────╢  ATtiny45  ╟───╢470Ω ╟───┘
       │     ╚════════════╝   ╚═════╝
GND ───┴─────────────────────────────────── G╧ (4)
┌──────────┐
│  DCF77   │                             ┌───────┐
│ receiver │                             │  USB  │
│  module  │                             └───────┘
└──────────┘

Schematic, totally easy (made of IBM CP437 frame characters; regular image)

Construction

See photos below.

[PCB top side] [PCB bottom side]
The assembly

Very low-power low-dropout voltage regulators are only available in SMD housings. Therefore, the chip is placed on the bottom side.

[Soldered TPS71533]  
The soldered TPS71533 (voltage regulator)

Programming

The chip is programmed using an external programmer.

The Firmware is freeware (FunkUsb.c: Public Domain; V-USB part: GNU LGPL). The firmware contains a new approach for synchronization of internal RC oscillator, and lots of changes at AVR-CDC for support of virtual modem state lines.

Installation

As for all AVR-CDC projects, no driver is necessary, but an .INF file. After installing, a serial port occurs (maybe, COM7) that can be used as any serial port with any Windows program.

Note that DOS software will not run with FunkUsb. Windows does not virtualize port addresses.

After installing the driver, the device will not automatically run nor a clock will automatically set. This is done with the next program, for example.

Usage (Windows)

For receiving the time and setting the clock, I have written the program “Funkuhr.exe” (has English and German GUI, but only German help file).

You can use any receiver software of your choice, but it must be Windows (not DOS) software that accesses a COM (not LPT) port.

Normally, the LED lights dark. On aerial signal (carrier attenuation) the LED lights up bright. For enabling this effect, the running receiver software must activate either TxD or DTR. The LED is completely off in USB standby mode.

FunkUsb emulating a Joystick

With same schematic, a newer approach emulates a one-button joystick. It has some pros and cons: The firmware now supports configurable pins and polarities.

See German version of this page for further details.

FunkUsb as Prefetching Receiver

This firmware version can use the same schematic as above but is made with modifications for rechargeable battery backup in mind. Its main advantage is keeping date and time available while PC is switched off. Therefore, time is available early at startup. It requires a special USB interface, and special software for querying this.

See German version of this page for further details.


Henrik Haftmann, Wednesday, 10-Apr-2013 18:46:41 CEST