WiFi Controlled Switchboard

Hello Everyone,

What I want to build is basically a switchboard (SB) for controlling light, fan, TV etc. The SB will be controlled from a smartphone. Both the SB and the Smartphone will be connected to the same network through a WiFi router. The smartphone will send commands using an app, and the switchboard will respond accordingly.

I decided to build this system using an arduino. But I'm confused which model should I use, and which other components will be required (for example, to connect the SB to the router). I want it to be low-cost.

Please help me.

Regards, Preetam Das

Your friend in this project is the Adafruit CC3000 breakout board. It provides WiFi access to a home wifi unit, and its price (if I remember right) was in the $30 - $40 range. I've got one set up to send text messages to my phone, monitoring home status when I'm away. The library for it and the examples are very adequate.

As for what processor to use, the Atmega 328 sounds plenty big enough for what you are doing. My favorite version of that is the Nano, because you can migrate it right from a breadboard into a PCB.

There's a esp8266 it's less then $10 from Adafruit too. It get's the wifi part going and then just figure how many input;s you need. Pick your ardunio board then.

Thank you for your suggestions,

The CC3000 board is not available in my area… and buying it from ebay will cost me a fortune, ESP8266 is available at a very cheap rate, so I’ll be using it.

Now, the area I’m really confused is… the initial setup. I can use the void setup function to specify the ssid and password. But what about it when I change my router’s password ? Or maybe set it up on my friend’s house. How to do this in an easy way ? Or do I have to reload the sketch with the modified parameters all over again ?


I have not tried the arduino on the esp8266 I use lua but I've read that you can set it up over the air so you should be able to. I just take my laptop with me and change it in code.

Is there any way that the wifi credentials could be set directly from the board ? Because it is very common thing to change your wifi password, and then setting the whole thing to changing the credentials using a laptop will become very cumbersome.

How cumbersome is your laptop? To edit the password directly on the Arduino, you need a screen, some buttons or a keyboard and a surprisingly large amount of programming.

By cumbersome I meant the process. I'm planning to set it up as a seperate module beside my manual switchboard. Maybe my friends and releatives will also use it in their homes (Many of them don't have laptops). But using a laptop to change the password is not only difficult, it will look ridiculous too.

I agree, using a touch screen to make changes in the password will definitely make it look cool. But, I guess the arduino UNO or Micro doesn't have that much memory to handle the code.

Is there any way that I can change the password beforehand ? Suppose I'm controlling the switchboard with my smartphone. Is there any way to change the password using the smartphone ? Then after changing the password the board will get disconnected from the router, but after changing the router's password, the board connects again. Can it be done ?

I'm stuck between two choices, The ESP8266 and the NRF24L01... Which one should I use ? I want to connect my arduino to my wifi router. NRF24L01 is about 3 times cheaper than ESP8266. What are it's advantage and disadvantages ?

I think your choice is easy, as the NRF24L01 does not support WiFi. It is just using the same frequency range.

You should look at a NodeMCU board. It's still an ESP8266 at heart, but it's built into a complete board that you can program via USB and with the .1" pins it's easy to prototype with on a breadboard (or solder to a permanent perfboard project). By default it's programmed using Lua, a scripting language, but the language is pretty easy to learn and there are IDEs for it if you look around. You can also program via the Arduino IDE with the appropriate plugin.

Low price on eBay or Aliexpress is about $6 USD, or a little more than double the price of most of the ESP8266 modules. For the simplicity it's definitely worth the price.