Making a chronometer with ESP32 board and SSD1306 display

ESP32 07-01-24
250 0

Tutorial plan

1- Operation of the chronometer controlled by the ESP32 board

2- The components needed to build a chronometer controlled by the ESP32 board

3- Mounting the ESP32 board with the SSD1306 display and push buttons

4- Programming the ESP32 board with Micropyhton to display the chronometer on SSD1306 display

 

 

Operation of the chronometer controlled by the ESP32 board

A chronometer is a timekeeping device used to measure the amount of time elapsed between its activation and deactivation. It typically consists of a digital or analog display and buttons to start, stop, and reset the timer. chronometer functions are commonly used in sports, fitness activities, scientific experiments, and various timed events where precise timing is essential.

Using a chronometer with ESP32 board is a fun and educational project. You can create a simple chronometer using theESP32 board and some additional components like buttons and SSD1306 display.

The operation of the chronometer controlled by the ESP32 board with SSD1306 display and push buttons can be described as follows:

Initial Startup: When you power theESP32 board, the timer begins to display Press START on the SSD1306 display.

Start Button: By pressing the Start button, the chronometer starts measuring the time from 00:00 until you press the Stop button.

When the chronometer is running, the SSD1306 display shows the elapsed time in minutes and seconds, for example, 00:15 (15 seconds elapsed), 01:30 (1 minute and 30 seconds), etc.

Pressing the stop button again causes the chronometer to freeze, recording the time elapsed up to that point, without setting it to zero.

Reset Button: By pressing the reset button, the timer returns to 00:00, thereby resetting the elapsed time to zero, regardless of its previous state (running or stopped).

This operation allows you to control the chronometer using the push buttons: start to start measuring time, stop to freeze the current time and reset to reset the chronometer to zero. The SSD1306 display shows real-time elapsed time in minutes:seconds format while the chronometer is running.

The components needed to build a chronometer controlled by the ESP32 board

To build a chronometer controlled by an ESP32 board, you'll need several components to create the necessary functionalities. Here's a list of components required:

ESP32 board:

ESP32 card

The ESP32 is a powerful microcontroller developed by Espressif Systems. It's renowned for its integrated Wi-Fi and Bluetooth capabilities, making it a popular choice for various IoT (Internet of Things) applications.

SSD1306 Display:

The SSD1306 display is a small OLED (Organic Light Emitting Diode) screen known for its use in various electronic projects. It's commonly employed for displaying information in DIY electronics, such as displaying text, graphics, or icons. The SSD1306 usually comes in resolutions like 128x64 pixels or 128x32 pixels and can be controlled by microcontrollers like ESP32 board.

Pushbuttons:

push button

These will serve as controls for starting, stopping, and resetting the chronometer.

Breadboard:

Test plate

A breadboard is a useful tool for creating temporary electronic circuits. It allows you to connect components without soldering.

Jumper Wires:

Jumper wires

For making temporary connections and wiring between components.

These are the basic components required to build a chronometer using the ESP32 board. The specific values and quantities might vary based on your design preferences and the exact functionality you wish to implement.

Mounting the ESP32 board with the SSD1306 display and push buttons

Mounting the ESP32 board with the SSD1306 display and push buttonsMounting the ESP32 board with the SSD1306 display and push buttons

Mounting the ESP32 board with SSD1306 display and push buttons involves physically setting up these components on a breadboard or a prototyping board and wiring them together. Here's a step-by-step guide to mounting these components:

Mount the SSD1306 Display:

- Connect the GND pin of the SSD1306 display to the GND pin of the ESP32 board

- Connect the VCC pin of the SSD1306 display to the 3.3V pin  of the ESP32 board

- Connect the SDA pin of the SSD1306 display to the GPIO 21 of the ESP32 board

- Connect the SCL pin of the SSD1306 display to the GPIO 22 of the ESP32 board

Connect Start Push Button:

- Connect the one of the legs of the push button to GPIO 19 of the ESP32 board

- Connect another pin of the push button to the GND pin of the ESP32 board

Connect Reset Push Button:

- Connect the one of the legs of the push button to GPIO 18 of the ESP32 board

- Connect another pin of the push button to the GND pin of the ESP32 board

Programming the ESP32 board with Micropyhton to display the chronometer on SSD1306 display

Ensure you have the Micropython firmware installed on your ESP32 and the necessary libraries (such as ssd1306.py) installed on your board before running this code. Also, adjust the SCL and SDA pins (Pin(22) and Pin(21)) according to the actual wiring of your ESP32.

This code initializes an SSD1306 display, starts a chronometer when executed, and displays the elapsed time on the OLED screen.

0 comment

Leave a comment

Veuillez noter s'il vous plaît*

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Purpose of this website

Educational robotics refers to the use of robots and robotics technology to promote learning in educational settings. It involves the integration of technology, engineering, and computer science into the classroom, allowing students to engage in hands-on, project-based learning experiences.
In this context, our website represents an excellent resource for parents, teachers and children who wish to discover robotics.

Contact details

Zaouiet Kontech-Jemmel-Monastir-Tunisia

+216 92 886 231

medaliprof@gmail.com

Pictures of the articles

Robotic site created by MedAli-Teacher info