I have a 3vdc flood alarm. When the flood alarm is activated it sounds a buzzer. When this buzzer goes off I would like to use it as a trigger to my Arduino Mega2560 via a digital input(DI).
My first thought was to hook a 20 gauge wire to the + side of the buzzer and connect the other end of the wire to a digital input on the mega 2650.
The sketch would simply do one thing if the DI is high and nothing if it is low.
The trick is however to condition the signal at the flood alarm to be +5vdc when it reaches the Mega 2650 DI.
As i am new to creating projects of this sort, is it possible for you to give me a URL to a opto isolator that I can use in my project. I use Amazon for a lot of my electronic purchases but if you have a better site I am willing to check it out.
As i am new to creating projects of this sort, is it possible for you to give me a URL to a transistor, inverter/amplifier that I can use in my project. I use Amazon for a lot of my electronic purchases but if you have a better site I am willing to check it out.
[/quote]
Any of hundreds of different small, NPN, audio or switching transistors will work in that circuit. Typical examples are 2N3904, 2N2222, or salvage one out of a discarded toy with some electronics in it.
You do have to pay attention to lead identification!
VCC is the working voltage of the processor you're using.
The Mega is a 5volt-logic Arduino, so VCC is the 5volt pin.
The pins of a transistor can be orientated differently, so pay attention to the datasheet of the transistor you're using. Google "2N3904 datasheet" if you use that transistor.
Leo..
I am trying to use a 0 to 8mVdc signal to trigger an Arduino mega 2650 digital input from low to high (0 to 5Vdc). This requires about a 500x increase. Is this possible?
Always have a bit of hysteresis to make it switch cleanly - eg go high at 5mV go low at 3mV .
You might just be able to do it with the internal 1.1v reference , but think Iβd add an op amp to boost it say x10, or as said a comparator is a good option .
Check the performance of any op amp for offset/drift and being able to work near 0v
Never used differential mode on a 2560, but worth a look