analog or digital read needed?

I want to buy some cheap wireless doorbells on eBay and use them as wireless switches. I wouldn't use the speaker, but obviously I would use the circuit board from the speaker unit.

Question is, would I use the output as digital or analog? Would it be fairly easy to find a spot on the speaker unit PCB where I can read a HIGH without needing to use the output to the speaker itself?

Regarding wiring it up - would I need to debounce (guessing the doorbell does this itself?) and use pull-up/pull-down resistors?

Thanks for any tips. I have Googled and seen other projects but want to do it right after recent lapses!

Depends on the make/model you choose...

You'll need to determine what happens in the receiver when the bell goes off. There might be an LED that lights up, in which case you can remove it and either analog read it or digital read it.

BUT. Please break out your multimeter and check your voltages. Most of these run on 9V batteries. If that's the case, you can LIKELY use a Zener diode to reduce the voltage to 5v.

If you decide to tie into the speaker itself, you can use analog read and poll it constantly and look for a high average of several samples, but you should use a bridge rectifier to avoid any negative voltage input into your arduino.

Final bit is that assuming there IS an LED, the receiver might light it up by bringing a pin LOW instead of high such as: 9v-->resistor-->led -->IC that pulls low but is usually high.

If so, you'll just need to be watching for LOW instead of high.

Hope this helps.

hmmm

I've been playing with the wireless doorbell receiver unit. The one that had a speaker (removed it, left with the two wires which powered it).

It has an LED but the LED stays lit until the doorbell having been rung is acknowledged and reset. This is done with a button press. I suppose I could get the Arduino to do the button pressing but it seems a massive faff. It seems easier to read from the speaker wires...

I've measured the voltage when the speaker is 'triggered' and it's 5v.

I've measured the current draw, too. 0.8ma at idle (listening), 15ma peak (just triggered) and 6ma average (operating the speaker, as was).

So I have a few quezzies/hypothoses, if I may:-

  • I can power the receiver via the Arduino as current draw never exceeds 15ma, right? I would power it direct from a 5v pin
  • I would connect the negative speaker wire to ground and the positive to an analog pin and wait for 5v or thereabouts
  • What's to stop me reading a HIGH from a digital pin and not bothering with a analog read given that the speaker operating voltage is 5v?
  • I didn't spot any negative volts with my multimeter. Does that mean I don't need a bridge rectifier? To be honest I don't know what one is.

There's a couple of write ups on blogs where people have connected their doorbells to their Arduino and they seem to have done it quite simply but also quite successfully. I was hoping o do the same.

I'm not sure I've understood the per pin/per supply relationship. I have a 1A power supply so can power devices up to 1A in power, but I still have to watch out for a 20ma limit per pin? Is this just the digital pins or does it include the pins which constantly supply 5v too?

THANKS

There's a couple of write ups on blogs where people have connected their doorbells to their Arduino and they seem to have done it quite simply but also quite successfully. I was hoping o do the same.

A wireless door bell that has to be "reset" doesn't seem like the typical $10 types.

zoomkat: A wireless door bell that has to be "reset" doesn't seem like the typical $10 types.

So none of the ways of working with it will work?

I was hoping I could lop off the LED (so that it's not drawing current unneccessarily) and just read a digital high from the speaker wire as described in my March 04, 2012, 04:12:22 post.

THANKS :)

I'd love some help with this - have some time to work on it tonight and don't know what to do.

To summarise my questions again but reworded:-

  • I don't see why the 5v peak on the speaker wire isn't usable as a digital read, only an analog read?
  • Is it sensible to take the LED out of the circuit so that it's not drawing current unneccessarily?
  • I can power the doorbell receiver from the arduino because current draw never exceeds 15ma and the digitalpin limit is 40ma
  • I didn't record any negative volts on the speaker wire with my multimeter.

Thank you!

Dane: I'd love some help with this - have some time to work on it tonight and don't know what to do.

To summarise my questions again but reworded:-

  • I don't see why the 5v peak on the speaker wire isn't usable as a digital read, only an analog read?
  • Is it sensible to take the LED out of the circuit so that it's not drawing current unneccessarily?
  • I can power the doorbell receiver from the arduino because current draw never exceeds 15ma and the digitalpin limit is 40ma
  • I didn't record any negative volts on the speaker wire with my multimeter.

Thank you!

Sorry- SUPER busy. FAST answers here: Use interrupts. Hit the leading edge: http://arduino.cc/playground/Code/Interrupts This is better than digitalread because it will mean you don't have to read ALL THE TIME to catch the HIGH. CAVEAT: make SURE you've got a delay in there that will TURN OFF the interrupt handler for a period of time (longer than the tone) so it doesn't interrupt repeatedly.

I say leave the LED in and see what happens, but that depends on how much current it's drawing. It would be REALLY great if you could post a photo of the board on the receiver and / or a video on youtube showing both the board and the operation.

You can power the receiver, but be aware that multimeters are AWFUL at reading transient voltage and current spikes. Just because your multimeter says it's XmA or xV,doesn't mean there aren't spikes. The only way you're going to tell that reliably is with an oscilloscope. This ALSO applies to whether your speaker has any negative voltage hitting it. Multimeters just don't respond fast enough to tell. This is how you would cancel that out: http://en.wikipedia.org/wiki/Diode_bridge

I would say do NOT power the receiver directly from a digital pin. Just throw it on the 5v or 3.3v out and be done.

Thanks all.

And I gather I can use the 5v on the speaker wire as a digital read?

Thanks again

Did you read what I wrote?

I suppose the answer is yes, with a huge number of buts.

hint: interrupts

brucethehoon: Did you read what I wrote?

I suppose the answer is yes, with a huge number of buts.

hint: interrupts

I did read what you wrote, thank you.

I won't be using interrupts. It sounds like I would need to use delays, which I don't want to do under any circumstances, [u]plus[/u] my code is working well the way it is and I don't want to begin an arduous re-write when my wife is already cross with me for spending too much time on this process. TMI? Sorry.

I didn't see that you'd directly addressed my question about analog vs digital read - I was advised I would need to use an analog pin to wait for the 5v high on the speaker wire, but that confused me because I thought a digital pin was designed to be able to detect exactly the 5v high I am looking to read?

Thanks and apologies if I have misunderstood you.

You won't use delays as in delay(). It would be closer to BlinkWIthoutDelay (in playground)

Take a look at this tutorial from Sparkfun. It shows why this is helpful: http://www.sparkfun.com/tutorials/326

If you just digitalread all the time, can you be sure that the exact moment that you read, there will be a HIGH on the speaker wire? Using interrupts solves this issue.

Next- I really recommend using a zener diode at the least to ensure that you're not overloading the arduino input.