Introduction: Beautiful and Cheap RGB Lamp Controled by Bluetooth

About: Miembro de SparkProjects, estudiante de ingenieria electronica, usuario GNU/Linux, bloguero desde 2009, entusiasta de los huertos urbanos.

Have you ever seen commercial RGB lamps but their price has made you think twice about whether they are worth buying?

In this tutorial I will show you how to build your own bluetooth-controlled RGB lamp.

---

¿Han visto alguna vez las lámparas comerciales RGB pero su precio los ha hecho pensar dos veces si vale la pena comprarla?

En este instructable les mostraré como armar su propia lámpara RGB controlada por medio de bluetooth.

Step 1: Components

In my case I will use the MSP430 development board to avoid having to make the 5v to 3.3v voltage converter in the connection to the Bluetooth module, but they can replace it with a preferred development board considering the voltages supported by its components.

  • MSP430.
  • Ring 12 LEDs WS2812
  • Some plastic container that is opaque (to improve the way it is illuminated by LEDs)
  • Dupont cables
  • Blutooth HC-06 Module

---

En mi caso utilizaré la placa de desarrollo MSP430 para evitar tener que hacer el convertidor de voltaje de 5v a 3.3v en la conexión con el módulo bluetooth, pero pueden reemplazarla por placa de desarrollo preferida teniendo en cuenta los voltajes soportados por sus componentes.

  • MSP430.
  • Aro 12 LEDs WS2812.
  • Algún recipiente plástico que sea opaco (para mejorar la forma en la que se ilumina por los LEDs).
  • Cables dupont.
  • Módulo Blutooth HC-06.

Step 2: Software

---

Step 3: Energia on Windows

There is a problem with the program, it does not correctly recognize the boards and therefore the program cannot be loaded, to solve it they must do the following:

  • copy *energia directory*\hardware\tools\DSLite\DebugServer\drivers\MSP430.dll to *energia directory*\hardware\tools\msp430\bin\
  • edit *energia directory*\hardware\energia\msp430\boards.txt an change the 2 occurrences of rf2500 with tilib
  • restart energia and you should be able to upload to the MSP-EXP430G2 with MSP430G2553.

---

Existe un problema con el programa, no reconoce correctamente las placas y por lo tanto no se puede cargar el programa, para solucionarlo deben hacer lo siguiente:

  • Copiar *directorio energia*\hardware\tools\DSLite\DebugServer\drivers\MSP430.dll a *directorio energia*\hardware\tools\msp430\bin\
  • Editar *directorio energia*\hardware\energia\msp430\boards.txt y cambiar las dos coincidencias de rf2500 con tilib.

  • Reinicie Energia y ya se podrá cargar programas a la MSP-EXP430G2 con MSP430G2553.

Step 4: Assembling the Components

Use dupont cables to connect the WS2812 LED ring to the development board, it is worth mentioning that this board has the option of connecting male or female dupont cables, in this case we will use female to facilitate prototyping.

---

Utilizar cables dupont para conectar el anillo de LEDs WS2812 a la tarjeta de desarrollo, cabe mencionar que esta placa cuenta con la opción de conectar cables dupont hembra o macho, en este caso utilizaremos hembra para facilitar el prototipado.

Step 5: General Diagram

*HC-06 (Fritzing only has the HC-05 model, it is necessary to verify the name of the pins before connecting it)

HC-06
MSP 430
VCCVCC
GNDGND
RXTX
TXRX

WS2812 ring to MSP 430

WS2812 ring
MSP 430
VCCVCC
GNDGND
INP1.3

Depending on the version of the MSP430 development board you will need to make an extra configuration to run the serial port hardware, see the following link http://energia.nu/reference/serial/ for more detailed information.

After assembling the MSP430 together with the Bluetooth module can be placed inside a container to make it more aesthetically pleasing.

---

Dependiendo de la versión que se tenga de la placa de desarrollo MSP430 será necesario realizar una configuración extra para que funcione el puerto serial por hardware, consultar el siguiente enlace http://energia.nu/reference/serial/ para información más detallada.

Luego de ensamblarlo pueden colocar la MSP430 junto con el módulo Bluetooth dentro de algún contenedor para que sea más estético.

Step 6: Programs

Energy Sketch:

Modification of the WS2811 library demo adapted for this project

Android app:

Application to control the lamp made in app inventor.

---

Sketch de Energia:

Modificacion del demo de la librería WS2811 adaptado para este proyecto

Android app:

Aplicación para controlar la lámpara realizada en app inventor.

Step 7: Andriod App

  • In the android application the first two buttons are for managing the connection to the Bluetooth device:
    • Seleccionar dispositivo -> Select device
    • Desconectar -> Disconnect
  • In the "lamp"section:
    • Encender -> light up
    • Apagar -> turn off
  • The "color" section.
    • The three bars are used to select a color which will be shown in the box above them, to change the color click on the button "change color".
  • The "brightness" section
    • In the same way as color only to control brightness.

---

  • En la aplicación android los primeros dos botones son para gestionar la conexión al dispositivo bluetooth:
    • Seleccionar dispositivo
    • Desconectar
  • En la sección de "lampara":
    • encender
    • apagar
  • La sección del "color":
    • Se utilizan las tres barras para seleccionar un color el cual se mostrará en el cuadro por encima de estas, para cambiar el color se hace clic en el boton "cambiar color"
  • La sección de "brillo":
    • De la misma forma que la de color solo que para controlar el brillo.

Step 8: Finally

Enjoy your home rgb lamp controlled by Bluetooth!

---

¡Disfrute de su lámpara rgb casera controlada por bluetooth!

Step 9: Consulted Sources

Bluetooth Challenge

Participated in the
Bluetooth Challenge