#4910374
So, just throwing another option for making cyclotron light diffusers:

I found these disposable shot glasses at dollar tree when I was working with my kids on another costume, and when I started working on my Spirit Halloween proton pack mods I wondered if they were the right size, and they are nearly a perfect fit. Only slightly small. I know people have a ton of things that work, as the size seems to be pretty common for little cups and stuff, but I thought I'd add that one to the list.

Thanks for the guides and helps, by the way CountDeMonet. I had never used neopixels before and now they are by far my preferred light for hobby projects. Talk about a versatile project that expands the capabilities of the arduino because of how they are driven.
CountDeMonet liked this
#4955639
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

I know this is an old thread, but it's such a cool project!

Is there an updated option for the neopixel sticks? The link in the first post is dead. I ordered these a while ago:

https://www.amazon.com/WS2812-Channel-C ... B081BBF4R3

and while the code works on them, they seem to be too long to fit in the powercell. Each stick is about 56mm long and my 3d printed powercell mount only seems to be 98mm long

The technical details on this one mention ‎dimensions ‎1.97 x 0.79 x 0.39 inches
https://www.amazon.com/WS2812-Integrate ... 08F9KN3K2/
which seems closer to fitting, lengthwise, but the width, at 20mm doesn't seem like it could be right, so I don't know how much I can trust the stated length.

Thanks,
-S
#4955923
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

lustreking wrote: September 15th, 2021, 9:09 am I know this is an old thread, but it's such a cool project!

Is there an updated option for the neopixel sticks? The link in the first post is dead. I ordered these a while ago:

https://www.amazon.com/WS2812-Channel-C ... B081BBF4R3

and while the code works on them, they seem to be too long to fit in the powercell. Each stick is about 56mm long and my 3d printed powercell mount only seems to be 98mm long

The technical details on this one mention ‎dimensions ‎1.97 x 0.79 x 0.39 inches
https://www.amazon.com/WS2812-Integrate ... 08F9KN3K2/
which seems closer to fitting, lengthwise, but the width, at 20mm doesn't seem like it could be right, so I don't know how much I can trust the stated length.

Thanks,
-S
Neopixels are just WS2812 led's so the link you have will work fine. If you look closely at the mount I made two of the led's are cut off and it's a 14 led sequence not 16. This allows you to center the stick in the mount so all available led's are visible. The code takes this into account

const int powercellLedCount = 14; // total number of led's in the animation
#4955934
CountDeMonet wrote: September 22nd, 2021, 10:42 am
Neopixels are just WS2812 led's so the link you have will work fine. If you look closely at the mount I made two of the led's are cut off and it's a 14 led sequence not 16. This allows you to center the stick in the mount so all available led's are visible. The code takes this into account

const int powercellLedCount = 14; // total number of led's in the animation
Oh, great! Thanks!
#4955939
Hello Count, first I have to say thank you for the code provided, I absolutely love it and my pack is running fine with it... But I have a question... I am an absolute beginner with arduino and have absolutely no idea what to do... I use the spiritminimal.ino and want to add a button to change the lights of the cyclotron to match the spengler wand...
What would I have to do that if I press a button the cyclotron changes to green, press again changes to blue, press again changes to orange, press again and go back to red and then so on... I searched the internet for tutorials, took books from my city's library but I can't find anything that looks like what I try to archive... Could you please send me in the right direction? That would be awesome... Thanks and greetings from Germany
#4955946
If it's just changing the color that's pretty easy. First the button.

https://create.arduino.cc/projecthub/mu ... ion-08adb5

A lot of button examples show usage of a resistor with the button but I've never needed it. It may be more correct to keep from having floating pins but I've never had a bad reading from a button. As you can see it's really easy to do.

The setting of the lights is done by a single function and it uses a state variable to determine which "mode" it's in. That function is called setCyclotronLightState. It basically handles all the colors and fading and animations for the cyclotron. The animation code can get a bit complicated so your best bet is probably to limit changes to that function. I would have a global variable up at the top to indicate current cyclotron color state. Something up near line 10 that looks like this

// Possible Pack states
bool powerBooted = false; // has the pack booted up
int cyclotronColorCode = 0; // current color of the cyclotron. 0 red, 1 blue, etc...

In the main loop check the button press as shown in the button tutorial. If it's pressed then increment the cyclotronColorCode variable. Something like this

if( cyclotronColorCode > 4 ){
cyclotronColorCode = 0;
}else{
cyclotronColorCode = cyclotronColorCode + 1
}

Then in the setCyclotronLightState function you will need to modify some of the case statements do be the color you want. Let's say that if cyclotronColorCode = 0 is red and cyclotronColorCode = 1 is blue for the lights then you would do something like this around line 59

for(int i=startLed; i <= endLed; i++) {
if( cyclotronColorCode == 0 )
cyclotron.setPixelColor(i, cyclotron.Color(255, 0, 0));
else if ( cyclotronColorCode == 1 )
cyclotron.setPixelColor(i, cyclotron.Color(0, 0, 255));
}

The cyclotron.Color is in the format Red, Green, Blue.

