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
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
- STM32F103C BluePill - 1pc
- IR Sensor - 2pc
- CH340 USB to TTL - 1pc
- OLED + I2C converter - 1pc
- Jumper Wires - Female-to-male & male-to-male
Installing and Setting Up Boards Manager
Now we have to setup Arduino IDE to support STM32 programming and interfacing
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
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
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
Wire Up the STM32 as per the schematic provided in the image attached.
Flashing the Code to STM32
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.
Downloads
Finishing Up the Programming
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
And that's it we have made the TEED-TS using STM32