If I wanted to wire this up as a switch to an esp, would I just treat it like a normal switch? Or does the flowing variable current mean it's not as straightforward as that?
My bell button is currently wired AC. Will it (just the button as the chime will be connected to a relay on further pins) work on the DC pin of the esp? The esp will be quite a way from the button itself.
This is following on from project guidance here, I'm seeing if I can simplify it by treating the button and the chime separately. But does the original plan stand as the better way to approach the problem?
It looks like your image shows an LED which is on when the button is not pressed and off when the button is pressed. If that is the case, can you sense the light from the led?
My intention was to put the "smart bits" in one place inside the house, probably at the same point where the bell transformer is. I'm unable to imagine how a light sensor at the doorbell end could be done in the same way?
Further the three goals from the OP was to be able to:
You could also measure the bell current - various methods available or even pickup the sound of bell.
But going back to basics, am I correct in thinking that as it stands an illuminated push button of the type above can't just be wired to a GPIO pin and be expected to work as an on/off switch? IE can the trickle current be detected as an OFF?
The "illumination" isn't a big deal and I'm happy to switch it for a dumber button if it makes the project simpler.
AC wiring with LED. That's interesting, as it means when the button is NOT pressed the current flows in one direction only. Now if you use an optocoupler with bypass diode in series with this, the opto will start producing a signal (50 or 60 Hz square wave) when the bell is pressed.
The button shorts the wires: the light goes off, the chime start making noise. Am I right here? The chime is not marked in your circuit, nor is the power supply. It seems the chime is always connected, just by pressing the button the 1k2 resistor is bypassed and it actually gets sufficient current to do its thing.
You want to disable the chime and use it on command - shouldn't be too hard to disconnect it from the normal circuit, then use a TRIAC to switch it on the original AC circuit by an Arduino output.
@wvmarle - my apologies, I thought you had already reviewed my previous thread (where you also helped massively!). It is here: Smartening up my doorbell - Project Guidance - Arduino Forum as well as a circuit that was designed - that was assuming a dumb switch (I didn't realise it was illuminated until now).
Oh, can't keep track of all those threads... that's why it's better to NOT start new ones usually.
Some new info came, especially how it's wired. Note that my new suggestion only works with an LED as it makes use of the LED blocking the current in the other direction. If it's an incandescent light or so it won't work.
Many elements are the same. You can again add the R5/C2 filter to get a steady output out of the opto.
Also new is of course the triac to switch the chime - that's the easiest way to switch AC.
I'm trying to understand this completely so took apart the button to get some answers. Your intuition that it was an incandescent light was correct. I can't see a resistor either which I presume isn't necessary with an incandescent.
What are the options to detect the button push? Wrt to the gpio pins, if they work on voltage and not minimum current the circuit would always be seen as closed. Should I focus on detecting current somehow?
the bell circuit is currently using 8v off a 2a transformer. so can a button of this type even work with a 5v DC line? Would the button illuminate?
for my curiosity, why was a relay chosen in the previous design to ring the chime?
I did a quick search for triacs and there's a range to choice from. How do I pick an appropriate one for a particular project (I'll probably buy a range of them anyway)
you could add a diode in series with the incandescent, but you'll lose about half the brightness. Then you're back at the circuit I suggested.
Wrt to the gpio pins, if they work on voltage and not minimum current the circuit would always be seen as closed. Should I focus on detecting current somehow?
That's basically what that optocoupler is doing.
the bell circuit is currently using 8v off a 2a transformer. so can a button of this type even work with a 5v DC line? Would the button illuminate?
The button will be fine; the light will be dimmer. Try it out, it won't break anything.
for my curiosity, why was a relay chosen in the previous design to ring the chime?
Because it was in your original design.
I did a quick search for triacs and there's a range to choice from. How do I pick an appropriate one for a particular project (I'll probably buy a range of them anyway)
Pick one that can handle the required current and voltage - where the voltage is so low just about any TRIAC will do. If you have one in your parts box, use it.
The part in my schematic I have used for 220V AC, 3-4A. It's a bit overkill for this but will do the job.
Of note: your chime is probably an inductive load. That means the TRIAC may not be able to switch off without an RC snubber. There exist TRIACs with a snubber built in.
If I did connect the button directly to the gpio, I presume the diode/oc method wouldn't work since there's no more AC. What would be the solution in that case? I see a component numbered acs412 that seems cheap and well supported by projects here. Would that work? It seems overkill considering I just need to detect low vs high.
With the chime, I see that as well as a triac I'll need a triac driver. Is there a reason why a relay isn't a more appropriate solution?
If you don't want the light, you can of course use the button as button and wire it the way you normally would wire a button.
Due to the long wires you should add a 100 nF filtering cap at the pin, and maybe use a stronger pull-up than the internal one (which is 20-30k). This as the long wires are antennas, picking up all kinds of electrical noise.
Similar question for the triac driver - I see an moc3010 and an moc3010m. Are these equivalent or should I specifically seek the moc3010m?
(Edit: some searching presents a datasheet that suggests the m suffix is to mark components previously supplied by Motorola? A confirmation would be great, the prices and pictures appear quite different)
Why do we need the separate triac anyway btw? Can't the chime be connected directly to the driver? Come to think of it, how is the gate of the triac activated? The driver doesn't seem connected to a power source...
(Edit: the same searches above suggest that these drivers are specifically designed to be used as triggers for further triacs)
Im still trying to figure out how to detect an illuminated button... But baby steps!
For the button push side of the project I found a similar question here:
This seems ideal as it is non intrusive and appears simple. Would I need to put a resistor in series with the button to replace the now isolated chime?