We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

47 posts
ame
Posts: 11565
Joined: Sat Aug 18, 2012 1:21 am

Re: 24 Minute Sun Simulation

Wed Oct 09, 2024 1:25 am

slotfan wrote:
Wed Oct 09, 2024 1:15 am
I found a third cord that works. Then I tried each of the three USB ports and found one that works. I think I can begin learning the programming now. I think...
You're onto it, champ.

I really want to see this project work. It sounds pretty cool.

Get your Pico doing something really simple, then iterate from there.
Oh no, not again.

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Fri Nov 29, 2024 3:00 am

I have finally managed to learn something to make these lights work, sort of.
I found this code:

from machine import Pin
from neopixel import NeoPixel

pin = Pin(2, Pin.OUT)
np = NeoPixel(pin, 8, timing=(300, 1090, 1090, 320)) # h0, l0, h1, l1
np[0] = (0, 0, 255) # blue
np[1] = (0, 255, 0) # red
np[2] = (255, 0, 0) # green
np.write()

Every time I press "run" in thonny I get a different result. I don't think I've ever gotten blue, red, and green as intended. Those three colors light up but it's two reds and a blue or two greens and a blue. Or the third one just doesn't work. I feel like the lights should do the same things every time instead of almost random. Any ideas as to why this is happening?

i have these wired like this:
Negative wire in VSYS
Power in 3V3
Main Data in GP2
Backup Data in a Ground between GP5 AND GP6

ame
Posts: 11565
Joined: Sat Aug 18, 2012 1:21 am

Re: 24 Minute Sun Simulation

Fri Nov 29, 2024 3:48 am

slotfan wrote:
Fri Nov 29, 2024 3:00 am
I have finally managed to learn something to make these lights work, sort of.
I found this code:

from machine import Pin
from neopixel import NeoPixel

pin = Pin(2, Pin.OUT)
np = NeoPixel(pin, 8, timing=(300, 1090, 1090, 320)) # h0, l0, h1, l1
np[0] = (0, 0, 255) # blue
np[1] = (0, 255, 0) # red
np[2] = (255, 0, 0) # green
np.write()

Every time I press "run" in thonny I get a different result. I don't think I've ever gotten blue, red, and green as intended. Those three colors light up but it's two reds and a blue or two greens and a blue. Or the third one just doesn't work. I feel like the lights should do the same things every time instead of almost random. Any ideas as to why this is happening?

i have these wired like this:
Negative wire in VSYS
Power in 3V3
Main Data in GP2
Backup Data in a Ground between GP5 AND GP6
That's, uh, a very creative wiring standard. Can you post a link to the LED strips you actually bought, and the power supply?
Oh no, not again.

rpdom
Posts: 25254
Joined: Sun May 06, 2012 5:17 am

Re: 24 Minute Sun Simulation

Fri Nov 29, 2024 8:32 am

ame wrote:
Fri Nov 29, 2024 3:48 am
slotfan wrote:
Fri Nov 29, 2024 3:00 am
i have these wired like this:
Negative wire in VSYS
Power in 3V3
Main Data in GP2
Backup Data in a Ground between GP5 AND GP6
That's, uh, a very creative wiring standard. Can you post a link to the LED strips you actually bought, and the power supply?
The Negative to VSys sounds very wrong. It should probably be Ground.

I haven't used any of the new strips with the Backup Data connection yet, but ground sounds about right.
AIUI The Data In from one LED goes to the Backup Data of the next LED. If an LED Detects backup data without normal data it assumes the LED before it isn't working and uses the backup data starting from the second frame.
The first LED in the string won't get any Backup Data.
Unreadable squiggle

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Fri Nov 29, 2024 3:00 pm

Here is the link to the lights: https://www.superlightingled.com/12v-ws ... -2133.html

I am currently using the Pico to power the LED's as I am only working with a strip of 30. I couldn't get a singly LED to turn white so I may not have enough power.

But I will be connecting this power supply soon: https://www.superlightingled.com/mean-w ... p-212.html

I'll move the Vsys to a ground just to see what happens and then I'll use the power supply like intended. I just want to see what the Pico can do.

B.Goode
Posts: 18782
Joined: Mon Sep 01, 2014 4:03 pm

Re: 24 Minute Sun Simulation

Fri Nov 29, 2024 3:18 pm

slotfan wrote:
Fri Nov 29, 2024 3:00 pm
Here is the link to the lights: https://www.superlightingled.com/12v-ws ... -2133.html

I am currently using the Pico to power the LED's as I am only working with a strip of 30. I couldn't get a singly LED to turn white so I may not have enough power.



From the URL you cite -
Specifications:

