Currently I'am working on a hack to make my doorbell smart. The whole thing is connected to a 24V bus-system and is running on a Atmea88 (U1). But it's practically a blackbox and I dont want to bother with it.
I want to archieve two things:
Measure activity on the speaker of the bell, so I can detect when somebody is ringing
Turn the speaker of when I want to
I'am doing the aforementioned with a Pro Micro and a N-channel MOSFET, details see the attached schematic. So if I connect my ADC Pin before the FET I still get a very quiet ring and quite high voltages (I guess the electricity is flowing back to my Arduino, and across the ADC Pin?), but if I connect it after the Fet, I can't detect a ring when the bell is switched off (which is quite crucial, when you want to use for example visual notifications).
Would be glad for any help or tips I'am stuck for now..
I don't really understand what you mean by your description of where you connect A2 on the Leonardo, no matter...
Connect GPIO16 on the door bell via R2 to A2 on the Leonardo. That should work. Make sure all the grounds are connected together.
Be aware that the voltage on A2 will probably be different depending on whether Q1 is on or off. As you control Q1 you can take care of this in your code.
Thank you very much for the tip, I can't unsee it now... sometimes it's strange how the brain is trapped in a tunnel... Works like charm
So I measured the voltage with a multimeter and the Mega88 is inducing 5.45 Volts, and the datasheet says the 32U4 is capable of withstanding 5.5 V, so it would be VERY close to the max. I have also a 3.3 V Relais connected to a digital Pin of the Leonardo (Pro Micro), could it get hurt when I induce 5.45 V to the analog Pin?
So I measured the voltage with a multimeter and the Mega88 is inducing 5.45 Volts, and the datasheet says the 32U4 is capable of withstanding 5.5 V, so it would be VERY close to the max.
It'll be fine.
The whole thing is connected to a 24V bus-system
I ignored this when I first answered as it didn't seem relevant, I am however curious about this 24V bus system; what is is? What has it to do with a door bell? In my experience door bells run of a 1V5 or 3V battery system, not a 24V bus system!
PerryBebbington:
I ignored this when I first answered as it didn't seem relevant, I am however curious about this 24V bus system; what is is? What has it to do with a door bell? In my experience door bells run of a 1V5 or 3V battery system, not a 24V bus system!
It's called "TCS-Bus" and it's something like KNX. There is a central power supply for the bus and all clients are connected via transciever chips which transform the 24 to 5/3 V and a microcontroller which talks to the transciever chip. My initial plan was to power an ESP via the bus power, but the ESP drew to much juice, it worked for a few seconds, until the caps of the bus-supply were emptied.