# MSF Clock

**URL:** <https://forum.arduino.cc/t/msf-clock/466148>\
**Category:** General Guidance\
**Created:** [June 22, 2017, 12:31am UTC](https://forum.arduino.cc/t/msf-clock/466148 "2017-06-22T00:31:21Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![otronics](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@otronics](https://forum.arduino.cc/u/otronics)\
**Post date:** [June 22, 2017, 12:31am UTC](https://forum.arduino.cc/t/msf-clock/466148/1 "2017-06-22T00:31:21Z")

</div>

Hello.

I am looking at making a radio-controlled/MSF clock for use here in the UK (more on the MSF signal here: [Time from NPL (MSF) - Wikipedia](https://en.wikipedia.org/wiki/Time_from_NPL))

There is a bit online about people who have done this themselves, but not too much.

I am new to Arduino.

Parts list:

1. Arduino Nano.

2. 1602 LCD screen. Do I need the version with the IIC?

3. Power supply - obviously for the Nano but does the LCD screen needs its own power supply or will it be powered by the Nano?

4. 60 KHz receiver and power supply. Will this work with the Nano? [http://www.ebay.co.uk/itm/60kHz-WWVB-MSF-USA-Canada-UK-atomic-clock-receiver-and-loop-stick-antenna-/262809427579?hash=item3d30a99e7b:g:5vEAAOSwcB5ZKztm](http://www.ebay.co.uk/itm/60kHz-WWVB-MSF-USA-Canada-UK-atomic-clock-receiver-and-loop-stick-antenna-/262809427579?hash=item3d30a99e7b:g:5vEAAOSwcB5ZKztm)

5. Project box.

6. Various cables.

Have I missed anything?

The bit I am stuck on is the code.

Any ideas on that? Anyone willing to help?

Many thanks.

Oliver.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [June 22, 2017, 2:46am UTC](https://forum.arduino.cc/t/msf-clock/466148/2 "2017-06-22T02:46:53Z")

</div>

Google will provide examples of Arduino code to decode MSF signals.

---

<div class="post-metadata">

**Author:** ![jurs](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jurs](https://forum.arduino.cc/u/jurs)\
**Post date:** [June 22, 2017, 10:15am UTC](https://forum.arduino.cc/t/msf-clock/466148/3 "2017-06-22T10:15:34Z")

</div>

> otronics:  
> Hello.
> 
> I am looking at making a radio-controlled/MSF clock for use here in the UK (more on the MSF signal here: [Time from NPL (MSF) - Wikipedia](https://en.wikipedia.org/wiki/Time_from_NPL))
> 
> Have I missed anything?
> 
> The bit I am stuck on is the code.
> 
> Any ideas on that? Anyone willing to help?
> 
> Many thanks.
> 
> Oliver.

Maybe you need a pull-up resistor for the data pin of the receiver.

I've done similar code for the German DCF77 radio clock signal and similar receiver module.

Unfortunately the signal gets disturbed by many kinds of electronics like, PCs computer monitors, TV sets, switching power adapters, energy saving lamps and many more.

Here in Germany, it' easier to get GPS time from a GPS module, even indoors, than getting reliable radio clock signal.

Maybe I could provide test code for such modules, just for evaluating the signal quality, but I have no code for decoding MSF time code protocol.

---

<div class="post-metadata">

**Author:** ![otronics](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@otronics](https://forum.arduino.cc/u/otronics)\
**Post date:** [June 24, 2017, 7:00pm UTC](https://forum.arduino.cc/t/msf-clock/466148/4 "2017-06-24T19:00:44Z")

</div>

Will an LCD screen need its own power supply?

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [June 24, 2017, 7:49pm UTC](https://forum.arduino.cc/t/msf-clock/466148/5 "2017-06-24T19:49:25Z")

</div>

Probably not. But post link to the display you like. Then we can be more precise in our advice.

---

<div class="post-metadata">

**Author:** ![jurs](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jurs](https://forum.arduino.cc/u/jurs)\
**Post date:** [June 24, 2017, 8:59pm UTC](https://forum.arduino.cc/t/msf-clock/466148/6 "2017-06-24T20:59:27Z")

</div>

> otronics:  
> Will an LCD screen need its own power supply?

It depends on the power requirements of the LCD.

Example: When powering an Arduino UNO board by USB, you can simply use the 5V pin of the UNO board to power a 1602 textmode-LCD (including backlight( from the UNO 5V pin, no other power supply required for a 1602 LCD.

---

<div class="post-metadata">

**Author:** ![otronics](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@otronics](https://forum.arduino.cc/u/otronics)\
**Post date:** [June 25, 2017, 10:18pm UTC](https://forum.arduino.cc/t/msf-clock/466148/7 "2017-06-25T22:18:48Z")

</div>

I was looking at something like this: [With/Without IIC/I2C/TWI 1602 Serial Backlight LCD Module YwRobot For Arduino | eBay](http://www.ebay.co.uk/itm/IIC-I2C-TWI-1602-Serial-Backlight-LCD-Module-YwRobot-For-Arduino-Raspberry-PI-/262983388221?var=&hash=item3d3b080c3d:m:mbo7oGHheXz4EnFaF39NzOg)

Also, do I need the IIC version?

---

<div class="post-metadata">

**Author:** ![anon57585045](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@anon57585045](https://forum.arduino.cc/u/anon57585045)\
**Post date:** [June 25, 2017, 10:20pm UTC](https://forum.arduino.cc/t/msf-clock/466148/8 "2017-06-25T22:20:53Z")

</div>

> otronics:  
> Also, do I need the IIC version?

It depends how many digital pins you can spare for it.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [June 26, 2017, 6:17am UTC](https://forum.arduino.cc/t/msf-clock/466148/9 "2017-06-26T06:17:11Z")

</div>

You don't _need_ the i2c version. The i2c version requires only 2 Arduino pins (A4 & A5 on Uno/Nano). The non-i2c version needs 6 Arduino pins. You have lots of spare pins on the Nano in your project as it stands. You will also need a small pot (10K) to adjust the contrast on tbe display (if you don't use one with an i2c backpack).

If you are considering alternatives to msf, you could use WiFi to connect to a Network Time Server. For this I would recommend a Wemos Mini instead of the Nano. Because the Wemos has fewer pins than the Nano, the i2c display would be a good idea.

---

<div class="post-metadata">

**Author:** ![Riva](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/riva/32/1013044_2.png) [@Riva](https://forum.arduino.cc/u/Riva)\
**Post date:** [June 26, 2017, 7:48am UTC](https://forum.arduino.cc/t/msf-clock/466148/10 "2017-06-26T07:48:06Z")

</div>

Attached is some code I cobbled together some time ago but I cannot remember the results of testing it so it may be faulty.  
Also I only tested it using an audio file as the source and not an MSF receiver module as I cannot get a reliable signal at my workbench and the ultimate aim was building an MSF Encoder so I could set radio controlled clocks in places where they cannot get a radio signal.

[MSF\_Decode.ino](https://forum.arduino.cc/uploads/short-url/nLBItg5J5biRLtLxiCtcvJjV8kY.ino) (3.96 KB)

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [June 26, 2017, 8:31am UTC](https://forum.arduino.cc/t/msf-clock/466148/11 "2017-06-26T08:31:17Z")

</div>

> radio controlled clocks in places where they cannot get a radio signal.

Huh?

---

<div class="post-metadata">

**Author:** ![Riva](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/riva/32/1013044_2.png) [@Riva](https://forum.arduino.cc/u/Riva)\
**Post date:** [June 26, 2017, 9:05am UTC](https://forum.arduino.cc/t/msf-clock/466148/12 "2017-06-26T09:05:46Z")

</div>

> PaulRB:  
> Huh?

Someone decided to buy radio controlled clocks for the workplace so they would not need resetting twice a year. But did not think of the problems of getting a signal in a electronically noisy MCR in a metal clad building.

---

<div class="post-metadata">

**Author:** ![otronics](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@otronics](https://forum.arduino.cc/u/otronics)\
**Post date:** [June 27, 2017, 10:57am UTC](https://forum.arduino.cc/t/msf-clock/466148/13 "2017-06-27T10:57:03Z")

</div>

> PaulRB:  
> You don't _need_ the i2c version. The i2c version requires only 2 Arduino pins (A4 & A5 on Uno/Nano). The non-i2c version needs 6 Arduino pins. You have lots of spare pins on the Nano in your project as it stands. You will also need a small pot (10K) to adjust the contrast on tbe display (if you don't use one with an i2c backpack).
> 
> If you are considering alternatives to msf, you could use WiFi to connect to a Network Time Server. For this I would recommend a Wemos Mini instead of the Nano. Because the Wemos has fewer pins than the Nano, the i2c display would be a good idea.

Got it. I have plenty of pins to spare on the Nano so will get the non-i2c version.

Re/ a 10k pot, will this be OK:

> **[Range of Mono Linear / Logarithmic Splined 16mm Potentiometer Pot | eBay](https://www.ebay.co.uk/itm/Range-of-Mono-Linear-Logarithmic-Splined-16mm-Potentiometer-Pot-/281705182354?var=&hash=item4196eff492:m:m4wCGal-N4R0oIjxpzHljHg)**
>
> Range of Mono Linear / Logarithmic Splined 16mm Potentiometer Pot.

Linear or logarithmic?

I am not considering any alternatives to MSF but thanks for the thought.

Riva - thanks for the code.

---

<div class="post-metadata">

**Author:** ![PaulRB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paulrb/32/216330_2.png) [@PaulRB](https://forum.arduino.cc/u/PaulRB)\
**Post date:** [June 27, 2017, 6:11pm UTC](https://forum.arduino.cc/t/msf-clock/466148/14 "2017-06-27T18:11:46Z")

</div>

That pot would work fine, but it's a bit big & bulky for the job. A "trimmer" or "trimpot" is appropriate. You won't need to adjust it very often, so something you can adjust with a small screwdriver. (Unless you plan to make the circuit battery powered, in which case the lcd may well be a mistake anyway).  
 ![s-l300 (5).jpg](https://europe1.discourse-cdn.com/arduino/original/4X/7/6/3/763f60d4fe69905445f7aae4b57ae140da4f4a62.jpeg)  
Log pots are generally only used in analog audio circuits. Linear pots are what's usually needed for Arduino projects.

![s-l300 (5).jpg](https://europe1.discourse-cdn.com/arduino/original/4X/7/6/3/763f60d4fe69905445f7aae4b57ae140da4f4a62.jpeg)

---

<div class="post-metadata">

**Author:** ![otronics](https://avatars.discourse-cdn.com/v4/letter/o/ce73a5/32.png) [@otronics](https://forum.arduino.cc/u/otronics)\
**Post date:** [June 28, 2017, 11:17am UTC](https://forum.arduino.cc/t/msf-clock/466148/15 "2017-06-28T11:17:35Z")

</div>

Excellent.

I shall order all the parts in the coming days.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 6:16pm UTC](https://forum.arduino.cc/t/msf-clock/466148/16 "2021-05-05T18:16:11Z")

</div>


