TOUCH LESS ENTRY EXIT TRACKING SYSTEM USING STM32

by SPLASH ELECTRONIC in Circuits > Arduino

57 Views, 0 Favorites, 0 Comments

TOUCH LESS ENTRY EXIT TRACKING SYSTEM USING STM32

health.png
health.png
FA3IXF1MHMCI9RX.jpg
F040BA4MHMCIDCG.jpg

A Touch less Entry Exit Tracking System now made using the legendary BluePill (STM32F103C). Although this project was made using an esp8266 while ago, this is a refreshed and legendary version of that.


Why STM32, as it was required for us to make a project using some ARM based projects, i reproduced the same with STM32 such that i was able to learn programming STM32 and using STM32 using Arduino IDE.

Supplies

IMG_20251109_211305790_MP.jpg
IMG_20251109_211437292.jpg
IMG_20251109_211456669.jpg
IMG_20251109_211251251.jpg
  1. STM32F103C BluePill - 1pc
  2. IR Sensor - 2pc
  3. CH340 USB to TTL - 1pc
  4. OLED + I2C converter - 1pc
  5. Jumper Wires - Female-to-male & male-to-male

Installing and Setting Up Boards Manager

Screenshot From 2025-11-09 21-23-18.png
Screenshot From 2025-11-09 21-25-53.png

Now we have to setup Arduino IDE to support STM32 programming and interfacing

http://dan.drown.org/stm32duino/package_STM32duino_index.json

Put this in the additional boards manager list ( file -> preferences -> additional board manager )


Now installed the specified board from the Boards Manager - STM32F1xx/GD32F1xx boards ( reference given in media)

Setting Up Boards Prefernce for CH340

Screenshot From 2025-11-09 21-29-47.png
IMG_20251109_214559160.jpg
FKYUA8JMHMCI9S2.jpg

Go to Tools section and make sure that these options are selected as per what i have attached


Make sure that you have selected correct voltage level in the CH340 so that your board wont fry while programming the STM32.

If STM32 is of 3,3v -> connect the VCC to 3.3v of the CH340 programmer


After Connecting the programmer to your laptop, select the COM port and board as it is mentioned in the picture

Board Name: Generic STM32F103C


Setting of STM32 for Programming

IMG_20251109_211456669.jpg
IMG_20251109_215401124.jpg

For Flashing the code to STM32:

The two jumper in yellow must be set to specific states, The upper one should be set to 1 and then reset button to be pressed once while it is connected to power supply.


Wiring the STM32 to CH340:

CH340 GND -> STM32 GND
CH340 RX -> STM32 A9
CH340 TX -> STM32 A10


Now it is time to program the STM32 via CH340 usb to ttl converter using Arduino IDE

Wiring Diagram for the Project

SCH_Schematic1_1-P1_2025-11-09.png

Wire Up the STM32 as per the schematic provided in the image attached.

Flashing the Code to STM32

Screenshot From 2025-11-09 22-12-07.png
Screenshot From 2025-11-09 22-12-19.png
FQRUW5BMHMCIA2P.png

Make sure that you have these libraries installed in Arduino IDE in library manager tab

Adafruit GFX Library by adafruit
Adafruit SSD1306 by adafruit


Below given is a small description about how the code works

This Arduino sketch implements a touchless entry/exit tracking system. It uses two digital input pins (PA0 and PA1) as sensors to detect entries and exits, with a 1-second debounce mechanism for each. The system tracks the number of entries, exits, and the current count of people "inside" (entries minus exits). All this information is then displayed on an Adafruit SSD1306 OLED screen.


Make sure that correct specs are set in TOOLS section while uploading as per the image.

Now verify and upload the code to STM32.

Finishing Up the Programming

FA3IXF1MHMCI9RX.jpg

After flashing the code we need to move the upper jumper in the STM32 from 1 to 0 position and then press reset in order the save the code into the STM32.


If this step is not done the flashed code will not be be cleared off the memory on reset or power off

Finished

IMG_20251109_232715416.jpg
IMG_20251109_232723657.jpg

And that's it we have made the TEED-TS using STM32