Translate

Sunday, June 14, 2020

Old PSTN entry phone - door opening - #5


Arrived the PCBs !!!

I couldn't resist and immediately started to put together the first official prototype and ... did found a problem !!!








First of all, here the PCB just arrived. Very very good quality !



Of course I had to mount a prototype in order to see if what done so far was OK.
And it was .. or maybe not.
Ok, small modification to the code, just inverted the port for the rotary dial switches and the code was working as on the breadboard prototype.
However, I found something I did not considered.

Every time the power is applied to the circuit, the relay activate for a second !!

Definitively a NO GOOD situation !
Since the relay open a door, the last thing one wants is to find the door opened because a power glitch !

So I had to investigate little bit.
What I didn't check before is that the Trinket when starts, is trying to connect via USB with a computer, using two IO (#3 and #4).
I connected the relay to the pin #3 and this pin is pulled up internally when the Trinket starts for the USB.
So until the bootstrap is done, the pin is pulled up and thus the relay is activated !
The ONLY thing to do is to change the pin that activate the relay and so I did, moving on the pin #4.
Like the #3 is used initially for the USB but is NOT pulled up, thus the relay is not activating during the bootstrap.

However at this point the pin #3 can not be used for anything else useful.
As input is not good because the internal pull up. I needed another input for the programming push button, BUT probably is not necessary !
But first, let see the new schematic.


On the new schematic (that can be adapted to the printed PCB, just a couple of cuts and a new wire) the push button, pull up resistor are not present anymore.
The pin #3 of the Trinket is left unused and the #4 is used to control the relay.

Here a picture of the first prototype mounted :



Programming


Now a push button is missing.
Originally the idea was to use the push button to start the programming of the number to be used to open the door.
The user had to push the button and then dial the number that was saved on the memory.

Because after the fix I have an input less I decided just to use the Rotary Dial itself !

Basically I added a new timer.
Only on the first digit, in order to program the number to be used, is enough to turn the dial and keep it stuck to the dial stop for at least 6 seconds.
After 6 seconds the LED turn ON indicating the system is in programming mode.
After that is enough to compose the number as usual.
At the end of the number (3 second timer ending after the last digit entered) the new number will be stored and the system will be ready for a new cycle.
The only "trick" to remember is to pause on the first digit for 6 seconds, but it must be the first digit you want to use for the new number.

Actually using the rotary dial also for the programming, i.e. with no need for an external push button, is even better since allows to keep the mechanic as much as possible "original".
The only issue is to have the LED visible in order to have some kind of feedback.

Let see for example how to set up the system to use the number 135.
  • put the finger in the hole on the number 1
  • turn the dial up to the dial stop
  • wait 6/7 seconds (or until the LED turn steady ON) keeping the dial on that position
  • release the dial
  • put the finger in the hole for the number 3
  • turn the dial up to the dial stop and release it
  • put the finger in the hole for the number 5
  • turn the dial up to the dial stop and release it
  • wait at least 3-4 seconds or until the LED is doing a single .5 seconds flash
  • done
At this point composing the number 135 will open the door

Update - June 2020

I did a modification about the way to notify the user about the change of states for programming and other things.
Originally I decided to use a LED as main feedback way to notify the user.
But the entire box with the board inside, will be embedded in the phone, so the user will not be able to see the LED.
So instead the LED I used a piezo buzzer.

In this way every time the LED is supposed to be ON, a sound will be present instead.

Use - example

In the video is presented the working prototype using the buzzer instead the LED.


No comments:

Post a Comment