Smart RGB Lamp

Student: Draghici Andrei
Master: ACES
proiect_iot.zip

1. Project overview

The purpose of this project is to develop a smart RGB lamp that can be controlled with Google Assistant commands or it can change the color and intensity by itself based on the weather. For this project i used an ESP32 board, an 8 bit 2812 RGB led strip, OpenWeatherMap API, Adafruit.IO platform and IFTTT.

2. Hardware

The hardware components needed for this project are:

  • 1 x ESP32 board

  • 1 x breadboard

  • 1 x 8bit 2812 RGB led strip

  • Jumper wires

Electrical schematic:

3. Software

The application was developed using Arduino IDE. In order to control the led bar, we have to download and import FastLED library. Each led can be individually changed, but i opted for all to have the same color. For automatic mode, i used the API from OpenWeatherMap. An account is needed, and with a simple request we can receive every information needed about the weather (temperature, wind, etc).

The Google Assistant API is not public and easily accessible. In order to use it, a good option is IFTTT ( if this than that). On this platform we can integrate our requests for G. Assistant and send the wanted data from request to another platform that can store it.

To connect the ESP32 to IFTTT, i used the Adafruit.IO platform, that can store all the requests and send any modifications to the board via MQTT protocol. On the Adafruit platform i created 3 channels: Color, Intensity and Automatic_Mode, in order to exchange information for the light with the ESP board

When automatic mode is on, the lamp will change the color and intensity based on the outside weather following the next conditions:

The intensity will be mapped according to the temperature. The min and max values are -10* and 40*. If the temp will be lower or higher, it will be limited to the maxed mentioned earlier.

  • If the weather is Cloudy, the color will be white and the intensity will be divided by 2 (after mapping from the temperature)
  • If the weather is Clear or Sunny, the color will be yellow and normal intensity
  • If it is Raining, the color will be blue, with normal intensity
  • If it is Snowing, the color will be white will normal intensity

Flow diagram:

4.Demonstration

For a demonstration use the following link: https://youtu.be/_8bi6cdD2bI

5. Conclusions

In conclusion this project is an interesting way to learn how IoT works, how it can be used every day for different activities, and how different API requests work and the differences between communication protocols. The main purpose of this project is to create a smart RGB lamp that can be controlled with Google Assistance commands or it can change the color and intensity based on the outside weather.

iothings/proiecte/2022/smart_rgb_lamp.txt · Last modified: 2023/01/20 09:40 by andrei.draghici2011
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0