DIY Portable WiFi Controlled Ambient Lights from scratch.

In this blog post I will explain how to create a portable WiFI controlled ambient light from scratch. Alongside these lights I built an IoT platform to control the lights that I built. I will explain how to build the IoT platform in a different blog post. I will break this blog post in to consumable chunks. I try to keep it simple as most of the things I have done can be found online.

Check the code here

  1. IOT Platform
  2. Ingredients list for the light
  3. Circuit Design for the Lights
  4. Testing the Neo Pixels
  5. Code for the ESP8256
  6. 3D Printing
  7. Packaging
  8. Calling the lights over the internet

1.IOT platform

This platform is almost written from scratch and uses some already existing services to have the reliability. This can be automated, but for the sake of testing I have written a web controller to control the IOT devices. I will explain on another post on how to create this platform. In the mean time you can use already existing IoT platforms to test the lights.

a. Web Controller

This is basically a UI that lets you control the devices connected to the IOT platform(MQTT broker). In order for that, it sends requests to the Python Server.

Code can be found here.

b. Python server

This server will decode the requests which it gets from the web controller and send them to the MQTT broker. You can host the server separately or in your own computer that you are running the web controller.

Code can be found here

c. MQTT broker

I have used Adafruits already existing MQTT broker. MQTT broker has the ability to send commands to the devices that are connected as well as to receive data from the connected devices.

2.Ingredients List For the lights

ESP8266, NeoPixel ring(12), Wires, Resistors (230 ohm), LiPo battery (3.7v, 850mAh) and a 3D printer.

3.Circuit Design for the Lights

This is a simple circuit design to connect all the components and you can find the sketch below. You can improve this circuit by adding switches etc. Since this was a rapid prototype, I did not add those improvements.

4. Testing the Neo Pixels

You can check if the neo-pixels are working using croc cables.

Light em up
Find a brother to do the soldering work
After soldering the wires to the Neo-pixels

5. Code for the ESP8256

This is basically a sample code got down from the internet and adjusted according to my need. The code is basically self-explanatory and if you have any unclear parts please ask question as comments.

link to the code to be uploaded to the ESP8266.

If you want to start from scratch use this link as a template.

6. 3D Printing

I will share the designs of my light’s case, which is actually a very basic design. You can build something which is much cooler and also effective in filament usage on your own. I used the AutoDesk’s Fusion 360 software to design the case.

Link to the already finished designs.

7. Packaging

You can place the circuit inside the box as follows.

Packing the components

Note : this container is different to the STL files I have provided.

8. Calling the lights over the internet

After powering up the lights, it is required to send a request to switch on the lights. I will cover this part in a separate post.

How it actually works

Lights at Work in a kitchen

Let me know what your experience on building portable lights. Good luck with your lights and the IoT platform.




Datascience (growth) @WSO2 | PhD in Computing

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Choose The Right Custom Software Development Company

Multi-Temperature Data Management Using S3 and Glacier

Manually Create Jenkins User And Login

Beyond Vim emulation inVSCode

The Currin-Korovin DNA-based non deterministic universal Turing machine

Version Controlling: Git and GitHub concepts

What Drives Digital Transformation in an Open Insurance Framework? — Part 1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Akshika Wijesundara

Akshika Wijesundara

Datascience (growth) @WSO2 | PhD in Computing

More from Medium

Salesforce Launches New Low-Code Developer Tools to Bring Salesforce Automation and Apps into Slack

Top 20 Easiest To Use Remote Desktop Software (based on G2)

Sync Airtable and Google Sheets using On2Air

My Top 3 Free MacOS Menu Bar Apps