I have a pin set to INPUT on a Uno. I am using 3 other Unos to signal that port digitally. I wish to use diodes on each wire from each of the other Unos so there is only "one way traffic" on each wire. I have tried the 1N4004 but that seems to eat up some current. Is there a smaller / better / recomended diode to do this?
It seems when i have the diodes inline and the PIRs are active (sense an object) there is not enough to cause the pin to see a HIGH. In my testing, once I remove the diode and test just one PIR it will work fine. Perhaps it is the voltage drop but that sould only be 0.7V for a silicon diode, sill enough for the pin to see "HIGH"
Or perhaps try Schottky diodes (BAT49, 1N5711) with only around 0.3V forward voltage drop (or even germanium diodes though they're quite expensive these days).
slipstick:
Or perhaps try Schottky diodes (BAT49, 1N5711) with only around 0.3V forward voltage drop (or even germanium diodes though they're quite expensive these days).
If the PIR output is 3.3 volts, a Schottky gets you no closer to working. I still don't understand what the OP is trying to do. He says originally:
I have a pin set to INPUT on a Uno. I am using 3 other Unos to signal that port digitally. I wish to use diodes on each wire from each of the other Unos so there is only "one way traffic" on each wire.
Then he's saying a PIR detector isn't working. How did we get from three other Uno's to a PIR? In the absence of a schematic or block diagram, these threads just become a guessing game of what the OP wants....
SamBrownADK:
I have a pin set to INPUT on a Uno. I am using 3 other Unos to signal that port digitally. I wish to use diodes on each wire from each of the other Unos so there is only "one way traffic" on each wire. I have tried the 1N4004 but that seems to eat up some current. Is there a smaller / better / recomended diode to do this?
Doesn't make a lot of sense to me.
Maybe easier to connect the PIR only to the first Uno.
Have it detect/process the PIR, and output it to the other Unos with an output port (with protection resistor).
Not sure why four Unos.
More info and/or a diagram could explain things.
Leo..
OK. I am sorry for the confusion. I am sorry, let me try to re-write the problem:
One (just one) Uno. Has 4 PIRs who's out put (all 4) are wired to digital pin 2 to wake the 328P-PU.
Each of the 4 have a 1N4004 diode. I tried with out a diode and for some reason it did not work. It does with the diode, but not if all 4 fire at the same time.
Spreading problems for a single project across several threads is never a good idea.
You get answers for one specific problem that might not be ok with the rest of the project.
What I get so far.
chicken coops that are "far away" (useless statement).
don't want to use (Cat-5) wiring.
four PIR sensors and one Uno per "area"
big 120Ah deep cycle battery (must be one per Uno).
four sensors on one interrupt pin with diode-OR (bad), to wake the Uno.
Did I leave something out?
Pin-change interrupt should work on all pins.
Not sure if that can wake an arduino.
Not sure what local and/or remote output (alarm) you want.
Leo..
SamBrownADK:
Each of the 4 have a 1N4004 diode. I tried with out a diode and for some reason it did not work. It does with the diode, but not if all 4 fire at the same time.
While a diode will ensure their is "one way traffic" that is not enough. Sure the other end of the diode will see a HIGH but but to the diode it will never see a LOW. You need both a HIGH and a LOW to drive an input. The absence of a HIGH is not the same as saying it is LOW. What happens is it still sees a HIGH due to the leakage current which happens with any diode.
Solution, add a pull down resistor to the input you are trying to drive.
Second problem with a 1N400x diode is the logic HIGH volt drop .
Cheap/common PIR sensors use 3.3volt logic.
A 3.3volt signal minus a diode drop is below the HIGH threshold (0.6*VCC) of a 5volt Arduino pin.
It might not work every time.
A diode "OR" is not needed. Every PIR can be connected to it's own input pin.
If... pinchange interrupt can wake the Arduino.
IIRC Nick Gammon has some good info about that on his website.
Leo..
@Grumpy_Mike: Can you please show schematic how do you think it is wired so diode leakage current keeps the pin HIGH? You are right that the pull-down resistor is usually needed for wired-OR made by diodes (assuming positive logic). But it is not because leakage current is too high - it is because diodes are too good and the leakage current is too small to pull reliably LOW.
Grumpy_Mike: pull down did the trick. Once I had one on each pin to GND my problem went away. Using 1N4004, they seem to work fine. I will keep testing.