VFD Clock with SNMP and NTP
So, I got a new screen and had a wooden box laser cut. I also added a bluetooth audio module and stereo speakers.
The display has been changed slightly. It was confusing (or so people told me) so I changed it to show the day as text, dropped the month and dropped seconds. There is a flashing : between hours and minutes (was off when I took the photo) like on most digital clocks.
The bluetooth module is connected via serial internally so the clock can control the phone. WAIT! I hear you cry, there are no buttons! Indeed.
So SNMP is used to control the BT module. You can control it as normal from the phone, skip tracks, change volume, pair etc but if you want to do so remotely you can send commands to the module via SNMP. A confirmation flashes briefly on the VFD when commands are sent.
I mentioned before I wanted to do auto-dimming. Well rather than use a light sensor I set the level based on time. At 11pm it dims to minimum and at 6am comes back up to full brightness. This seems to work well. I was thinking about having SNMP oids for “dim time” and “light time” so you could control it but that seems a little over the top. It will start to need a manual soon and the whole idea was for this to be a plug and forget clock. If you need a manual, it’s too complex.
Also, for use in my bedroom I changed from an Arduino clone and Wiz5100 to a Spark Core with WiFi. This means there is no cat5, just a 12v adapter which is much neater. I can also flash new FW remotely to the clock at any time. The Spark Core is pretty cool.
My next “wishlist” item is a UDP mode that shows the data directly on screen so the server can send text. I would do things like scrape bus time tables and show “bus in 5, leave now” etc Maybe weather warnings like “Take a brolly!”
Last on the wishlist is a sleep timer that stops the BT audio after say 30 minutes. While that is easy to do, I have no buttons on the clock so triggering it requires some thought. The only sensible option I have come up with is an IR receiver and a remote control.
So I always get annoyed with clocks. They NEVER do what I want. Either they need setting too often because of drift, or they don’t know Daylight savings time or they are not very readable. NONE of them fit my needs.
So, what to do? Build one.
For a screen I am using a salvaged VFD from an old Fruit Machine. 16 character 14 segment display with serial input.
Main control board is an ardiuno clone from eBay.
Connectivity is via a WizNet5100 board.
There is also a Dallas 1-wire Temperature probe because why not?
Power is a small DC2DC module from eBay that takes 12v or so and gives 5v and 3.3v out.
The screen needs 12v so the main PSU is a normal 12v wall-wart. This goes to the Vreg module and then 5v out to the Arduino clone and 12v over to the display. The Wiznet board uses 3.3v so that comes off the module too.
The screen shows the date, dd.mm then the time hh,mm,ss and finally the temp tt.tt
you can see from the shot above it was 11:33:21 and 24.25’c when I took this photo on the 4th Dec.
The internet connection is DHCP so no configuration of the device is required, it picks up it’s IP and hostname via DHCP on boot. This makes it pretty much plug and play anywhere there is a network socket.
The clock sets itself via NTP, so no buttons are needed!
What’s more it adjusts for Daylight savings time automatically. Adjustment is done every 24 hours at midnight, so this is also when Daylight savings is applied or not.
The Temperature is quite accurate using the Dallas 1-Wire sensor, certainly .00 of a degree is more than I need to know when the only question is should I wear a T-Shirt or Jumper?
An HTTP server displays all the information on a dedicated web page, full time/date and uptime etc.
It detects the Dallas 1-wire and shows the address on the webpage as well as the DHCP information on it’s IP and Hostname.
Lastly I put an SNMP server in it, all info is available over SNMP.
The device name is a get only value that is set from the DHCP request so you can change it’s hostname by configuring the DHCP server correctly.
The standard Arduino DHCP library didn’t do what I wanted. I modified it so that I could get the hostname in the DHCP reply. This is passed back to the rest of the code and used to set the device name in the SNMP system oid.
The standard system OIDs are all supported including up-time.
Location/Contact are get/set fields so you can program those to say what you want.
I also setup an OID to show the temperature so I can remotely monitor this. I have a server running Cacti graphing the temp every 5 minutes from the clock.
I really needs a box with filter over the display but is quite readable in all lighting.
I would like to add an ambient light sensor and vary the brightness of the display to be dimmer at night. At the moment that isn’t an issue as it’s on my desk at work, but for in the bedroom it would need auto-dimming.
I have a humidity sensor that I would like to add too.
The PSU should be replaced by a POE receiver so it can run just off the Cat5e cable. Having Cat5e and PSU is a bit too messy :p
I now have an always correct Clock that never needs setting, is clearly visible and shows the time/date/temp on one clear and concise screen. I can monitor it via HTTP and SNMP as well as graph the temperature over time