Creating Better LED Lights With The Pimoroni Plasma 2350 W

It's that time of year again (Decemberween) so I was looking around for a set of addressible LED string lights to set up.

When you get a set of LED lights from your local supermarket they will often be either a single circuit or a set of multiple circuits. This means that they are either all on, or can alternate in a set number of patterns. This is frankly rather dull.

What supermarkets don't have is addressible LED string lights. In these lights each LED on the wire can be address individually to set the colour or brightness. You can tell if the lights are addressible as they will have three cables, two for power, and one for communicating with the lights.

During my search I found the Plasma 2350 W, from Pimoroni, which can be paired with a number of different sets of LED string lights. I picked up the Plasma 2350 W and a set of 66 stars on their store. This is probably the simplest way of getting started with the board.

Here's an image of the front of the Plasma 2350 W.

An image of the front of the Plasma 2350 W board. It is connected to power and the light in the top right is lit up green.

And the back.

An image of the back of the 2350 W board. Showing the different pins available.

Here's an image of the star shaped LED lights, taken against a wall.

A shot of the LED lights supplied with the Plasma 2350 W set. The LED lights are shaped like stars and have a blue colour..

Even just plugging in the device gives you a nice rainbow effect, but you can add your wifi credentials to pull random colours from an external API. That's really interesting as it means you can update the colours on the device by just changing the contents of an API endpoint.

In this article we will look at the Plasma 2360 W, setting up the board, and even some simple examples of programming it using MicroPython.

Specifications

The Plasma 2360 W has a few specification to report on, so let's dig into them.

  • Powered by RP2350A (Dual Arm Cortex M33 running at up to 150MHz with 520KB of SRAM)
  • 4MB of QSPI flash supporting XiP
  • Raspberry Pi RM2 module (CYW43439), supporting IEEE 802.11 b/g/n wireless LAN, and Bluetooth
  • Reset, BOOT and a user button.
  • A programmable on-board RGB LED.
  • Screw terminals for attaching your LED strip
  • USB-C connector for power and programming (3A max)
  • Qw/ST (Qwiic/STEMMA QT) connector
  • Measurements: approx 61 x 22 x 12mm (L x W x H, including connectors)

The board comes fully assembled, so you don't need to solder anything to get started. You do, however, need to connect the LED lights to the device.

It is compatible with 5V WS2812/Neopixel/SK6812 and APA102/Dotstar/SK9822 LEDs so there are a number of light options available.

Connecting To The Board

