[How To] Upgrade light that can be controlled through the slicer/app

The chamber LEDs that the printer comes with are not very bright. You can hardly see things on the camera, so I decided to add LEDs to mine.

camera image with new leds:

before/after:

My solution

This is the schematic for the circuit:

What do you need?

  • A soldering iron
  • Solder
  • Flux (helps a lot with the soldering)
  • An IRLB8721 MOSFET (in TO-220 form factor)
  • For the P1 series, you need a micro JST GH 1.25 (two wire) connector. I recommend buying them with attached wires (then you will only have to lengthen them), because the connector is tiny. This is the one I bought: https://www.aliexpress.com/item/1005004330378840.html
  • For the X1 series, you need a micro JST ZH 1.25 (two wire) connector (I think?).
  • You could skip buying the wires by reusing the built-in led connector, but I have not tried this.
  • A led strip that only has a plus and minus wire. Before you order one, make sure that the riser you want to use, supports led strips of that width. I ordered a led strip 2835, 2-pin wire, Natural White, 5mm Width, 5m, but a smaller length should work as well.
  • Some glue (the glue my led strips came with did not hold when the leds were on for a long time, because they become hot)
  • Wires for extending the ones that connect to the printer. I used 24 AWG wire in red and black.
  • Some way to power the LEDs, I used one of these PD/QC/AFC Fast Charge Decoy Trigger Support 5V 9V 12V 15V 20V Fixed Voltage Output Type-C with a USB C power supply that supports power delivery.
  • Resistors (one 1kΩ-resistor should be enough)
  • Some isolation tape for the wires
  • If you are using my pcb, you should buy screw terminal blocks, 2 pin with 5.0mm pitch, I bought these: 50PCS PCB Terminal Block Connector Pitch 5.0mm KF301 Straight Pin 2P 3P Screw PCB Terminal Blocks
  • About 400g of filament that can withstand high temperatures for the riser (might be more or less, depends on what you print).
  • Optional: TPU for the “gasket” (I think it used around 200g)
  • A bit of duct tape to fix the jst extension cable to the printer

I tried to include everything you might need in this list, so you will likely have many of these already.

Ordering a PCB

I uploaded the PCB to GitHub: GitHub - Luro02/pcb-blled: Printed Circuit Board Design for controlling an led strip with a bambulab printer

You can download the latest version by clicking on “Actions”:

Then select the latest workflow run with a green arrow (in my case the “add pcm symbols”).

Scroll down to artifacts and download the output file:

There are many options for where you can order your PCB, here are some:

I ordered mine through JLCPCB (cost me ~7€ including shipping).

To order the pcb, select the zip file you downloaded in the previous step. You should see a preview of the pcb:


Here you can change the color of the PCB as well, but some manufacturers charge extra or take longer for different colors.

You don’t have to change any other options, just place the order, pay and in a few weeks they should arrive.

Disclaimer: I messed up my initial PCB design, so my screw terminals are too close to each other. I fixed this in the version I uploaded to GitHub, but I have not ordered that version, because that would be a waste of money (I already have one that works just fine).

Alternatives to ordering a pcb

The first option would be to solder the wires by hand. If you want something that is less of a cable mess, you can use one of these instead:

image

They are called prototype pcb boards. You can solder the components onto one and connect the components through cables.

Be careful that you choose components with the right pin spacing (pitch). Many components use a 2.54 pitch, but there are some that use a different one like 5.0mm or 1.27mm.

This is how it should be wired:

Choosing R1 and R2

I included the R1 and R2 resistors in the circuit, because the mosfet gate acts like a capacitor that will then discharge when you turn the printer off:

What I did not know at the time, was that when you press the led off button in the printer/slicer/app, the voltage will not be 0. Therefore, my leds did not fully turn off.

It took me quite some time to figure out what the problem was. When the built-in LEDs are off, I measured a voltage of ~1.4V.

Therefore, my chosen resistors did not work. I did not bother with calculating the resistors I should use and instead tried different combinations, until I found one that worked.

For R1 I did not use a resistor (instead I soldered the wire of the resistor between the two holes) and for R2 I used a 1kΩ-resistor.

