Does this schematic work?

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Does this schematic work?

Post by djanim8 »

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?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Does this schematic work?

Post by adafruit_support_bill »

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.

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

Great thank you! Can't wait to get the parts in!

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Does this schematic work?

Post by adafruit_support_bill »

If you post some photos showing all your soldering and connections we can take a look.

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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.
20220519_202930.jpg
20220519_202930.jpg (531.46 KiB) Viewed 165 times
20220519_203031.jpg
20220519_203031.jpg (569.32 KiB) Viewed 165 times

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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)

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Does this schematic work?

Post by adafruit_support_bill »

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.
The power switch won't do anything unless you cut the trace as described in the guide: https://learn.adafruit.com/adafruit-pro ... -1942369-6
The wires to the LED strip aren't soldered
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.

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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.

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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.
20220519_211023.jpg
20220519_211023.jpg (151.92 KiB) Viewed 162 times
20220519_211149.jpg
20220519_211149.jpg (417.9 KiB) Viewed 162 times

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Does this schematic work?

Post by adafruit_support_bill »

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

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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.

User avatar
djanim8
 
Posts: 17
Joined: Sat May 14, 2022 8:17 am

Re: Does this schematic work?

Post by djanim8 »

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?

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: Does this schematic work?

Post by adafruit_support_bill »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”