DESK LAMP With ESP12F and RGB LEDs

by Arnov Sharma in Circuits > LEDs

5163 Views, 23 Favorites, 0 Comments

DESK LAMP With ESP12F and RGB LEDs

45.gif
43.gif
RGB LAMP v1.png
IMG_20211205_140258.jpg

Hey everyone what's up!

So here's something cool, a Designer RGB LAMP made with a custom 3D Printed body and a WIFI Based Board that uses Neopixels and an ESP8266 as the main controller.

This Instructables will be about its overall Built process that includes every process, from the body design to the circuit assembly.

Supplies

  • PCBs
  • WS2812B LEDs x 14
  • 100nf Capacitor 0603 x 14
  • ESP12F Module x 1
  • AMS1117 3.3V x 1
  • 10uF Cap x 1
  • 100uF Cap x 1
  • 0 ohms Resistance x 2
  • 10K x 4
  • Female header pins
  • 10uF 16V Aluminium Capacitor x 1
  • Solder Paste
  • 3D Printed body (STEP FILE and FUSION360 FILE are both attached)
  • HOTPLATE

CUSTOM CIRCUIT From OLD PROJECT

image_EWRwOTb1nx.png.jpeg
image_mu4nZLOuB2.png.jpeg
image_YZEIC1rK5Q.png.jpeg

To make this RGB Lamp, I used one of my previous project's PCB which was this-

https://www.instructables.com/Dodecagon-Portal-Pro...

In this project I've used two circuits, one is the mainboard and another one contains 7 WS2812B LEDs.

Mainboard has ESP12F Module hooked up with WS2812B LEDs. The mainboard generates the signal for the first WS2812B LED, through NZR communication mode, the first pixel obtains the data from ESP8266 via DIN Port and then sends the 24bit data to the second pixel via its DOUT Port.

Main Board Contains 7 PCBs so when the data reaches to 7th pixel, we add another PCB onto the main board which adds 7 more pixels to this setup, the data is then transferred from the first PCB to the second PCB
the Second PCB doesn't have an ESP12F module soldered on it, it's just a breakout for 7 RGB LEDs.

So in total, there are 14 RGB LEDs used in this lamp, 7 on the first board and 7 on the second.

BASIC IDEA

27 (6).gif

The idea here is to use Two Dodegcagon PCBs and use them to make an RGB Desk Lamp with 3D Printed parts.

now before preparing the 3D Model for the LAMP, I first arrange all the stuff which were required to make the Dodecagon Circuit.

Material Sourcing From ALLCHIPS

04 (33).gif
IMG_20211125_201854.jpg

As for the Source from where I get most of these components, I got the ESP8266, Resistors, and capacitors from ALLCHIPS.

ALLCHIPSis a well-known Platform For Electronic Components Supply, they have everything that you need for any type of project.
They are an all-in-one procurement department of hardware manufacturers as all components I used in this project were provided by ALLCHIPS which was a cool and helpful thing!

Also, they have this BOM IN ONE BOX thing which is such a helpful thing, we provide them a BOM List and they procure all the components and deliver them "IN ONE BOX" which is an efficient way of purchasing components for any project!

Check out ALLCHIPS for more info, now back to the project.

GETTING STARTED

RGB LAMP v12.png
Capture.PNG

I've prepared this model in fusion360, the goal here was to make a lamp that looks different than a traditional lamp and it would feel futuristic, so I just use a curved line shape and modeled the lamp based on that curvy shape.

Because of the lamp height, I prepared a wide base to support the length and height of the lamp so the setup would maintain a low center of gravity. After finalizing the lamp, I exported all the files and prepare my printer for a 48-hour print job.

3D PRINTING

parts.jpg
13 (31).gif
14 (26).gif

This lamp contains 6 different parts, well technically speaking 4 but I had to divide the TOP Body and its diffuser into two parts as they were too big for my printer's built surface.

All parts were printed with White PLA except for diffusers which were printed with transparent PLA.

Print Setting and Few Edits That I Had to Make

16 (24).gif
17 (25).gif
18 (23).gif

I used a 20% infill with supports, 0.2mm layer height, and a 0.5mm nozzle. 0.5mm Nozzle helped a lot in reducing the print time.

After Printing two parts of the TOP Body, I found out that one of the TOP Body Pieces has warped a little bit.

I could print another part but doing that would be a waste of time so instead, I cut down the warped piece from one side and bent it in the opposite way of warping.

Then I use fiber tape to hold the two pieces together and use super glue to attach the TOP two pieces.

Superglue will permanently join two pieces together but to fill the gap between the edited piece, I used epoxy putty.

Filling the Joint With Epoxy

19 (21).gif
20 (21).gif
21 (19).gif
22 (14).gif

I mixed the hardener with epoxy and apply it to the joints.

the key here is to apply the epoxy in between the spaces and then smooth the surface with a little bit of pressure with fingers.

After letting it dry for an hour, I used a sanding tool to sand the excess putty off from the surface and make the surface even and smooth.

​PAINT JOB

23 (11).gif
26 (9).gif

Because of the Epoxy, I had to paint the top body to make it look better.

I used Metal Spray paint for this process and only sprayed the TOP Part and let it dry for 10 hours so the paint would completely dry up.

CIRCUIT

schematic_WeQlZa9OGt.jpg
01 (37).gif

Here's the schematic of the PCB that I'm using.