Assembly

  1. Solder the mosfet, screw terminals and resistor to the pcb (also connect R1 with a wire), it should look something like this:

  2. Solder two cables to the USB-C PD trigger board:

  3. Ensure that you set the correct voltage for your led strip in the PD board (see the back for configurations, there should be a 1 and 0 near the switch on the pcb, you might need a screwdriver to change the states)

  4. Extend the JST cable, so it reaches the PCB (length depends on where you place it, so I would cut it after you found a suitable place).

  5. The built-in LED is connected to a PCB that is above the door. There is electrical tape on top of it that you must remove. After you did that, it should look like this on the P1 series (not sure how it looks on the X1 series):

  6. Now unplug the built-in led and plug in your jst extension cable:

  7. I placed the cable on the edges of my printer and fixed it with duct tape:

  8. and then I routed the JST extension cable (with the led cable) through a hole I made in the riser:

Note: I used this riser, which does not have hole in the back. You can either add one after printing (I did that) or do it before printing in the slicer (if I remember correctly, you make a cylinder as a negative part and then move it in the right position?)
https://makerworld.com/en/models/162582

For the pcb I designed a small holder that has magnets on one site and mounts to the back of the printer. The distances between the pcb holes are: 14mm and 43.5mm

Alternative solutions I found:

I am not the first one who had an issue with this, so there are several solutions.

Most of them use some LED (RGB) Strip and then control them through:

The problem is how they should be powered, here are some solutions I came across:

7 Likes

Nicely redacted, very complete and useful post. Congratulations.
Thank you.

1 Like

Nice job! Very thorough and well-written post! Unfortunately, I only found it when I was about to post a similar one—haha!

Anyway, maybe someone will still find it useful. The idea is the same, but I wasn’t sure if connecting the GND of the JST GH 1.25 and USB was completely safe, so I included an optocoupler to keep the two circuits isolated.

Parts I used:

  • Optocoupler : PC817
  • MOSFET : IRLZ34N
  • Resistors : 220Ω, 1kΩ, 10kΩ

Here is the circuit scheme:

How it works:

The LED strip gets 5V directly from USB, and the MOSFET switches the ground. The optocoupler connects to the 0.3A app-controlled output and triggers the MOSFET gate. When the light is turned ON via app/panel, the gate opens, and the LED strip lights up. The 10kΩ resistor pulls the gate low when OFF.

Implementation:

  • I used a 5m 5V (COB?) LED strip that measured ~0.71A for the full roll. That’s much lower than I expected from COB LEDs, so I probably got conned by a Temu supplier — but to be fair, they were pretty cheap.
  • I split it into 3 strips and, believe it or not, managed to cram the entire 5 meters into the chamber without a riser.)) Still, I wouldn’t recommend doing this, and probably will end up replacing them in the future when something falls off and ruins a print…
  • I also left the original LED bar connected. So, the combined current was ~1.23A.
  • I soldered everything without a PCB to keep it compact and hot-glued the exposed contacts for safety. Although it looks kinda fugly, it works.

4 Likes

I was about to comment on connecting printer PSU ground and standalone power brick ground is not 100% safe of OP but then I saw the date of the post and your post.

Using opto to isolate two circuits is a proper way to do it.

TLDR;

Most of switching PSU design is like this

If you use cheap wall adaptor (phone charger and all) without earth prong, it is like this

Now, there is a voltage potential mismatch between two GNDs (printer PSU and phone charger). You will get problems with ground loops and all. Fortunately, ground loops problem mostly is not fatal, it just causes weird behaviours, like bad wifi signal, microcontroller reset…

2 Likes

Thank you for the explanation. I wasn’t aware of this issue in regards to connecting different GNDs together.

In my case, there were no noticable issues without the optocoupler.

To give everyone who might be reading this an update:

My described solution did work for about 3 months, before the AliExpress fake Mosfet gave up (always letting a bit of current through and became extremely hot). Yes, before that I wasn’t aware that there is fake stuff out there (I know, naive, but I learned my lesson).

After that I spent a lot of time researching mosfets, trying to find one that works well with the voltage of the printer. I ended up abandoning that solution and went with an ESP32 that reads the voltage through a voltage divider and then controls a small mosfet that works well with the esp32 voltages.

The solution is quite hacky (for example I glued a usb c pd board to the pcb), so I am not going to post it here.

In case anyone wants to build this, consider going with the one by @teaholic.

1 Like