Digital LED NTP Clocks provide an accurate, synchronized time Display across an organization. They can be used in schools and hospitals along with factories and manufacturing works. This helps Classes, Meetings, Manufacturing Events, Processes etc start/end at correct times. They are also widely used in pharmaceuticals manufacture to log batch times. Any where a reliable accurate time reference is required. However, most existing NTP Clocks sync time by connecting to the NTP Server from an Internet enabled Network either through Network Cable (RJ45) or through WiFi. This is just fine for few units (1-5), though as the count increases, these NTP Clocks begin throttling the Network, especially the WiFi NTP Clocks. Traditional WiFi Routers can't handle more than 10+ users/devices and the Industrial/Commercial Routers typically allow for 100-200 Users/Devices. This becomes a problem in an application setting like a Hospital where for example there are 150+ users connecting to the Router and an additional 50 WiFi NTP Clocks also trying to connect and sync time.
The above problem can be solved by simply using only *One* NTP Internet Connected Gateway/Device and meshing the other NTP Clocks to this Gateway. Now for our previous example of 50 NTP Synced Clocks, we now only need one Internet Connected Device and the remaining 49 Clocks sync time through the Mesh Network.This reduces the load on the Network and also the ambiguity of handling 50 independent WiFi NTP Clocks.
Our Solution will use the Particle Argon as the Gateway which syncs time from the NTP Server & sends to endpoints using Particle Mesh feature. Each of the Endpoint is connected to a LED Display which also shows the time.
Since I couldn't get my hand on a Xenon Board / Argon Board to test out the Mesh, I only tested NTP fetch and Time Display on the Argon. The Mesh code however is written and the complete functionality should be demonstrated when the Endpoint code is flashed to another Xenon / Argon.
The Gateway Code shows how Time is fetched from the NTP Server and is sent over the Serial port. The Serial Port is connected to a P10 LED Display which shows any data received on it's custom Serial Driver Module. I choose to refresh/send this every half second.
The following code will publish the updated time across the endpoints.
Mesh.publish("timeUpdate", hhmmss(now.seconds));
The endpoints receive this time and display to the LED Panel:
Mesh.subscribe("timeUpdate",timeHandler);
The Timezone is currently setup for UTC.
Comments