Go gentle - this is my first foray into the world of Arduino.
Situation: I am looking to make my house an entire "Smart House", I will be re-wiring the entire property back to a distribution panel, controlled by relays, hooked up to MQTT. I will run separate cables for each socket, each light, data cables for all switches and a bunch of sensors for each room.
I am at the design stage of this project at the moment - eager to try and make each individual element work before committing it to the whole house
Question: I am looking to have all the switches connected to one Arduino. I am looking for ~51 illuminated momentary push buttons throughout the house. The LED on each button must be controlled separately to the button itself. So essentially I have 51 push buttons and 51 LEDs to control all independently.
I am not at the point of coding, this is a design question.
I have done lots of reading on shift registers etc, I think I can achieve what I want using daisy chained 74HC165s for the buttons and daisy chained 74HC595s and ULN2803s for the LEDs.
The buttons may be pressed simultaneously (think different people in different rooms - may happen to use at the same time). The LEDs will illuminate if the intended load is on, but with additional time based rules applied. It is possible that all 51 LEDs may be required to be on at the same time, although unlikely.
I have tried to do my own research, the attached Eagle file is a culmination of it. It is my first work with eagle - please point out where I can improve/learn.
The LEDs are all attached via 220ohm resistors, the capacitors are all 100uf, the inputs of the 74HC165s are all pulled low via 10k resistors.
The Arduino Mega Rev3 will be powered via 12V on the VIN pin, this will also power the LEDs. Everything else is powered via the 5V VCC pin.
Is this achievable?
Have I followed best practices?
How can I improve the design?
Does the 5V Vcc pin have capability to power all the chips?/will the 12v be able to power 51 LEDs? I used the transistor arrays so I wouldn't exceed the current draw on the I/O pin for the board.
When I get round to looking at the code - will the Mega be able to handle dealing with all the inputs, reporting their state to an MQTT broker and listening to the broker for the state of the LEDs and actioning accordingly.
Or is that asking too much?
Cheers
G
LEDs.zip (67 KB)
