Doorbell to Spark Core

I see one related topic but it assumes no access to Doorbell Transformer. In my case, I do have access to Doorbell Transformer.

What do I need to detect doorbell push with a Spark Core? I happen to have a relay shield as well as this doorbell detector if either would help.

Thank you!

@jShaf, the doorbell detector you pointed to would be perfect! It has an open collector output which means you can pull it up with a resistor (10K ohm for example) to the Spark 3.3V pin and then to any digital pin which you would read in your cod and know when the doorbell is pressed. The wiring looks straight forward so it should be easy peasy! :smile:

1 Like


According to the doorbell detector’s manual, the Max Output would be 40mA @ 12 Volts D.C but that is okay as long as I put in a 10K ohm resistor?

Oh, and how do I know which one is the 10K ohm resistor? They all look about the same @


Ah, after a bit of google-fu, it would be gold, orange, black then brown in the order for 10K ohm resistor.

As you figured, yes, this is a first for me. Hah.

@jShaf, the output rating of 12V@40ma means that is the maxium voltage and current you can have. So the pullup going to 3.3V fits within that.

You have the right idea on the resistor but it is read the other way - brown (1), black (0), orange (000), gold (5% tolerance).

Oh, and “neg” on the board connects to GND on the Spark. Open collector means the collector of a transistor is left open so it can be pulled up to any voltage. The emitter of the same transistor is connected to ground and the base is controlled by the door bell detector. When the doorbell is not active, the transistor is off and the output is 3.3V or HIGH due to the pull-up resistor. When the doorbell is pressed, the transistor is turned ON which connects the collector and emitter together. Since the emitter is at GND, the output goes to GND or LOW. :smile:

I am figuring out what I need to do next to connect to a digital pin from which I would read and do the magic assuming I did the rest correctly. See picture. Thank you.

@peekay123 I don’t think I have it done correctly.

I did play on analog side to see the reading, and saw that it would reach and sit around 2050. When doorbell button is pressed, it drops the reading to under 700. On digital side, I don’t see HIGH or LOW changing. I am curious what the threshold is for HIGH and LOW?

@jShaf, for logic 0 (LOW) the voltage needs to be below 1.2v and for logic 1 (HIGH) it needs to be above 2.2v. Looking at your analog readings, 700 corresponds to about .65V and 2050 is 1.65V which is not enough for a HIGH.

You may want to use a stronger pull-up resistor like a 4.7K or 2.2K ohm. I assume from the picture that the yellow wire going from GND on the Core is going to NEG on the doorbell sensor and OUT goes to the other side of the resistor, correct? If you have an multimeter, check the voltage of the OUT/pullup junction to corroborate your analog readings. Let me know how it goes :smile: