keyestudio
Share your creative ideas with us here
By Ran | 01 July 2024 | 0 Comments

HOW to Build a Water Level Alarm with Microbit

Overview

In real life, when heavy rain occurs, the water level in a river or a reservoir will rise sharply. When reaching a certain water level, it is necessary to open a floodgate to solve the safety hazard. However, how to detect the water level in a river or a reservoir? Very simple, use a water level sensor.

So in this experiment, we are about to use a water sensor and a buzzer module to detect the water level in the glass, if beyond level, buzzer should make an alarm.

Components Required

  • Micro:bit main board*1

  • Keyestudio Micro bit Sensor V2 Shield*1

  • USB Cable*1

  • keyestudio Water Sensor*1

  • keyestudio Digital Buzzer Module*1

  • DuPont jumper wire*6

  • Premium Battery Holder 6-cell AA*1

  • 1.5V AA Battery*6

Component Introduction

Keyestudio Water Level Sensor:

The water sensor is easy- to-use, portable and cost-effective, designed to identify and detect water level and water drop. This smaller sensor can measure the volume of water drop or water quantity through an array of traces of exposed parallel lines.

Connection Diagram

32

Test Code

Img

Test Results

Wire components up, plug in external power and transfer code to micro:bit. Open CoolTerm, click Options and select SerialPort, set COM port and baud rate(115200). Click OK and Connect.

The deeper the water level sensor is soaked in the water, the larger the analog value is; on the contrary, the analog value gets smaller. When the analog value is more than 400, the active buzzer sounds, otherwise, it doesn’t emit sound.

 

Leave a Reply

Your email address will not be published.Required fields are marked. *
Name
E-mail
Content
Verification code