2

i wanted to make a remote controlled wall socket over wifi (and maybe internet in the future) with an Arduino, i'm relatively new to Arduino, i know only the basics of programming. My idea was to use a Arduino Pro Mini, a relay, a Esp8266 wifi module to connect to my home wifi and maybe a module to monitor consumption like the ACS712 current sensor but i don't know how to make all of this work, maybe i can get the Arduino working but i don't know how to control it on the client side like an app or web interface on my phone/computer.

6
  • 1
    You only need the ESP8266, which can be programmed using the Arduino IDE as if it were "an Arduino"
    – David Kerr
    Feb 13, 2017 at 22:36
  • 4
    Or buy a Sonoff, which contains an ESP8266, and hack it if it doesn't already do what you want.
    – Mark Smith
    Feb 13, 2017 at 22:43
  • @hapi how could you do that? Isn't the ESP8266 just a wifi module?
    – alex3850
    Feb 14, 2017 at 21:15
  • @MarkSmith the Sonoff is not bad but i want to control it over WiFi network not over RF so it doesn't do what i want.
    – alex3850
    Feb 14, 2017 at 21:17
  • 1
    They are wifi controlled. (Wifi is RF, given that it's radio...)
    – Mark Smith
    Feb 14, 2017 at 21:30

2 Answers 2

1

The hardware you have chosen is perfect for the job at hand. But what @Hapi also mentioned was that you could probably do away by not using the Arduino ! The ESP8266 is in itself programmable. There are many Firmwares available to help you do so. (You can even program your own)

This can help you getting started : http://randomnerdtutorials.com/esp8266-web-server/

This is something like what you need at the end : https://hackaday.io/project/4562-esp8266-wifi-smart-garage-door

One thing to note : ESP8266 works with 3V, while your Relay would require 5V. Happy hacking my friend.

0

All the Hardware mentioned are correct,

Arduino Pro Mini (Micro-controller) - To control the Relay

5V Trigger Relay(240V) which would be trigger using a digital Pin on the Arduino. http://www.instructables.com/id/Controlling-AC-light-using-Arduino-with-relay-modu/

Once you accomplish the steps above you must hook up your wifi module. Then write a software in your preferred/environment for example, Visual Studio C#, and Use the a UDP or Telnet or HTTP Web-Server ( http://blog.nyl.io/esp8266-led-arduino/ ) connection to sends command to the Arduino though the Wifi Shield, which will trigger the Relay and therefore turn on the Switch.

Also you must find an adapter that sits into the socket and convert 240V AC to 5V DC power to match the consumption of your Arduino.

3
  • The adapter to convert 240V AC to 5V DC is not a problem, i can use an old cellphone charger, the HTTP Web-Server connection is very interesting i took a quick look at it maybe i will use it. I still haven't all of the hardware to make a proof of concept but i will soon.
    – alex3850
    Feb 14, 2017 at 21:26
  • @alex3850 well keep me updated, hope the answer help you out. Feb 17, 2017 at 7:21
  • For now I'm waiting for the Arduino and other stuff to arrive then I will try to do some thing, your answer is really helpful.
    – alex3850
    Feb 17, 2017 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.