I hope you enjoyed the tutorial on
building this little self sufficient room management system. I call
it self sufficient because it is running all by it self without being
connected to a network or a computer. I am sure, there is plenty of
space for improvement and still, if you have any additional ideas or
suggestions, please feel free to leave a comment. As said before,
creative critic is always welcome and kindly appreciated.
Now for everybody trying to build one
of this, please act responsible.
You may use the code as is or modify it
to your needs as you wish but what ever you do with it, you do it at
your own risk and responsibility. On implementing the Room Management
System in your light system you are dealing with high power
electrical systems (240 V in Europe, 110 V in USA). If you are not
familiar with at least basic electrical installations, please ask for
professional advice. Failour to do so may cause injury or death or
damage to buildings or equipment.
If you have been following the tutorial
from the beginning I guess you now how to handle the Room Management
System and how to adjust timers and sensitivity settings. However, I
through it in anyway:
Going back to our code right on top
where it says “//Timer and Sensitivity Settings to be changed to
individual needs//”:
unsigned int sensitivity = 500;
This variable is a time value in
milliseconds on the end of the code to adjust for how responsive the
system reacts to inputs. You may lower the value for the system to
react faster but you may get problems with the priority buttons,
getting the effect that the lights switch off an on again by one
button press. Raising the value will lower the response of the
system. Specially on manual input. Buttons have to be pressed a
little longer to react to the input.
unsigned int photoCellCutOff = 280;
The photocell is giving back a reading
between 0 and 1024 depending on the light input. As more light, as
higher the reading. As lower you set the value as darker it will be
until the light come on in the selected rooms.
long int dBed1 = 60000;
to
long int dMaster = 240000;
All the variables between this two
statements representing the times between the last detection of
movement and the delay until the system is switching off the lights.
Since Arduino is calculating everything in milliseconds, this number
are quite high. 1000 milliseconds stands for 1 second and 1minute
makes up 60.000 milliseconds. If you would like to have a delay of 10
minutes you need to put the value up to 600000.
To set this values depends a little on
your set up. However, a corridor, where usually nobody is getting
comfortable and where you do not have to consider inactivity for a
period of time while a movie is being watched or a book is been read,
a short delay time of just 2 minutes (120000 milliseconds) will do
the job. In living areas where people do sit down and read a book
etc. you also have to check how sensitive the PIR's are you are
using. If the PIR's are very sensitive and you didn't pull up the
systems sensitivity setting to a value of 1000, a 5 minutes (300000
milliseconds) delay in living areas is sufficient. A kitchen again is
a busy area and a 2 minutes delay will do the job. A little more
careful considerations are needed in bath and shower rooms. If you
have a all in one bathroom with bath, shower and toilet together,
there is no problem, just make sure that the used PIR is suitable for
a bathroom (humidity). If you have a separated shower area with its
own light but to small to install a PIR in a save way, the delay has
to be long enough to take a shower without the lights switching off.
Happy Arduino Day ! I thoroughly enjoyed all the thought and hard work you put into this project . I have only browsed through a few of the posts , but I plan on reading them all . Thank you for sharing this journey with us!
ReplyDeleteBuild_it_Bob
Thank you very much.
Delete