Table of Contents

Data Logger and Graphing Terminal

Introduction

The project consists of a standalone data logging and visualization system based on the ESP32 microcontroller. The device reads data from analog and digital sensors (temperature/pressure, light). The data is also rendered in real time on a color TFT display. The system can be operated independently from a PC using a custom hardware interface and a standard PS/2 keyboard.

The Scope of the Project: The main scope of the project is creating a set of portable tools capable of logging and storing physical data whilst also offering the user a local control panel. The user can type commands to modify the sampling rate, graph scale, or to save/load data from memory.

Starting Idea: I wanted to build an embedded system that can integrate many communication protocols and peripherals that I studied (SPI, I2C, UART, ADC, PWM, timers, system interrupts) without using a computer. I was inspired by budget oscilloscopes.

Why It Is Useful: For regular users, the project serves as a practical and visual instrument for monitoring the environment or testing analog signals. For me as a developer, I wanted to write from scratch a driver for the PS/2 protocol (managing external interrupt timings) and coordinating multiple data buses (high-speed SPI for graphics and I2C for sensors and storing data) without blocking operations.

General Description

Block Diagram

Project Modules and User-System Interaction

The system is split into hardware and software modules. The system is partially event-driven (using interrupts).

  1. User Input (PS/2 Keyboard and Custom Driver)
    • Hardware: Signals that are coming from the keyboard (5V) go through resistors to protect the ESP32 (3.3V).
    • Software: The ISR listens to the CLK pin of the keyboard and receives the data bits at every negedge cycle. The scan codes are decoded and inserted into a buffer.
  2. Data Reading (Sensors and Timers)
    • Hardware/Software: A hardware timer dictates the reading of data from the sensors in a strict interval (ex. default = 100ms, may be changed by the user). The module reads the data from the I2C bus (BMP180) or from the ADC pins (photoresistor) and stores the values in a circular array.
  3. Memory (I2C EEPROM)
    • When the SAVE command is issued by the user, the data is serialized and written on the I2C bus to the AT24C256 EEPROM for permanent storage.
  4. Graphics (SPI TFT Display)
    • Using the high-speed TFT_eSPI library, the screen can render the graph smoothly. The refresh rate is optimized by drawing the “delete rectangles” ahead of the new data, thus bypassing the flickering effect. The brightness of the screen is adjustable through software using a PWM signal on the backlight (LED) pin.

Hardware Design

Bill of Materials:

Electrical diagram

Software Design

IDE:

Libraries and 3rd Party Resources:

Algorithms and Data Structures Used (or Planned):

Sources and Implemented Functions:

Rezultate Obţinute

Care au fost rezultatele obţinute în urma realizării proiectului vostru.

Concluzii

Download

Jurnal

Bibliografie/Resurse

Export to PDF