Arduino connected to remote motion sensor (~10m) - Page 1
Forum section: electronics / projects

author: c64
author_rank: Frequent Contributor
timestamp: December 25, 2023, 03:02:19 am
content: I want to install quite a few motion detection sensors around the house, inside and outside. Thinking about PIR HC-SR501. To minimize amount of wires used (and not enough pins anyway), I plan to have one Arduino in the center, connected to multiple others, which are in turn connected to multiple PIR sensors. Wires will be long, probably up to 10m or maybe even 20m. Can I use just standard wiring (maybe with some pull-up or pull-down resistors) or need to have some 50Ω or 75Ω drivers and cables? Any extra protection required, like diodes?Also, is it OK to power them all from one power supply connected to the central arduino?

author: coromonadalix
author_rank: Super Contributor
timestamp: December 25, 2023, 04:17:46 am
content: well you have arduinos with lan, and you can or could use rs485 ...and in lan you could use poe "power over ethernet" enabled stuffesp32 or some raspi with wifimany possibilities

author: Ian.M
author_rank: Super Contributor
timestamp: December 25, 2023, 04:49:15 am
content: The 'simple' approach of running single-ended logic level signals to/from bare I/O pins over multicore wiring and distributing 5V and (signal/power) Gnd via the same is fraught with problems. Induced transient currents will commonly exceed I/O pin internal clamping diode ratings, requiring far more complex circuits to externally clamp and current limit incoming signals, and overload protected external drivers for outgoing signals. The voltage drops in the power and ground distribution must also be considered - voltage drop in power is manageable by local regulation from a higher voltage, but voltage drop in Gnd directly compromises your logic low thresholds, reducing noise immunity, causing an incorrect state to be detected. One can use local flyback converters for power so power and signal grounds can be isolated, but generally its easier to simply use differential signalling, which (with good choice of transceivers) can tolerate a moderate ground offset + reduce sensitivity to common mode noise.

author: ArdWar
author_rank: Frequent Contributor
timestamp: December 25, 2023, 09:48:56 am
content: If you insist on using low wire count connection you can try design the remote system as 4-20mA transmitter circuit. Design it properly and you can even power the circuit and transmit the signal simultaneously using only two wire, but that's quite a lot of thinkering needed and I doubt arduino can even fit within the power budget here.I'd simply use differential signaling. Beware of induced common mode voltage tho.

author: zapta
author_rank: Super Contributor
timestamp: December 25, 2023, 02:27:04 pm
content: Have you consisted a wireless link for the data?

author: ajb
author_rank: Super Contributor
timestamp: December 25, 2023, 06:59:54 pm
content: You don't need anything fancy for the PIR sensors at 20m. Input protection at the Arduino end is never a bad idea (external clamp diodes, rc filter), at the PIR end you might benefit from a series resistor on the signal output and some extra bulk capacitance on the power lines if there isn't enough on the board.For Arduino-to-Arduino connectioms, it depends on the data rate required. A simple UART link over RS485 would be a good solution for up to a few Mbps (depending on which kind of "Arduino", UART will max out at a few 100kbps anyway), and allow you to daisy chain from one device to another. Signal cabling for that should be twisted pair, Cat 5 or similar with one pair for data and the other three pairs ganged together for power can work well. RS485 transceivers are generally somewhat robust, likely good enough for a home installation as they are, but a couple of TVS diodes at each node wouldn't be a bad idea.

author: c64
author_rank: Frequent Contributor
timestamp: December 25, 2023, 10:34:27 pm
content: Quote from: zapta on December 25, 2023, 02:27:04 pmI'm open for suggestions

author: tooki
author_rank: Super Contributor
timestamp: December 26, 2023, 11:43:07 am
content: ESP32 supports WiFi and ESP-NOW, its own lightweight wireless protocol, natively. (Hardware is built in.) Or LoRa, which is pretty much designed for this type of application.

author: coromonadalix
author_rank: Super Contributor
timestamp: December 28, 2023, 09:03:19 pm
content: xbee's