Mirko Pavleski
Published © GPL3+

Easiest Way to Connect Any VFD Serial Display to Arduino

This is a nice retro-look weather station and clock that I made with a POS VFD display for which I did not have any data and information.

IntermediateFull instructions provided7,819
Easiest Way to Connect Any VFD Serial Display to Arduino

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
MyOctopus i2c Barometric Air Pressure Sensor BMP280
MyOctopus i2c Barometric Air Pressure Sensor BMP280
×1
DS3231M - ±5ppm, I2C Real-Time Clock
Maxim Integrated DS3231M - ±5ppm, I2C Real-Time Clock
×1
Serial VFD POS display
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Schematics

Schematic diagram

Code

Arduino Code

C/C++
#include <Wire.h>
#include <SFE_BMP180.h>
#include <DS3231.h>
SFE_BMP180 bmp180;
DS3231  rtc(SDA, SCL);
int Altitude = 713; //current altitude in meters in my town

void setup() {
  Serial.begin(4800);
  rtc.begin();
  // The following lines can be uncommented to set the date and time
  //rtc.setDOW(WEDNESDAY);     // Set Day-of-Week to SUNDAY
  //rtc.setTime(17, 47, 0);     // Set the time to 12:00:00 (24hr format)
  //rtc.setDate(3, 7, 2021);   // Set the date to January 1st, 2014
  
  bool success = bmp180.begin();

  if (success) {
    Serial.println("BMP180 init success");
  }
}

void loop() {

  char status;
  double T, P;
  bool success = false;

  status = bmp180.startTemperature();
delay(1000);
  if (status != 0) {
  
    status = bmp180.getTemperature(T);

    if (status != 0) {
      status = bmp180.startPressure(3);

      if (status != 0) {
        delay(status);
        status = bmp180.getPressure(P, T);

        if (status != 0) {
          int comp = bmp180.sealevel(P, Altitude);

          Serial.print(" ");
          Serial.print(comp);
          Serial.print(" hPa");

          Serial.print(" * ");
          Serial.print(T);
          Serial.print(" C ");


  // Send date
  Serial.print(rtc.getDateStr());
  Serial.print(" ");
 
  // Send time
  Serial.println(rtc.getTimeStr());
  
        }
      }
    }
  }
}

Credits

Mirko Pavleski

Mirko Pavleski

149 projects • 1283 followers

Comments