Wireless Security Detector
9 Ekim 2024

The project covers the design process of a security detector circuit and card that can detect motion, have Wi-Fi communication, and operate connected to the mains electricity.
The Wireless Security Detector card is designed to perform various tasks by detecting motion.
These critical tasks are:
- Being able to read and process data from sensors without any problems.
- Being able to operate with 220VAC mains power.
- Being able to send real-time data via Wi-Fi.
- Being able to calculate time data with a Real-Time Clock.
- Being able to control peripheral units in ON/OFF states using relays.
- Being able to measure temperature.
The STM32F103C6T6A microprocessor was used as the processor. It processes the data received from sensors and peripheral units and provides relevant commands.
The circuit receives power from the mains power. This energy must be distributed to the components in the circuit in a controlled manner. For this purpose, the circuit includes an AC-DC converter topology, 12V to 5V and 5V to 3.3V step-down switching, and linear voltage regulators. These regulators eliminate potential voltage fluctuations in the circuit, and pure DC power is delivered to the onboard components.
One of the sensors on this board, the NCS36000, can directly measure the presence of motion. Data flow is provided using CMOS communication with the NCS36000 sensor processor. In the presence of motion, the circuit activates current through the connected LED. Data obtained from this sensor is used to initiate tasks determined by the processor based on the presence of motion. These tasks can include activating the Wi-Fi sensor and sending data, or activating/deactivating a relay.
The electronic board is capable of measuring temperature with the thermistor and MAX6662. This measurement, performed using an op-amp and filtering topology, can be obtained using SPI communication with the microprocessor.
The satellite is intended to provide position information through the GPS module throughout its mission in the air. It was preferred to make a connection via terminal instead of a direct connection on the board. Terminal connections are designed in accordance with the UART communication protocol.
The resulting sensor and command data are sent to the cloud system via the ESP32-WROOM-32 module. The data flow between the ESP32-WROOM-32 module and the processor supports UART communication. A sensor ON/OFF switch has also been added for power savings.
The circuit includes an oscillator (clock) circuit for use by the processor, a reset button for manual "Reset" operation with a button, a programmer, a buzzer, a relay, and an LED driver circuit.
Since the sensors were preferred as ICs instead of modules in the circuit design, care was taken to use decoupling capacitors, taking IC health into consideration.
All electronic components used in the project are as follows:
STM32F103C8T6 Microcontroller, LQFP48
LHI 878 PIR Sensor
HS1101 Humidity Sensor
DS18B20 Temperature Sensor
MQ-2 Gas Sensor
Crystal 8 MHz
TVS Diode SM712
PTC Fuse 0805
NPN Transistor BC817-16, SOT-23
Tactile Switch SMD
LM1117-3.3 Voltage Regulator, SOT-223
Mini USB Type-B Connector
LED Orange & Green/Red, 0603
Capacitors (ceramic + tantalum)
Resistors (all values)
Jumper / Header Connectors (2x1, 4x1, 5x2 etc.)
