-
The Meter
2014-12-02 04:12:00The whole idea of this project was to create a giant meter to show website response time almost like a speedometer would. The result is something that’s both fun to watch and provides a meaningful ‘heartbeat’ of current status. After several revisions and different designs along the way, I ended up with what you see here.
Construction & Design
The meter is carved using my CNC machine from 1/4” bi-color HDPE (12 inches square). This is a great material to cut signs or other carvings with because anything carved out is the alternate material color, so there’s no painting/masking/re-painting needed. The needle is cut from 1/8” orange acrylic which worked great for the speedometer theme. For mounting the micro servo, I designed a hole matching the shape of the outer plastic casing which the servo I chose had (see parts list for a link). I designed the whole thing using Inkscape and Easel, mainly because they are free and fairly easy to use. Check out my bill of materials if you are interested in using the same HDPE and acrylic.
View my design & bill of materials
Electronics
I decided to power the meter using the Arduino Uno microcontroller since it handles servo control really well. The Raspberry Pi would be another option, but I’ll detail the Arduino setup for now. My implementation also uses a few LED displays to display detailed metrics, but the servo is the main piece you need. Here’s a quick parts list:
- Arduino UNO
- micro servo motor
- 2x Adafruit Quad Alphanumeric Display - Blue 0.54” (optional)
- Adafruit Bicolor LED Square Pixel Matrix (optional)
- misc jumper wires
- screws, scrap wood for test cuts, etc.
Code
Construction was by far the longest part of this project. The code ended up being pretty simple since it’s just rotating a servo using a PWM output and writing values to LED displays over i2c. The nice thing is that the implementation can be changed to support any kind of metric or API that is desired. For example, instead of web response time you could make a meter for monitoring CPU utilization on a server or even your own desktop. I’ve posted all of the code required to get this working, along with more detail about the implementation on GitHub under servometer. Enjoy.
-
Spring MVC Mapped Interceptors
2013-07-16 05:38:00Spring MVC 3.2 adds the ability to exclude certain request interceptors from running based off the incoming request path. Here's how it works... -
Freemarker and Exception Logging
2013-05-09 03:54:00Freemarker pushes a lot of information to the logs. Here's how to specify the logging framework it uses, or disable logging entirely... -
Hibernate Envers - Audit Logging Made Easy
2013-04-21 05:26:00Need to keep a detailed audit trail for your database entities? Hibernate Envers is the way to go! -
Facebook LIKE buttons without the count
2013-04-01 07:22:00Facebook seems to really want you to show the number of LIKEs whenever you use one of their buttons on your site. Here's a good hack around that...