An unexpected power down leads to change

A project log for Cordless phone RESET when off - hook & no audio

My 2018 Hackaday Open Hardware Project involves resetting a cordless phone when an elderly neighbor does not hang up

Boelens, LelandBoelens, Leland 04/29/2018 at 05:100 Comments

Testing the Cordless Phone Reset on my cordless phone, I experienced the phone base powering down during a call, at a low audio volume.

A software change was in order. I changed the no Audio voltage to be between 0 and .02443  volts, it had been between 0 and .03421 volts.  So far the change is working.

I also decided to give me a visual status indicator as to what loop the program is in by using a two color common cathode LED. I used pin 5, port 0 for the GREEN LED, and pin 6, port 1 for the RED LED. The program turns on the required LED, or both at the beginning of each of the three loops.

GREEN is for Loop 1,  testing for Off Hook plus No Audio,  which then advances to

RED for Loop 2, testing for Off Hook plus No Audio for 2 minutes, which then advances to

AMBER for Loop 3, Powering off the phone base for 1 minute. Then go back to Loop1. 

Getting a visual indicator during a program by turning on a 2 color LED is a useful troubleshooting aid. As this program has three loops one after the other this tool is useful. Now if I find the RED LED lit during a call I can make a noise or power down before RED turns to AMBER. I could have made the LED s blink but program wise it is much simpler to write a single line of code such as :

digitalWrite(0, HIGH), digitalWrite(1, HIGH); to turn on both LED s to produce AMBER, on a common cathode  dual color Red and Green LED.

Loop 1 needs to reset the LED color each and every time as most tests that fail go back to Start. So the first line of code is then :

digitalWrite(0, HIGH), digitalWrite(1, LOW);  //  GREEN LED ON.