Introduction: Smart Sockets

Today Internet is the one of the most exciting HiTech thing. Internet of Things - next step of it. This summer I and my teammates found Intel IoT Roadshow and decided to try this. We had done our first IoT project (based on FabLab Polytech in Sankt-Petersburg) and had a bit learning. Smart Sockets are devices for managing electricity with the help of smart analytics. This is a little story about this project :)

Step 1: Picking Up Ideas

It`s clear that sockets have electronic components as sensors, microchips etc. We wanted to make consumption of electrical energy as low as possible in order to make the system more accurate. So we decided to make communication between sockets and other parts of system by radio. That means that there is special component with WiFi module and simple radio module. We named it «base station». We used Arduino Nano and Intel Edison as a base station. We used Parse cloud service as quite familiar to us.

Step 2: Components

1 x Intel Edison with Arduino Board

1 x Arduino Nano

2 x Amperage sensor

2 x Radio module nRF24L01

1 x Smartphone charger

1 x MOC3063

1 x BTB16

Also 3D-printer was used.

Step 3: Making a Socket

Firstly we made an electronic power switch. Pair of TRIAC with optocoupler was chosen in case of low voltage drop. Optocoupler provide Arduino to changing state of TRIAC gate.

After that we combined all components in one circuit and checked all electronic parts of socket. Smartphone charger was used for powering up.

After that we found out the minimal size of case. Model of case was created in SolidWorks. Then we exported .stl file to print this part on 3D-printer.

Step 4: Making a Base Station

This step isn`t to hard: you just need to connect nRF24L01 to Intel Edison. And you can make nice case for it, as we did :)

Step 5: Socket Program

We started programming socket from function for amperage sensor. It has been done by conducting a series of experiments with current source.

Then the sample sketch for communicating by radio modules was written. We using MIRF library in projects with nRF24L01. We used another Arduino Nano on prototype board for testing.

Step 6: Base Program

The Edison program was written on Arduino because the library for radio modules was accessible only on this IDE. Fortunately, it's just a half of all base station program - communication with the cloud service had been written on Python.

How does it work:

1. If Python task receives a request from cloud it creates .txt file and starts another task (Arduino). This program conects with socket, writes data or read it from .txt file and then Python task runs again.

2. If Python task haven`t received a request from cloud to long, it starts another task (Arduino) and write data about energy consumption in cloud.

Step 7: IOS Application

Last part of our «Smart Sockets» system - smartphone App. iOS was chosen as a platform because the majority of team members have an iPhone. At that time of RoadShow app can:

  • give you control of sockets (on/off)
  • show you statistics of electricity
  • give some tips about energy optimization

Later we are looking for improving interface and adding a little bit of gamefecation (sharing analytics in socials or so).

Step 8: Presentation on RoadShow

We were a little bit nervous about the incredibly high ping, so even lighting a bulb was impossible. Anyway, on presentation we got a great experience.

At the beginning of the work we only wanted to try loT. When the lamp lighted up first time we felt really proud and happy. Wish you to embody your ideas! :)