Magical Instruction

Build your Magical board

🚀
If you got an assembled board, skip this section.

Prepare for the build

Before assembling the tree, please make sure you are good to go!

  1. Soldering iron
  2. Solder wire - with rosin or use Flux
  3. Micro USB cable to connect with your computer
  4. Tweezer - to grab small parts. It's really tiny.

parts list

  • Raspberry Pi Pico x 1
  • WS2812B x 9
  • 100nF capacitor x 9
💡
Please double check before soldering the parts!! There is no ctrl-z in real world!

If you are new to soldering, watch this video first, This video explain what should be done for SMD parts.

https://www.youtube.com/watch?v=EW9Y8rDm4kE

Attach all WS2812B Full colour LEDs on the front side of the PCB. please note WS2812B has a tip at one corner.

🌡️
Be careful not to touch the soldering iron. It is really HOT!!!
WS2812B has a mark at the corner.
💡
WS2812B tip should be towards to the right bottom of PCB.
The mark is at the right bottom.
This is one of the poor soldering example. Ensure all LEDs are attached flat.
When you finish the front side, it will be like this. ALL tips are towards to right bottom.
⚠️
Attach LEDs first, then go for the capacitor. if you start with the capacitor, you might need to squeeze your soldering iron.
Only one capacitor on the front

Before flipping the PCB, attach a capacitor. Only 1 capacitor is on the front side. Rest of capacitors need to be attached on the back side.

💡
These capacitors are non-polarized. that means you don't need to care about right-left side(even upside or downside!)

Flip the tree and attach rest of capacitors.

🔋
These capacitors make more stable LEDs control under unstable power source. For most cases, these capacitors are not really necessary, so if you failed to solder the capacitor(s), don't worry, just leave it.

Attach Raspberry Pi Pico

Okay, This is the last big part. attach the Raspberry Pi Pico at the back. We designed it works for both Pico and Pico W, so if  you wish to control this board wirelessly,  use Pico W instead of the Raspberry Pi Pico.

📦
Our kit include Raspberry Pi Pico, not the W.
Raspberry Pi Pico W attached to PCB

Solder all pads?

Yes. Technically some GND pins, 5v and GP1 are necessary to work. However it make physically secure for USB cable plug-in and out.

Let's get it work

Connect USB cable to Raspberry Pi Pico

Connect your computer to Raspberry Pi Pico.

When it connected, you will see the icon on the Desktop (if you are using macOS/Windows/Raspberry Pi OS).

🗒️
We already installed CircuitPython for all assembled kits. when you connect to your computer "CIRCUITPY" will show up.
Pico is accessible as RPI-RP2

Setup CircuitPython for Raspberry Pi Pico

Download CircuitPython firmware. As of today (November 20, 200), the latest stable version is 7.3.3

Download it from here

CircuitPython - Pico Download
The Raspberry Pi foundation changed single-board computing when they released the Raspberry Pi computer, now they’re ready to do the same for microcontrollers with the release of the brand new Raspberry Pi Pico. This low-cost microcontroller board features a powerful new chip, the RP2040, and all...
https://circuitpython.org/board/raspberry_pi_pico/

Click on the "DOWNLOAD .UF2 NOW" button.

Once you downloaded, drag and drop the file to RPI-RP2. It may take 20~30 seconds.

🍎Are you using macOS 13 Ventura?

macOS 13 Venture is not support well with Raspberry Pi Pico. When you connect Raspberry Pi Pico to your computer, mass storage device will show up, however, you cannot directly drag and drop the UF2 file (It will be failed with error code 100093)

But there is a good news, you can copy the file with terminal, so open up the terminal and copy the UF2 file to Raspberry Pi Pico. (Usually pico is mounted as /Volumes/RPI-RP2/)

e.g. copy command

cp adafruit-circuitpython-raspberry_pi_pico-en_US-7.3.3.uf2 /Volumes/RPI-RP2/

If you don't know what to do, ask me at @kotaMorishita

🏗️
If you purchased the assembled one, the firmware is already written to the pico.

Set up the tree

Download Development Tool

Thonny, Python IDE for beginners

Download and install Thonny to your computer.

🤔
If someting is not working, unplug and re-connect the USB cable.

Press the red button.

When you press the red button (with white square at the center), "Shell" will be refreshed. also If something is not working, hit the red button anytime!

After you hit the button, CircuitPython version will show up in "Shell" tab.

If nothing happens, Go to Thonny -> Preferences -> "Interpreter" tab to ensure  CircuitPython is selected, also Port is  <Try to detect port automatically>

Then press "ok" to close the preference menu.

Still not working?

Automatic setting should work most of cases, but if it doesn't work with your setup, select the Pico - CircuitPython

🔴
Don't forget to press the red button when you change the preferences.

Download the sample code

Adafruit Industries is a great company. they make CircuitPython and provide sample codes as well.

For your convenience, I collect modules and sample code under this repo.(Thanks Adafruit to release these code under MIT license)

kotamorishi/pico-tree-magical
Contribute to kotamorishi/pico-tree-magical development by creating an account on GitHub.
https://github.com/kotamorishi/pico-tree-magical

Open up the link and click on "Code" then "Download ZIP".

🖥️
You can use git command too!

Unzip the file.

Unzip downloaded file, folder name is "pico-tree-magical".

Open the Thonny, select just unzipped folder at "Files" tab.

Upload the sample code.

Select "lib" and "code.py" and right click to open the menu, then click "Upload to /"

Light up the tree

Double click "code.py" to open the file, once you open the file hit the green button on the top to run the program.

Stop the program

When the program is running on your Raspberry Pi Pico, they are not able to read/write files. Press the Red button first, then open or replace files.

💡
Do not attempt to see 100% output power LED. It is too bright, try lower power and increase litte by litte. For most case, 20%(in code 0.2) is enough.

Change the code

I included a bit differnt light up version code named "soft.py".

Copy the contents of soft.py and paste it to "code.py", press save then press the green button.

🚗
code.py will run when you connect to the power source. (Automatically start the light up)

Tweak the code with CircuitPython neopixel.

please refer this website when you want to know more details, they are really well documented. enjoy the coding!!

CircuitPython Essentials
You’ve already gotten started with CircuitPython. What’s next? CircuitPython Essentials! This guide provides examples of all the core modules and some of the common libraries found in CircuitPython and how they’re used. You’ll be able to use any board designed for CircuitPython and learn about the d…
https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel
🖥️
We are accepting your light up code, feel free to send a pull request to this project!!! I hope to add some before the Christmas.

Help needed?

If you need some help for Magical PCB, please contact me @kotaMorishita

Optional : Battery Powered Tree

You can light up the tree with battery power.

DO NOT connect USB and battery at the same time. It may break your computer or tree!!

Connect red wire to +(Positive) side, black to the -(Negative) side.

Connect to the battery port
🔋
Do not connect Positive/Negative revesed. It may break your board!!
3 x 1.5v battery works few days of light up!(depending on brightness and code)