This circuit is pretty simple, there's a Minimal ESP12F setup along with an Attiny85 Setup on one side. both are connected with Neopixel LEDs, we can add either of those two setups on this circuit to drive 7 Neopixels. I've added an AMS1117 Voltage regulator to regulate voltage from lithium cell which is 4.2V to 3.3V for ESP12F to operate.

ASSEMBLY #1

02 (38).gif
03 (36).gif

To Prepare the first PCB which would be this Main Board, I first applied solder paste to each component's PADs and then pick and place each component in their assigned place in the right order.

ASSEMBLY #2

04 (38).gif
05 (35).gif

After adding components to their location, we carefully lift the PCB and put it on an SMT hotplate.

I'm using my DIY SMT Hotplate, learn more about it from here-

https://www.instructables.com/DIY-SMT-Hotplate-Pro...

Hotplate heats the PCB from below up to the solder paste melting temp, as soon as the PCB reaches that temp, solder paste melts and all the components get soldered to their pads.

we lift the PCB and then place it on a cooler surface for a little bit, to cool down the heat of PCB.

Now we need to add ESP12F on the bottom side with a Hot Soldering station because we cannot use our hotplate for this task.

ASSEMBLY #3

06 (34).gif
07 (38).gif
08 (33).gif
09 (32).gif

On the Bottom side of the Mainboard, I added solder paste to all components pads, then I placed ESP12F in its place and then add the AMS1117 Voltage Regulator along with 10uf Cap, 100uF Cap, and 0ohms Resistance to their pads one by one.

Then I used Hot air soldering station to melt the solder paste and solder all the components on their pads.

I didn't use hotplate reflow here as on the TOP side of the board there are LEDs and components so I only had two choices here, use a soldering iron or use a soldering air station.

At last, we add the THT Programming header pin on the Main Board and the circuit would be completed.

10 (38).gif
11 (36).gif
12 (33).gif

In the end, I added two PCBs together by connecting their Pads with wires in this config-

  • VCC of Mainboard to VCC of Second Board
  • GND of Main Board to GND of Second Board
  • Dout of Main Board to Din of Second Board

CODE and ESP12F Flashing

36.gif
12 (33).gif

For Uploading the code, I will be using my Nodemcu programmer which is a NODEMCU whose ESP12F module is powered down and we are using its CP2102.

For the Detail version, check out my post about this process-

https://www.instructables.com/Program-ESP8266-With...

The Nodemcu programmer setup has these breakout points that get connected with ESP12F Module.

  • 3V to 3V
  • GND to GND
  • RST to RST
  • GPIO0 to GPIO0 //D3 is GPIO0 on NodemcuTX to TX
  • RX to RX

I added Jumper wire between ENA and GND Pin on Nodemcu. this will turn off the ESP12F of the Nodemcu and our external ESP12F will get connected with the Nodemcu's CP2102 chip

FLASHING STEPS

  • Connect the Nodemcu programmer with the ESP12F Board
  • open Arduino ide, plug the USB on Nodemcu
  • then go to the Tools menu and select the Nodemcu board that you are using
  • select the right port and hit upload
  • after uploading go to the serial monitor and hit the reset button on Nodemcu.

the setup will get connected with the wifi router and you will see the IP Address of the ESP12F module.

Copy this IP address and open this in your web browser and you will see the RGB LAMP Webapp.

Select any color from the color palette and that color will get displayed on the RGB LAMP.

Downloads

FINAL ASSEMBLY #1

28 (5).gif
29 (3).gif

As for the final assembly, we start first by adding the circuit into the TOP Body by adding hot glue on the body and then placing the circuit onto it. dont worry, the circuit won't heat up and melt the glue.

FINAL ASSEMBLY #2

30 (3).gif
31 (3).gif
32 (2).gif

then we add a rocker switch and 5mm Barrel DC Jack on their provided slot and hole. Rocker Switch is to turn ON or OFF the mains power and DC Jack is for Charging the Lithium Cell.

after this, we screw the TOP Body onto the Bottom Body with M3 Screws. Now we prepare the wiring of this whole setup.

POWER SOURCE

34 (1).gif

Before the final wiring process, let's first talk about the power source.

As for the Power source of this Project, I'll be using a 3.7V 2600mAh Li-ion Cell, because of its small size and capacity.

To make the charging and discharging of this cell safe, I added a PCM Module which is a battery management system for a single lithium-ion cell. It charges the battery from low voltage up to 4.2V and cuts off the input voltage as soon as the cell reaches its max voltage which is 4.2V, for low discharge, this PCM cuts the supply voltage of the cell when the cell reaches 2.5V.

WIRING

33 (1).gif
35 (1).gif
SCH_page-0001.jpg

I first added two long wires to the first circuit's battery port. (both on +ve and -ve)

I use hot glue to stick this wire permanently with the inner walls of the top body to keep wires in their position.
Next, by following the below wiring schematic, I did all the connections and the wiring was pretty much completed.

Finishing Touches

37.gif
38.gif
39.gif
40.gif

At last, after completing the wiring, we add the bottom lid to the lamp with a few M2 Screws.

I added two diffusers to the lamp without any adhesive and the project is finally completed.
Now let's connect this setup with the internet and see the result of this built.

RESULT!

41.gif
42.gif
43.gif
44.gif
45.gif

we open any web browser and type in the IP address of the ESP8266 which we get from the serial monitor after programming the ESP module.

the web app allows us to control the brightness and color of the lamp, we can set any color with it and the whole toggling process took less than a second which was really cool. this is it for today guys,

Thanks, Allchips for supporting this project, check out Allchips for getting great electrical components deals for less cost. And I'll be back with Part 2 of this post soon! Peace out