I would recommend not worrying about the game version of the animation that fades the previous light in the sequence for simplicity. This is up in the header as one of the options. If you turn it off you only have to change the case 0: statement with your new colors.

const bool useGameCyclotronEffect = false; // set this to true to get the fading previous cyclotron light in the idle sequence

That is how I would do it quickly as a hack to test it out.
Lempo liked this
#4956182
CountDeMonet wrote: September 22nd, 2021, 10:42 am Neopixels are just WS2812 led's so the link you have will work fine. If you look closely at the mount I made two of the led's are cut off and it's a 14 led sequence not 16. This allows you to center the stick in the mount so all available led's are visible. The code takes this into account

const int powercellLedCount = 14; // total number of led's in the animation
I ended up buying the adafruit neopixel strips (before you replied), and they do fit much better than the original ones I bought, but I'm still having a problem with the 3d printed mount. The way that the strips mount in it is with the data input at the top, which makes the animation go backwards. It's like the little notch in the mount for where the capacitors are is on the wrong side. The previous ones I ordered had the same issue. Any thoughts?

Thanks!
#4956365
The ones I have in bags still from way back when match the pictures I see in the second link you provided. Looking at the model it should be right but I would have to take my pack apart to check it. Are you sure you don't have the 3d printed mount upsidedown? The pics in the first post are the best I have of how I installed it
#4956403
It looks like the Adafruit ones that I have are laid out in the opposite direction!

Image
Compared to these:
Image

However two of these is 6mm longer than two of the Adafruit ones.

Do you have any advice for changing the code so the powercell animation runs in the opposite direction so I can just use these? I've experimented, but the changes I made didn't make a difference.

Thanks!
#4956773
you would have to modify the startup sequence and the regular sequence. Line 211 would look something like this

