How to connect standard wired doorbell into BigClown ecosystem?


#21

Okay, I have both diodes and Capacitors
New photo by Lubomír Kamenský


#22

which capacitor to use? The electrolytic is the only one where I can read the value 100μF .
What about the resistor which I have on the circuit now, keep it as the first member?


#23

Try the electrolytic caps first. You have to experiment. Try if it will run fine with ceramic caps later. The ceramics have its value coded in 2-3 numbers. What you need is value around 105 (10 * 10^5 F = 1uF).

But this is really trial and error. You don’t damage anything. If you choose too big capacitor value then you could miss when for example someone does two button presses on the doorbell. But you miss only the second button press within few seconds. So you have to find capacitor value that will smooth the 50Hz input signal, but not too much big so you can reliably distinguish when someone presses doorbell twice. But this is up to you if you would like to get more MQTT messages when one person is ringing twice.

(By rectifiying the AC voltage you get little bit higher DC voltage but your optocoupler resistor is 1k which is safely way above the value I’ve computed)

The half bridge rectifier needs to be placed between transformer and your current resistor-optocoupler circuit.


#24

I got stuck today. Started as suggested with a diode and one 100μF capacitor. The behavior didn’t change much. Some events for short press are still missing and long press generates set of events. In fact, there is no problem with more events but the missing event for short press is a showstopper.

The strongest of ceramic capacitors I have is 104, I tried to connect up to 15 of them in parallel but it didn’t work at all, no event from both short or long press registered.

As I had the parallel setup ready, I started to add more 100μF capacitors. Subjectively my impression was that the lowest loss rate of short press events was with 4 100μF capacitors and then it got worse when adding more. But no serious statistics were done. Anyway, always some short press events were missing. Sometimes in the beginning, sometimes the beginning was fine and the gap came after some successful attempts. Well, but I am far from being able to define any clear patterns.

And in fact, there was not much different behavior when I bypassed the capacitors at all so there were just the diode, the resistor, and optocoupler.

I tried some other things which probably didn’t have sense, like changing the resistor, replacing diode with led, changing the order of diode and capacitor, and other various combinations expecting some miracle. But it didn’t happen.

New photo by Lubomír Kamenský

#25

Hi, you have a mistake on the breadboard as I can see. The diode pin with white band, 1k resistor and plus pole of capacitor has to be connected together. Not in series with a capacitor. And the minus pin of capacitor has to be connected to the ground - which should be your black wire?
Also, use only one capacitor. No need to have them paralel… try it with one and the we’ll see.


#26

This is how it should look. I cannot see how that two wires are connected to the Core Module. But one pin of output of optocoupler should be connected to VCC and the other to the BUTTON/BOOT pin.
New photo by Martin Hubáček


#27

YES! Works perfectly now :sunny:

exactly one event for any press short or long any duration, no gaps! Perfect job :sunglasses:

New photo by Lubomír Kamenský

#28

Awesome!

I’ve just created the same circuit just to make sure it works. I have 220uF 25V capcacitor and I feel it is too much because it dont react on the double press of the button. The 22uF seems on the endge so 100uF would be ideal… I try to find it meanwhile.

I’m testing this on the osciloscope so I can see how the rectified voltage is stable.


#29

100 uF seems too much. SO 47uF would be ideal to dont miss double or triple doorbell press and at the same time filter the AC voltage enought that it dont trigger sporadic new button press.

100uF filter output. I also use 1k resistor but the optocoupler is little bit different.
New photo by Martin Hubáček


#30

yes, tested double or triple click and it generates just one event but for my purpose it is optimal. But who knows, perhaps some ideas about secret codes will come one day :slight_smile:


#31

Ok, let us informed when you’ll have it fully running.

We will be happy if you send us a video how yout get notified on the phone when you press the doorbell.

Best regards
Martin


#32

sure, first I will share the picture of the final implementation. And probably I will stay just with SMS for now, have USB modem as SMS gate on the same hub as BigClown usb-dongle. I use emtecko where calls and sms are for free in the company network so the total cost monthly is around 3 CZK for the sim.

Now focusing on building the sensor network. There is not many things to add in the house but plenty in the garden and there are few challenges to be solved, I think I will create some new topics soon :slight_smile: My intention is to store the full history of data, to build sort of personal dwh :slight_smile: and use it as playground for machine learning. Trying to document things in my blog lubolab.com, but that’s always a challenge to find time for it. Soon should add there also something about BigClown integration :slight_smile:

Thanks a lot, Martin, it was true pleasure to cope with this task here and my already great experience with BigCLown improved yet more, perhaps I will not be so scared of hardware now :slight_smile:


#33

The final product is here
New photo by Lubomír Kamenský

I have to admit that from inside it looks quite DIY :slight_smile: but my focus was just to place it inside and keep the maintenance easy as possible, so replacing batteries in both Gong and BigClown module without any special effort. Considering 5 days from the idea to production and my zero hardware experience, I hope it is not that bad :slight_smile:

New photo by Lubomír Kamenský

using drawbridge approach :slight_smile:

New photo by Lubomír Kamenský

#34

I finally managed to finish the first post regarding my BigClown setup: https://lubolab.com/building-sensor-network-bc/

In the next post, I am going to describe this doorbell sensor story :slight_smile:


#35

here it is https://lubolab.com/iot-doorbell-bc/

I hope I didn’t mix it up too much.


#36

Thats an awesome and well written article. Thanks for that. We are preparing references section so this will be another addition to it.

Martin


#37

and the last addition to this. Here is the post describing how to make a practical use of this doorbell https://lubolab.com/building-sensor-network-sms/