Home automation - looking for ideas to improve it

Hi All..

I have setup 6 automated lights on my stair case using PIR sensors.
I use a UNO right now.. which now has all the digital io pins taken by the relays / PIR sensor inputs.

My question is..
I need at-least 4 Inputs and 6 Outputs + a DS1307 for RTC.. is it possible to use a ATTiny84 with shift outs?
so It uses less power and I will have an extra UNO to play with :slight_smile: and basically

all I m going to do is use the clock to see if its day or night ? and then use the PIR sensors to activate relays

I have ordered a few ATTinys like 84 and 85 already..
So I would love to use anything that doesnt waste my complete UNO that just looks nice :slight_smile:

One side qn: sometimes ALL my lights go on .. when someone runs around.. so Is it possible I may exceed the amperage that i can take out of each/combined IO ports?

My relay is "8 Channel relay board with +12V relays 10A/250V AC with ULN2803 IC" Seller didnt provide me any datasheets to work with.

ATtiny84 + shift registers
http://blog.ethanfrei.com/2011/07/attiny84-shift-register-and-interrupts.html

Here's the datasheet for ULN 2803

I suppose your driver is arranged so that input goes through the ULN and not to the relays directly, right?
In that case, there should be no problem for UNO (or ATtiny) to provide enough current.

Thanks for your answer, Helped me a lot.

Input goes only through the ULN and Relays are powered by the external 12v wallwart.

Another question though :
Whats the best way to detect the day and night.. I do have a DS1307 chip.. but wanted to know if there is any better options/simpler/etc

DS1307 is the Real Time Clock thing, right? I can't think of anything that will determine the difference between day and night more accurately. A light dependent resistor might do the trick if you can put it near a window or where at least it won't be in a dark hallway.

The benefit of LDR is that if it gets cloudy and dark outside during the day your lights also light up, but if the light level during the day is too low on your staircase it might not reliably differentiate between day and night. You'd have to test that.

An LDR (to detect light levels)
an ultra sonic distance measurer (eg how far away) might come in handy.
Temprature sensor, eg heat/cool activation
a mic might be useful, detecting sound?

Time to order a new arduino board? lol.. the attin85 is great but lacks uart, softserial does the trick!