for ( int i = powercellLedCount; i >= 0; i--) {
if ( i >=0 ) {

The bootup would be harder to deal with. See if that fixes the regular animation to start

FWIW the stick I have on hand is the same as the diymall one. I may have used real neopixels on the pack though. I bought different ones for another project
#4956778
lustreking wrote: October 1st, 2021, 6:53 am It looks like the Adafruit ones that I have are laid out in the opposite direction!

Image
Compared to these:
Image

However two of these is 6mm longer than two of the Adafruit ones.

Do you have any advice for changing the code so the powercell animation runs in the opposite direction so I can just use these? I've experimented, but the changes I made didn't make a difference.

Thanks!
actually I just looked at the pics on the first page and I used the one similar to the diymal one on this pack. You can see the din on the left with the holes pointing up. Are you sure you are using the mount correctly? Is this the new style pack? I have not seen the updated one for this year. Can you post some pics?
#4956781
CountDeMonet wrote: October 7th, 2021, 1:58 pm you would have to modify the startup sequence and the regular sequence. Line 211 would look something like this

for ( int i = powercellLedCount; i >= 0; i--) {
if ( i >=0 ) {

The bootup would be harder to deal with. See if that fixes the regular animation to start

FWIW the stick I have on hand is the same as the diymall one. I may have used real neopixels on the pack though. I bought different ones for another project
It looks like I did edit the for loop properly, but missed the changes in the if statement. I'll give that a try in a bit.


I know I'm using the mount properly, and my pack is from last year. My problem is that both sets of my sticks (adafruit pictured, as well as a no-name brand) have Din on the right with the holes up.)

I may try to mod the mount rather than the code.

Thanks for your help!
#4965675
I got a question does anyone know how to daisy chain 2 single neopixels so there can be 2 per cyclotron. I want to make it brighter in each individual cyclotron. yes I know i am making it hard on myself i should just get the Newpixel jewel but i am being a cheap ass. lol Any input would help . I think i have the code figured out to make them work . let me know if it sounds right
const int c1Start = 16;
const int c1End = 17;
const int c2Start = 18;
const int c2End = 19;
const int c3Start = 20;
const int c3End = 21;
const int c4Start = 22;
const int c4End = 23;
#4965818
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

are you asking how to wire it up? I use individual ones that have the pads for in and out clearly marked. Something like this although the 100 I bought were from a different vendor.

https://www.amazon.com/ALITOVE-100pcs-W ... B01D1FFVOA

Image
2wED1 liked this
#4965819
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

Paco wrote: January 9th, 2022, 7:59 pm Is there a way to add code into the existing code to modify the cyclotron lights to emulate the afterlife spinning led?
I responded to this question on pm but thought it would be useful here as well

instead of the 4 led's you could use one of those flexible neopixel chains and install it on the cyclotron wall. You would have to update the code to address those as an option and build the animation for it. Wouldn't be too hard at all since it's a simple chase pattern.

Something like this
https://www.amazon.com/BTF-LIGHTING-Ind ... B088BKY3V9

could be wrapped around and cut to size. Something like this could also be used

https://www.adafruit.com/product/2874
#4965843
This post may contain an affiliate link that helps support GBFans.com when you make a purchase at no additional cost to you.

CountDeMonet wrote: January 20th, 2022, 2:05 pm are you asking how to wire it up? I use individual ones that have the pads for in and out clearly marked. Something like this although the 100 I bought were from a different vendor.

https://www.amazon.com/ALITOVE-100pcs-W ... B01D1FFVOA

Image


I wired some up but i have singles for the cyclotron. i was wondering if i could double up on the singles for each of the cyclotron sections? then modify the code to reflect those 2x singles wired together if that makes sense . looking like this per cyclotron 00——00——-00——00 then on to 4 singles for the pack vent.
#4999518
Hi Count,

Thank you for the code. I've soldered everything just as the pictured showed me. I'm not using the power converter as of right now. I've uploaded the code and that seems to load fine. I'm using a 9V battery to power the Arduino Nano and it seems to fire up but, the LEDs will not light up. Am I missing something? Thanks in advance for your help.

Mike

Image
#4999566
I found the same LEDs and I think your wiring is the problem.
Image

It looks like you've accidentally soldered the yellow and red wires backwards. To be clear, VCC goes to the 5V connection on the Arduino (usually a red wire). IN refers to "data in", which goes to the data pin on the Arduino (I assume a yellow wire). And OUT goes to the IN of the next LED board.

Try swapping the two wires connected to the Arduino around and see if it works. If it does then its up to you if you want to desolder and swap them around, or just live with the fact that you're using a yellow wire for 5V (you can add a label with masking tape if you want).
CountDeMonet liked this
#4999609
Your absolutely Correct! And that's the exact chip I have! I swapped the red and yellow wires and it worked great! That solves the problem of getting the LEDs to light up but it only works on one and not on the other 3 neopixels because it thinks there is 7 leds (on the one) and doesn't address it as 1 whole led, so it just cylces the lights on 4 of the 7...haha. That's ok, I went and purchased the ones you suggested at the beginning of the feed. That way there is only 1 LED per board to address. Also I really like the interchanging yellow on start up. Any way to have the come up after every 5 cycles of the red? That way I would be able to see it again and not just on start up. Thanks. I really appreciate the help.
#4999628
Mikeofalltrades wrote: August 20th, 2024, 1:21 am Your absolutely Correct! And that's the exact chip I have! I swapped the red and yellow wires and it worked great! That solves the problem of getting the LEDs to light up but it only works on one and not on the other 3 neopixels because it thinks there is 7 leds (on the one) and doesn't address it as 1 whole led, so it just cylces the lights on 4 of the 7...haha. That's ok, I went and purchased the ones you suggested at the beginning of the feed. That way there is only 1 LED per board to address. Also I really like the interchanging yellow on start up. Any way to have the come up after every 5 cycles of the red? That way I would be able to see it again and not just on start up. Thanks. I really appreciate the help.
Note that the full pack code uses the jewels for the cyclotron so it's brighter. I wanted to keep it simpler for this codebase and just use the single neopixel. To use the jewels you just update the initialization of the neopixel to have the total count of neopixels and then adjust the indexes.

change the 4 here to the total count of the neopixels in the chain.
Code: Select all
Adafruit_NeoPixel cyclotron = Adafruit_NeoPixel(4, NEO_CYCLO, NEO_GRB + NEO_KHZ800);
For the single one the start and end are the same index number, for a 7 neopixel jewel start would be 0 and end would be 6 for the first one, then 7 for c2 start and 13 for the end, and so on.
Code: Select all
int c1Start = 0;
int c1End = 0;
int c2Start = 1;
int c2End = 1;
int c3Start = 2;
int c3End = 2;
int c4Start = 3;
int c4End = 3;
it wouldn't be that hard to reset every so often. You would basically need to create a global variable to store the count. Up near the top of the sketch you would add the variable below the powerBooted like so
Code: Select all
// Possible Pack states
bool powerBooted = false;   // has the pack booted up
int resetCount = 0;
const int resetLevel = 5;
Then in the main loop code you would increment and reset the powerBooted when the level is hit like this
Code: Select all
void loop() {
  // get the current time
  unsigned long currentMillis = millis();

  // reset the powerBooted when the level is hit
  if( resetCount == resetLevel ) {
    powerBooted = false;
    resetCount = 0;
  }else{
    resetCount++;
  }

  if( powerBooted == false ){
    powerSequenceBoot(currentMillis);
  } else {
    powerSequenceOne(currentMillis, pwr_interval, cyc_interval, cyc_fade_interval);
  }
  delay(1);
}
There may be a little more to it than that. I don't have my pack available to try it out. The only thing I could think that may also need to be reset would be the currentBootLevel, currentLightLevel, and powerSeqNum to their defaults. I've never tried re-running the startup code before. Might take a little more debugging once running but that should be really close.
#4999671
Thanks for the code. It didn't quite work, but it's thinking about it. It flashes yellow back and forth, as it should...then instead of running 5 cycles of the red, it lights up the first red neopixel in the first position and then back to yellow sequence and then flashes the next red neopixel in the second position and so and and so forth. I hope that makes sense.
Books featured on screen

Was also able to pick this book up for a very re[…]

Seems to be working now. Yesterday is technically[…]

Spirit/Qpack hybrid

Finished. Couldn’t be more pleased. https:/[…]

Was hoping to send a PM to ask about the Legacy Mo[…]