Smart Cities - Phone for Seniors with Vision Impairment

From Sensors in Schools
Revision as of 05:09, 26 December 2024 by EdmondLascaris (talk | contribs)
Jump to navigation Jump to search

Building a simple telphone for seniors with vision impairment

Building a simple telephone for seniors with vision impairments using a Raspberry Pi can be an enriching and functional project. Below are the steps to create a device that allows seniors to call loved ones, leveraging either the internet (e.g., VoIP) or interfacing with a traditional mobile phone. The design emphasizes ease of use, accessibility, and practicality.

Project Overview

  • Features: Large, Accessible Buttons:
  • Physical buttons for calling predefined contacts.
  • Tactile feedback for easy navigation.
  • Voice Assistance: Text-to-Speech (TTS) for confirmation of actions.
  • Simple voice commands to perform tasks.
  • Internet Calling: Using VoIP services like SIP (Session Initiation Protocol).
  • Mobile Phone Interface (Optional): Interfacing with a traditional mobile phone via Bluetooth.
  • Speaker and Microphone: High-quality audio input/output for calls.


Materials Required

  • Raspberry Pi (Model 3, 4, or Zero 2 W recommended for performance).
  • MicroSD card with Raspberry Pi OS installed.
  • USB speaker or 3.5mm-compatible speaker.
  • USB microphone or headset with a mic.
  • Large tactile buttons or a numeric keypad.
  • Breadboard and jumper wires (for prototyping buttons).
  • A touchscreen or an e-ink display (optional for feedback).
  • USB or Bluetooth module (for mobile interfacing, optional).
  • Power supply for the Raspberry Pi.


Step 1: Setting Up the Raspberry Pi

Install the OS: Install Raspberry Pi OS on the MicroSD card using the Raspberry Pi Imager. Enable SSH, Wi-Fi, and audio support. Update and Upgrade: Run the following commands:

sudo apt update
sudo apt upgrade
  • Install Required Libraries: Install libraries for GPIO, audio processing, and VoIP:
sudo apt install python3-pip pyaudio alsa-utils libportaudio2
pip3 install gpiozero pyttsx3

Step 2: Adding Physical Buttons

  • Connect Buttons to GPIO: Connect large tactile buttons to GPIO pins on the Raspberry Pi using jumper wires and a breadboard. Each button corresponds to a contact.
  • Write a Button Script: Create a Python script to detect button presses and initiate calls:
from gpiozero import Button
from subprocess import call
import pyttsx3

# Define buttons and actions
button1 = Button(17)  # GPIO pin 17
button2 = Button(27)  # GPIO pin 27
engine = pyttsx3.init()

def call_contact(contact_name):
    engine.say(f"Calling {contact_name}")
    engine.runAndWait()
    call(["linphonec", "-c", contact_name])  # Replace with actual VoIP command

button1.when_pressed = lambda: call_contact("Alice")
button2.when_pressed = lambda: call_contact("Bob")

print("System ready. Press buttons to make calls.")
while True:
    pass


  • Run the Script:
  • Save the script (e.g., call_buttons.py) and execute it:
python3 call_buttons.py

Step 3: Setting Up VoIP (Internet Calling)

Install a SIP Client: Install a lightweight VoIP client such as Linphone:

sudo apt install linphone-cli

Configure SIP Account:Sign up for a VoIP service provider (e.g., Linphone, Asterisk, or Twilio) and configure the SIP client. Test Calls: Test internet calls using the command line:

linphonec
> call sip:example@domain.com

Step 4: Mobile Phone Interface (Optional)

Bluetooth Pairing: Install Bluetooth tools:

sudo apt install bluetooth bluez

Pair the Raspberry Pi with the mobile phone:

bluetoothctl
  • Use Bluetooth Protocols: Use protocols like HFP (Hands-Free Profile) to route calls through the Raspberry Pi:
  • Install and configure ofono and pulseaudio.
  • Test Call Routing: Verify audio routing from the mobile phone to the Raspberry Pi.

Step 5: Accessibility Features

Text-to-Speech Feedback: Add TTS for actions like confirming button presses and errors:

engine.say("Call in progress.")
engine.runAndWait()

Voice Commands (Optional): Install voice recognition libraries like SpeechRecognition: pip3 install SpeechRecognition Step 6: Enclosure Design Build a Custom Case: Use a 3D-printed or handmade case to house the Raspberry Pi, buttons, speaker, and microphone. Label buttons with Braille or large text for accessibility. Add Power Backup: Include a portable battery pack for uninterrupted usage. Step 7: Deployment and Testing Predefine Contacts: Configure contact details in the script or VoIP client. Test Audio Quality: Test speaker and microphone placement for optimal clarity. Stress-Test for Usability: Simulate real-world use with seniors to refine the interface.