Manometer Clock (controlled by Arduino)
by Maritha22 in Circuits > Clocks
178 Views, 4 Favorites, 0 Comments
Manometer Clock (controlled by Arduino)




In this Instructable, I documented how I converted a manometer into a clock. I found the manometer at a fleamarket. For those who don't know, a manometer is a pressure gauge, it probably used to be connected to a water pipe. I noticed the numbers on the front plate go up to twelve, so it was practically destined to be turned into a clock.
This is my first project with Arduino and, in general, one of my first real programming projects. I thought programming a clock would be a perfect introduction to working with microcontrollers—since the number of components is still manageable, but it is also definitely challenging.
Over the course of the project, many unexpected difficulties appeared, and it turned out to be much more complicated than I anticipated. Nevertheless, I think this is one of my all-time favorite projects so far. Not only did it introduce me to a completely new world of possibilities, but it required me to come up with solutions to connect very old with very new technology.
The title of the project is No. 3560399, as that is the serial number of the manometer. This number was hand-scratched into the paint on various components. I also found another number: 1906. I assume that this was the year of manufacture. This would also match with the time of the production location, which was marked on the front of the dial.
This is not really a step-by-step guide—rather a process journal with perhaps a helpful tip or two.
Supplies



I used :
- one old manometer
- one big, rusty gear, also found at a fleamarket
- acrlic sheets (2mm)
- (also in the picture: a brass connection tube I didn't use in the end)
- double-sided tape
microcontroller parts:
- arduino nano
- real time clock (DS3231)
- stepper motor (28BYJ-48)
- stepper motor driver (ULN2003)
- jumper cables
- breadboard
- micro usb cable
tools
- rotar carving tool
- electric screwdriver and flat head bit
- wd-40
- alcohol, cotton swabs
- soldering iron
- (current meter to check if something is broken)
The Before






With such old technology, everything still works fully mechanically: The manometer is screwed onto a pipe, and a hole runs from the bottom to the middle, where it transitions into the circular metal ring. This part is also hollow inside and expands when the pressure increases. Attached to it is a lever, with a gear (in the shape of a quarter circle) at the other end. As the lever is pulled to the side by the circular metal part, the gear rotates a smaller gear, which is directly connected to the pointer and moves it.
There is also a small balance wheel, but I couldn't figure out its purpose.
On the outside, there are many layers of paint (white over light blue over dark blue), which tell their own story.
Preparing the Casing



The first challenge was getting the casing open in the first place. The screws had remained unchanged for a hundred years, giving them time to stick together with paint, and slightly rust. First, I removed the paint using alcohol and cotton swabs, then carefully sprayed the screws with WD-40. The slots in the screw heads were very narrow, so I sharpened a flat bit with sandpaper until it was thin enough to grip. Using a normal scredriver, I kept slipping, so I used a power screwdriver—very slowly but with a lot of pressure—and that worked.
Then, I removed the outermost casing (in the image bottom right corner), which held the glass pane and a spacer ring (preventing the glass from touching the pointer). Beneath that was the dial. Each component was fastened with a completely different type of screw to avoid confusing them. At the back, I also unscrewed a rear plate.
Most of the inner workings could be unscrewed, except the pointer which wouldn't come off. To remove the dial, I had to saw off the pointer. Additionally, I cut off the circular metal ring. The main metal arm was fixed, but I could simply leave it in place because my motor was just narrow enough to fit between it and the dial.
The first picture is the finished casing.
Understanding the Electronics





Although this was my first project with Arduino, I had many components to experiment with because my dad has a large collection of parts that I was allowed to use. This allowed me to test different components and evaluate how useful they were.
At the beginning of the project, I worked with an Arduino Uno because it is easier to handle. However, I later switched to the Arduino Nano because I wanted to keep the technology as small as possible to fit into the casing. I mounted the Nano on a small breadboard so I could connect multiple jumper cables to a single pin.
Since the Arduino does not have a built in clock, I had to use a rtc module. The real-time clock is easy to use and it has its own battery, allowing it to retain the time even when the Arduino is unplugged. The wiring from the RTC to the Arduino is as follows: SCL to A5, SDA to A4, VCC to 5V, GND to GND.
Originally, I wanted to install a small servo motor but realized that it was far too inaccurate. Additionally, my motor needed to rotate 270°, whereas most servos (like the SG90) only have a specified rotation angle of 180°. That’s why I decided to use a stepper motor (28BYJ-48). A stepper motor can rotate indefinitely but comes with a few special considerations—specifically, that you don’t rotate it by a certain degree but rather by a number of steps. It also requires a stepper motor driver to be connected beforehand. Wiring: IN1 to 11, IN2 to 10, IN3 to 9, IN4 to 8, GND to GND.
Usually, it’s recommended to connect the stepper motor to an external power source to avoid overloading the Arduino. However, I decided to connect it directly to the 5V pin since my stepper motor doesn’t need to exert much force. This saves me a power supply component, a few jumper cables, and an additional power cord.
In the last image, you can see my final wiring setup, except that the button on the yellow breadboard was modified into a zero-position detector (explained in the next step).
Old blog posts have truly helped me with every problem—there are so many about Arduino!
Building Zero-position Detector, Secure Components in Casing



If the power goes out, the motor does not remember the position of the pointer. When the clock is unplugged and then plugged back in, it needs to reset itself, meaning the motor must return to zero and recalibrate. A metal pin next to the zero position, an original part of the manometer, can be used as a calibration aid.
The metal pin is electrically conductive; as is the pointer, which is connected to the motor and conveniently also to its housing. This means that I could solder a wire to the metal pin on the back of the dial and another wire to the motor housing. I connected these two wires to the Arduino (one to D2, one to GND). When the pointer touches the metal pin, a circuit is completed—just like with a pressed button—and the motor stops.
The image shows an initial test before soldering to check if the circuit closes and the concept works.
Since not only the metal pin but the entire dial is electrically conductive, it must not come into contact with the motor. The dial is screwed directly to the housing, but I placed a thin acrylic sheet between them as insulation (held in the photo by red clamps on the dial). This allows me to securely mount my electrical components without having to stick them directly onto the painted surface with the handscratched notes, which could otherwise be damaged.
The acrylic sheet also ensures that the motor sits exactly in the center and does not shift, as I drilled a hole in the middle of the sheet to secure it. I also drilled a hole for the solder joint on the metal pin. All electrical components were mounted using double-sided tape.
Basic Programming of Each Component


I tested each component beforehand with the basic sketches I think were integraded in arduino IDE. (stepper
I had problems with the stepper motor—it wasn’t rotating correctly counterclockwise. The solution was to change the order of the numbers in this line: Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); Instead of "8, 9, 10, 11", I switched it to "8, 10, 9, 11".
For the RTC sketch, there is a line in the setup: rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); This line must be removed in the final program; otherwise, the clock resets to the time recorded during the upload to the Arduino every time the system restarts, instead of keeping the actual time.
The zero-position detector (in the final code called; void calibrate) works as follows: The stepper motor rotates counterclockwise while continuously checking whether a circuit is closed at Pin 2 (where the cable from the metal pin is connected). If the circuit is not closed, the motor continues to rotate. If the circuit is closed, the motor stops, and the program briefly pauses.
After that (void stellen), the RTC is read, and the current time is first converted into a 12-hour format. Then, the current time is converted into segments (each hour on the dial is divided into five segments). This is then translated into the number of steps the motor must rotate clockwise.
Combining the Code



