Author Topic: [Solved] Detecting Doorbell AC With an Microcontroller For DIY Doorbell  (Read 2927 times)

0 Members and 1 Guest are viewing this topic.

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7563
  • Country: au
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #25 on: May 25, 2022, 02:13:03 am »
That just seems like a lot of unnecessary work - the door bell pushbutton is a simple normally open switch - disconnect it from the AC and wire it directly between a GPIO pin and ground.
Or just rectify the switched 12v ac, filter it a bit, (you don't want the cap too big or it won't turn off), turn an optocoupler on  with it, & use the output transistor of that device to switch 3.3v to the PIC, or whatever.
It's not as if it has to be a fast detection of the switch function.

Another way, if you can get at the transformer, is to rectify & properly filter the 12v ac prior to the switch.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #26 on: May 25, 2022, 03:56:09 am »
It's a little tricky to find an AC relay with the right pullin voltage.

How hard can it really be? You do need either an AC relay or a bridge rectifier and DC relay, and you'll want it to be approximately close to the doorbell voltage, but given the extremely low duty cycle it shouldn't really matter. I would bet that just about any random junkbox relay would work with the rectifier approach. A conventional doorbell coil will burn out if the button is held down indefinitely, it doesn't matter if the relay would too.
 

Offline antenna

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #27 on: May 25, 2022, 04:48:11 am »
Even simpler, rectify the AC and use the resultant DC, whatever voltage, through a resistor and 5v zener diode (or two red LEDs) and take the signal voltage right off the diode.  The diode regulates to logic level.  Or is the common-mode on the doorbell wire an issue?
« Last Edit: May 25, 2022, 04:51:29 am by antenna »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #28 on: May 25, 2022, 06:39:38 am »
Even simpler, rectify the AC and use the resultant DC, whatever voltage, through a resistor and 5v zener diode (or two red LEDs) and take the signal voltage right off the diode.  The diode regulates to logic level.  Or is the common-mode on the doorbell wire an issue?

The issue, which has been discussed at length here is the lamp that is wired across an illuminated button. That will cause the LEDs you suggest to glow at all times whether the button is pressed or not.
 

Offline shmuelzonTopic starter

  • Contributor
  • Posts: 11
  • Country: il
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #29 on: May 25, 2022, 06:58:28 am »
Quote
A really simple solution is to use a mechanical relay in place of the optocoupler, that will be electrically very similar to the solenoid coil in the original doorbell and will avoid the challenges posed by an illuminated button.

I must say, the AC relay sounds very tempting to me, thanks for that!
Does this look like something that would be suitable? https://www.amazon.com/Baomain-Power-Relay-PTF08A-Socket/dp/B00YTW5Q0E
I seems, from the reviews, that others have used it for their doorbells as well.
 

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1137
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #30 on: May 25, 2022, 09:23:45 am »
What if you just use the switch only? No transformer not 220VAC. The switch is the same as the relay.
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 493
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #31 on: May 25, 2022, 02:18:58 pm »
Quote
A really simple solution is to use a mechanical relay in place of the optocoupler, that will be electrically very similar to the solenoid coil in the original doorbell and will avoid the challenges posed by an illuminated button.

I must say, the AC relay sounds very tempting to me, thanks for that!
Does this look like something that would be suitable? https://www.amazon.com/Baomain-Power-Relay-PTF08A-Socket/dp/B00YTW5Q0E
I seems, from the reviews, that others have used it for their doorbells as well.

Measure the DC resistance of the solenoid winding in the chime. Find AC relay with similar coil resistance and 12V operating voltage. The coil resistance is always stated in the relay data sheet and often in the sell sheet. If it's not listed, then move along.

EDIT: the Omron datasheet for the LY2N-AC12 shows the coil resistance to be 46 ohms. The part on Amazon is a different manufacturer, but it's probably a copy of the Omron part, so likely similar.
« Last Edit: May 25, 2022, 02:29:14 pm by eugene »
90% of quoted statistics are fictional
 

