This example project shows an example for Mikroe Alcohol Click board driver integration with Silicon Labs Platform.
Alcohol Click is based on the MQ-3 sensor, which detects the presence and the concentration of alcohol in the air. It has a high sensitivity to alcohol and slight to benzine, suitable for detecting alcohol in concentrations from 0.04 to 4mg/l.
The MQ-3 provides an analog representation of its concentration in the air sent directly to an analog pin of the mikroBUS™ socket labeled OUT. The analog output voltage provided by the sensor varies in proportion to the alcohol concentration; the higher the alcohol concentration in the air, the higher the output voltage. Also, this Click board™ has a built-in potentiometer that allows users to adjust the Load Resistance of the MQ-3 circuit for optimum performance
-
EFR32xG24-EK2703A EFR32xG24 Explorer Kit (BRD2703A xG24 Explorer Kit Board)
-
Or SiWx917 Wi-Fi 6 and Bluetooth LE 8 MB Flash SoC Pro Kit (BRD4002 + BRD4338A)
-
If the EFR32xG24 Explorer Kit is used:
The Alcohol Click board supports MikroBus, so it can connect easily to the Explorer Kit via MikroBus header. Assure that the 45-degree corner of Click board matches the 45-degree white line of the Explorer Kit.
The hardware connection is shown in the image below:
-
If the SiWx917 Wi-Fi 6 and Bluetooth LE 8 MB Flash SoC Pro Kit is used:
Description BRD4338A GPIO BRD4002 Breakout Pad Acohol Click Positive analog input ULP_GPIO_1 P16 OUT
You can either create a project based on an example project or start with an empty example project.
-
From the Launcher Home, add your device to My Products, click on it, and click on the EXAMPLE PROJECTS & DEMOS tab. Find the example project filtering by mq3.
-
Click Create button on the Third Party Hardware Drivers - MQ3 - Alcohol Click (Mikroe) example. Example project creation dialog pops up -> click Create and Finish and Project should be generated.
-
Create an "Empty C Project" for your board using Simplicity Studio v5. Use the default project settings.
-
Copy the file
app/example/mikroe_alcohol_mq3/app.c
into the project root folder (overwriting existing file). -
Install the software components:
-
Open the .slcp file in the project.
-
Select the SOFTWARE COMPONENTS tab.
-
Install the following components:
If the EFR32xG24 Explorer Kit is used:
- [Services] → [Timers] → [Sleep Timer]
- [Services] → [IO Stream] → [IO Stream: USART] → default instance name: vcom
- [Application] → [Utility] → [Log]
- [Third Party Hardware Drivers] → [Sensors] → [MQ3 - Alcohol Click (Mikroe)] → use default configuration
If the SiWx917 Wi-Fi 6 and Bluetooth LE 8 MB Flash SoC Pro Kit is used:
- [WiSeConnect 3 SDK] → [Device] → [Si91x] → [MCU] → [Service] → [Sleep Timer for Si91x]
- [WiSeConnect 3 SDK] → [Device] → [Si91x] → [MCU] → [Peripheral] → [ADC] → [channel_1] → use default configuration
- [Third Party Hardware Drivers] → [Sensors] → [MQ3 - Alcohol Click (Mikroe)]
-
-
Install printf float
-
Build and flash this example to the board.
Note :
-
Make sure that the Third Party Hardware Drivers extension is installed. If not, follow this documentation.
-
SDK Extension must be enabled for the project to install "MQ3 - Alcohol Click (Mikroe)" component.
The example detects the presence and concentration of alcohol in the air and shows a message on the log screen, which is raw data and the output voltage of ADC.
You can launch Console that's integrated into Simplicity Studio or use a third-party terminal tool like TeraTerm to receive the data from the USB. A screenshot of the console output is shown in the figure below.
To report bugs in the Application Examples projects, please create a new "Issue" in the "Issues" section of third_party_hw_drivers_extension repo. Please reference the board, project, and source files associated with the bug, and reference line numbers. If you are proposing a fix, also include information on the proposed fix. Since these examples are provided as-is, there is no guarantee that these examples will be updated to fix these issues.
Questions and comments related to these examples should be made by creating a new "Issue" in the "Issues" section of third_party_hw_drivers_extension repo.