The LED string lights that came with the kit had three wires, already stripped and ready to be connected to the Plasma.

  • The 5V wire is marked with dots, plug this into the space marked 5V.
  • The middle wire is for communicating with the lights, plug this into the "DAT" space.
  • The outermost cable (that doesn't have dots) is then plugged into the space marked "-".

Here is my board with the wires connected, the socket on the right hand side is the socket marked "5V".

A closeup of the Plasma 2350 W, showing the connected cables at the front of the board.

The screws can be a little bit fiddly to connect to the wires, but they do sit correctly once connected.

Installing The Firmware

Whilst you don't technically need to install the firmware when setting up, you can follow the these instructions to flash the default firmware at any time.

  • Download the firmware from the Plasma Github repo. You want the file called plasma_2350_w-v1.0.0-micropython-with-filesystem.uf2 for this device. This will flash the device with the Micro Python executable and
  • Connect Plasma 2350 W to your computer with a USB-C cable.
  • Put your device into bootloader mode by holding down the BOOT button whilst tapping RST.
  • Drag and drop the downloaded .uf2 file to the "RP2350" drive that appears.

Your device should reset and is now reay to use. You can access the device using Thonny and program the lights using Micro Python and the built in Plasma libraries.

Note that flashing the firmware will delete any files that you've changed on there, so only do this if you have backed up anything you are working on.

Using Thonny

Thonny is a Python IDE that can easily connect to the Plasma 2350 W, you just need to set up some options in Thonny first.

Open Thonny and click Tools > Options and go to the Interpreter tab. On that tab click the "What kind of interpretter..." option and select MicroPython (Raspperry Pi Pico) from the list.

The options screen of Thonny, sohwing the MicroPython set up and the WebREPL setup set to detect the port automatically.

Once you've set the options up, restart Thonny and click Open. You should then see a little dialog box asking you where you want to open the file from. If you have set everything up correctly then you should see a dialog that looks like this.

The open dialog from Thonny, showing the options for opening from This computer or from the Raspberry Pi.

If you get a device is busy error then click the Stop button in the Thonny toolbar and try again.

If everything worked correctly you should see the following dialog, which shows a list of the files available for this device.

The files that exist on the Plasma 2350 W..

The files you want to look at are:

  • main.py - This is the core executable, meaning that this file will automatically be loaded when the device is plugged in. Out of the box the script will attempt to connect to your wifi network and make a request to an external API that contains a colour. That colour is then shown on all LED lights on the strip. Every 120 seconds a new request is made and the colour updated.
  • secrets.py - A file that is used by main.py to connect to your local wifi network.
  • sparkles.py - A stand alone script that will light up the LEDs in multiple overlapping, phase-shifted sine waves to create a sparkly effect.

There are a few other files on the device, some of which will work with the 2350 W, some will only work if you have the correct interface attached. You can certainly have a poke around to see what's there, but not all of it is guaranteed to work.

Update your wifi details in the secrets.py file and save this back to the device. When you plug the device into any USB port the main.py file will run and either show a rainbow pattern (if wifi doesn't work) or a solid colour if the API request was successful.

Programming The Plasma 2350 W

Programming on the Plasma 2350 W is quite easy as the device comes with a built in MicroPython package called plasma. This package gives you lots of handy functions that you can use to update LEDs, listen to button presses, connect to wifi, or even accept data from periferals. Plasma has lots of documentation and examples to show you how to get started.

The bundled examples on the device, whilst useful, didn't work quite right out of the box with my setup. After some initial experimentation I found that the colours were a bit off on the included LEDs. What I thought was red came out as blue.

The solution was to change the colour order of the LED lights to Blue, Green, Red, which is configured when setting up the plasma object at the start of the MicroPython script. There are a number of constants that you can use to control this.

  • COLOR_ORDER_RGB - RGB
  • COLOR_ORDER_RBG - RBG
  • COLOR_ORDER_GBR - GBR
  • COLOR_ORDER_GRB - GRB
  • COLOR_ORDER_BGR - BGR
  • COLOR_ORDER_BRG - BRG

You can set this in your script using the following, passing the color_order parameter to the setup script.

NUM_LEDS = 66

led_strip = plasma.WS2812(
    NUM_LEDS, color_order=plasma.COLOR_ORDER_BGR
)
led_strip.start()

Making this change means that the colours you set will come out correctly. Experiment with your version to find the correct version.

Using the led_strip, object we can call the set_rgb() method to set the colour of any LED in the strip. This takes the number of LED, followed by the red, green, blue values for that LED. The order of the colours in the mthod is always the same, no matter that you set the colour order to at the start.

For example, to set the first LED in the chain (the array of LEDs has a zero index) to red we would use the following code.

led_strip.set_rgb(0, 255, 0, 0)

To set the entire set of LEDs to a single colour you can use a simple loop.

for i in range(NUM_LEDS):
    led_strip.set_rgb(i, 255, 0, 0)

If you want to clear all of the previous set colours then use the clear() method.

led_strip.clear()

Outside of this, there are lots of examples to let you going, and the main.py file that comes as default will get you started with wifi connections and different colour effects.

Conclusion

This thing is amazing. It is a extremely well crafted PCB with lots of connection options and features.

I've got a few project ideas planned for this already and the included wifi board means that you can possibly perform actions through the wifi interface as well.

In terms of power consumption it is also very impressive. I had this running the default script plugged into a battery in my office for about 80 hours before the lights went out.

Getting set up wasn't the best experence as connecting the lights to the board was a bit of a pain. My hand slipped whilst I was trying to tighten the screws and I managed to cut myself. My LED lights had a break in the data wire about half way up, but I was able to sort quite easily with a bit of woldering (and melted plastic).

It would be nice to be able to get a case for this board. The exposed chip hanging around isn't the best look, but Pimoroni don't sell cases on their site. If you are reading this and have a 3D printer then please get in touch!

The included examples with the firmware give me lots of different ideas on how to get started with wifi interfaces, button presses and a number of other things. In addition to the LED screw sockets the board has a number of other interfaces that you can connect to. I get the feeling that what I have done so far is only the surface of what this board can do. Well worth the cost!

Add new comment

The content of this field is kept private and will not be shown publicly.