Help understanding this doorbell circuit - Page 1
Forum section: electronics / beginners

author: vmallet
author_rank: Regular Contributor
timestamp: January 28, 2021, 01:24:21 am
content: I have an electronic doorbell chime in my home and I was trying to understand how it worked, but the AC aspect of the circuit is tripping me up a bit.The doorbell system is a pretty standard wired circuit: 16V 10VA transformer, goes to a doorbell button (with a 1N4004 diode in // with the button), goes to the chime terminal labelled "FRONT", out the chime via terminal "TRANS", and back to the transformer.Inside the chime is a tiny one-layer PCB with a few TH components on top and a few SMD components on the bottom, including a small chip under a blob of epoxy. I'll call the chip an MCU for now. Two wires connect a small speaker to the PCB.The PCB has three terminals: FRONT, TRANS (labelled "GND" on the PCB), and REAR (which has nothing connected to it in my installation).I've tried to produce a schematic to try to make sense of the circuit. Still a WIP.When the system is idle (no one is pressing the button), the circuit sees the half-rectified wave (from the button diode) between FRONT & TRANS, and that keeps the circuit energized, the 7805 producing 5V for the MCU to be ready to do things.When the button is pressed, the circuit now sees the full AC wave; somehow the MCU is able to detect this and make the speaker chime by controlling Q3.What I don't understand is how the MCU can see the lower-half of the input wave when the full wave is seen between FRONT / TRANS? If I look at the signal at the anode of D9 it's a steady 5V on idle, and it goes to 0V in phase with the input wave going negative when the button is pressed. Not sure how that part worksNote: D1-D4 are 1N4007; D5-D10 are 1N4148.

author: gnuarm
author_rank: Super Contributor
timestamp: January 28, 2021, 02:23:42 am
content: On both the front and rear input terminals they drive a rather messy bit of circuitry that detects the negative half of the waveform. I didn't understand how this worked until I read the bit about the doorbell button having a diode. That means the buttons are polarized, only one end must go to the transformer and only the other end can go to the bell.When the button is pushed and the negative halves of the AC reach the bell, it pulls down through R3 and D5 bringing the tie point of the diodes and R7 a bit below ground. That is the job of D7 to prevent it from going more than one diode drop below ground. Then the diode drop across D9 pulls the input of the MCU to ground without dragging it too low. When the positive half of the AC cycle returns this input rises as pulled up by R7. I expect the MCU times the transitions looking for 50/60 Hz so it does not trigger on a bit of noise.Does that make sense?

author: msat
author_rank: Regular Contributor
timestamp: January 28, 2021, 02:31:00 am
content: Seems like a convoluted way to detect a button press. It's not like you're actually reducing the amount of wiring.As for how it works, my guess would be that when the button is pressed the power coming in to the circuit is no longer half wave rectified, although there is still a rectifier in the circuit itself. So as far as the power supply section goes, not much has changed. The MCU input however can sense the other (low) half of the wave (which had been rectified, and thus non-existent, by the switch before). In other words, the low half of the wave is pulling the MCU's input low.

author: gnuarm
author_rank: Super Contributor
timestamp: January 28, 2021, 03:26:01 am
content: I don't know why you say that's convoluted. The problem is they need to remain compatible with the doorbell transformer and wiring that's in the house. I'm a bit surprised they bother with keeping the MCU powered when no one is pressing the button, but I suppose if it has any adjustments or setups they need to be done when the power is on. Otherwise I would scrap the diodes in the button and just rectify the power to sound the bell. An MCU can power up in a millisec or few. It can power down the same way. But the diode thing is not so bad. Passive and discrete components are really inexpensive. Resistors are a fraction of a penny, caps a penny or two and diodes can be near that same price. Heck, the button is probably 20 times more expensive than the diode. Easy to assemble too. Use more! They're nearly free!

author: Terry Bites
author_rank: Super Contributor
timestamp: January 28, 2021, 03:37:22 pm
content: You could always buy a bell?

author: vmallet
author_rank: Regular Contributor
timestamp: January 28, 2021, 09:48:53 pm
content: Quote from: gnuarm on January 28, 2021, 02:23:42 amThanks, that helped! With that, I plugged some of that design in Multisim Live (the web version that has just enough that I could repro the schematic) and played around with the circuit, and I see exactly what you are describing.Bonus questions:What is the role of the D1 / R1 pair? It provides another path on the negative halves but it doesn't seem pertinent to the rest of the circuit. If I remove them the simulation doesn't change.What is the role of R4? I understand R3 is there to drop the rest of the voltage after D4/D5 on the negative halves but R4 seems to not do much. If I remove it, the sim works just the sameThanks!

author: vmallet
author_rank: Regular Contributor
timestamp: January 28, 2021, 09:55:39 pm
content: Quote from: gnuarm on January 28, 2021, 03:26:01 amIn this case I believe they need to stay powered up to be able to play the full length of the chime sound. If I press the button for 500ms I still want to hear my 5s chimeIt looks like a pretty clever way to retrofit an existing old-school electro-mechanical doorbell with an electronic one without having to touch any of the wiring, just adding a diode in the button so we can have continuous power and detect the button press.

author: msat
author_rank: Regular Contributor
timestamp: January 29, 2021, 01:59:03 am
content: Quote from: gnuarm on January 28, 2021, 03:26:01 amIn light of the requirement to use an existing circuit in terms of wiring and xformer, it makes much more sense, and maybe even clever.

author: gnuarm
author_rank: Super Contributor
timestamp: January 29, 2021, 05:07:20 am
content: Quote from: vmallet on January 28, 2021, 09:48:53 pmI wondered about that as well. For some reason they want to maintain a load on both halves of the AC cycle. Transformers are funny beasts. Maybe it is to prevent too much of a DC current appearing? That's a bit of a reach as the other half cycle current must vary a lot... unless they have a dummy load there too swamping out the rest of the circuit.The speaker drive circuit interests me. I need to design something similar, but I don't think it will work for me as mine is PWM at 32 kHz. I forgot the base is a diode... so I'll need to think about this a bit.QuoteThe only thing I can see R4 doing is changing the timing of the waveform to the MCU. R3/R4 acts as a voltage divider referenced to the peak voltage of the AC. So D5 won't see the full negative voltage meaning the threshold crossing will be timed differently. Maybe it's to give a better 50/50 duty cycle since the MCU input threshold is not at 0V?You should be able to test that out in your simulation. Add a comparator with a 1.4 or 2.5V reference voltage (TTL vs. CMOS inputs).I wonder about D5 and R7. D5 seems superfluous, likewise a 1 M pullup. They are missing a pullup on the MCU side of D9. The only thing I can think is they were concerned about diode leakage driving the MCU input too high. I would have just used a resistor to 5V on the MCU side.