RespTalk is a low-cost Breath Controlled Assistive Interface (BCAI) designed to help people who are paralyzed, unable to speak, but fully conscious communicate their essential needs using only their breathing.
Instead of relying on speech or physical movement, the user generates short and long breaths, similar to Morse code. These breath patterns are detected by a piezoelectric sensor, processed through an analog signal conditioning circuit, and interpreted by an ATmega328P microcontroller into predefined words such as Food, Water, Emergency, Medicine, Yes, and No.
The recognized message is immediately displayed on an LCD screen and confirmed using an audible buzzer, allowing caregivers or family members to understand the user's request quickly.
⚠️ Educational Purpose OnlyThis project was developed as an educational and research prototype to demonstrate how simple electronic circuits and embedded systems can provide an affordable communication method for individuals with severe speech and motor impairments. It is intended as a proof-of-concept and not as a certified medical device.
- Breath-based communication
- Morse-code inspired input method
- Piezoelectric breath sensor
- LM324 analog signal conditioning
- Dual-threshold breath detection
- ATmega328P standalone implementation
- 16×2 I2C LCD message display
- Audible confirmation using buzzer
- Low-cost hardware design
- No internet or external computer required
- Portable embedded system
Many patients suffering from conditions such as:
- Locked-in Syndrome
- ALS (Amyotrophic Lateral Sclerosis)
- Severe Paralysis
- Stroke
- Neuromuscular Disorders
- Temporary speech disabilities
remain mentally conscious but lose the ability to communicate verbally.
RespTalk provides an inexpensive communication alternative using one ability many of these patients still retain:
Controlled breathing.
By recognizing different breathing durations, the system enables users to communicate basic daily needs without requiring cameras, complex sensors, or expensive eye-tracking systems.
The complete system consists of four stages:
- Breath Detection
- Analog Signal Conditioning
- Pattern Recognition
- Message Display
Workflow:
User Breath
│
▼
Piezoelectric Sensor
│
▼
LM324 Signal Conditioning
│
▼
Comparator Outputs
│
▼
ATmega328P
│
▼
Breath Pattern Recognition
│
▼
LCD + Buzzer
The user blows air onto a piezoelectric disc.
The piezo sensor converts the air pressure into a small electrical signal.
Since the generated signal is very weak and noisy, it is processed using multiple LM324 operational amplifiers.
The analog circuit performs:
- Signal amplification
- Rectification
- Envelope detection
- Threshold comparison
Finally, two comparator outputs are sent to the ATmega328P.
The Arduino program measures how long the breath lasts.
Based on the duration:
Duration < 1 second
↓
Short Breath (.)
Duration ≥ 1 second
↓
Long Breath (-)
Every three breaths form one command.
RespTalk uses a Morse-code inspired communication method.
Each command consists of three breath symbols.
Example:
Short Breath = .
Long Breath = -
Pattern example:
.-.
After receiving three breaths, the microcontroller compares the sequence against predefined commands and displays the recognized word.
| Breath Pattern | Meaning |
|---|---|
.-. |
FOOD |
.-- |
WATER |
--- |
EMERGENCY |
-.- |
TOILET |
--. |
MEDICINE |
... |
YES |
-.. |
NO |
The analog front-end is built using the LM324 Quad Operational Amplifier.
Its purpose is to convert the weak piezo sensor signal into clean digital pulses suitable for the microcontroller.
The stages include:
Amplifies the tiny voltage generated by the piezoelectric sensor.
Converts both positive and negative signal components into a usable positive waveform.
A diode-capacitor network extracts the signal envelope, representing breath intensity over time.
Two comparator thresholds generate digital outputs indicating:
- Breath Start
- Breath End
This dual-threshold method improves detection reliability and reduces false triggering caused by noise.
The ATmega328P firmware continuously monitors the two comparator outputs.
The software logic works as follows:
- Wait for the upper comparator to detect the beginning of a breath.
- Start timing using
millis(). - Wait until the lower comparator indicates the end of the breath.
- Measure the breath duration.
- Classify the breath as:
- Short (
.) - Long (
-)
- Short (
- Store the symbol.
- After collecting three symbols, compare them with the predefined command table.
- Display the corresponding message on the LCD.
- Activate the buzzer for valid commands.
- Automatically reset after an idle timeout.
This approach makes the system simple, deterministic, and computationally lightweight.
Breath
│
▼
Piezo Disc
│
▼
LM324 Analog Processing
│
├──────── Comparator 1
└──────── Comparator 2
│
▼
ATmega328P
│
├── LCD Display
└── Buzzer
- ATmega328P (Standalone)
- LM324 Quad Operational Amplifier
- Piezoelectric Disc Sensor
- 16×2 I2C LCD Display
- PCF8574 I2C LCD Backpack
- 16 MHz Crystal Oscillator
- 22 pF Capacitors ×2
- 10 kΩ Reset Pull-up Resistor
- 4.7 kΩ Pull-up Resistors ×2 (SDA & SCL)
- 1N4148 Diode
- Potentiometer (Sensitivity Adjustment)
- Buzzer
- Push Button (Reset)
- 5V Regulated Power Supply
RespTalk uses a 16×2 LCD with an I2C backpack (PCF8574) to minimize the number of microcontroller pins required.
The LCD communicates using the I2C bus:
- SDA → A4
- SCL → A5
To improve communication reliability, 4.7 kΩ pull-up resistors are connected from both SDA and SCL lines to +5V.
These pull-up resistors help:
- Stabilize I2C communication
- Improve signal integrity
- Prevent floating bus lines
- Ensure reliable LCD operation over longer wiring distances
Although many commercial I2C LCD modules already include pull-up resistors, adding external 4.7 kΩ pull-ups is recommended when building a standalone ATmega328P circuit or when the onboard pull-ups are absent.
The comparator outputs produce digital pulses corresponding to the detected breathing duration.
The firmware measures the pulse width to distinguish between short and long breaths.
During development and testing, the recognized breath sequences can be monitored through the serial terminal.
Example:
Breath detection started...
Short breath (.)
Long breath (-)
Short breath (.)
Recognized: FOOD
Serial output:
Video demonstration:
RespTalk/
│
├── firmware/
│ └── bcai.ino
│
├── circuit/
│ ├── arduino_circuit.jpg
│ └── lm324_filter_crkt.png
│
├── assets/
│ ├── thumbnail.png
│ ├── prototype.jpg
│ ├── morsecode_mapping.jpg
│ ├── short-deep-breathplot.jpg
│ ├── sim_serialmonitor.jpg
│
└── README.md
The project structure may evolve over time. Refer to the repository tree for the latest structure.
git clone https://github.com/tecrade/RespTalk.git
cd RespTalkOpen:
firmware/bcai.ino
using:
- Arduino IDE
- PlatformIO
The RespTalk firmware is designed to run on a standalone ATmega328P rather than a complete Arduino Uno board.
The ATmega328P can be programmed using an Arduino Uno configured as an ISP (In-System Programmer).
The general programming procedure is:
- Upload the ArduinoISP example sketch to the Arduino Uno.
- Connect the Arduino Uno to the standalone ATmega328P using the SPI interface (MOSI, MISO, SCK, RESET, VCC and GND).
- Select Arduino as ISP from the Arduino IDE.
- Burn the bootloader (only required once for a new microcontroller).
- Upload the RespTalk firmware using Upload Using Programmer.
A detailed step-by-step tutorial with wiring diagrams can be found here:
👉 https://www.instructables.com/Program-ATmega-328-Using-Arduino-Arduino-As-ISP/
Compile and upload the firmware using:
- Arduino as ISP
- USBasp
- USB-to-Serial Adapter (if bootloader is installed)
Apply a regulated 5V supply to the standalone ATmega328P circuit.
The LCD should display:
RespTalk-(BCAI)
******
The system is now ready to receive breath inputs.
- Assistive communication
- Locked-in syndrome support
- ALS patient assistance
- Hospital bedside communication
- Rehabilitation systems
- Elderly care
- Home healthcare
- Embedded biomedical projects
- Educational biomedical engineering demonstrations
- Adjustable breath sensitivity
- Personalized breath calibration
- Larger vocabulary
- Mobile application integration
- Wireless communication (Bluetooth/WiFi)
- Voice synthesis
- Text-to-Speech output
- OLED or TFT graphical interface
- AI-based adaptive breath classification
- Battery-powered portable version
This project demonstrates:
- Embedded Systems Design
- Standalone ATmega328P Development
- LM324 Analog Signal Conditioning
- Piezoelectric Sensor Interfacing
- Comparator Design
- Pulse Width Measurement
- Human-Computer Interaction
- Assistive Technology Design
- Biomedical Embedded Systems
- Low-Cost Communication Devices
RespTalk is an educational prototype and is not intended to replace certified medical communication devices.
Performance depends on factors such as:
- Patient breathing ability
- Sensor placement
- Ambient vibrations
- Circuit calibration
- Component tolerances
Further clinical validation and safety testing would be required before use in real healthcare environments.





