LED Lamp Out of a Glass Container (Raspberry Pi Pico)

by Nick Programmer in Circuits > Raspberry Pi

1583 Views, 7 Favorites, 0 Comments

LED Lamp Out of a Glass Container (Raspberry Pi Pico)

daniele-franchi-GbAEJUJKJ88-unsplash.jpg

LED Lamp out of a Glass Container is a Raspberry Pi Pico based LED strip Controller, that has different modes that you can change using only a single button.

I decided to make LED lamp with modes because I got a useless glass container. If you afraid of darkness, LED lamp can help you to fall asleep. LED lamp might be stylish thing in your room.

I added different modes, that you can control using a single button.

  • RED;
  • GREEN;
  • BLUE;
  • ORANGE;
  • RAINBOW;

It's really better to use something useless than kick it out to trash can.

Supplies

IMG_20230810_214140.jpg
  • Raspberry Pi Pico x1;
  • Button x1;
  • Capacitor 1000uF x1;
  • Resistor 4.7k x1;
  • Accumulator (Min 1.8v. Max 5.5v) x1;
  • RGB LED Strip WS2812b x1;

Install and Configure Arduino IDE *Optional

Growhome _ Arduino 1.8.19 10_7_2023 2_08_58 PM.png
Growhome _ Arduino 1.8.19 10_6_2023 12_42_08 PM.png
Software _ Arduino - Google Chrome 10_6_2023 12_38_42 PM.png

If you have never used Arduino IDE, you will need to download and install it. We'll need to download and install Arduino IDE to upload the code into a microcontroller.

ATTENSION!!! Do not download 2.x versions, at the moment of 10/6/2023 there are still a lot of bugs. It better to download a 1.8.19 version.

Download it here - https://www.arduino.cc/en/software

  • After Installing, navigate to File > Preferences
  • Find Additional Boards Manager URLs, and paste this link into a text field - https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
  • Then, navigate to Tools > Board: > Boards Manager
  • Type the "Raspberry Pi Pico" in a search field, find and Install.


Download and Install Libraries

Growhome _ Arduino 1.8.19 10_7_2023 2_27_04 PM.png
Capturenepixel.PNG

Install libraries is necessary to work with the microcontrollers, encoders, displays, thermometers, other components, and get the information from there.

  • Navigate to Sketch > Include library > Manage Libraries
  • Type every single library one by one and download:
  1. EncButton
  2. Adafruit NeoPixel

Download Firmware

Capturenn.PNG
Captubhjjre.PNG

The Firmware folder is the main folder of the project because it contains the code, that we'll upload into a microcontroller.

GitHub Repositoryhttps://github.com/NickProgrammerOffical/LED-Lamp-with-different-modes/tree/main/Firmware

  • Download the .zip on my GitHub.
  • Extract the Firmware folder, then open Firmware.ino file with Arduino IDE.

Install Arduino-pico-littlefs-plugin

Captghjhure.PNG

The primary purpose of the arduino-pico-littlefs-plugin is to let you upload the files into the RPI's flash memory. In this tutorial, the purpose of this tool is to format the RPI's flash.

Download the file called PicoLittleFS-0.2.0.zip from https://github.com/earlephilhower/arduino-pico-littlefs-plugin/releases/tag/0.2.0

And then extract the content of the archive into the "...\Arduino\Tools\" folder.

After that, restart the Arduino IDE.

Flash the Raspberry Pi Pico

Capture.PNG
Capturehh.PNG
Captur77e.PNG

The last step of assembling is upload code into microcontroller.

  • Navigate to Tools > Board: > Raspberry Pi RP2040 Boards > Raspberry Pi Pico;
  • Hold BOOT button on Raspberry Pi Pico board and plug it to the computer;

(The step is necessary to be able to see the boot port)

  • Navigate to Tools > Port > UF2 Board;
  • Click upload button in the left top corner;

Assemble the Lamp

DiagramLamp.png

It actually takes 2 minutes to assemble.

Assembling is one of the easiest steps of instructable.

Put Everything Into a Glass Container

IMG_20230810_212853.jpg
IMG_20230810_212743.jpg

This step is not the easiest because putting takes a lot of careful work.

Put everything into a container and close it

Enjoy

IMG_20230810_213252.jpg
IMG_20230810_213326.jpg
IMG_20230810_213030.jpg
IMG_20230810_213120.jpg
IMG_20230810_213213.jpg

Congratulations, you made it!

Now, enjoy. Push button to change mode.