Return to the Weasley Clock Project

LabVIEW Community Edition + Raspberry Pi + Arduino = Magic

Posted by Q on 2020-05-25
Words 413 and Reading Time 2 Minutes
Viewed Times

So this project started back when the LabVIEW Community Edition Beta first came out back in January of 2020. At the time it was my intention to finish it by NIWeek 2020 in May, (what would have been last week). However, come March, the world was turned upside-down and NIWeek was cancelled. My priorities shifted to other projects and now I am finally getting back to it.

Introduction

The project is a Weasley Clock. For those not versed in the Wizarding World of Harry Potter, Harry Potter has a friend named Ron Weasely. In Ron’s home there is a special clock that doesn’t tell time but instead has a hand for each member of the family and tells where each member is. Instead of numbers it has places such as: Home, School, Work, etc. It also has “Lost” and “Mortal Peril” which is more of situations than locations but here is a picture from the movies:

Weasely Clock Gif

Architecture (Attempt #1)

So, as I said, I started this project a while ago and I am now just getting back to it. The plan is to have a hand for each member of my family, and three more to also tell the time, seven hands total. I bought seven servos, Raspberry Pi, and the AdaFruit Servo Hat for the RPi. I started with this tutorial found on Instructables but planned to use LabVIEW as the main code. The architecture includes:

Architecture 1

*Each member of my family happens to belong to different Hogwarts Houses. So here we are depicted by our house.

The tutorial pointed me to the OwnTracks app which is available on iPhone and Android. The app allows for setting up geo-fences or regions. As my or a family member’s phone crosses a region a message is sent using MQTT to a server. The tutorial also pointed me to a cloud-based MQTT server called CloudMQTT. It offers free MQTT broker service for five connections or less. This suited me with one connection for each family member and one for the Raspberry Pi/Weasley Clock.

My Raspberry Pi application, written in LabVIEW, includes a MQTT subscriber which would allow it to receive MQTT messages with these location events. The application would then command the appropriate servo to move the hand of the clock to the correct location. Thus bringing into existence a magical location knowing clock; proving Clark’s Third Law:

`Any sufficiently advanced technology is indistinguishable from magic. --Arthur C. Clark`