STM32F103C8T6-Based Water Level Monitoring and Communication System with SIM900A and LoRa Connectivity
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary of the Circuit
This circuit integrates various components to perform multiple functions, including wireless communication, distance measurement, and water level sensing. The core of the circuit is an STM32F103C8T6 microcontroller, which interfaces with a SIM900A GSM module, an HC-SR04 ultrasonic sensor, a water level sensor, and a LoRa Ra-02 SX1278 module for long-range communication. An FTDI programmer is included for programming and debugging the microcontroller. The circuit is designed to operate with a common ground and a 5V power supply for some components and a 3.3V power supply for others.
Component List
SIM900A GSM Module
- Description: A GSM/GPRS module for cellular communication.
- Pins: GND, DB9-3 (RXD), DB9-2 (TXD), 5V, 3VR, 5VR, 3VT, 5VT, VCC, Ring, RESTART, RESET, STATUS.
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic ranging module for distance measurement.
- Pins: VCC, TRIG, ECHO, GND.
STM32F103C8T6 Microcontroller
- Description: A 32-bit ARM Cortex-M3 microcontroller.
- Pins: GND, 3.3V, reset, B11, B10, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14, C13, VBT, 3.3, 5V, B12, B13, B14, B15, A8, A9, A10, A11, A12, A15, B3, B4, B5, B6, B7, B8, B9, SWIO, SWCLK.
Water Level Sensor
- Description: A sensor for detecting water level.
- Pins: SIG, VCC, GND.
LoRa Ra-02 SX1278 Module
- Description: A long-range communication module based on LoRa technology.
- Pins: GND, NSS, MOSI, MISO, SCK, DIO5, DIO4, 3.3V, RST, DIO0, DIO1, DIO2, DIO3.
FTDI Programmer
- Description: A USB to serial converter for programming and communication.
- Pins: DTR, RX, TX, VCC, CTS, GND.
Wiring Details
SIM900A GSM Module
- RXD connected to STM32F103C8T6 pin A3.
- TXD connected to STM32F103C8T6 pin A2.
- GND connected to the common ground net.
- VCC connected to the 5V power net.
HC-SR04 Ultrasonic Sensor
- TRIG connected to STM32F103C8T6 pin A0.
- ECHO connected to STM32F103C8T6 pin A1.
- GND connected to the common ground net.
- VCC connected to the 5V power net.
STM32F103C8T6 Microcontroller
- GND connected to the common ground net.
- 5V connected to the 5V power net.
- 3.3 connected to the 3.3V power net.
- reset connected to FTDI Programmer DTR.
- A0 connected to HC-SR04 TRIG.
- A1 connected to HC-SR04 ECHO.
- A2 connected to SIM900A TXD.
- A3 connected to SIM900A RXD.
- A4 connected to LoRa Ra-02 SX1278 NSS.
- A5 connected to LoRa Ra-02 SX1278 SCK.
- A6 connected to LoRa Ra-02 SX1278 MISO.
- A7 connected to LoRa Ra-02 SX1278 MOSI.
- A9 connected to FTDI Programmer RX.
- A10 connected to FTDI Programmer TX.
Water Level Sensor
- SIG connected to LoRa Ra-02 SX1278 DIO0 and SIM900A TXD.
- GND connected to the common ground net.
- VCC connected to the 5V power net.
LoRa Ra-02 SX1278 Module
- NSS connected to STM32F103C8T6 pin A4.
- MOSI connected to STM32F103C8T6 pin A7.
- MISO connected to STM32F103C8T6 pin A6.
- SCK connected to STM32F103C8T6 pin A5.
- GND connected to the common ground net.
- 3.3V connected to the 3.3V power net.
- DIO0 connected to Water Level Sensor SIG.
FTDI Programmer
- DTR connected to STM32F103C8T6 reset.
- RX connected to STM32F103C8T6 pin A9.
- TX connected to STM32F103C8T6 pin A10.
- GND connected to the common ground net.
- VCC connected to the 3.3V power net.
Documented Code
Since no code was provided in the input, this section is currently empty. When code is available, it should be documented here with comments explaining the functionality and the connections to the various peripherals and sensors used in the circuit.