In this final program, all elements are combined.
However, there was one problem: My angle calculations did not match the correct segments/ the actual time. I couldn't find the calculation error, so I adjusted the numbers by modifying the total angular range of my clock face. Now, it works quite well.
What exactly does the program do? The pointer does not move continuously. The time is converted into a number of segments, and every 12 minutes (the duration of one segment), the pointer returns to zero and then sets itself to the new time.
Something happens every 12 minutes because each hour on the clock face is divided into five parts.
There is a special case at 12 o’clock: The pointer remains in position for 12 minutes, just like at any other time, and then at 12:12, it returns to zero.
This works because, for some unknown reason, there are only four segments between 0 and 1, so this discrepancy is compensated for. However, the painted zero is no longer accurate—when the pointer is at that position, it is not actually 00:00/12:00 but rather 12:12 (it stays there until 12:24, when it moves to the next segment).
At midnight, the program does not yet work exactly as intended. The pointer should remain at 12 until 0:12, but instead, it already moves to zero.
Downloads
Attach the Pointer



I drilled a hole in the center of the metal part of the stepper motor, where I later attached the pointer with a small amount of super glue. Overall, the pointer would have been too high, so I trimmed the metal part of the stepper beforehand.
Backplate

I replaced the original metal backplate with a acrylic sheet so that the blinking lights of the electronic components would be visible. To do this, I simply placed the original metal backplate on acrylic glass, traced the outlines, and drilled directly through the existing holes to ensure that the positioning is accurate.
After that, I drilled a hole for the power cable, making sure it was large enough to pull the micro-USB connector through. One thing that would have been useful is attaching a clamp to the cable inside before screwing the panel in place. This would serve as a strain relief to prevent it from being pulled out.
Finished Project


Here are videos how the clock looks when you plug it in. I love how you can see the blinking LEDs from the stepper motor driver.
Thank you for reading!