Hello guys, i have a question that is driving me crazy for some time
I use a pir that on motion gives high (tried few of them, last one is this
I've connected 10k pull down resistor between output wire and ground to sensor, and it still is triggered for example by my neoway m590 module (i've moved it further) or by light switch in mains power nearby the setup!
Guys, please help me out on this, i have no more ideas to try out
Those sensors work internally on a 3.3volt suppy, so the "unloaded" digital output signal is ~3.3volt.
Don't "load" it with a 1k resistor, because that will pull the output signal below the HIGH threshold of the MCU. No resistor should be needed on the digital output of a PIR.
It seems that the transmitter of that neoway module triggers the PIR sensor.
Nothing you can do about that, apart from some distance between them.
You could ignore a PIR trigger during transmitting (and about 3 seconds after that) of the neoway module.
Make sure the "time" (Tx) pot is set fully counter-clockwise, so the PIR resets quickly.
Leave the "sensitivity" (Sx) pot in the middle.
Leo..
Power source is 12v 2a wall block. It goes to LM2596 (voltage drops to 5.15) then it goes to TP4056 Lipo charger, and then it goes to MT3608 (voltage is increased to 5.15 v for optimal performance) and thru diode it reaches arduino.
When problems started, i've put a 470 uF capacitator at 12v line input, it solved some false positive problems.
Pir is connected to mains +5v and arduino gnd, as well as neoway modem.
Also, some problems were gone when I've introduced pull down resistor (it actualy eliminated quite big part of false positives).
And still, if I turn on and of another mains device connected near 12v wall mount charger that supplies arduino, i can still provoke false positives.
Code is very basic If (pirpin == High) then motion detected.
Sorry for no pictures, i use setup as alarm in remote location, i will provide them when possible.
You could try a 100n capacitor from the Arduino input pin to ground (near the Arduino).
And a 100uF decoupling capacitor across the supply pins of the PIR module (near the PIR).
Leo..
Looks like i've received response, but it does not show in here, so i post it from e-mail
"Do you mean that output voltage of the sensor is not enough to register a HIGH on the Arduino."
It is enough. Even with 1k pull down arduino registers sensor output, which is 3.3 v. What i mean, that with decap arduino registers output if i move sensor wires a bit near each other, it induces voltage high enough for arduino to trgister as high.
"voltage is increased to 5.15 v for optimal performance
Doesn't make sense.
The MCU runs at the same speed (16Mhz), independent of the supply.
A 16Mhz Arduino running on >=3.85volt has the same "performance" as one running on 5.15volt."
It does makes sense in the plan that voltage step-up unit produces most amps according to data sheet when input voltage is ~4v ant output is 5.15v. I noticed problems because of relay and greedy neoway module if apms were too low.
Sorry, lost the post while editing.
Arduino HIGH threshold is 0.6*VCC.
Arduino VCC has to be lower than 5.5volt for the 3.3volt PIR to register a high.
You must have your reasons to increase VCC to 5.15volt.
A higher voltage is not related to "performance".
Leo..
Yes, "A higher voltage is not related to "performance"." indeed you are right
Today i'm going to add 100n cap on arduino side, but i do not understand why exactly and how this will help, so if you could give me a note what to google about i would deeply appreciate that
tadasp:
Today i'm going to add 100n cap on arduino side, but i do not understand why exactly and how this will help, so if you could give me a note what to google about i would deeply appreciate that
A 100n cap from Arduino pin to ground could short hum/hash/RF (picked up by the wiring) to ground, while still leaving the relatively slow PIR output signal intact.
Google e.g. "bypass capacitor".
Leo..
Okay, it was bit to early to get happy although arduino stopped reacting to mains power switches, open collector problem got much much worse after applying both caps. It is enough to touch pir wires or wave hand around them to get high on arduino end. Any thoughts?
There should be no open collector pin problem.
The PIR chip has a digital output with a ~1k5 series resistor.
The Arduino pin is either electrically connected to ground or to 3.3volt (via a 1k5 resistor).
I think there is something wrong with the way you have wired it up.
Post pictures (as already requested in post#6).
Leo..