Sense doorbell being pressed

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So I have a fairly simple doorbell system. It has an AC transformer that supplies about 12.5VAC to the doorbell circuit. One of the 12.5V wires between the transformer and the chimes is interrupted by a an illuminated pushbutton.

The button has an incandescent light in parallel with a switch. This light allows some voltage through to the chimes at all times - about 0.25VAC at the chime terminals. When you push the button, the full 12.5VAC is sent to the chimes causing the ring.

My dilema is trying to find a simple way to sense the pressing of that button. I have easy access to the transformer but I can't think of anything I can do there except have a current transformer ring around one of the wires to sense the power burst. It would be a lot harder to do something at the doorbell or chime end (drywall work).

Is there any clever trick I can implement near the transformer that will allow me t sense the press with a GPIO pin?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wouldn't a diode and comparator give you 0V when not pressed, and (12.5 - ~.6)V DC when pressed? You can then level-translate that with a simple voltage divider so that it gives you a 0-5V square wave @50Hz/60Hz to the micro.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interesting question.
If you only have access to the transformer then as you mentioned sensing the current drawn by the bulb and chime vs that drawn by the chime alone would seem to be a reasonable approach.

It would be good to put an AC ammeter in series with the transformer to measure the two currents and see by how much they differ.

You'd like them to differ by a lot, obviously, as the ABSOLUTE current measurements will vary with the actually 120 VAC level, which can change with "brown outs", and other transients on the power line.

You might try something along this line, totally untested :) , and somewhat conceptual in nature:

You insert R1 in series with the transformer lead to use as a current sense resistor. The value depends upon the current measurements made above, but perhaps 5 - 10 ohms, in a suitable power rating.

R2 & R3 form a voltage divider to drop the high side voltage down to the 0-5 V range tolerated by an AVR.

D1 rectifies the input sin to give you just the positive peaks going to the R1, R2 divider.

C1 filters it a bit.

V3 represents the transformer's output voltage, and the high side voltage of the current sense resistor.

R4 and R5 match R1 and R2, again with a diode and cap.

V4 will be a little bit lower than V3 because of the voltage drop across R1, the sense resistor.

Both V3 and V4 are low level, "DC" voltages.

One can now measure both V3 and V4 and hence one knows the voltage across the resistor, and hence the current through the resistor, and hence which load is currently being seen by the circuit.

Note that Mega's, at least the one's I've used, do NOT have a true differential ADC input mode, IIRC. But one can easily measure both V3 and V4 with two ADC inputs, each measured with respect to ground, and then one knows the differential voltage.

One could also feed V3 and V4 into an op-amp to amplifiy the small differential voltage, and feed it into a single ADC input, or into an analog comparator input.

R5 was made a pot in the schematic, as one can then tweak the low side leg a bit. This adjusts for differences in the resistors, and sets what the baseline difference voltage measurement will be.

Watch the power rating on R1. The lower its value the less power it has to dissipate, but the smaller will be the difference voltage you are measuring between the two load states.

Watch what you call ground for the circuit.

If you use a clamp on current sensor then these concerns vanish, but I thought I throw this out there as an alternative approach, which you might be able to do totally with parts on hand.

JC

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How much current is drawn by the chime when it's operating? If it's relatively small, put a small, low voltage lightbulb in series with the chime, and put the bulb inside a light tight container alongside your favorite type of photodetector. At low currents, the bulb will not light, at high currents it lights, and the photodetector sends a signal to the GPIO pin.
The requirements for the bulb would be an operating current equal to or slightly above the operating current of the chime, and a voltage rating low enough that the bulb does not reduce the voltage across the chime too much.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Those current sensors for Arduino are a very simple and cheap solution. Search Ebay for "acs712".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not put a simple optoisolator accross the switch? The LED inside the opto will turn on when the button is open causing the transistor output to go low(if it is a transistor output opto). And the collector will float when the button is pushed.

Cannot get any simpler.

Parts:
One optoisolator NPN Transistor output(digikey has thousands)
One LED series resistor(dont want to blow up the new opto)
One Collector resistor

connect the emitter to ground the collector to Vcc through the resistor. Collector to AVR pin

Connect resistor to anode of opto LED, connect cathode and resistor accross the doorbell button

Done!!

EDIT: Put the LED cathode and resistor at the chime. Better spot to get a true read!

DONE AGAIN!!

Had to put a schematic in:

Attachment(s): 

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Last Edited: Thu. Mar 22, 2012 - 08:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A simple way to create a current switch is to run the current through a resistor which also connects to a transistor base and emitter. At a certain current the transistor will turn on and the conducting transistor could drive an optoisolator which signals your AVR. Pick the resistor so that it will drop about 1V when the switch is closed (in reality the base-emitter junction will clamp that at about 0.7V). Depending on the current drawn by the chimes, you may need to limit the transistor base current to a safe value with an additional series base resistor.