This project is divided into two parts. The first part is to design and produce a minimum system board based on the Renesas R7FA2E1A72DFL microcontroller. All IO ports are led out, debugging interfaces are reserved, and USB power supply is used. The second part is based on the minimum system. Gas alarm circuit, the main functions are introduced below.
Hardware part:
1. Microcontroller: Renesas R7FA2E1A72DFL. Based on the Arm Cortex-M23 core, with a maximum frequency of 48 MHz, it has up to 512KB of flash memory and 64KB of SRAM. The supply voltage range is 1.6V to 5.5V. Peripherals include full-speed USB, CAN, 24-bit analog-to-digital converter (ADC), 16-bit analog-to-analog converter (DAC), capacitive touch sensing, and security features.
2.MQ4 methane sensor. The gas-sensitive material used by the MQ-4 methane sensor is tin dioxide (SnO2), which has low conductivity in clean air. When there is combustible gas in the environment where the sensor is located, the conductivity of the sensor increases as the concentration of combustible gas in the air increases. A simple circuit can be used to convert changes in conductivity into an output signal corresponding to that gas concentration. The MQ-4 methane sensor has high sensitivity to methane and strong anti-interference ability to alcohol and other interfering gases.
3.0.96 OLED display. The screen size is 0.96 inches, the pixels are 128*64, the internal driver IC is SSD1306, and the communication method is I2C.
Software part:
1. Program development software: e2studio, an Eclipse-based integrated development environment (IDE) containing all necessary tools for creating, compiling and debugging RA product family projects. Its configurator allows easy graphical access to tasks such as creating new projects, or accessing the configuration of different hardware features such as clock modules or pin function selection, as well as access to middleware, drivers, board levels Support packages and software module options for RTOS. None of these operations require a particularly detailed study of the user guide.
2. Serial port burning software: Renesas Flash Programmer V3.09, used to burn firmware for Renesas microcontrollers.
Main functions: The OLED display shows the combustible gas detection value, the buttons control the alarm on and off, an LED is used to display the alarm on and off status, an LED is used to send out a flashing signal of the gas alarm, and the buzzer is used to sound the alarm.
Working principle: Renesas R7FA2E1A72DFL collects the analog value of the MQ4 methane sensor through the ADC and drives the OLED display to display the gas value at all times. When the gas value reaches the set threshold, the microcontroller drives the buzzer to start an alarm and the alarm light starts to flash. Press the button to turn off or turn on the alarm function.
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet