I found these instructions on printable.com and wanted to create this lightsaber for my nephew. The instructions have all the parts from Adafruit needed to build the LED light saber part. https://drive.google.com/file/d/18VLbrH ... C4By4/view
In the instructions, it has this schematic drawing: https://learn.adafruit.com/assets/41583. The battery used in the instructions links to a 3.7v battery connected to the LiPoly backpack and the Trinket M0.
My question is, the LEDs say they require 5v, but this schematic uses 3.7v for everything. Will this work?
Does this schematic work?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Does this schematic work?
Yes, WS2812 and SK6812 LEDs work just fine at 3.7v. Most of our portable and wearable projects using these LEDs are designed around 3.7v LiPo power.
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
Great thank you! Can't wait to get the parts in!
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
This isn't working for me. I can't get the LEDs to turn on at all.
I've triple-checked the wiring and it's all connected the same as the diagram. I used my voltmeter and the output for power for the LEDs is 3.75 as it should be. I'm not sure what the digital line from #4 should be, but it reads 0.003 to 0.009 while it's connected. I assumed the switch would cut the power to the LEDs in one position, but it's always showing 3.75 volts no matter where the switch is.
What could be wrong? I tried a different backpack board to see if it was that, but I'm getting the same thing.
I've triple-checked the wiring and it's all connected the same as the diagram. I used my voltmeter and the output for power for the LEDs is 3.75 as it should be. I'm not sure what the digital line from #4 should be, but it reads 0.003 to 0.009 while it's connected. I assumed the switch would cut the power to the LEDs in one position, but it's always showing 3.75 volts no matter where the switch is.
What could be wrong? I tried a different backpack board to see if it was that, but I'm getting the same thing.
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Does this schematic work?
If you post some photos showing all your soldering and connections we can take a look.
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
There are 2 yellow wires, one to the USB output on the M0 and one to the switch. I've ensured they are in the right connections.
The wires to the LED strip aren't soldered, but I do have them connected properly. The black cable to ground, power to red and data from #4 to white.
The wires to the LED strip aren't soldered, but I do have them connected properly. The black cable to ground, power to red and data from #4 to white.
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
This is the code in the main.py file on the M0 board. For now it's set to 60, but will change when I add the second meter and cut them down. I was trying to test this with the 60 LED single strip first.
Code: Select all
# Lightsaber Script
import board
import neopixel
import time
pixel_pin = board.D4
pixel_count = 60
pixel_num = 60
diff_pixels = 60
pixels = neopixel.NeoPixel(pixel_pin, pixel_count, brightness=1, auto_write=False,)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
YELLOW = (255, 255, 0)
CYAN = (0, 255, 255)
WHITE = (255, 255, 255)
for i in range(0, diff_pixels):
pixels[i] = CYAN
#pixels[pixel_num-i] = CYAN
pixels.write()
time.sleep(0.01)
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Does this schematic work?
The power switch won't do anything unless you cut the trace as described in the guide: https://learn.adafruit.com/adafruit-pro ... -1942369-6I assumed the switch would cut the power to the LEDs in one position, but it's always showing 3.75 volts no matter where the switch is.
That would be a good place to start. Un-soldered connections do not make reliable electrical contact and are a common cause of non-working neopixels.The wires to the LED strip aren't soldered
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
Ahh OK about the switch, I didn't know that from the instructions I got.
As for the LED strip, I didn't solder them this time because this didn't work before and I thought the LED strip was bad. I tested them on an arduino uno board too and couldn't get them to light, so I ordered another strip. This one I didn't want to cut up until I knew they worked.
As for the LED strip, I didn't solder them this time because this didn't work before and I thought the LED strip was bad. I tested them on an arduino uno board too and couldn't get them to light, so I ordered another strip. This one I didn't want to cut up until I knew they worked.
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
OK, I cut the connection for the switch and that works. I soldered the wires to the LED strip and they still don't light up. I checked to make sure they are getting voltage, and yes, they are still getting 3.7v to the power and 0.003 to the input from #4 (not sure how much that should be, but it's not 0). Tried to take a photo of the whole circuit. The LED on the M0 board lights up. The red LED on the backpack board is lit but dim. LEDs shut off when I flip the switch.
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
Could it be something with the code? I can read and understand what's there, but I've never written python before. Is there some test code I could try out maybe?
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Does this schematic work?
Python is not my language either, but what you have there looks pretty straightforward.
You can try the example code from the guide: https://learn.adafruit.com/adafruit-neo ... 3005651-22
You can try the example code from the guide: https://learn.adafruit.com/adafruit-neo ... 3005651-22
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
Nope, that's not working either.
I even tried swapping out the Trinket M0 board and doing straight wires from that to the LED strip, just to make sure the connector I was using wasn't the issue. And I'm still getting no LED lights.
I even tried swapping out the Trinket M0 board and doing straight wires from that to the LED strip, just to make sure the connector I was using wasn't the issue. And I'm still getting no LED lights.
- djanim8
- Posts: 17
- Joined: Sat May 14, 2022 8:17 am
Re: Does this schematic work?
the code just goes into the code.py file and is copied to the root of the board right? it doesn't have to be compiled or anything?
- adafruit_support_bill
- Posts: 88037
- Joined: Sat Feb 07, 2009 10:11 am
Re: Does this schematic work?
You shouldn't need to compile the Python script. If you want to try the Arduino version, the 'strandtest' example sketch is my 'goto' test code for neopixels.
Please be positive and constructive with your questions and comments.