PIR re-initialising when servo starts/stops

Hi,

I'm having a problem with a PIR, when I load the sketch it takes a little while to initialise and then works fine (currently turning on an LED on another pin with any movement), no problem. However, when I then start or stop a servo (connected to another pin) the PIR reinitialises and takes another 30 seconds or so to start working again. I'm hoping to use several of these sensors to control the position of the motor eventually. Does anyone know what's occurring here? Any help would be much appreciated.

Many thanks!

It might be a sensitive reset pin on the PIR module - does it have one?

The servo motors may be disturbing the power supply to the PIR modules. You could try separating the supplies to check.

Mike

Thanks Mike, using a seperate power supply for the PIR does indeed cure the problem. Does that mean a capacitor could somehow be used to even out the disruption? My electronics knowledge is a bit lacking, but will investigate and report back!

Oh, and no, they don't have a reset pin.

That's good.

Yeah - a cap might help - try a 100uF or more electrolytic near the servo.

The best would be to use separate supplies to the servos, either by using a different supply, or separate regulation.

See what the cap does first, though.

Mike

Well, a cap stopped the problem when the servo drained power, but not when I stopped it and the voltage went up again. I guess I'll just use a separate supply, but what do you mean by 'separate regulation'?

Thanks for the help.

By separate regulation I mean using one power source, feeding the Arduino and PIRs with an addition voltage regulator to the servo.

Hopefully the additional regulator would stop the load variation affecting the Arduino/PIR supply voltage.

The PIRs seem remarkably sensitive to power supply fluctuation. Are you running them close to their lower supply limits?

The problem probably has to do with the fact that all inductive loads (motors, relays, solenoids) draw a lot more current just when starting up. Sometimes it is 10 times more current for a short time justwhen starting up, than when running steady. A large cap may help eliminate this problem, but you also have to make shure that the needed current is available. How large is the cap you have tried ?

OK, maybe this was a newby error! I was running everything from USB power. With an external power supply everything works fine.

Many thanks for your help.

Cool.
USB can supply max 500 mA if i remember correct.