LED Strip Type: Individually Addressable RGB LED Strip Lights
LED Chip: WS2815 Breakpoint Resume + SMD5050
Input Voltage: DC12V
Power: 14.4W/m max, 72W/roll

It seems quite likely that not providing sufficient voltage to the LED strip may be a part of your problem.
Beware of the Leopard

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Wed Jan 01, 2025 7:40 pm

So I managed to get a 8 Leds to light up and I could change the color of each one.

I tried to expand on this and now nothing works. Even this SUPER simple code:

from machine import Pin
led = Pin(25, Pin.OUT)

led.toggle()

I get:

Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'machine'

Is my Pico suffering from an identity crisis?

deepo
Posts: 1439
Joined: Sun Dec 30, 2018 8:36 pm

Re: 24 Minute Sun Simulation

Wed Jan 01, 2025 9:45 pm

You have bought "WS2815 Individually Addressable RGB LEDs", not simple LEDs.
You need to wire up the LED strip with power, ground and a communication wire.
And you need your code to address each LED to turn it give it an RGB color and turn it on.

Maybe some of this can help you (though he's using the older WS2812B):
https://www.youtube.com/watch?v=aNlaj1r7NKc

ame
Posts: 11565
Joined: Sat Aug 18, 2012 1:21 am

Re: 24 Minute Sun Simulation

Wed Jan 01, 2025 9:52 pm

deepo wrote:
Wed Jan 01, 2025 9:45 pm
You have bought "WS2815 Individually Addressable RGB LEDs", not simple LEDs.
You need to wire up the LED strip with power, ground and a communication wire.
And you need your code to address each LED to turn it give it an RGB color and turn it on.

Maybe some of this can help you (though he's using the older WS2812B):
https://www.youtube.com/watch?v=aNlaj1r7NKc
OP already had 8 LEDs working properly.
Oh no, not again.

deepo
Posts: 1439
Joined: Sun Dec 30, 2018 8:36 pm

Re: 24 Minute Sun Simulation

Wed Jan 01, 2025 10:23 pm

ame wrote:
Wed Jan 01, 2025 9:52 pm
deepo wrote:
Wed Jan 01, 2025 9:45 pm
You have bought "WS2815 Individually Addressable RGB LEDs", not simple LEDs.
You need to wire up the LED strip with power, ground and a communication wire.
And you need your code to address each LED to turn it give it an RGB color and turn it on.

Maybe some of this can help you (though he's using the older WS2812B):
https://www.youtube.com/watch?v=aNlaj1r7NKc
OP already had 8 LEDs working properly.
I was triggered by the code he showed us. That doesn't match up with addressable LED's...

ame
Posts: 11565
Joined: Sat Aug 18, 2012 1:21 am

Re: 24 Minute Sun Simulation

Wed Jan 01, 2025 11:05 pm

deepo wrote:
Wed Jan 01, 2025 10:23 pm
ame wrote:
Wed Jan 01, 2025 9:52 pm
deepo wrote:
Wed Jan 01, 2025 9:45 pm
You have bought "WS2815 Individually Addressable RGB LEDs", not simple LEDs.
You need to wire up the LED strip with power, ground and a communication wire.
And you need your code to address each LED to turn it give it an RGB color and turn it on.

Maybe some of this can help you (though he's using the older WS2812B):
https://www.youtube.com/watch?v=aNlaj1r7NKc
OP already had 8 LEDs working properly.
I was triggered by the code he showed us. That doesn't match up with addressable LED's...
True. But that's not what the code was for.
Oh no, not again.

B.Goode
Posts: 18782
Joined: Mon Sep 01, 2014 4:03 pm

Re: 24 Minute Sun Simulation

Wed Jan 01, 2025 11:43 pm

slotfan wrote:
Wed Jan 01, 2025 7:40 pm
So I managed to get a 8 Leds to light up and I could change the color of each one.

I tried to expand on this and now nothing works. Even this SUPER simple code:

from machine import Pin
led = Pin(25, Pin.OUT)

led.toggle()

I get:

Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'machine'

Is my Pico suffering from an identity crisis?


One possible explanation is that you have changed the configuration of your Thonny IDE so that it is running your script using the Python interpreter on your Workstation machine.

Check the information panel at the bottom right corner of the Thonny window and make sure it refers to the MicroPython firmware on your attached Pico board.
Beware of the Leopard

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Thu Jan 02, 2025 11:30 pm

Thonny is telling me no backend.
The PC says "unrecognized, malfunctioned last use"

The LED on the Pico lights up dimly.

Is there a hard reset for these things?

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Thu Jan 02, 2025 11:30 pm

Oh, and I've tried all three USB ports with the bootsel button pressed.

B.Goode
Posts: 18782
Joined: Mon Sep 01, 2014 4:03 pm

Re: 24 Minute Sun Simulation

Fri Jan 03, 2025 9:11 am

slotfan wrote:
Thu Jan 02, 2025 11:30 pm


Is there a hard reset for these things?

See the official Raspberry Pi Documentation -

Resetting Flash memory - https://www.raspberrypi.com/documentati ... ash-memory



Then re-install the MicroPython firmware onto the Pico. (This process will of course irretrievably delete any scripts, files, or other content you have stored on the Pico board.)
Beware of the Leopard

ghp
Posts: 4448
Joined: Wed Jun 12, 2013 12:41 pm

Re: 24 Minute Sun Simulation

Fri Jan 03, 2025 10:59 am

Is there a hard reset for these things?
Perhaps order a new device, does not look promising.

Of course, if bootsel and connection to a USB works, then try to reset the flash as already proposed.

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Sat Jan 11, 2025 12:15 am

2 new Picos have been ordered and I am awaiting their arrival.

Thanks for the help so far.

deepo, thanks for that link. I actually stumbled across the website version of that video. Now I know what he was referring to as "terminal." I am on a PC using Thonny I'm struggling with downloading plug-ins. But I think I found a video that helps with that, I think.

When searching for 2815 LEDs I find that most people use 2812 LEDs and a thread that makes me think the change in hardware causes the software to glitch. Or maybe its because the person was using rustmas. I have closed the tab so no link, sorry.

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Sun Jan 19, 2025 3:01 am

Update: New Pico and logic converter have arrived.
I plugged in the test strip of 30 LEDs and everyone of them lit up white. Never happened before and I don't know why they are now.

Logic converter 74AHCT125 is powered and the voltmeter says its working. As per the diagram at https://learn.adafruit.com/neopixels-on ... -pi-wiring (first diagram). Unfortunately they're using 2812 LEDs and I'm using 2815. I have GPIO2 going to 1A on the converter. 1Y then connects to the primary data line on the LEDs. My voltmeter shows that this has 5 volts. https://cdn-shop.adafruit.com/product-f ... AHC125.pdf for pin read out.

I have not had control of my strip at all. They came on white and some have turned off. For some reason the first one went off and came back red, its the only one to show color. I have connected the data lines and another ground wire from the Pico as shown in the first link and also this Youtube video:https://www.youtube.com/watch?v=QhdgTG4SeuY. Skip to about the 6 minute mark.

ame
Posts: 11565
Joined: Sat Aug 18, 2012 1:21 am

Re: 24 Minute Sun Simulation

Sun Jan 19, 2025 3:42 am

2815 LEDs appear to need a 12V supply, and 12V signalling:

https://suntechlite.com/wp-content/uplo ... chLite.pdf
Oh no, not again.

ghp
Posts: 4448
Joined: Wed Jun 12, 2013 12:41 pm

Re: 24 Minute Sun Simulation

Sun Jan 19, 2025 7:24 am

Many opinions on logic level voltages.
My understanding is that these WS2815 have an internal voltage regulator VDD 12V down to VCC 5V for the logic circuit. Unfortunately the cited datasheet is not very clear about this and does not specify the target value of VCC. Also later the the abbreviation VDD and VCC are possibly exchanged in the "Electrical Characteristics (TA=-20〜+70°C, VDD=4.5〜5.5V". The data input voltage levels should be kept in the VCC range.

https://github.com/stanleyondrus/LedBoxV2/issues/1
https://www.reddit.com/r/FastLED/commen ... ?rdt=58998

ame
Posts: 11565
Joined: Sat Aug 18, 2012 1:21 am

Re: 24 Minute Sun Simulation

Sun Jan 19, 2025 7:27 am

ghp wrote:
Sun Jan 19, 2025 7:24 am
Many opinions on logic level voltages.
My understanding is that these WS2815 have an internal voltage regulator VDD 12V down to VCC 5V for the logic circuit. Unfortunately the cited datasheet is not very clear about this and does not specify the target value of VCC. Also later the the abbreviation VDD and VCC are possibly exchanged in the "Electrical Characteristics (TA=-20〜+70°C, VDD=4.5〜5.5V". The data input voltage levels should be kept in the VCC range.

https://github.com/stanleyondrus/LedBoxV2/issues/1
https://www.reddit.com/r/FastLED/commen ... ?rdt=58998
Good catch!
Oh no, not again.

slotfan
Posts: 15
Joined: Mon Aug 19, 2024 6:32 pm

Re: 24 Minute Sun Simulation

Sun Jan 19, 2025 1:57 pm

Well, at least I know I have the correct hardware.

47 posts

Return to "General programming discussion"

AltStyle によって変換されたページ (->オリジナル) /