Multiple sensors, one relay for garden lights between garage and house

Hi all,

I have a project for my house but I am not sure if it is possible to realise it. I was looking for days on youtube to find similar projects but i couldnt find any. The picture I attached describes it quite well i guess but i will try to explain it with words.

My Garage is quite far from the house so I want to install some garden lights along the way that will be controlled by an arduino. I plan to use two HC-SR04 ultrasonc sonar distance sensors, one at the garage and one at the house. Let's say if i leave the house, i want the house sensor to turn the lights on and I want these to stay on untill i reach the garage sensor that sould turn them off. This should also work the other way around, moving from the garage to the house.

If anyone could provide a link to a similar project I'd be very happy :wink: Also if you Pros out there know it is not possible, please let me know :wink:

Arduino garden lights.pdf (981 KB)

Your Project is surely doable but You will "never" find code, nor wireing diagrams, out there. You'll have do a all, or most of it by Yourself.

Certainly possible, but I'm not sure why an Arduino would be needed. Also, hc-sr04 are not really suitable for outdoor use and will soon fail if exposed to rain/damp/frost.

You can buy off-the-shelf PIR motion sensor modules for use outdoors. They have an adjustable timer which will allow enough time for you to walk between garage and house after they are triggered, and a relay built-in which can probably switch multiple led garden/path lights.

I don't know, the neighborhood dog or birds might keep the garage lights on a lot of the time.

Railroader:
Your Project is surely doable but You will "never" find code, nor wireing diagrams, out there. You'll have do a all, or most of it by Yourself.

Hi Railroader, I was just hoping maybe someone had or saw a similar project ...

PaulRB:
Certainly possible, but I'm not sure why an Arduino would be needed. Also, hc-sr04 are not really suitable for outdoor use and will soon fail if exposed to rain/damp/frost.

You can buy off-the-shelf PIR motion sensor modules for use outdoors. They have an adjustable timer which will allow enough time for you to walk between garage and house after they are triggered, and a relay built-in which can probably switch multiple led garden/path lights.

Hello PauRB,
I was planing to place the hc-sr04 inside the garage and also under the patio, protected from the rain...
I saw the Motion sensors with adjustable timers, I might try these out if i have no success with my arduino project, even though I don't like like timers when it comes to light :wink:
Thanks for taking the time to read and answer.

Ok, so what kind of lights are you considering? Are they low voltage DC, mains voltage AC? How many and what power?

I'm pretty sure you will need 2 Arduino. Basic ones like Nano will be fine.

I can think of 2 approaches:

  1. One Nano is master and controls the relay as well as monitoring a sensor. The other Nano is a slave and only monitors is sensor and then communicates somehow to the master. Communication could be via rf or wired.

  2. Both Nano control changeover relays and don't need to communicate with each other, but they will need to detect if the lights are currently on or off.

Some things to think about:

What if someone leaves the house and walks to the garage, but when they are half way, a second person leaves the house?

What if someone leaves the house, gets half way to the garage, then trurns around and returns to the house?

What if someone arrives in the garage at the same time someone leaves the house?

Hi,
OPs diagram.


Tom... :slight_smile: