Alert System

Overview

Alert system for stroke patient, allowing patient to alert their caretaker of any required assistance. The system communicates over TCP/IP, using a client-server architecture. The client, located near the patient, extends a large pushbutton to the patients bed. The server is portable so the caretaker can move it with them, and uses an LED and buzzer as the alert cues. When the patient presses their button, the LED lights and the buzzer activates. The caretaker must clear the alert on their device to acknowledge they have assisted the patient.

Components

Client:
  • Raspberry Pi 3 Model B+, w/ 3D Printed Case from thingiverse.
  • (4) #4 x 1/2 flat head screw.
  • Large Momentary Pushbutton Switch, w/ custom 3D Printed Case (thingiverse).
  • Speaker wire & jumper wire.
  • 5V DC Power Adapter.

Client secured under patients bed.

Server:
  • Raspberry Pi Zero W, w/ 3D Printed Case from thingiverse.
  • (2) #4 x 3/4 flat head screw.
  • USB Battery Pack.
  • (3) LED (1 Red, 1 Yellow, 1 Green).
  • (2) Momentary Pushbutton Switch.
  • Passive Buzzer.
  • Custom 3D Printed Case (thingiverse).

Server enclosed in casing.

Server alert protoboard.

Server casing CAD drawing.

Technical Details

The project was written in C. The Sockets library was used for TCP/IP communication. The client hardware was a Raspberry Pi 3 Model B+ and the server hardware was a Raspberry Pi Zero W, each running a Linux distribution.

The server creates a socket and binds it to port 6000, then listens for connections. The client creates a socket and attempts to connect to port 6000 of the server's IP address. For improved usability and UX, the client attempts to connect to the server every five seconds if a connection could not be established (for example, when the client is started before the server).

An interrupt is attached to the client's pushbutton and sends a '1' over the TCP connection when it is triggered.

When the server receives a '1', the LED is lit and the buzzer is activated. A timer is used to trigger the buzzer every 60 seconds until the alert is cleared. An interrupt is attached to the server's pushbutton to clear the alert. An interrupt is attached to the server's second pushbutton, which is used to toggle the device's power state (i.e. on to off, vice-versa).

Check It Out

Alert System Demo

Note

The dimensions of the server could be greatly improved by using a smaller battery (i.e. LiPo) with a boost converter. This would allow the designer to remove the space required for the large USB charger and respective cabling, which is a large percentage of the design space.