1. Introduction
Older style thermostats and some tilt-triggered alarm systems both historically used exactly this kind of switch, a sealed capsule containing a small blob of liquid mercury that rolls to complete or break a circuit depending on orientation. In this experiment, a mercury tilt switch module is wired to the STM32F070RB as a simple digital input, and the microcontroller reports the detected tilt state over UART.
2. Scope
This experiment covers understanding how a sealed mercury capsule acts as a tilt-actuated electrical switch, and reading its digital output with an internal pull-up. This reinforces the simple digital GPIO read pattern used across this series, applied here to a tilt-actuated sensor.
3. Prerequisite
3.1 Hardware
-
STM32 Nucleo-F070RB development board
-
Mercury tilt switch module
-
Breadboard and jumper wires
-
Micro-USB cable
-
PC with PuTTY
3.2 Software
-
STM32CubeMX (standalone)
-
STM32CubeIDE
-
ST-LINK USB driver
-
PuTTY, or an equivalent serial terminal application
Community Q&A
0 questionsAsk questions and get answers from our community and staff moderators.
No questions yet — be the first to start the conversation!
Ask a Question
Please log in to ask a question or post a reply.
Login to Participate