Offline antenna

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #32 on: May 25, 2022, 05:37:26 pm »
The issue, which has been discussed at length here is the lamp that is wired across an illuminated button. That will cause the LEDs you suggest to glow at all times whether the button is pressed or not.
Then why not just add a load resistor to replace the return path the doorbell coil offered?  The button light will still work and you can sample across that load resistor with your diode network (which, while the button is not pressed, has a voltage drop across it too small to make it through the zener).  Just make the return path resistor 1/10 the resistance of the lamp, then take the output from that resistor and do what I suggested.  A common theme on this forum is to "just throw IC chips or a microcontroller at it".  That is not always the answer. 
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #33 on: May 25, 2022, 06:12:55 pm »
Measure the DC resistance of the solenoid winding in the chime. Find AC relay with similar coil resistance and 12V operating voltage. The coil resistance is always stated in the relay data sheet and often in the sell sheet. If it's not listed, then move along.

EDIT: the Omron datasheet for the LY2N-AC12 shows the coil resistance to be 46 ohms. The part on Amazon is a different manufacturer, but it's probably a copy of the Omron part, so likely similar.

IMHO that is overthinking things. Doorbell coil resistance varies widely, it is just not critical at all. You have an unregulated transformer, a button and a coil, often the button has a small lamp across it. The duty cycle is extremely low, you could probably overdrive a relay coil by a factor of 10 and it would still last decades. I wouldn't even bother calculating, I'd just hook something up and see if it works.
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 493
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #34 on: May 25, 2022, 07:47:38 pm »
You are correct that I'm probably overthinking it. The coil resistance will have only a minor effect on lamp brightness. With the optocoupler out of the way, almost any 12VAC relay would probably work well enough.
90% of quoted statistics are fictional
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2085
  • Country: sk
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #35 on: May 25, 2022, 08:13:44 pm »
What if you just use the switch only? No transformer not 220VAC. The switch is the same as the relay.

that's not possible in many cases... for example if you have a door bell with intercom and remote door opening.. the system sends you 12 or 18V AC to ring the bell.. you have to either detect it or use it with an AC relay or rectify it and use the voltage..

i wanted to have a secondary doorbell in a room where my doorbell is not audible.. so bought a cheap wireless doorbell, shorted the remote button and instead of a 12V battery (23A size) connected the rectified 12V from the doorbel wires , works perfectly ;) common mode voltage is not a issue because it's wireless :)
 

Online BeBuLamar

  • Super Contributor
  • ***
  • Posts: 1137
  • Country: us
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #36 on: May 25, 2022, 08:19:38 pm »
What if you just use the switch only? No transformer not 220VAC. The switch is the same as the relay.

that's not possible in many cases... for example if you have a door bell with intercom and remote door opening.. the system sends you 12 or 18V AC to ring the bell.. you have to either detect it or use it with an AC relay or rectify it and use the voltage..

i wanted to have a secondary doorbell in a room where my doorbell is not audible.. so bought a cheap wireless doorbell, shorted the remote button and instead of a 12V battery (23A size) connected the rectified 12V from the doorbel wires , works perfectly ;) common mode voltage is not a issue because it's wireless :)

But in the OP situation he has no wireless remote. I am sure the switch alone can be used to trigger whatever contraption he came up with.
 

Offline aargee

  • Frequent Contributor
  • **
  • Posts: 872
  • Country: au
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #37 on: May 26, 2022, 03:02:44 am »
Not really sure if this fits, but...

On our doorbell, I replaced the bulb with an LED and dropping resistor. The doorbell switch shorted the LED when pressed, the sense is on the anode of the LED which sent a Low to the doorbell circuit.
It is simple and works at my place.
Not easy, not hard, just need to be incentivised.
 

Offline shmuelzonTopic starter

  • Contributor
  • Posts: 11
  • Country: il
Re: Detecting Doorbell AC With an Microcontroller For DIY Doorbell
« Reply #38 on: June 14, 2022, 01:09:31 pm »
Hey all,

Just wanted to update that the AC relay solution works perfectly with the illuminated push button.

Thank you all for your help!
« Last Edit: June 21, 2022, 05:17:04 am by shmuelzon »
 
The following users thanked this post: ledtester, james_s, eugene


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf