last day (15 days later) » 

05:04
-1
Q: Can arduinos and Rasberry Pi build a custom smart home solution?

Scientific MasterI am working on a custom smart home project and do not know how exactly I have to make the system design. I am thinking of making a Rasberry pi to work as a webserver and connect it to multiple Arduino boards to which the sensors and accentuators (motors and NFC signal transmitters) are connected...

Ah the wonderful world of IOT ... all great until the kid next door takes over all your devices to mine bitcoin. But yeah, plausible. All straightforward until you get to the question of connecting to the end devices, the "fingers" of the network. In a house it can be a pain to run all that signal wire, but putting a wifi on every lightswitch is a recipe for crappy wifi.
What size of copper wires do you recommend for connecting the Arduino boards to the farthest endpoint which will be roughly around 200 meters?
I don't. Figure out your signal format first, then the current it uses, then look it up in the table. There are also other hacks like radio or older wifi bands, putting a signal on the power network, etc.
most of the sensors with use 5v with the current in range of 30-50 mA
Ok let me put it another way. Would you want to install 50 old school telephones in your house? Or is it easier to just walk to the phone?
Anything that can be powered by the house power obv do that, in my opinion. (I don't see the appeal of changing thermostat batteries x 20 for example). And despite my complaints, these things do end up using wifi
05:04
The problem is that I want to connect multiple sensors to each Arduino board, so let's say one Arduino may be connected to 5 temperature sensors each in a different room. The Arduino itself can be connected to wifi using the wifi module, but connection with each of the sensors have to be wired.
I think Arduino (the 8-bit AVR variety) might not be the right platform for that. Look into setting up a distributed network of (cheap) ESP8266/NodeMCUs, the Tasmota platform (for example) and setting up an MQTT broker on the Raspberry Pi. Your problem has already been solved. You're free to develop your own platform however.
@StarCat well yes and no. I am being grumpy and I apologize. But the reason I responded is because I have a similar but less ambitious project, involving just lighting. And figuring out how to do it without it becoming a headache is not easy, even with just a couple rooms.
Basically I concluded that I would want to run a 24V power network around the ceilings and include a one-way data bus. (the 1 wire bus used by those led-strip things should do). Each bank of lights would get a tiny micro to decode the bus address and the intensity level, the rest would be a current control / pwm,
@Scientific Master ... re: arduino -> 5 sensors ... that is okay. As StarCat says there are (many) other options that have benefits, but arduino is accessible to a wider audience and is a great place to get started. Anyway work through the details. 50mA per device is a surprisingly high amount of power in this context.
@StarCat ... Why do you think ESP8266 is better than Arduino for that project? I mean that Arduino has 6 analog pins that can allow connecting 6 different IR sensors for example. I want to stick to the wired solution for security reasons, but what functionality can ESP8266 add to the project except for the wifi capabilities?
@PeteW I think I have a problem figuring out how to get the 6 pins on Arduino Uno to be connected to more than 6 digital sensors. Do you think using an analog multiplexer will enable me to get data from many sensors in nearly real-time, or I have to use multiple boards? Also what type of microphones do you think is suitable for use in rooms that should be connected to rasberry pi through USB to transfer the voice commands to the system?
Yes, multiplexers are a great solution all around. For home automation you're probably going to have more on/off stuff than actual analog, especially for sensors. For these it's quite easy, you can use something like MCP23S17 which interfaces easily with the arduino via SPI and does both input and output! You'll need some interface circuitry to safely get signals into and out of your system, so do your homework. For the analog outputs such as dimming lights, you'll want to use PWM outputs. For that you might need something just a touch more complex to do many channels.
Come to think of it, having many PWM outputs is one reason to go with something more than the 8bit chips used on the basic arduino...
so what alternative to arduino do you recommend for expanding sensor and output capability?
05:04
I don't know. Depends on how much device-specific programming you want to do for this project, and how much is worth investing in learning for future work. The STM32 series is both more powerful and versatile, probably equally popular, but unfortunately more complex and time consuming to learn than the 8 bit AtMega's used in arduino. Totally not clear that its worth it for the application, especially considering embedded PC stuff like Raspberry Pi are more powerful still, and easier to program (at the expense of not having the ultra precise timing-control of a micro)
Definitely ask around. It's a loaded question, kindof like asking if Ford is better than VW or something, but lots of others will have much more experience and advice. If you're dealing with primarily on/off sensors at low frequencies, just go with the simplest thing you can find.

last day (15 days later) »