Pull-up resistor value for PIR + 10 M cabling

I am currently using a 3.3v microsized arduino with a PIR using a 10K external pull-up resistor. I am finding that with longer runs of cable such as my current 10m of CAT-5 that noise is being picked up by the cable and triggering a LOW. I am assuming that I should use a pull-up with less impedance however I am concerned about going lower then 10K.

Based on my setup what would be the best resistor value to use? The board is powered by mains so inefficiency is not a concern.

Thanks for the help.

If it's a sparkfun motion sensor, the alarm pin is open collector so there should be no problem using a 1K pullup for 10x improved signal strength.

There are various options, but you need to concentrate not on the pull-up resistor, but noise rejection.

Are you by the way, using the Cat 5 cable for anything else at the same time, if so what?

Clearly you need to ensure there is no connection at the sensor end to anything else, including ground, otherwise a ground loop will irrevocably introduce the noise. Is the cable running alongside a mains cable?

A logical approach, is to "condition" the signal at the Arduino end with a 10k resistor after the pull-up, and a 5µF capacitor.

Rather than altering the pull-up, it would make more sense at the sensor, to use a 10k pull-up and a 74HC14 with one inverter feeding the other five in parallel, as a buffer.

Thanks for the prompt replies. Right now I am using a simple pushdown button to simulate the PIR in lab conditions, the CAT-5 cable is simply what I had around to test, but it is also quite likely I would use it for the PIR as its what I have large quantities of, but other recommendations are welcome. The CAT-5 is not being used for anything but for the PIR, or in this case a button shorting a binary_input (10K pullup, Arduino end) and ground.

The PIR is powered from an external 12v DC PSU which will pass through the same cat-5 cable on a separate pair.

The CAT-5 is in my office with much electronic equipment, I notice that tuning on/off my soldering station a few meters away will always trigger a LOW. However when commissioned it is expected it will run alongside with power cables as it will be fitted in a metal post with 220v AC, I guess using STP/FTP should help, or is this generally a very bad idea?

I would prefer to not use the 74HC14 and try to reduce complexity as much as possible, I have about 50 of these micosized arduinos to deploy in the field, So from what you are saying, I gather that I should use 2 10k resistors, one on the PIR and one on the Arduino end, possibility with a 5µF capacitor?

So from what you are saying, I gather that I should use 2 10k resistors, one on the PIR and one on the Arduino end, possibility with a 5µF capacitor?

It makes negligible difference on what end the pull-up is, compared to the (low) resistance of the cable.

The low-pass filter I described should be reasonably effective (I have not verified its response compared to the mains frequency). Shielding (grounded at the Arduino end) does make sense.

I am slightly suspicious of your "simulation" setup as against the actual target device, handling the switch may itself be a factor as your body represents a significant capacitance. And the proximity of other wiring to the soldering iron may be as much of a concern.

I do not actually think you should use a separate ground for the 12v supply; this would mean a rather large loop between the two grounds, sounds like trouble to me.

The ground is actually shared (kinda). Basically the PSU of the LED lights which I am controlling has a 12v out. The 12v out is stepped down to 3.3v using a simple inline linear power supply to power the mini arduino, the PIR is however powered directly from the 12v PSU output as the PIR has an on-board regulator bringing the voltage down to operating levels which I believe to be 3.3v.

I have use a multimeter to check ground continuity after it is passed through the regulator and it seems ok.

Is the concept behind my setup completely wrong? Will sharing a ground between a 12v and 3.3v circuit even if from the same PSU cause issues?

Is the concept behind my setup completely wrong? Will sharing a ground between a 12v and 3.3v circuit even if from the same PSU cause issues?

No, I was not concerned about a common ground of the same power supply, rather connecting the ground from two separate power supplies together via an inappropriately long run of wire.

The only concern I can see with the multiple supplies, is keeping the corresponding regulators and the Arduino close together so that the ground wiring between them all is as short as possible.

If your "master" is a 12V power supply and on the mains, I do wonder why you would be using the Arduino at 3.3V rather than 5.

I see.

The reason I am using 3.3v is because I am not using an Arduino. What I am using is called panstamp, they are a wireless sub-gig Arduino miniature, www.panstamp.com they are native 3.3v.


Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png or pdf?

This way we can be sure we understand you project better.

Tom..... :slight_smile:

I agree that noise rejection would be the biggest consideration. It would be good to get a picture of the signal on an oscilloscope, however I realize that things could change after installation in a noisy environment. It's possible that shielded cable and/or opto-isolation might be required.

Whatever you decide on for conditioning the signal, I would try testing with a much longer cable, or 2 or 3 10M cables coupled together to see if your solution still works.

If the PIR signal is open collector, then it could be pulled up to 3.3V at the Arduino end, perhaps with something simple like this that includes some filtering:

Two things wrong with that diagram.

One is that you have the "switch" - the open collector transistor - directly across the capacitor. This may or may not be healthy for it, but it also means you are applying a low-pass filter differently to the "make" and "break" behaviour. My suggestion before was a pull-up, then a series resistor (10k plausible) and the capacitor to ground.

Secondly you are indicating a ground on the sensor end. I realise that is most likely an oversight but I have been stressing the point that you do not want grounding at both ends of the cable, producing earth loops.

As per Paul__B ... brilliant! +1

Actually, I only mentioned the ground in principle - I am pretty sure that he intends to supply the 12V down the Cat 5 as well, and only one ground wire will be needed.

Thank you all for your time. +1. I ended up using the above circuit and experimenting with different resistor values until I came up with something stable. I found that a single 10K resistor, plus the 1uF cap worked well at removing noise. No more false alarms, even with mains next to the line!

Using the two 10k resistors proved too much however and the button would simple not trigger, just so you know!