Project showcase
Repurposing an Old Voltmeter

Repurposing an Old Voltmeter © GPL3+

How to build an humidity and temperature meter with time display from an old voltage meter casing.

  • 618 views
  • 1 comment
  • 0 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
Hy gluegun
Hot glue gun (generic)

About this project

At the bottom of the old box I found an old beaten up old voltage and ampere meter. The first idea was to modernise the meter but still using the original pointer and scale which both survived the 80+ years that this meter had survived so far. The case was however filled with gunk and remnants of a battery some resistors end other less identifiable stuff. Unfortunately the coil had suffered either from time or other influences to point where it one second would show the correct voltage and the next something totally different. So unfortunately it became a repurposed case of a voltage meter. But the case was made in good quality bakelite and after removing all the innards and the glas it was cleaned from possibly old electrolytes, oil and other stuff you do not want in a voltmeter. I cleaned the glass and hot-glued a OLED display to it and reattached the glas in the case connected an arduino nano with an RTC and a DTC 22. After some programming inspired from some online sources and with my own ideas added to the program the volt meter is now showing the date and time for three seconds after which the time slides out from the oled display and the temperature and humidity slides in. After this the cycle is repeated, watch the video it looks better.

Have fun!

Code

The code to this small projectArduino
Software for a temp, hum, time and date display.
// Using a DHT 22 on pin 7 and a 0.96 inch OLED display

#include <DHT.h>
#include <U8g2lib.h>
#include "RTClib.h"

U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);

RTC_DS1307 RTC;

//Constants
#define DHTPIN 7              // PIN for DHT 22
#define DHTTYPE DHT22         //DHT 22 (AM2302)
DHT dht(DHTPIN, DHTTYPE);

//Variabler
int count;
int chk;                      //counter for cursor
float hum;                    //Stores humidity value
float temp;                   //Stores temperature value

void setup(void)
{
  u8g2.begin();
  RTC.begin();

  if (! RTC.isrunning()) {
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));
  }
}

void TempHum() {                                            // write temp and hum on OLED
  u8g2.clearBuffer();
  u8g2.setContrast(255);
  u8g2.drawRFrame(0 - chk, 0, 128, 64, 7);
  u8g2.setFont( u8g2_font_helvB24_tf);                      // Font
  u8g2.setCursor( 17 - chk, 28);                            // Kursor
  u8g2.print(temp, 1);                                      // Write temp
  u8g2.drawCircle(80 - chk, 5, 2, U8G2_DRAW_ALL);           // Make a °
  u8g2.print(" C");                                        // Celsius
  u8g2.setCursor( 17 - chk, 60);                            // Cursor
  u8g2.print(hum, 1);                                        // write hum
  u8g2.print(" %");                                         // Write %
  u8g2.sendBuffer();
}

void dateTime() {                                         //Write date and time on OLED
  DateTime now = RTC.now();
  u8g2.clearBuffer();
  u8g2.drawRFrame(0 - chk, 0, 128, 64, 7);
  u8g2.setFont( u8g2_font_timB24_tn);                     // Font
  u8g2.setCursor(5 - chk, 27);                            // Kursor
  if (now.hour() < 10)
    u8g2.print("0");
  u8g2.print(now.hour(), DEC);                            // Write hour
  u8g2.print(":");
  if (now.minute() < 10)
    u8g2.print("0");
  u8g2.print(now.minute(), DEC);                           // Write hour
  u8g2.print(":");
  if (now.second() < 10)
    u8g2.print("0");
  u8g2.print(now.second(), DEC);
  u8g2.setCursor( 7 - chk, 60);                            // Cursor
  u8g2.setFont( u8g2_font_timB18_tn);                      // Font
  u8g2.print(now.year(), DEC);                             // Write year
  u8g2.print("-");
  if (now.month() < 10)
    u8g2.print("0");
  u8g2.print(now.month(), DEC);                            // Write month
  u8g2.print("-");
  if (now.day() < 10)
    u8g2.print("0");
  u8g2.print(now.day(), DEC);                              // write day
  u8g2.sendBuffer();
}

void loop(void)
{
  chk = -128;
  do {                                    // let Temp and hum slide in
    TempHum();
    chk = chk + 1;
    delay(1);
  } while (chk < 1);

  delay(3000);

  hum = dht.readHumidity();               // read hum
  temp = dht.readTemperature();           // read temp

  chk = 0;
  do {                                    // let Temp and hum slide out
    TempHum();
    delay(1);
    chk = chk + 1;
  } while (chk < 129);

  chk = -128;
  do {                                    // let time and date slide in
    dateTime();
    chk = chk + 1;
    delay(1);
  } while (chk < 0);

  count = 0;
  do {                          // split the delay of 3000 into six 500 delays to have a smoother sec display
    dateTime();
    delay(10);
    count = count + 1;
  } while (count < 30);

  chk = 0;
  do {                                   // let Temp and hum slide out
    dateTime();
    delay(1);
    chk = chk + 1;
  } while (chk < 129);
  chk = 0;
}

Schematics

Fritzing Schematics
temp_hum_clock_oled_display_emXoXZXLvN.fzz

Comments

Similar projects you might like

Digital Voltmeter With Arduino Nano

Project showcase by KumarB

  • 4,875 views
  • 4 comments
  • 6 respects

Automated Snake Enclosure with Camera

Project showcase by hagakure

  • 5,903 views
  • 9 comments
  • 17 respects

Workspace Environment Monitor - enVMon

Project showcase by comcrazy

  • 3,082 views
  • 3 comments
  • 15 respects

Arduino Digital Voltmeter 5V

Project tutorial by RoboCircuits

  • 2,824 views
  • 3 comments
  • 13 respects

Morse Code Kitchen Timer

Project showcase by oklima

  • 1,505 views
  • 0 comments
  • 8 respects

Voltmeter Using Arduino

Project showcase by Team Next Tech Lab

  • 20,062 views
  • 22 comments
  • 61 respects
Add projectSign up / Login