Menu

Integrating a 433 MHz in-home healthcare alarm Log in to Edit

Lester Hightower
Attachments
IMG_20181224_225225766.jpg (1018100 bytes)

This page describes how I intergrated a 433MHz nurse call alert system into basalsure. Note that this project requires soldering...

Materials

This is the precise 433MHz nurse call alert system that I integrated: https://www.amazon.com/dp/B00FDXY2WG (UPC# 734122001675).

I chose that device for a few reasons:

  • We have had one in our home for over two years, with the button kept on my son's nightstand, and I know that it works well.
  • This was the only device of its kind that I could find with the remote (button) operating on 3V DC, and that is convenient for integration to a Raspberry Pi.
  • Up to 8 remotes can be paired to an alarm base, and so I knew that I could have our existing button and the basalsure trigger that same alarm base.

In addition to some consumables, a 3V DC relay is needed to "press" the alarm button on the remote control. I used one of these: https://www.amazon.com/gp/product/B01M0E6SQM

Concepts and Wiring

I removed the circuit board from the remote control. It is very easy to do (5 screws). One word of caution: the antenna coil is glued into place at the tip end. I was not very careful when removing it, damaged the end of the antenna, and had to snip it off. You might consider first pulling the glue away with needle-nosed plyers and/or sliding a small screw driver through the antenna coil wire to aid in removing it without damaging.

Power for the remote control's circuit board

I did not want to need a 3V CR2032 battery in the remote control that I integrated to basalsure, and so I soldered power leads to it, but that is technically optional (you could use a CR2032 battery, as designed).

Triggering the alarm

The remote control's button is "pressed" by the normally open (NO) terminals of the relay shorting across the remote's button, when the Pi triggers the relay to do so. These two photos show how I soldered power wires to the remote control (white/red for positive and white for negtive) and how I soldered the button shorting wires (both black) and attached them to the relay's NO and Common (CO) terminals.

These photos show the two boards mounted on a piece of ABS plastic that I cut to fit. I later replaced the two, white cable ties with short pieces of nylon string so that the assembly would sit flat in the roof of the wood box and hold well with velcro. The third photo shows how I "bench tested" the rig with a couple of 1.5V AAA batteries, wired in series. In that photo, the alarm is triggered. Note that the remote button is accessble and still functional, which is convenient for testing the range of the device, checking battery strength in the alarm base, and/or for pairing the remote control board to an alarm base.

The relay and the remote contol board are powered by the Raspbery Pi using 3V DC on the VCC terminal and grounded on the GND terminal. The relay is controlled via a GPIO pin tied to the IN terminal and I used a green wire to pin 15. In this build, I powered all of the components in the box using only the Raspberry Pi's pin 1 (3V DC) and ground on pin 6, and I did so by bringing all of the components' power wires to the relay and attaching them to the VCC and GND terminals. I left the relay's jumper caps plugged in as the Pi can drive this little 3V relay with no need to power the relay coils separately.

The photo interrupter sensors' indication wires (yellow) go to pins 7 and 11, and the buzzer is attached to pins 13 and 14, just as in my first build.

These photos show the assembly in the box and working. The third photo has a relay just sitting beside the one in service, as a visual reference so that you can read the terminal labels. Note that all of the power wires are red with the exeption of one white+red, the ground wires are brown plus one white, and the relay control wire is green.


Software Configuration

The sections below are copy/pasted from /etc/basalsure_conf.py.

A 3/4 of a second pulse is plenty of time to trigger this alarm system.

# GPIO configuration for momentary switch
momentary-switch-config:
  output_pin: 15
  on_state: 1
  off_state: 0
  time: 0.75

...and an example configuration for using this alarm (momentary-switch):

# Define the condition monitors here
condition-monitors:
  # 433 MHz alarms for basal times
  - name: "9:45pm Levemir 433MHz Alarm"
    timeframe:
      -  '21:50-21:55|*|*|*'  # between 09:50 and 09:55pm
    alarm_states:
      - { input: 11, state: 0 }    # syringe is in place
    alarms:
      - type: "momentary-switch"

Option to Remove the Relay

As part of my 2023 Build, I became curious if the relay could be removed from this setup and I believe that it can by using a GPIO pins "down" state to sink voltage like a ground:

I experimented just enough to make myself believe that this is, in fact, possible to do, but I did not actually build it. My experiment was to remove the GPIO control wire (3.3VDC) from the buzzer of running basalsure1 (with that GPIO pin in the "down" state) and jumper it on the correct location on the 433MHz remote (to ground) and it did trigger it. I am fairly sure that this would work if that PIN were held high (3.3V would be on both sides) and then when it was dropped (became like a ground) the button would be pressed. The tricky part is that the 433MHz alarm may trigger during the basalsure software startup and shutdown as any time that the pin is "down" it would alarm. Maybe that could be mitigated by carefully initializing that pin to "up" at the very beginning of the software start, but it seems unreliable. Alternatively, you could power the entire remote control with a GPIO pin and only bring it up (power the board) after the alarm control pin was brought up.


Related

Wiki: 2018 Build
Wiki: Home
Wiki: TODO items

MongoDB Logo MongoDB