Pages: [1]   Go Down
Author Topic: Turn on the lights when gate opens - magnetic contact switch  (Read 1882 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear all,
I would like to make my garden light to turn on when the gate opens. I used to have a pir motion sensor attached to my lighting system but unfortunately it is not always working.
For this reason I was thinking to take the pir away and use a small arduino with a magnetic contact switch (together with a light sensor) that drives a relay. When the switch is open and the sunlight is low the lights turned on for a couple of minute.
What do you think? Do you have better ideas?

I would do that using a arduino uno, but since it is a very simple thing, can I use a simple ATTiny85 also to do that?
thank you,
dk
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8669
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would do that using a arduino uno, but since it is a very simple thing, can I use a simple ATTiny85 also to do that?

The ATtiny85 could certainly do it but because that's not a standard Arduino it complicates the process quite a bit.  You should use a real Arduino if you want to keep it "a very simple thing".  If you are short on physical space you can use a small Arduino like the Arduino Nano.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Full Member
***
Karma: 5
Posts: 219
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I'd just mount a mechanical switch that closes it's contacts when the gate opens.  Some things don't require software.
Logged

Offline Offline
Jr. Member
**
Karma: 4
Posts: 93
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think I'd just mount a mechanical switch that closes it's contacts when the gate opens.  Some things don't require software.

--When the switch is open and the sunlight is low the lights turned on for a couple of minute.--

Simple answers are not always simple solutions.

I think the type of switch depends on the situation and construction of the gate. Do you want the lights of from the moment you open the gate or when you close it?
Logged


0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like a 555 timer circuit.
Logged

Pages: [1]   Go Up
Jump to: