I used two buck converters in my setup powered by a single 11.1v lipo. One powers the arduino and lights and the other the fx board and audio amp. The delay could still be caused by weak connections. Maybe try moving the component to a different part of the breadboard. Some of the cheap breadboards I've found have issues with some connections. The most likely place where the loop would pause would be in the audio board calls to read the state so make sure the ACT pin connection is good. The other place I've seen pauses is in the actual play function which I believe is caused by blocking serial communication. Double check those wires as well.
Another day....another problem. lol....at least I'm having fun right? Ok, so I got everything wired up and working on the bench so I figured it's time to to play with the relay and setting up a smoke vent. This doesn't seem that hard right? Well for whatever reason I can't get this to work to save my life. The relay is working...the green and red leds come on when powered on and I hear a distinct click when the switch is fired to turn it on and off....BUT.....it doesn't seem to have any voltage running out of the DC+ and DC- leads? For testing I'm inserting a common 5V LED bulb (as well as a multi-meter) and it's just not out putting any power. I've tried three different relays and all perform the same. So what am I doing wrong? Below is an illustration of my wiring. Any help is appreciated!

Think of a relay as a remote controlled toggle switch. A relay is made of two separate circuits. the control side (on the left in your picture) is the low amp circuit that is getting the input signal from your Arduino. You have that wired correctly, don't change that side . BUT, the other half of the relay is nothing more than a switch that is turned on and off by the control side. it is not electrically connected to the control circuit and it does not provide power to the circuit it controls. When you are wiring it in to the circuit you want it to activate, you have to wire it the same as a simple switch. you will put it in series on either leg of that circuit, but that circuit needs its own power source.
Hope this helps.
i'am curious to know if someone can tell me how i can including some other "mode" in this code.

if i dont want use "toggle switch" for theme song but instead use this toggle for switch to different mode.

Example : normal mode, slime mode and stasis mode.

For now i have 3 separate .ino files representing the 3 modes.

how i can crush all this 3 mode togheter and be able to switching between each mode with a toggle switch? Iam not super good for create from scratch for coding but iam good to remix and test/error shot

some example code ? that's could help me so much
Ok....I got almost everything wired up (except the Ecig and vent lights) and it appears to be working EXCEPT when I flip off the activate/safety switch. I hear the "clicktrack" and wand lights shut off but the bar graph just freezes in place. I had it working on the bench (so the bar graph lights shut off when the activate was turned off). So my question is obviously the switch it working. Any idea where I might want to look for a bad solder joint or loose connection? Everything else seems to work (theme switch, on/off. trigger) perfectly expect that sequence....Any ideas?!
That is strange that everything worked on the bench but not now. In the code the shutdown_leds(); function is what clears the bar graph. in the main loop that is called in the last else statement that does all of the shutdown of the pack.
} else { // if we are powering down
if ( poweredDown == false ) {
if ( shuttingDown == false ) {
playAudio(shutdownTrack, playing); // play the pack shutdown track
shuttingDown = true;
cyclotronRunningFadeOut = 255;
} else {
if (startup == true) { // if started reset the variables
clearPowerStrip(); // clear all led's
startup = false;
safety = false;
fire = false;
EDIT: ok what is the point of the code block if it won't keep the code formatting? Quote seems to work a little better...

if you look at what that code is doing it will loop during the powercell shutdown faze and then once the shutdown is complete it will clear the powerstrip and bargraph. My guess is that for some reason the final clearing is not being called. Did you change the number of led's in the powercell by any chance?
Really? That is incredibly strange. The code is there to clear the bargraph but since my pack does not have it I can't test it and verify it is still working. I don't see anything in the code that would indicate a problem since if the powercell is reset the bargraph should be as well. I'll take another look tomorrow to see if I see anything
NotSabbat liked this
is it possible that the powercell offset index is 0 in your configurations? Around line 891 in the ecig code you can see this if statement

if ( powerShutdownSeqNum >= powercellIndexOffset) {

It's possible that is not being satisfied for some reason and therefor the poweredDown = true; and reset of the powercell/bar graph is not happening. Powercell may not be noticable since it's already shutting lights down till the end.

I'm not sure how that is not being satisfied but without being able to debug it that is the only place I see where that could be missed. Once the poweredDown is set to true it should clear the bar graph.

it does look like I may have written the power down sequence after I stopped working on the bar graph code so I may never have tested the bargraph shutdown after the animation was complete.
Random question - Are there any other pins on the Arduino Nano that aren't being used? The reason I ask is I'm having a hell of a time getting the Relay to Work? I'm honestly not sure if it's the Pin or not, but the relay always stays on? I've tried changing the HIGH/LOW statements in the code, I've powered the relay from both the arduino as well as separate 5v power and nothing seems to work....I'm just wondering if something might be wrong with D13? Any ideas?
if it was working on the bench that usually indicates some sort of issue with the final soldering of the components. Just to be safe when I have gremlins like this I always hit each pin with a soldering iron to make sure good contact is being made. Could be a cold solder joint or something. It's highly unlikely just one pin on the arduino would fail. Usually when I fry arduinos it just won't boot at all.
Quick update.....I bypassed the buck converter and ran the arduino nano directly off the battery and then 5V power lead directly to the relay.....turned it on and the relay works flawlessly? No idea why it didn't like it's own power supply directly out of the buck from the battery? (and yes I checked the voltage from the buck...it was dialed in at 5.05 volts.)
So here's a question I thought I'd throw in: I'm in the process of building this setup for my Spirit pack and wanted to now that since the Digikey bar graph pieces you linked won't fit in the 83% wand, could I rig up 15 of these (https://www.digikey.com/products/en?mpa ... 573AD&v=67) and have the coding still work? Or would it need to be redone for those LEDs?
First things first, this thread is fantastic and I've really received an education here. It's really cool to see everyone pitching in, helping out, and of course Count, you deserve a medal.

I've dabbled in electronics before, but nothing this elaborate. I'm...struggling.

First of all, should the code work with only some of the components put together? I like to do things in sub-assemblies so that I can test as I go and trouble shoot. I know there was sample code for just the powercell and neo-pixels, but what if I'm using the powercell, jewels, and neo-pixels (for the vent feature)?

I'm also having trouble with the buck converters. I know it's me doing something wrong, but I can't seem to get any voltage reading. The highest reading I got was 0.01 volt, and that was with my variable DC converter turned up to 12 volts. I've watched several videos now, and as far as I can tell, I'm recreating them exactly, but I'm getting no reading. Any ideas?

Has anyone tried to add a rumble motor into this setup? I figure you'd have to go with a Mega to get the extra pin. Thoughts?

Thank you all so much for any help!
NotSabbat liked this
There are varying levels of code on the github site. All of the code can be used on a MEGA and I really would recommend it. I originally did the nano because I was going to put it in the wand but ran out of time and just stuck it in the pack. I would highly recommend anyone starting out now just use the mega as you can easily expand on it and the nano is down to one pin I think free.

https://github.com/CountDeMonet/Arduino ... itMinimial - This one is the bare minimum that I threw together for my spirit pack. Just powercell and cyclotron and meant to be a simple project for someone with little electronic experience.

https://github.com/CountDeMonet/Arduino ... trino_Wand - This is the one currently on my pack. Fully controllable with just the sound board and arduino and the base for the next two. You can start with this one and then move up to the next set of code to add the sx1509 later.

https://github.com/CountDeMonet/Arduino ... With_Graph - Adds in the sx-1509 for the bar graph. If using a mega though you could skip the 1509 if you wanted to. Would require a little code change to not use it and address the mega pins for the lights. One benefit though regardless of nano/mega using the 1509 is less wires having to go to the wand.

https://github.com/CountDeMonet/Arduino ... ECig_Relay - This is the big daddy with everything and the relay code for the ecig venting.

The first two will work with partial components connected. On the one with the audio board you will find the code runs slower if the audio board is not connected though. You can get around that by commenting out the contents of the play function until you have it added. The other two require the sx1509 to be connected or they will halt

Which buck converters are you using? Is it the one I recommend? If so there is a little pot on it that can adjust the voltage. Doesn't take much movement to do that adjustment so definitely test with a multi meter

Rumble motor could be implemented utilizing another relay to turn the motor on and off just like the ecig. You would want to figure out when you want it to rumble and turn it on and off with those features. If you wanted variable speed rumble you would need to add a motor controller which makes it more complex but still doable.
All the components I'm using I got directly from the shopping list you posted on Github.

I see where the pot is, and I was adjusting it, but I'm still barely getting a reading. I may post on some of the electronics groups on Facebook I'm on so they can tell me what I'm doing wrong.

I'll try those first two codes, that's a huge help.

I'm sure I'll be back soon with another slew of problems, but thank you!
  • 1
  • 16
  • 17
  • 18
  • 19
  • 20
Another pedal build

Awesome build!!!! Love the weathering!!

Replaced the front and rear grips with 3d printed […]

Hasbro Ghostbusters

Thanks for sorting out the code @Kingpin. The se[…]

Most of the original song has been dropped entirel[…]