Introduction: NeoBulb (Neopixel Bulb With Sensor)
This project was done for 'Creative Electronics', a Beng Electronics Engineering 4th year module at the University of Málaga, School of Telecommunications. (www.etsit.uma.es).
This project is a bulb with Bluetooth communication that can change colour brightness and create special effects with lights powered by 2 Neopixel Rings, it also has the possibility to connect a external sensor to measure outside parameters like temperature, humidity, move...
And a special fact, that is quite important nowadays, is that it onlyconsumes around 4W a maximum in white and with maximum luminosity.
Every parameter is controlled by an Android APP, that shows:
- The mesure of the humidity and the temperature of the room in which the bulb is
- Change the colour of the bulb.
- To Program the default colour of the bulb that is an option if you want to use like a regular bulb.
- Special lights effects , like an Aurora, light of a candle or random colors every 5 sec.
All the circuits are embedded in a regular bulb of 15W of which I only used the body.
So let's get started.
Step 1: Before Start
Before start, I think is better to know how its works.
Step 2: Bill of Materials.
In this project, I've tried to do it as cheap as possible and I think in a next version, it could be even cheaper If we did some changes in the circuit. For example using a ESP8266, but that will be a future modification.
The bill is around 22€.
It's detailed in the Excel file, with prices, quantity and links.
- Regular Bulb 15W E27(It's important to be the same model, because it must have the same dimmesions).
- Neopixel 8Bit Ring.
- Neopixel 12Bit Ring.
- Bluetooth HC06
- PCB 46mmx46mm
- Phone Charger (minimun 1,5Amps and reduced dimensions, I used a Nexus 4 charger).
- DHT11(Humidity/Temperature sensor)
Step 3: Hack a Regular Bulb and Phone Charger.
When you open a LED bulb, normally you will find a PCB with all the LED, and a power supply that transform 220 AC(Or the regular line voltage of your country) to around 100v DC to supply the LED.
It's quite easy to disassemble it, but be carefuk and follow these tips
- Make sure that superior of the bulb is plastic and not glass.
- It's better not to cut too short the wires of power supply that are connect to the bottom part, because before it's way difficult to solder to the metallic bottom part.
- Obviusly, if you're going to hack it please, don't connect it to the electricity.
Finally, we only want the body of the bulb, so you can save the rest for another project.
Next step is to take off the circuit of a phone power supply, it's a little difficult so you have to be a bit patience. In the photo you can see the result.
Step 4: Design a Control Circuit
I've made two different options to develop the control circuit:
The first one, it's a PCB the schematic and board are uploaded. I think it's a better option to create through this method because you will find a better result.
But not every body has the possibility to make it this way so also I uploaded a version with Fritzing(Second imagen and protoboard file) to see that it's an easy circuit that can be made with a predrilled board.
(Note: The Fritzing version has different components because there aren't the same that I have used, but the pin-out is the same)
I used an ATtiny85 because the program control size is around 8KB so for the basic function it's not necessary more memory.
Step 5: Programming and Control.
This part, can be seppareted in two.
The firmware has been develop with Arduino IDE, but it's uploaded to an ATTiny85, that can run this software, although it is neccesary to use some extra libraries to run serial communication, neopixel and DHT11
The software basically, receives an message from the app that could be:
- c(red_value 0 to 255)/(green_value 0 to 255)/(blue_value(0 to 255))/ to program the colour that we want.
- t to send the value of the temperature that is measuring the sensor, but it can be changed to add another type of sensor.
- e+(number) to start a special function like fire lights.
- s that saves in EEPROM memory the value of the actual colour. When the bulb starts again will show that colour.
- Android APP:
This APP has been developed with Thunktable, that allows you to do an APP with not too much knowledge of Android programming.
This app allows you to see the temperature of the room that is the bulb and control it.
Step 6: Assembly.
This part could be the hardest one of the developement. You had better be careful, since it's neccesary to isolate all the parts for security reasons,as we are working with AC current and that's very dangerous.
- Solder the wires to the bottom part of the bulb, like in the first and second imagen.
- Connect and sold the wires to AC part of the power supply(Third imagen)
- Isolate the circuit with hot glue(4th imagen).
- Make a drill hole to put the connector of the sensor like in the 5th imagen.
- Connect every thing to the main PCB like in the 6th and 7th imagen.
Finally,If everything is corrrect, it should be like in the last photo and ready to be closed.
Step 7: Finish.
I want to thank my sister for helping me with the writing in English.
I hope you've enjoyed this project.
If you any question, please ask me.
We have a be nice policy.
Please be positive and constructive.
What's the boot-up time when you first apply power to the bulb?