( 8.2V) zener is 8. 2 0.046 = ~0.38W, so we are well
within the 1W limit. The transformer voltage dropped to
about 14V (AC) while the strikers are activated, so now
we have ( 14. 5 Ö2) - 8. 2 - 0.7 = 11.6V at the 10 µF
capacitor. Zener current (1N4732A) is now ( 11. 6 - 4. 7) /
220 = 31 mA. That’s enough.
The resistors are 1/2W types, and similar power limit
calculations can be done for them. Please remember
these are all approximations since I am ignoring capacitor
ripple currents, as well as the fact that the power
transformer 16V output drops a fair bit when loaded. The
objective is to verify that we have reasonable “swing”
room in the various sections of the circuit, so it will work
as designed. The PIC
There are always several ways to make something
work, and probably the easiest way to detect a button
push is to run a scan routine. I decided to use the PIC
sleep capability, so I needed an interrupt routine to wake
the PIC when a button was pushed. I used the external
interrupt on change pin. It can be programmed to trigger
on the negative or positive going transition.
Since the pin is held high by the 9.1K resistor and
pulled low by the optocoupler, I needed to look for the
positive to negative transition. Since I have two individual
buttons and only one INT pin, I needed to combine these
signals into one, but keep them separate at the same time.
I therefore used an AND gate.
The 74LS08N is a quad AND gate; I used only one
section (inputs of the unused sections are pulled high).
The AND gate will have a high output as long as both
inputs are high. Now when a button is pushed, INT goes
low, interrupt is set, PIC wakes, looks which button has
gone low, and plays the correct tune. When done, the
interrupt is cleared, and the PIC returns to sleep. Circuit Board
This is a one-off project, so nothing too fancy here.
The most important thing is probably the switch mode
power supply. If building on proto boards, try to keep
connections as close as possible to the regulator, since
long connections can introduce undesirable oscillations.
I do not anticipate that many readers will be building
one of these, but if you do have a similar chime, they are
worth preserving. With that in mind, circuit construction
was done on a simple dot type proto board (Figures 7
and 8). Once the extraneous parts were removed from the
chime, there was lots of space for the new board. I
mounted it on four brass stand-offs.
May 2017 33
FIGURE 6. Full circuit diagram.