# Four Channel Prop Controller Using Arduino (FourBanger)



## mikkojay

Hello All, I have been playing with some various Arduino projects over the last few months, so I thought it was time to share one with the community. This project is a four channel prop controller with MP3 sound that can be built by pretty much anyone for about $20 using readily available parts. Probably the most technical skill required is the ability to make about 20 solder joints for the required pin headers. The other skill involved is patience- to wait for the parts in the mail as they make that slow boat from China trip to your mailbox.

This project is called FourBanger for lack of a better name. It uses either an Arduino Nano or Mini Pro as its foundation. The example I use in the video below is the Nano. This would be a good choice for a beginner, as programming a Mini using a TTL converter could be a tutorial in and of itself. The main thing you want to look for in a Nano or Mini is that it uses an AT328p processor and is a 5v model (not 3.3v). The FourBanger has variable resolution which allows for shorter sequences of high resolution, or long sequences of low resolution. Here are the available resolutions in FPS (frames per second) and their corresponding maximum length:
25 FPS = 1:18
20 FPS = 1:38
10 FPS = 3:16
5 FPS = 6:32
The default is set to 20 FPS which allows for over a minute and a half of recording time.

I have compiled some parts into a sort of shopping list *HERE*.
The latest version of the software download can always be found *HERE*

This is the general idea as far as pin numbers go (Nano version):









This is the entire thing once wired looks something like this:








With Audio, PIR, Relays, and optional button programmer. The small form factor allows the entire thing to fit inside a small enclosure such as a Hammond 1591-G:








This is a screenshot of the Windows PC based programming interface:










There is a bunch more info on the website mentioned in the video. I am in the process of assembling some more documentation, but that is tedious stuff... I have a few more projects like this, so I am sort of testing the water with this one. If it works out and others find it useful, I will be happy to share more info.

This project was inspired by other great DIY controllers and commercial controllers such as:
Halstaff & Tstraub's picaxe controllers
Jason Tatum's MonsterShield
FrightProps PicoBoo, BooBox, and Director application
Monster Guts
etc...
I merely made my own flavor, using the parts I had available.

If you have any questions, please fire away.
Also, if anyone decides to take the plunge and sees any glaring holes in what instructions I have assembled, please tell me.

Thanks, Mike


----------



## jasonsbeer

Definitely interested here.

I will be following this project with great interest as I am in need of one or more prop controllers. The price point is great.

Thanks for sharing your hard work with us!


----------



## jasonsbeer

OK, first question.

The e-bay image of the Nano appears to show male headers already present. However, in your image it seems that you either removed the male headers or they did not come pre-soldered. Your image shows the male headers on the opposite side of the board from the e-bay image and also most are not present.

I don't see any male headers listed in the parts list.

Can you clarify the disposition of the male headers?

Thanks!


----------



## mikkojay

Hey Jason, Thanks for the kind feedback. If you watch the youtube video in the first post, there is a portion of it at the beginning dedicated to the pins and headers I used. I did only use a portion of the pins. I made the one in the pictures with the pins facing upward so that the bottom of the Arduino would be mostly flat. That would allow for the board to be adhered to the bottom of an enclosure with a few dobs of silicone.

Yes, these boards come with the headers not soldered. That allows you to hook it up however you like (male, female header, hardwired, etc). The 8 pin female header that I added was done at an angle because I thought it might be nice to have it sticking out of a slot in the side of an enclosure. That female header can be seen more in this video that I made about manually programming it:






I am just kind of playing with the designs at this point and have actually tried a number of header arrangements. I literally have a shoebox full of Arduinos, so the prototypes are starting to pile up. 
I'll try to mount the Nano from the pics above into a small enclosure sometime in the next few days & take a pic or two.

Thanks, Mike


----------



## jasonsbeer

Thanks for the reply. I guess I should have watched the video. I jumped right to the written documentation.

Fantastic stuff there.

Keep it coming!


----------



## DarkOne

MikkoJay,
I just want to say "Holy Crap!" I've been wanting to figure out something like this for a long time, because arduino clones are just so cheap. I picked up 10 arduino pro minis a while back on Ebay for $12 shipped! They came in at 3.3V though instead of 5V. But I've probably got 20 arduino boards in some shape or form.

I can't wait to build this. I still haven't been able to mess with the Catalex board to see if I could poll it and read that it was playing a file. I may be contacting you again when I can get back to it. I have had the board playing a file at my desk at work for over a month continuously. Very robust MP3 player, thanks for introducing me to them.

I've always thought Arduino boards have always been underrated for something like this, you're a great asset to the haunt and Arduino community. Thanks for sharing!


----------



## mikkojay

Hey thanks for the vote of confidence DarkOne! I totally agree about the Mini & Nano clones being perfect for these things. Cheap, tons of pins, 1k onboard eeprom, tons of tutorials and sample code, a huge following of people who can answer questions, and did I say cheap??? I just put a freshly tweaked copy of the PC APP out there tonight. If anyone wants to check it out, there is no reason you cannot run the app even if you do not have an Arduino. The app just needs a Windows PC with the .Net framework v 3.5 or greater. I'm looking forward to seeing people make some cool stuff!

Thanks, Mike


----------



## mikkojay

DarkOne said:


> I still haven't been able to mess with the Catalex board to see if I could poll it and read that it was playing a file.


One more little note about this- Since this little project just uses a background track and a scare track, I use the Catalex command that "loops a track" for the background track, then I use the "single play" command for the scare track. That way, the perpetual loop does not even need to poll to see whether or not the ambient file is playing. It just plays over and over.
-Mike


----------



## mikkojay

*Enclosure*

I snapped a few pics as I assembled this prototype into a Hammond 1591-G enclosure.









I used tacky glue and folded some thin packing foam under the relay module to keep the non-screwed side solid & flat.








The thicker red/black pigtail wires are to supply the relays with 12v if desired. 








Case closed. The blue PIR / Trigger terminal is affixed with Super Glue. It seems to be holding solid.








Mini-USB for programming via the PC or uploading custom firmware








The Hammond 1591-G turned out to be a perfect fit for this project. I hoard these boxes when I can get 'em for a smoking price.
-Mike


----------



## halstaff

That looks great!
I like that enclosure. Where do you get them and how much do they usually cost?


----------



## mikkojay

Thanks Halstaff! Here is a link to the seller I bought mine from. BUT please try this first- right now he has only individual boxes listed for 5.99. When I bought mine, I got them from the same vendor for 9.99 for 5x boxes. The shipping for 5 was $5.36 + $2 for each additional item. That way, you could buy 2 lots of 5 for less than $30, making the boxes less than $3 each shipped. Here is a link to the listing I bought from. I would message the seller and ask if they could make you that deal. It would definitely save a few bucks.
Thanks, Mike


----------



## HavenHaunt

This is great! Thanks for the details, and code.


----------



## jasonsbeer

I have been talking to Mikkojay about this project and some thoughts about how to use his controller for my electric chair project. He was kind enough to shoot me some parts for testing. Today I took some time to hook it up and test out some pre-set programming.

Everything worked very well. When I have some more time, I will program in my own sequence and report back. I have played with Mikkojay's program and the interface seems very intuitive and easy to use. Some quick video is below. The first sequence uses the button board from his video to activate the action. The second sequence uses an arcade-style button to activate the action. I quickly rigged up a light to test the second relay. You can hear the third relay clicking, but I don't have anything to connect to that at the moment.

Good job, Mikkojay, and thanks for sharing this project!






Stanley approves!


----------



## mikkojay

Looks good Jason- I can't wait to see how the custom programming goes. It looks like Stanley is in good hands!
-Mike


----------



## mikkojay

*Flyback Diode*

I ran into the need for a flyback diode when I connected a 12v solenoid to this controller for the first time, so I thought I would take a minute to explain the problem I encountered and what I did to correct it.

Problem: When running a sequence with nothing connected, the relays clicked away no problems. When I connected a 12v air solenoid to the number 1 relay (shared 12v with the microcontroller) I noticed that when the solenoid engaged for the first time everything worked- but when it went through the first on-to-off cycle, the microcontroller would reset.

What was happening: Since the solenoid is an inductive load (essentially a big coil), the on-to-off power cycle causes the electrical field to collapse over the coil, which in turn creates an induced power spike. I am not an engineer by far- so I will defer to the Wikipedia article 



.

Solution: I added a 1n4007 diode at the relay contacts, similar to "D" in this diagram:








Were it a more permanent wiring job, I would place the diode as close as possible to the solenoid. After adding the 2 cent 2n4007, things worked great and the reset problem was completely solved. Also, from what I read, using a diode across inductive loads in this fashion will prolong the life span of your relay contacts. I certainly looks like 2 cents well spent.

One last note, if I had used a separate adapter for the solenoid, added more power filtration between the adapter and the microcontroller, or used an A/C solenoid, I would likely have not had this issue. I just like the convenience of being able to run 12v solenoids and the microcontroller from a single adapter to keep the parts count down.

I just thought I would throw this out as a consideration if anyone ever encounters these symptoms.

Thanks, Mike


----------



## jasonsbeer

I had a chance to program the controller with my own sequence and everything went fine. I was able to upload to the arduino with the provided software without issue.

New video of the test of my sequence. Again, just using two of the relays for now.


----------



## mikkojay

Cool man- that light flickering out reminds me of the movies when the juice to the chair is such a draw that the lights in the building go dim for a second. You know the old fixtures with a tin shade and a cage around the bulb?


----------



## DarkOne

How involved is it to add channels to this to make it an 8 or 12 or 16 or....banger?


----------



## mikkojay

DarkOne said:


> How involved is it to add channels to this to make it an 8 or 12 or 16 or....banger?


As it sets, this particular project just did the 4 because I wanted to be able to manually program with a button board. The drawback to that is that it hogs up pins. I have another version that does 8 TTL pins and 4 PWM pins & uses I2C eeproms for added sequence storage. That project is still under construction though.

I added the source code for the this Arduino sketch in the zip file I linked to, so really that could be copied and turned into whatever someone could dream up. You could also use 2 or more of these i/o expanders for about $4.50 each. You could add them as needed, up to a max of 8 modules (64 total pins).

Like others before, the TTL outputs in this project use 1 bit per recorded "state", and there are 8 bits in a byte. The next thing would be to figure out how you want to store all those state data bytes, and how you plan to organize them into a useable sequence. The more outputs you have, the more state data you need to store, sequence and choreograph.

I looked through my parts pile and did remember that I had a couple of these. They are 16 bit i2c expanders. You have me thinking that adding support for these in the next project would be worthwhile  I would likely do it in a modular fashion, so that they could be added in 8 or 16 bit modules with a configurable address. I'll have to add that to the queue, after I get done playing with the DMX output...

-Mike


----------



## Palmdale Haunter

I'm so doing this!


----------



## mikkojay

*Triggering Information*

Hello All, I have had a few people ask questions about triggering so I put together some additional documentation regarding that topic HERE. If you are going to attempt this project, reading and understanding this document will be very beneficial (if not crucial) for your success.

It mainly has to do with configuring the controller to expect a High or a Low TTL value as a trigger. 
The document I linked to above goes into much more detail regarding the difference between the settings.









I have attempted to make the triggering options flexible, so with that there are configuration options that must be understood and set correctly. If anyone has any suggestions on how to make various triggering options easier to configure, I would be happy to discuss & modify this project with what everyone thinks is the best approach.

Thanks, Mike


----------



## BillyVanpire

this is great work mikkojay, from sourcing all the parts/pics/links to explaining it all clearly..job well done, thanks for sharing!


----------



## mkozik1

Agreed! Can't wait to put one together myself .. Just so happens I have a few Arduino's laying around looking to be used!!!


----------



## mikkojay

^^^ Hey thanks for the encouragement guys! A little thanks goes a long way 

I added a hex file to the deployment package compiled specifically for the UNO, just in case it is different from the previous Nano compilation. There is a \hex subfolder in the zip package that contains a few different hex files. You basically just pick the firmware that matches your Arduino from the dropdown list and upload that one.
If someone has a different board than a mini/nano 5v 328 or UNO, they can also compile the sketch themselves choosing their own hardware as the target platform.
I can add more hex files later if anyone needs something else.

One important thing is to use an Arduino with the 1k onboard eeprom. If you aren't sure, here is a comparison matrix. Since the Nano 328 is about $3 and works like a champ, I have a tough time figuring out why not to use them- unless you had something different laying around already.

Thanks, Mike


----------



## Palmdale Haunter

The Arduino Uno arrived today...
Perhaps I can get this breadboarded up and the code loaded!
I can't wait it is exactly what I was intending to do this spring!


----------



## scubaspook

This is a great project and having the ability to change trigger delay, trigger hi/low, and adjusting the record lock and not having to recode is awesome. The other great feature is the price. I am so happy that there are some talented people here on Hauntforum that are willing to share their hard work. I looked at the code that mikkojay wrote and that was a lot work. While I know some electronics when it comes to coding I am totally clueless. Just want to say thanks for your hard work mikkojay. Can't wait to show off what this controller will be operating. USPS keeps delaying my packages but in time I will post a vid of this controller in action.


----------



## z0mbie st0mp

This is super awesome, i'm an arduino newb and love this project!


----------



## Palmdale Haunter

Hey Mike, I can't get the code to load on my Uno...
It fails to compile saying the softwareserial can't be found...
The library does exist when I check it... Ideas?


----------



## mikkojay

You can read about it here:
http://www.arduino.cc/en/Reference/SoftwareSerial If you want to compile yourself, you just need to download this lib and place in your install directory under the \libraries subfolder.
There should be a hex file precompiled for the UNO, all you should have to do is select it and upload it. It sounds like you are trying to compile it yourself though- which is cool.
I compile from MS Visual Studio using a plugin called Visual Micro http://www.visualmicro.com/ so that is how the Arduino source files are arranged. If you want to compile using the Arduino IDE, there may be some slight adjustments required to the reference paths, etc..
Since you have the Arduino source, I assume you downloaded the whole zip package. Can you try uploading the UNO hex file to see if it works? I gave away my UNO to a friend at work so I cannot try it myself.
-Mike


----------



## mikkojay

If you watch this video from about 7:30 to about 9:30 it shows how I upload a precompiled hex file. 




You should be able to select the hex file named FourBanger_uno.hex and upload that one.
Let me know how it goes.
Thanks, Mike


----------



## mikkojay

Palmdale Haunter said:


> Hey Mike, I can't get the code to load on my Uno...
> It fails to compile saying the softwareserial can't be found...
> The library does exist when I check it... Ideas?


Oh man, hold the phone- I just dug into the code and realized that the SoftwareSerial reference is not even needed! You should just be able to comment it out. I have multiple projects going on, with multiple iterations of each- that reference was a holdover that changed at some point.
I commented it out and updated the version in the download link.
Sorry for the confusion!
Thanks, Mike


----------



## MBrennan

Mike, thanks for sharing all of your hard work here! You have inspired me to take the Arduino plunge!

I've been wanting to try my hand at micro-controllers and trigger-able props for some time now - I even purchased a picaxe board to play with - but got completely intimidated by the coding and techie stuff.

After reading through this thread, I decided NOW is the time for an old dog to learn a new trick! Now waiting for the slow boat to arrive.

Thanks again!


----------



## IMU

*OK, time to give this a try!*

I found your video on youtube today researching "cheap prop controllers". I've talked for years about wanting to up my prop building game. THIS project looks like something I can actually do that doesn't scare the crap out of me! Thank you so much for posting this and all the hard work that went into this project.

I hope you don't mind mikkojay if I shoot you a PM if I run into any issues?

Gonna get the parts list together and place my orders for the parts soon.


----------



## mikkojay

Hey Capt'n, that sounds great- let me know how it goes. I encourage all questions and feedback. A few of the beta pioneers have already helped me shake out a few tweaks so far, so that works out great for everyone. 

Thanks, Mike


----------



## Jaybo

I just ordered all the parts to build this today. Now to wait for the slow boat from China. I had a question about the relays. They always make loud annoying clicking sounds while operating, so are Solid State Relays quieter and could I use them instead?


----------



## JeffHaas

You can use solid state relays instead, there are some boards out there that are the equivalent of the one you ordered, just search for "SSR Arduino". However there are some types of things that don't work as well as with standard relays, because there is a tiny bit of current "bleed" across a solid state relay. For example, I found that LED spotlights didn't turn all the way off. There is a way to add a small light across the relay, or another part, but I didn't have time to figure that out so in my situation I just swapped out the SSRs for standard relays.

Google "SSR bleed" to find other people discussing this. It may not matter for some stuff but if you run into it you'll know why and how to fix it.


----------



## mikkojay

You can also take some of that foam wrap that a lot of Chinese parts come packed in and encapsulate the relays in a box of their own. I crank up the audio to help drown out the noise too. I do use ssr's like Jeff mentioned, it just depends on the application.
_Mike


----------



## JeffHaas

The other thing to remember is that usually there is SO much noise that a little clicking from the relays is never heard!

On the other hand, SSRs are great for some stuff - especially flickering light effects.


----------



## Jaybo

Thanks for the info guys. I think I will get both and just play around and see what works best for my scenes. I considered sound proofing the box the relays will be located inside of and also running longer wires from the relays. That way I can move the relays farther away from the scene. I'll just have to be patient and what until I actually have the controller built. Patience is NOT one of my virtues.


----------



## jabberwocky

Hi everyone.
Quick, but might be a stupid question.
Can this be done without a laptop or pc?
Can it be done with an iPad?
At this time, I have no access to a pc or laptop.
Thanks a lot,
Robert


----------



## mikkojay

The app that I wrote to program this controller requires a Windows pc or a Mac with vmware to run.


----------



## BillyVanpire

jabberwocky said:


> Hi everyone.
> Quick, but might be a stupid question.
> Can this be done without a laptop or pc?
> Can it be done with an iPad?
> At this time, I have no access to a pc or laptop.
> Thanks a lot,
> Robert





mikkojay said:


> The app that I wrote to program this controller requires a Windows pc or a Mac with vmware to run.


if you order the tv button board you can program it manually, is that correct mikkojay?


----------



## Jaybo

You would still have to load the initial sketch onto the Arduino, then you could use the buttons to program. See if you can borrow someone's PC to do the initial load, then you could just use the buttons.


----------



## mikkojay

Jaybo said:


> You would still have to load the initial sketch onto the Arduino, then you could use the buttons to program. See if you can borrow someone's PC to do the initial load, then you could just use the buttons.


Beat me to it, that is exactly correct 
With a mini usb and the utility app, you could upload the precompiled hex file in a matter of minutes. You could maybe use a PC at a public library if the security wasn't locked down to tight. You might get some funny looks from the old lady at the desk though 

Programming with a button board absolutely works, but after seeing how easy it is to do it via the PC, it is tough to go back to the manual way of doing things.
-Mike


----------



## jabberwocky

Thanks for the info.
I most likely will be using the buttons for final programming.
I like doing the "scene" in real-time.

I'd just like to throw this out there...
Would anyone be wiling to do the initial setup for me if I'm unable to find an alternative?


----------



## mikkojay

Are you planning on using audio? You would also need a pc to copy files to an SD card. I cannot imagine not having a pc, I have no less than 6 now but I am a total geek


----------



## Palmdale Haunter

So I downloaded the new version and I still can't get it to load on my Uno...
I like to think I'm not too stupid but I can not figure out why this will not work...


----------



## mikkojay

"I can't get it to load" doesn't give much to work with. Do you have any more detail? Any messages? Are you using a Windows PC? Did you select the FourBanger_uno.hex firmware to upload? Using an UNO is an unproven experiment as I chose the Nano as the primary supported platform. I would just fork out the $3 with free shipping for a Nano and call it good. Here is *one on sale* for $2.59 shipped. That might save some headaches. I gave my UNO away to a coworker after I had bought my first shoebox full of minis and nanos.

Or, you could always take the source code and compile it yourself in the Arduino IDE and upload it to your UNO.

Hope you get it going!
-Mike


----------



## mikkojay

One other reason I like the mini/nano is the small footprint. I just cobbled together a host board for the nano that will make things tidy & assembly easier. The dimensions of this are 1.95" x 1.95":








The 7805 and caps would technically be optional, same with the optocoupler, but I added them since the parts are cheap.
One other change to this one will be the pinout to the button board. I made this board so that the cable can be plugged straight in without having to rearrange any of the wires. I found a bunch of the 2.0mm headers that match the button board cable, so those should work slick. It will be nice to just be able to plug them in as-is & not have to dink with adding resistors to the led traces.

I sent this off to a China board maker last night, so now I am waiting on that old slow boat again  Once I get this board and it tests out OK, I will put the eagle files out there. I will also make a corresponding hex build that uses the board's modified pinout.
-Mike


----------



## BJS

*Great work. Thank you for sharing all of your hard work.*

I'm new to arduino and know very little about programming. I'm more of a hardware guy. I have built a few of these and love them. It looks like your making it better and better. Is there any chance you were looking into adding servo control. I have ben looking into adding an audio to servo controller for a skull I have in a scene but a push button for open and close would be perfect.
Thanks again for sharing this with the rest of us.


----------



## mikkojay

BJS said:


> Is there any chance you were looking into adding servo control.


Hey there- glad to hear that you have had some success with all this! Yes, I have experimented with an expanded version of this that supported 4 additional PWM/Servo outputs. I made that one use the i-o pins from the manual programmer as outputs, so as a tradeoff for not being to manually program, it has a total of 8 TTL outputs. I used an at24c512 eeprom to provide 64 times the memory storage for about $1. I won't go into a ton of detail since the design is still a little bit up in the air.

One thing that I have noticed while adding on multiple libraries and outputs to one sketch. I made one with i2c eeprom memory, TTL out, serial audio out, PWM/Servo out, and DMX out. I wanted it to do everything, but saw some issues when trying to use too many libraries that used the same timers and interrupts simultaneously. Arduinos are great for doing one or two things great but once you start asking too much of them, odd conflicts can/will happen. Its like the old cliche of 10lbs of "stuff" in a 5lb sack.

Anyway, if the spin off project goes anywhere, I'll be sure to document it in some form.
--Mike


----------



## Palmdale Haunter

Hi Mike, of course how silly...
It is exactly where we left off before.
The app will not load the code and the Arduino IDE will not either.
It bombs on the miniaudio.h


I don't see it in your package and can't find it with google.
So, I can't install that library and it fails trying to upload either way.
Is it a library you created? 

I would love to try to standardize to the uno.
I know that sounds goofy but I like the larger footprint solder less assembly potential.
I plan to do some other thing with them as well...


----------



## mikkojay

OK, cool- let's figure this puzzle out!
You should have seen the miniaudio.h file in the same folder as the ino file, but regardless of that I have isolated the ino sketch file and the miniaudio.h file into their own stand-alone folder and placed a copy *HERE*.

This is what the contents of the folder looks like- I just tested compiling it with my version of the Arduino IDE (1.05.r2)









Please download the trimmed-down sketch source and give it a go.
If the compile throws you an error, please try to give a screenshot.
Let me know how it goes!
Thanks, Mike


----------



## jabberwocky

Hi again.
Got enough parts comin to make 3 setups.
Couple more questions.
Could you post a photo of the diode attached?
A visual really helps.
Also, are the relays capable of passing 110v across the coil?
Again, thank you.


----------



## Palmdale Haunter

Thanks Mike, I will give it ago.


----------



## mikkojay

Hey PH, I couldn't help myself and bought a cheapie ($6) UNO clone off ebay in order to test what was going on with the uploader.
Here is what was going on: It turns out that the serial baud rate for uploading to a nano is different from that of the uno. I'll spare everyone the details, but long story short, it is now working fine with uno or nano as long as they have the 328p processor.

Another nice thing I realized is that the same hex file works for both, so I don't need to recompile multiple copies for the different boards. There is one new option to look for while uploading a hex file, and that is the radio button here:









It defaults to nano, but if using an uno, just select that one and proceed.
I also decided to capture the output info and display it. This was just a feel-good measure to be doubly sure that the upload process worked ok.









What was nice about the uno was that since it already comes with the female headers, I was able to just use male-to-female jumpers to connect the relay module. This meant that I had it hooked up in less time than it takes to toast a bagel









I updated the download package with this change and a couple other beneficial tweaks. It can be found in the usual *DOWNLOAD *location

Check it out!
Thanks, Mike


----------



## IMU

All the parts I ordered are in already (surprised since they all said July 30th delivery date). I missed a few small things and I'm having issues finding one of these:










Since I don't know what it's called, every search I do results in not finding it online.  Anyone know what this part is "officially" called so I can order one? The power supply I ordered is the exact one that was called out in the parts list.

As for how it's going, I managed to connect (I believe) all the small wires to the correct pins (maybe) so I have to do some soldering and then testing.


----------



## halstaff

IMU said:


> All the parts I ordered are in already (surprised since they all said July 30th delivery date). I missed a few small things and I'm having issues finding one of these:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Since I don't know what it's called, every search I do results in not finding it online.  Anyone know what this part is "officially" called so I can order one? The power supply I ordered is the exact one that was called out in the parts list.
> 
> As for how it's going, I managed to connect (I believe) all the small wires to the correct pins (maybe) so I have to do some soldering and then testing.


They are called DC Power Female Jack Connectors like these - http://tinyurl.com/o89rur4
These are the ones I use to fit my power supplies but make sure to get ones that fit yours.


----------



## IMU

Thanks halstaff. I'll check and see if they match the power supply I bought before ordering.


----------



## mikkojay

IMU, do you also know that a nano (if that is what you ordered) can be powered by the USB cable? You can begin experimenting with this immediately if you just have a nano, USB cable, Dupont connector wires, and a relay module (and soldering equipment of course). I do 90% of my testing with the nano powered from the USB cable. You will want to use the "real" power supply for real-world purposes, of course.
-Mike


----------



## jabberwocky

Any pics of the diode installed that you had to use for the relays?
A visual really helps.


----------



## mikkojay

Sorry, not at this point in time. I sent that setup to another member. There is a diagram in this *document *on page 7 that shows it. How you are using the relays, and what you have them hooked up to, and what voltage source you are using, and what wire you are switching with the relay determine:
a) whether you even need a diode
b) how it would be oriented
Merely taking a picture of a diode on a relay would not tell the whole story, and would actually do more harm than good.

If you are switching 110 AC you do not need a diode
If you are switching a non-inductive load you do not need a diode
If you are switching external DC power (not the same power running the nano), you do not need a diode

So, the only circumstance that I have found where I needed a diode is when I switched an inductive load with the same 12vDC that was powering the nano. For future setups I will add the diode on the solenoid itself. Most documentation I have read says to place the diode closest to the load. If I get a chance to put one together this weekend I will take some pics for sure. I will be pretty busy in the next 2 days

Thanks, Mike


----------



## IMU

mikkojay said:


> IMU, do you also know that a nano (if that is what you ordered) can be powered by the USB cable? You can begin experimenting with this immediately if you just have a nano, USB cable, Dupont connector wires, and a relay module (and soldering equipment of course). I do 90% of my testing with the nano powered from the USB cable. You will want to use the "real" power supply for real-world purposes, of course.
> -Mike


I looked through my box-o-junk and found an old wall wart for a phone I no longer own. It fits the nano so I could use that for power. It's 5v as well. I don't have my soldering station, solder or those helping hands so I can't do that part yet. I guess I could load the program on the chip and see how that goes.


----------



## jabberwocky

mikkojay said:


> Sorry, not at this point in time. I sent that setup to another member. There is a diagram in this *document *on page 7 that shows it. How you are using the relays, and what you have them hooked up to, and what voltage source you are using, and what wire you are switching with the relay determine:
> a) whether you even need a diode
> b) how it would be oriented
> Merely taking a picture of a diode on a relay would not tell the whole story, and would actually do more harm than good.
> 
> If you are switching 110 AC you do not need a diode
> If you are switching a non-inductive load you do not need a diode
> If you are switching external DC power (not the same power running the nano), you do not need a diode
> 
> So, the only circumstance that I have found where I needed a diode is when I switched an inductive load with the same 12vDC that was powering the nano. For future setups I will add the diode on the solenoid itself. Most documentation I have read says to place the diode closest to the load. If I get a chance to put one together this weekend I will take some pics for sure. I will be pretty busy in the next 2 days
> 
> Thanks, Mike


Thanks for that explanation.
Based off that, I will not need the diode then.


----------



## Palmdale Haunter

Hey Mike,
The code loaded for me!
Now I can't get anything to work...
It is likely my bread boarding has gone awry...

I need to test some things out with my equipment.
Update coming soon..


----------



## IMU

Palmdale Haunter I loaded the software and was able to get mine to work today. Hopefully you can figure out what might be wrong. I still have some parts coming as well to finish up mine. I can tell mine will work when I get the last few wires soldered together. Good luck!


----------



## Erebus

Jaybo, nice to see you doing this as well. I ordered enough parts for 5 of these, have almost everything in except a few extra parts I'm adding in. I ordered a wireless remote setup and need to wait for that to come in to see how big the receivers are so I can fit everything into the box. The wireless receivers run off 12v so I bought 12v power adapters and a voltage regulator board to run everything off 1 adapter. I'll post some pictures once I have everything and start working on it.


----------



## Jaybo

I just ordered enough to build one, and now have everything except the PIR. I wanted to get my feet wet before ordering tons of parts. After twiddling my thumbs waiting on the slow boat from China, I'm wishing I would have went ahead and ordered more parts.

I got the software loaded and working on the Nano tonight. Sidenote, 64 bit Windows 8.1 and Arduino's are a pain. The Arduino software does not come with the proper drivers. I had to download drivers from a 3rd party to get it to work. It's late and I don't remember where I got the drivers, but if anyone else needs them let me know. I'll look it up again.


----------



## Palmdale Haunter

Hey Mike! It works!
Code loads and the sequence...
The hardware was an issue with switches...
Thanks for the Uno tweaking.
I think it is an easier platform to use.


----------



## mikkojay

Awesome! Yes, I originally wrote the uno off because the nano was smaller and a little cheaper, but after trying one out, I can absolutely see it as a viable alternative. Make a killer prop and let us know how it goes!
-Mike


----------



## IMU

*Got mine working*

OK, my first time ever using a soldering iron and I managed to get everything working! I still have the wall wart plug to add but for now I'm using an old cell phone charger for power.






Thanks again for all the help and for this tutorial Mike. Now I have all the electrical stuff to work on for the relays to turn on and off.


----------



## mikkojay

That's great! Looking forward to seeing more videos!
Thanks for the update!
-Mike


----------



## heresjohnny

This thing is so calling my name.


----------



## mikkojay

*More Channels?*

I have been asked about expanding this project to provide 8 or more outputs. I have another project on the back burner that will do such a thing, but at this time I have decided to keep this project simple. Without going into too much detail, the easiest way to put it is that 8 outputs will require 2x the memory space. This would mean that without adding more memory, the current 20fps duration of 1 minute 38 seconds would be cut in half to just 49 seconds.

To keep things simple, here is the Easter Egg I added into the most recent firmware: I added a momentary output pulse that goes to one of the unused pins (D12) when a scare sequence is triggered. What that means is that when nano #1 detects a trigger, it sends an output signal that will automatically trigger nano #2 to run its sequence simultaneously. This will allow multiple four bangers to be easily daisy-chained together. My initial experiments were very successful with it. You just set the "slave" up to have the Trigger Low Idle = false. Then you wire the trigger out pin (12) of the main controller to the trigger in pin (11) of your slave controller. This allows you to add 4 more channels at the cost of a nano clone, or about $3. Want 12, 16,&#8230; channels? buy another nano! ***be sure to not have them daisy-chained while programming***

If using a step pad or button input, it might be possible merely tie the trigger inputs of two nanos together. The approach described above is more geared towards PIR sensors on the input of nano #1 and keeps the inputs electrically isolated from each other.

Hopefully this workaround will provide folks who want extra channels a cheap and easy solution ($3 for 4 more outputs). The manner in which you program the 2 nanos would vary depending on whether you are manually button banging or you are using the PC application, but either way would be pretty easy (no different than programming a single).

I will continue to refine the more exotic spin-off of this project as well, but getting that one to a point where I am satisfied with its features/usability could take a little while.

If anyone would like me to expand on any other details of this little extra feature, please feel free to ask.

Thanks, Mike


----------



## IMU

Would that update be able to trigger something like a micro maestro servo controller board? I have no idea how any of that works so I'm just throwing it out there.


----------



## mikkojay

IMU said:


> Would that update be able to trigger something like a micro maestro servo controller board? I have no idea how any of that works so I'm just throwing it out there.


Not too familiar with that one- I would need to research it. The signal is a normally high TTL signal that is forced low for .1 seconds to provide a triggering pulse.
-Mike


----------



## MBrennan

Getting ready to start putting this together, and in reading through the documents, I came across this...

"The LED on the button board should have 1k resistors in series. I found that cut traces with surface mount resistors on the back of the board worked really slick."

I couldn't see the resistors placement on any of the videos. Do you have any pics or could you describe how you did it?


----------



## Jaybo

I got a testbed up and running the other night. Still waiting on my PIR to arrive, but I'm thinking I might just build a mat trigger instead. Loving this little thing!

mikkojay, have you put in any thought about building a controller that could handle more than one scare sequence? That way you could have the prop run different scares based on a playlist or random sequence?


----------



## mikkojay

MBrennan said:


> Getting ready to start putting this together, and in reading through the documents, I came across this...
> 
> "The LED on the button board should have 1k resistors in series. I found that cut traces with surface mount resistors on the back of the board worked really slick."
> 
> I couldn't see the resistors placement on any of the videos. Do you have any pics or could you describe how you did it?


Good question- here is some more info:









I found some of these little adapter PCB's to convert the cable to the same pin spacing as the pins on the Arduino nano. They were super cheap but the shipping from China took FOREVER. 








The hassle of the adapter above is part of what drove me to design a little host board for these. The host board would solve these issues:
1) No need to hack the button board & add resistors (they are on the host)
2) No need to rearrange any wires on the button board cable (host traces rearranged to match cable as-is)
3) Host board has a 2.0mm pin spacing so no adapter needed









Let me know if you have any other questions- good luck with your project!
-Mike


----------



## mikkojay

Jaybo said:


> mikkojay, have you put in any thought about building a controller that could handle more than one scare sequence? That way you could have the prop run different scares based on a playlist or random sequence?


Hey Jaybo, glad to hear things are working out! Yes, I have a spin-off project that can support multiple sequences. It also has 2 trigger inputs so you can trigger 2 different lists of scare sequences. The code complexity is about 3x what this project entails (both on the Arduino and the PC app side). The hardware arrangement is also a bit more complex, since additional external memory is required.

I have actually been using this simpler project as somewhat of a measuring stick to see how well a project > in complexity might be digested by others. At the same time it is also a test of my documentation methods, to see if difficulties encountered by DIY assemblers are the result of gaps in my tutorials or gaps in the teeth of those attempting assembly  I must say that I am impressed by the work I have seen by others so far. I am also glad to see people digging in and trying things like this for the first time. ** The success videos like yours are also like Christmas in July for me- it makes the efforts on my part feel more worthwhile when I see people getting excited about microprocessors.

Once the dust settles on this project I will either dive into the project mentioned above or my 3 axis skull stuff. I will likely get back into the skull project first though, because it is already well underway:









Thanks, Mike


----------



## MBrennan

mikkojay said:


> Good question- here is some more info:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I found some of these little adapter PCB's to convert the cable to the same pin spacing as the pins on the Arduino nano. They were super cheap but the shipping from China took FOREVER.
> 
> 
> 
> 
> 
> 
> 
> 
> The hassle of the adapter above is part of what drove me to design a little host board for these. The host board would solve these issues:
> 1) No need to hack the button board & add resistors (they are on the host)
> 2) No need to rearrange any wires on the button board cable (host traces rearranged to match cable as-is)
> 3) Host board has a 2.0mm pin spacing so no adapter needed
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Let me know if you have any other questions- good luck with your project!
> -Mike


Thanks Mike, that's exactly what I was looking for.


----------



## jasonsbeer

mikkojay said:


> I ran into the need for a flyback diode when I connected a 12v solenoid to this controller for the first time, so I thought I would take a minute to explain the problem I encountered and what I did to correct it.
> 
> Problem: When running a sequence with nothing connected, the relays clicked away no problems. When I connected a 12v air solenoid to the number 1 relay (shared 12v with the microcontroller) I noticed that when the solenoid engaged for the first time everything worked- but when it went through the first on-to-off cycle, the microcontroller would reset.
> 
> What was happening: Since the solenoid is an inductive load (essentially a big coil), the on-to-off power cycle causes the electrical field to collapse over the coil, which in turn creates an induced power spike. I am not an engineer by far- so I will defer to the Wikipedia article Flyback diode - Wikipedia, the free encyclopedia.
> 
> Solution: I added a 1n4007 diode at the relay contacts, similar to "D" in this diagram:
> 
> 
> 
> 
> 
> 
> 
> 
> Were it a more permanent wiring job, I would place the diode as close as possible to the solenoid. After adding the 2 cent 2n4007, things worked great and the reset problem was completely solved. Also, from what I read, using a diode across inductive loads in this fashion will prolong the life span of your relay contacts. I certainly looks like 2 cents well spent.
> 
> One last note, if I had used a separate adapter for the solenoid, added more power filtration between the adapter and the microcontroller, or used an A/C solenoid, I would likely have not had this issue. I just like the convenience of being able to run 12v solenoids and the microcontroller from a single adapter to keep the parts count down.
> 
> I just thought I would throw this out as a consideration if anyone ever encounters these symptoms.
> 
> Thanks, Mike





mikkojay said:


> Sorry, not at this point in time. I sent that setup to another member. There is a diagram in this *document *on page 7 that shows it. How you are using the relays, and what you have them hooked up to, and what voltage source you are using, and what wire you are switching with the relay determine:
> a) whether you even need a diode
> b) how it would be oriented
> Merely taking a picture of a diode on a relay would not tell the whole story, and would actually do more harm than good.
> 
> If you are switching 110 AC you do not need a diode
> If you are switching a non-inductive load you do not need a diode
> If you are switching external DC power (not the same power running the nano), you do not need a diode
> 
> So, the only circumstance that I have found where I needed a diode is when I switched an inductive load with the same 12vDC that was powering the nano. For future setups I will add the diode on the solenoid itself. Most documentation I have read says to place the diode closest to the load. If I get a chance to put one together this weekend I will take some pics for sure. I will be pretty busy in the next 2 days
> 
> Thanks, Mike


I confess to being the one in possesion of Mike's test unit. I see the requested picture was no longer needed, but I thought I would throw it up here just in case. You can see the banded side of the diode is tied to red wire (+12v) and one lead of the solenoid. The other end of the diode is tied to the ground side of the solenoid.










I'm still lurking! This is a fun thread.


----------



## jabberwocky

Now when you say the PIR has to stay plugged in, you mean?
At all times, meaning?
During programming, setup, storage?


----------



## mikkojay

If you set it up for pir triggering then that means it will be looking for a high signal to trigger on. That means that a disconnected pir will be seen as a high, and it will likely try to keep triggering continuously.


----------



## jabberwocky

Ok, but it won't damage anything?
I ask, because I've received everything but my pir's and would like to move forward with the project.
Thanks.


----------



## mikkojay

Not at all. You will be fine. I would suggest getting the latest software download from my website. The default will be set up for button input, not pir. Fear not, you will be fine.


----------



## IMU

*1st Issue*

OK, so my plug adapters finally showed up so I finished the controller. I soldered the connector to the board and figured I was done. I plugged in the wall wart and the red light came on the Arduino but the MP3 board did not come on. I got no sound the PIR did not respond either. I desoldered the connector and tried again. Got the same result.

I tried another wall wart I had and plugged that into my setup. Everything came on, it triggered but then stopped after about 10 seconds. I figured that was because its not 1A but 500mA. I plugged the phone charged into the Arduino and everything works like before.

So, do I need to order a new wall wart from someone else or should I just give up for now and keep using the phone charger? These are the "little" things that keep me from wanting to go further with these types of projects.


----------



## mikkojay

Without being physically there too look, it is tough to speculate. Do you have items being powered by the relays? Also, 500ma should be plenty to run an arduino, relay module, and mp3 module. I personally use 12vdc 1a adapters in most cases


----------



## IMU

I went back through your instructions and noticed I missed a comment: "If using regulated 5v, attach to the Arduino's vcc. If using 9-12vdc, apply to the vin pin." I have a 5v 1A not a 12v 1A so I'm guessing that is my problem.

On the bottom of the Arduino I have the red wire soldered to the VIN and the black wire to the GND. My board doesn't have a VCC but it does have a 5V next to the RST. Would moving the red wire to the 5V be what the issue is or am I still lost?



mikkojay said:


> Without being physically there too look, it is tough to speculate. Do you have items being powered by the relays? Also, 500ma should be plenty to run an arduino, relay module, and mp3 module. I personally use 12vdc 1a adapters in most cases


----------



## mikkojay

Yes the 5v pin is what I meant by vcc. As long as the adapter outputs vdc, it should work hooking it up to the 5v pin.


----------



## IMU

Well, that didn't work either. If I try and power the Arduino with anything other than the phone charger, it doesn't work. Since I have the wall wart plug soldered to the 5V pin I won't try the 12V wall wart.

I can only guess it's the wall wart I bought for this project. I'm to frustrated to keep messing with this now. I know it works but not with the same setup you show in your video or the drawings. I guess I should have gotten the 12V 1A wall wart.


----------



## mikkojay

Yes, a break is sometimes the best medicine. Speaking of power adapters, I have found that thrift stores are often a great source for them. They look at me funny when I plop an armload of them down at the checkout register, but hey, for .99 each I will stock up.

Speaking of breaks, I have the project page offline currently while I work out a couple of kinks with this project that are bugging me regarding the way different types of PIR trigger inputs are handled. The thing I am sorting out right now is the way that the controller looks to see if it thinks that a trigger is "stuck" at power up. Right now if this happens, the controller goes into an error condition and cannot even be updated from the PC with a new configuration. I would rather modify this to make the controller "untriggerable" in this condition, but also allow for a new configuration to be sent from the PC app. Since this will require an update to the Arduino code and the PC app, I have the page down until I can get the updated pair packaged together along with some documentation that explains all the potential scenarios.

Thanks, Mike


----------



## GPSaxophone

The picture links in the first post are broken and the website displays an out to lunch message. That's a little odd since this thread was only started in April. Does anyone have the full info laying around?


----------



## mikkojay

Look one post up from yours. Yes this started about 4 months ago and to date about 5 people seem to have tried it, so I didn't think there would be anyone that would care while it was down for refinements.


----------



## GPSaxophone

I guess it would help to read all the way to the end. I was excited by what I saw in the beginning and jumped around trying to find out more information. I was able to order some of the items (nanos, mp3 boards) based on the videos and early comments. Hopefully you'll have the site back up by the time everything arrives on the slow boat. Looking forward to getting more props animated this year!


----------



## IMU

Well Mike, I gave it another go and I'm closer to getting the separate power supply working. I resoldered it to the 12V pins and with a 3rd power supply I had it came on and everything worked. Then after about the 3rd trigger it stopped. I reused the phone charger plug and it worked well past the 3rd trigger. Do you think the Arduino saves a bit of power from the phone charger and after a time, it can't keep/store the power? Just a random thought.

I don't have any 12V 1A wall warts ... every one I have is a 12V 500mA. I gave up on the 5V 1A wall wart ... I guess it isn't really what's on the label. I'll have to find/buy one and try it with a 1A.

Good luck with the mods and updates ... it is a great little controller ... even if I can't figure out my issue. Looking forward to the new and improved software.


----------



## mikkojay

IMU, do you have solenoids or something hooked up to the same adapter you are powering the nano from? If so, you may be running into the need for fly back diodes mentioned in previous posts. You can also bypass that need by powering your relay switched loads from their own adapter. This is another thing that I need to document in further detail.


----------



## mikkojay

GPSaxophone said:


> I guess it would help to read all the way to the end. I was excited by what I saw in the beginning and jumped around trying to find out more information. I was able to order some of the items (nanos, mp3 boards) based on the videos and early comments. Hopefully you'll have the site back up by the time everything arrives on the slow boat. Looking forward to getting more props animated this year!


The changes should not be too huge, but may be significant enough that they might make parts of the old video and docs obsolete. I will be working on it over the next week or two and will update as progress is made. 
Thanks,Mike


----------



## IMU

I don't have anything but the controller powered by the wall wart. I plan to build a small box for the 4 receptacles for power that the relays will turn on and off.

I know it won't help, but here is my setup.




























I believe everything is basically the same except the 12V power supply and the PIR isn't exactly like the one in the video (mine doesn't have the jumper). I don't think that would matter since it works with the phone charger.



mikkojay said:


> IMU, do you have solenoids or something hooked up to the same adapter you are powering the nano from? If so, you may be running into the need for fly back diodes mentioned in previous posts. You can also bypass that need by powering your relay switched loads from their own adapter. This is another thing that I need to document in further detail.


----------



## mikkojay

Here is a long shot, do you know if the center conductor of your power plug socket and the hole in the tip of your adapter are identical? I have seen issues when a 2.1mm socket of that type is used with an adapter tip that has a 2.5mm hole. This could cause an intermittent power disconnect that might explain the symptoms you describe.


----------



## IMU

The female jack is a 2.1mm but I don't have anything on the wall wart that says what the male adapter size. I have a wall wart that has the plug cut off so I could solder it right to the pins.


----------



## GPSaxophone

What button programmer are you using? I'm not getting the results I want through Google and other places to find it.


----------



## mikkojay

Here is one on ebay that ships from the USA: http://www.ebay.com/itm/Universal-L...131?pt=LH_DefaultDomain_0&hash=item2594ff9a6b
These button boards have a 2.0mm pin pitch while the nano has a 2.54mm pin pitch, so you can use an *adapter *or you will need to cut the cable and solder the wires to your own 2.54mm pin header. After using the button board VS the PC software, I believe that most people will prefer creating and modifying sequences with the PC software- this makes the button board unnecessary. If you still want to press keys in real time to make your sequence, the software is capable of doing this in real-time by using "record mode" and pressing the 1,2,3,4 buttons on your PC's keyboard. You could then use a wireless keyboard if you wanted more freedom while programming.
This is another example of the type of things that I need to beef up in the documentation prior to re-releasing all of this.
Thanks, Mike


----------



## MBrennan

Okay - So that others may benefit - I'll admit to failure. 

Here is how it went...

After soldering everything up and triple checking the connections, I plugged in the power supply, and VIOLA - Green LED on the Arduino - so far, so good.

Fired up the PC and started the app, connected to the Arduino, and uploaded the firmware. At this point all of the relays triggered and stayed "on". Proceeded to the next step and made the "serial connection," and "upload all" buttons. The relays all "reset" and the test sequence started to run like a champ (only I didn't have any audio).

I had the PIR connected, and the sequence kept triggering every 30 seconds, so I disconnected it, which solved the problem. When I re-connected - the sequence ran. Now to the audio...

I thought that maybe the audio files didn't get transferred, so I clicked on the "Export Audio to SD Card" tab, and the next screen said no device detected (or something like that). I removed and re-inserted the card, observed a green LED on the MP3 blink on then back off - and still no sound. Here is when things started going south.

I disconnected the USB cable, and instantly got a buzz through the speakers, plugged USB back in, buzz went away. At this point the test sequence wasn't going, because the trigger was disconnected. After a couple of times connecting and dis-connecting the USB trying to figure out what was going on, the all four LEDs on the Arduino lit up (red RX-green TX and PWR- and red "L"), followed by the relays turning on and off, and sound of a small "POP" and small orange glow from the chip on the MP3 player (did I mention the magic smoke?).

I dis-connected the USB and power and scratched my head. Re-connected one at a time and the Arduino got HOT. All the LEDS where lit up as described before, and it wouldn't respond to the PC. The green LED on the MP3 player that had previously blinked on and off when I ejected the card no longer blinked. (toast)

Not sure what went wrong, but when I tested my wall wart, which says its 12vDC and 500m, it showed 14.3 volts?! Tested a couple others, and they were all over the board too - I don't know if that is too unusual.

So I'm gonna order a couple more parts and try again.

As this is my first dip into the Arduino realm, I probably made a noob mistake. All in good fun! 

Now let the experts speculate as to the error of my ways so that we can ALL learn from my meltdown.


----------



## mikkojay

MBrennan said:


> and sound of a small "POP" and small orange glow from the chip on the MP3 player (did I mention the magic smoke?).
> 
> I dis-connected the USB and power and scratched my head. Re-connected one at a time and the Arduino got HOT.


Oy vey- that sucks! My condolences :zombie:
An Arduino getting hot makes me think that something was shorted. The smoking of the MP3 player could be one of:
1) the polarity of the DC voltage going to the mp3 module was reversed (but this is odd because you said you had a green light)
2) the DC voltage going to the mp3 player was > 5vdc
3) the mp3 module was defective, had a short on the board, etc...
*reading this again, if your input power was 14+ volts, this could very well have caused issues too.

If you try to run it with the mp3 player disconnected completely, does it operate normally?
I would suggest to most people, especially those doing this for the first time, to first run the nano merely using the power supplied via the USB cable first. After doing this & everything tests OK, then you could proceed to hooking up an external 12vdc adapter to the raw/gnd pins of the nano in order to run in standalone mode.

Also, I use regulated 12vdc adapters. They might measure 12.5v, but definitely not over 14 volts. All the documentation I have read says to stay between 7 to 12 volts input. I would try to find an adapter with better regulation, and only hook it up after having successfully tested things using USB power only.

-Mike


----------



## MBrennan

mikkojay said:


> If you try to run it with the mp3 player disconnected completely, does it operate normally?
> 
> -Mike


I suspect that when I was moving things around, something shorted. :xbones:

At this point, the Arduino is toast also - I plugged it in using only the USB and it still gets hot.

Next stop is ebay. 

Gives me time to work on the prop that this will go into.

Keep up the great work, and thanks again!


----------



## mikkojay

*Version 1.2*

Progress is coming along on the slightly modified version of this. I took a new approach to the triggering inputs- here is what I changed:
1) I am now using 2 different pins for button/pad trigger input and PIR input.
2) Pin 11 is now a dedicated button/pad input. This pin will have an internal resistor applied so that it does not "float" and cause errant triggers.
3) Pin A6 (analog input) is now the designated PIR input.
At boot up, the controller does some value checking to see if the PIR is connected. If not, that input is ignored and just the Pin 11 button/pad input is checked for triggering. If a PIR is detected/hooked up, it is then checked for triggers like normal.

This new approach also allows you to use a button/pad (or a remote) and the PIR at the same time if you want to. Using the analog pin for the PIR input ended up being a better way to go from what I have gathered after testing it this way. I will document a full build/wiring with pictures and test, test, test some more.

Here is a quick wiring diagram showing the slightly modified pin arrangement. I'll update as things develop.










Thanks, Mike


----------



## IMU

All still Greek to me but as long as you keep it simple for the electronically challenged, I'm sure it will be good.

As for my project ... I've managed to shock myself at least 4 times and also fried one of the relays. THIS is why I choose not to do any how-tos on this new project the controller is supposed to trigger. I haven't decided if I'll order another 4 relay board or just go with the 3 that still work.


----------



## BillyVanpire

thanks for doing all this extra work to get everyone's gear working mike.
the re-wire seems like a good idea, i'm (luckily) still waiting on parts for mine


----------



## jabberwocky

Hi Mike,
Got all my parts so I'm just waitin on the new design.
Again, thanks so much for all the work your puttin into this.
Couple quick questions on the new layout.
Will the "internal resistor" on pin 11 be covered?
Also, will this new setup allow for PIR and switch operation together?
Robert


----------



## mikkojay

jabberwocky said:


> Will the "internal resistor" on pin 11 be covered?


The internal pull up resistor is internal to the microprocessor and not a physical part. You can write a line of code to tell the Arduino to hold an input pin HI (+5v). Without this, an input pin just floats and values read from it cannot be trusted. Here is a good link about *pull-up resistors*.



jabberwocky said:


> Also, will this new setup allow for PIR and switch operation together?


Yes! That was one of the benefits that drove the new changes.

I'll be working on documentation most the afternoon today, stay tuned!
Thanks, Mike


----------



## Palmdale Haunter

Hey Mike, your site is offline... 
I finally got all the parts and am ready to wire up all the buttons and the diagram is not there.
Will it be back soon?


----------



## mikkojay

Yes I am working with someone currently to iron out a last couple small kinks. We are testing the heck out of it and I am writing more thorough documentation. I will post back here as soon as it is available.
Thanks, Mike


----------



## Richie4540

Mike, I am waiting to how it gets better, happy to be a beta tester if you want another set of eyes on it?

Regards richard


----------



## Erebus

I was finally able to get one completely together. I also bought a wireless remote with 6 modules to make all of my props wireless. I also added dc plugs and an audio jack to the box so I don't have to hard wire it to my props. I get tired of having to screw all of the wires in all of the time. Here are a couple of pictures.










Here it is all closed up. Hopefully this will keep everything nice and neat.










This is the wireless system I bought from Aliexpress. It was about $50, and comes with 6 modules, the picture only shows 3 of them.


----------



## Richie4540

OK, so I have been hassling Mikkojay with questions and he came back saying he was catching the last of the summer sun while boating on holidays, sounds like the right thing to be doing, but time stand still for no one and I had promised a four banger to my brother who lives on the other side of Australia and is visiting this weekend, so I have made him up a Version 1.1, its what Mikkojay described originally and while I know he is about to release version 2 soon I had to give my brother something, I have tried to incorporate a few of the changes that are coming to the trigger wiring, but it all works as it stands. And still amazes me what $20 can do, so this one is off to perth for haunting out there.

http://i1228.photobucket.com/albums/ee451/runwin2/2015-07-31%2015.42.54-Optimized.jpg,

[URL=http://i1228.photobucket.com/albums/ee451/runwin2/2015-07-31%2015.49.49-Optimized.jpg]http://i1228.photobucket.com/albums/ee451/runwin2/2015-07-31%2015.49.49-Optimized.jpg[/URL],

http://i1228.photobucket.com/albums/ee451/runwin2/2015-07-31%2015.49.58-Optimized.jpg


----------



## Richie4540




----------



## Richie4540

ok so it appears i stuffed up the picture posting - so here are the others

see my post above for the story -
http://i1228.photobucket.com/albums/ee451/runwin2/2015-07-31%2015.42.54-Optimized.jpg


----------



## Richie4540




----------



## Erebus

For anyone interested, I updated my computer yesterday to Windows 10, and it is on a brand new computer so I haven't added any drives that doesn't come on the computer originally. I downloaded to the fourbanger program and hooked the Arduino to the computer and it connected perfectly. It took me hours to get it to connect to my old laptop which was running on windows 7. It communicated great, and everything transferred over without any problems.


----------



## mikkojay

Hello All, I have rebuilt the original *project page*.
There is an updated zip package that has the newest matching firmware and a bunch of built in documentation.

The biggest difference for anyone who built the old version will be that the PIR now connects to the A6 pin. The previous input pin of 11 is still a trigger input, it is just now TTL only and always uses an internal pull-up resistor. Please refer to the docs inside the download if you need more detail.

I am still working on the "master" help doc, but the smaller docs like parts and wiring guides are now updated. Feel free to check it out and let me know how it goes.
Thanks, Mike


----------



## jabberwocky

Hello Mike.
Can we get the resistor value for the D4 and D3 wires for the manual programmer?
Thanks,
Robert


----------



## jabberwocky

I figured .2ohms based of the colors, but wanted to be sure.


----------



## mikkojay

Brown, Black, Red = 1k ohm








If you read the document called "nano_wiring.pdf" the value of these resistors is mentioned on page 1 and page 3.
Please read the documentation, that is what it is for.


----------



## Richie4540

Mike, thanks for the update, I tried the fourbanger hex version with the wiring layout as per the picture and the pushbuttons and recording does not work (no buttons respond, and the led glows a soft red, and does not change state), when I load the fourbanger standalone hex it works as intended and I have run through and all items work, manual programming, uploading program from computer, testing pir and ttl input.

the only other thing i noticed was when on the splash page when starting the program the accept / deny buttons were blacked out, with only a faint outline showing, it maybe that the button graphic has been pushed to the backgound as clicking on the bottom button takes you to the program, (of course it took me two goes at this)

regards Richard


----------



## jabberwocky

I apologize for the unneeded question about the resistors.
I have no access to a PC, only my iPad, so I'm limited on what documents I can download.
Again, I apologize.
Robert


----------



## mikkojay

Richie4540 said:


> Mike, thanks for the update, I tried the fourbanger hex version with the wiring layout as per the picture and the pushbuttons and recording does not work (no buttons respond, and the led glows a soft red, and does not change state), when I load the fourbanger standalone hex it works as intended and I have run through and all items work, manual programming, uploading program from computer, testing pir and ttl input.


Did you read the document called uploading_firmware.pdf, specifically page 2? Here is a quote:
"Pick the Hex file you want to
upload. As of the creation of this document, there are 2 hex file options:
• FourBanger_Standalone_1.2.hex This is if you are wiring directly to the Arduino
• FourBanger_Board_1.2.hex This is if you are using the host PCB board"
If you pick the wrong hex file contrary to the documentation, it will absolutely not run. The pinouts are different. That is the point. If this too confusing for people (which it looks to be) I may just delete the "board" version from the hex folder and... actually, nevermind- I just did. I changed the name so it will not be "selectable" in the uploader program unless someone consciously renames the hex file.



Richie4540 said:


> the only other thing i noticed was when on the splash page when starting the program the accept / deny buttons were blacked out, with only a faint outline showing, it maybe that the button graphic has been pushed to the backgound as clicking on the bottom button takes you to the program, (of course it took me two goes at this)
> 
> regards Richard


Do you have a screen shot? What OS are you running?

Thanks, Mike


----------



## BillyVanpire

Hey Mike, thanks very much for putting this all together.. again!

i'm still waiting on some parts but i took the time to read all the nice pdf's you created.

have you ever considered adding a paypal donate button to your page?
just a thought


----------



## mikkojay

Thanks BV, I appreciate it. The documentation is the most tedious part but very important. I just dropped an update to the main manual out there a few hours ago. It is only partially complete, but I thought that would be better than nothing


----------



## BillyVanpire

ok so i couldn't wait any longer..

i grabbed a nano, a relay board and some wires..
10 minutes later i have 4 relays happily bangin away your test sequence 

thanks again mike!


----------



## IMU

Hey Mike, just curious ... now that you've made some revisions, should I deconstruct my V1.0 and rebuild to the newer version 2.0?

Thanks again for putting this together for us to use. Great work!


----------



## mikkojay

Hey IMU, you should not have to deconstruct anything from a wiring perspective. The only change would be if you were planning on triggering from a PIR. If that is the case, you would need to run the PIR signal wire into the Arduino's pin A6.
Button triggering happens on the same pin (11) as before.

You should be able to just hook up your Arduino to the USB then perform the firmware upload procedure like usual. That will give you the latest firmware that is in sync with the latest PC application. Make sure you download the very latest zip package from the project page- I was making tweaks to it as recently as 10 hours prior to this post.

Thanks, Mike


----------



## mikkojay

To any/all who are trying this PC application out, I would appreciate the following:
If you can unzip it and run it without issues, please let me know (and include what OS you are running)

If you encounter any strange issues, please include:
1) what OS you are running
2) as much detail about the error message / behavior as you can
3) what circumstance led to the issue, i.e. happens at startup, when I try to...
4) a screenshot is also very helpful.

I would like to try to keep track of the success VS fail ratio, and try to see if I can plot any trends with certain OS's etc. that might be more troublesome than others. If only the people who have issues speak up, it makes me think that the whole effort is more trouble than it is worth. If there is more of a pattern towards success, that will provide me with justification for keeping it going.

I PM'd with one member who mentioned a potential antivirus conflict. The recent version of this app does have some new functionality that can get updates from the web automatically, so if that feature turns out to be more trouble than it is worth, I may just chop it out for the time being. Detailed feedback helps me isolate these things, so I appreciate what I can get. This is a learning experience for me too, so please bear with me as I fine-tune this stuff as we go.

Thanks!
Mike


----------



## IMU

mikkojay said:


> Hey IMU, you should not have to deconstruct anything from a wiring perspective. The only change would be if you were planning on triggering from a PIR. If that is the case, you would need to run the PIR signal wire into the Arduino's pin A6.
> Button triggering happens on the same pin (11) as before.
> 
> You should be able to just hook up your Arduino to the USB then perform the firmware upload procedure like usual. That will give you the latest firmware that is in sync with the latest PC application. Make sure you download the very latest zip package from the project page- I was making tweaks to it as recently as 10 hours prior to this post.
> 
> Thanks, Mike


I have mine triggered by a PIR so I'll have to make that change. I'll download the new stuff tonight and report back with how it goes.


----------



## Rick

Mike, is there a single source to order the major components? If so, who do you recommend? If not, what sources do you recommend? I could not find the exact nomenclature you used for the 4 channel relay (AVR/AVR/ARM Arduino). Does it matter? 
Thanks for all your work on this. It looks like this is exactly what I need for my scissors prop.

Thanks
Rick


----------



## IMU

*Upgrade Hickup*

I downloaded the new program from your website.

I went through and move the PIR Signal wire to Pin 6. Nothing. After messing around with it, I went back and looked at your help file.










My original PIR wiring was where you have the trigger wiring now. The orange & black wires are still connected to my PIR as version 1.0. Just moving the signal wire to Pin 6 won't work for me.

I'm sure I did something wrong, but for now ... my controller stopped working with the upgrade. Back to the drawing board for me.

Dave



mikkojay said:


> Hey IMU, you should not have to deconstruct anything from a wiring perspective. The only change would be if you were planning on triggering from a PIR. If that is the case, you would need to run the PIR signal wire into the Arduino's pin A6.
> Button triggering happens on the same pin (11) as before.
> 
> You should be able to just hook up your Arduino to the USB then perform the firmware upload procedure like usual. That will give you the latest firmware that is in sync with the latest PC application. Make sure you download the very latest zip package from the project page- I was making tweaks to it as recently as 10 hours prior to this post.
> 
> Thanks, Mike


----------



## mikkojay

You mean A6, not 6 right?
Did you upload the new firmware/hex file?


----------



## Richie4540

Mike, thanks for clarifying I should have read the whole document  , here is a screen shot of the program at opening -

frmSplash_2015-08-04_09-45-46.png Photo by runwin2 | Photobucket

I am running Windows 7 Home Premium version - 32bit and the program works great - thanks again for a great controller, its is so much better making one than just paying for one.

p.s. if you can't see the picture click the heading and it shows up.

regards Richard


----------



## Richie4540

delete


----------



## Richie4540

delete


----------



## Richie4540

sorry for all of the above posts but trying to add pictures from photobucket just doesn't want to work, you should be able to click and see from one of the links though.

richard


----------



## IMU

I checked everything again and it was wired correctly - Pin A6, not 6. I did upload the new standalone hex file but still wouldn't trigger with the PIR. I ended up having to reupload the sequence I created and that seemed work. It now triggers with the PIR.

I like how you showed the pigtails so I may end up wiring mine that way as well.

I'll have to get into your documentation a bit more and see what changes you made. I recall you saying something about daisy-chaining them together for an 8 relay setup?

Thanks again for the help.



mikkojay said:


> You mean A6, not 6 right?
> Did you upload the new firmware/hex file?


----------



## mikkojay

Richie4540 said:


> I am running Windows 7 Home Premium version - 32bit


Got it- thanks for the pic, that helps a lot. It looks like an issue with Windows Visual Styles, I'll take a look.
In the meantime, since you are using a button board, try using the - and + buttons. They should adjust the volume up and down. You can also now control the volume via the PC interface as a controller property.

I'll let you know when I have an update to try.
p.s., I peeked at some of your other photos- cool stuff!

-Mike


----------



## mikkojay

IMU said:


> I ended up having to reupload the sequence I created and that seemed work. It now triggers with the PIR.
> Thanks again for the help.


That makes sense now. Since I changed the hex file, I changed the code that checks the eeprom at bootup to see if it has legitimate values.
I would bet that after connecting, the serial info screen (with the green font) would have said a message like "invalid config, using defaults" or something like that. When you see that message, that means the "Upload All" menu needs to be clicked to send a fresh config up to the Arduino.
Sounds like you are back and running- cool deal 
-Mike


----------



## mikkojay

mikkojay said:


> Got it- thanks for the pic, that helps a lot. It looks like an issue with Windows Visual Styles, I'll take a look.
> I'll let you know when I have an update to try.
> -Mike


OK, I placed an updated version out there- you should be able to see the buttons on the splash screen now. Let me know how it goes.
Thanks, Mike


----------



## IMU

I didn't check the serial info screen until after I uploaded the sequence again so I don't know but yes, that makes sense after you explained it. 

Just an FYI, here are my operating stats:

Win7, SP 1, 64Bit - no issues with software.

Thanks, Dave



mikkojay said:


> That makes sense now. Since I changed the hex file, I changed the code that checks the eeprom at bootup to see if it has legitimate values.
> I would bet that after connecting, the serial info screen (with the green font) would have said a message like "invalid config, using defaults" or something like that. When you see that message, that means the "Upload All" menu needs to be clicked to send a fresh config up to the Arduino.
> Sounds like you are back and running- cool deal
> -Mike


----------



## BillyVanpire

mikkojay said:


> Also, if anyone decides to take the plunge and sees any glaring holes in what instructions I have assembled, please tell me.
> 
> Thanks, Mike


Hey Mike are you re-doing the video's you had up before, showing how it worked?
i think some people need visual reference, myself included 

also, is there a how-to about connecting things to the relays?
running a mixture of 12v/110v like fog machines, lights, motors, etc.

there is mention in the flyback diode pdf about only running ground through the relay:
"red wire connected to +12v continuously (always hot), then switch the black GND
with the normally-open and common relay terminals"

i think expanding that section might answer a few questions for people, once they have their own fourbangers built.


----------



## Rick

Need help, where is the best place to order these components?

Thnaks
Rick


----------



## BillyVanpire

Hi Rick, here's the shopping list from ebay. 
http://buttonbanger.com/downloads/fourbanger_parts.pdf

my pir sensors finally arrived..the last piece of my puzzle 

working great on the bench, next is controlling things with the relays.


----------



## Erebus

Mikkojay, do you have a picture of how you installed the flyback diode? I am having the same problem and not sure where to install it. Thanks


----------



## BillyVanpire

Erebus, I think you can find a pic in the flybsck diode pdf, found in the fourbanger.zip file.


----------



## mikkojay

If running the latest software (you should),
go to the Help menu, select View Help, flyback_diode.pdf
Look on pages 2 & 3.


----------



## TheMikeBarrera

*Using a 12v pir*

Hi guys, this is a wonderful thread. Thank you so much for putting in the time to make this happen. With that said I have successfully built my controller and will be testing it out in my pro level attraction this year. Once it was completed I wanted to make one change, if possible that is. As of now im using the standard pir sensor that you recommend. But is it possible to use a standard 12v pir like you buy from fright props or something like that? I have tryed every witch way I could think of to hook this up, but I haven't had any luck. I understand the pir would have to have its own power suply, but the problem is that it has 2 trigger wires for a total of four wires. 2 power 2 trigger. Any thoughts on this? If I can find away to make this happen it makes mounting my pir sensors so much easier. Thank you in advance ether way


----------



## mikkojay

BillyVanpire said:


> Hey Mike are you re-doing the video's you had up before, showing how it worked?
> i think some people need visual reference, myself included
> 
> also, is there a how-to about connecting things to the relays?
> running a mixture of 12v/110v like fog machines, lights, motors, etc.


Yes, I would like to make a new video, I just need to find the time.
I was on vacation for a week, then had to help my dad move for 2 days when I got back. Work is stacked up from being gone for a week. Etc...

In the mean time, there is a great sticky regarding how to hook up relays and stuff by Darklore here:
http://www.hauntforum.com/showthread.php?t=19719
I would sure like to learn how to make diagrams like those, mine end up looking crude by comparison using my current methods.

-Mike


----------



## mikkojay

TheMikeBarrera said:


> But is it possible to use a standard 12v pir like you buy from fright props or something like that? I have tryed every witch way I could think of to hook this up, but I haven't had any luck. I understand the pir would have to have its own power suply, but the problem is that it has 2 trigger wires for a total of four wires. 2 power 2 trigger. Any thoughts on this? If I can find away to make this happen it makes mounting my pir sensors so much easier. Thank you in advance ether way


Do you have a link to what you want to use?
Without a specific model and spec sheet, it would all just be guessing.
-Mike


----------



## mikkojay

If using this PIR:
http://media.frightprops.com/downloads/manuals/0657Manual.pdf
You could just hook the black and red wires up to the 12v raw input from your controller's 12v adapter. Then hook the green and white wires up to pin 11 and GND on your nano. This is the same as the orange and black wires on this diagram:








The green and white wires can be flip-flopped, it sounds like all they do is close the circuit (act like a switch) when the PIR detects motion.
Looking at the manual again though, I see that they recommend white to GND, and green to input. Therefore, I would put white to GND and green to pin 11 (orange wire in the pic above) 
The PIR in the picture above is running off of 5vdc. The 12v PIR would need to have the red wire connected with VIN, or the raw +12vdc coming in from your 12v regulated adapter. I see no reason why it shouldn't work. Good luck with your project.
-Mike


----------



## TheMikeBarrera

mikkojay said:


> Do you have a link to what you want to use?
> Without a specific model and spec sheet, it would all just be guessing.
> -Mike


Thank you for the message, Here is the link to the specs an layout to the exact sensor I have and am trying to use. http://www.frightprops.com/faq/index.php?action=artikel&id=184

Also, right now I have everything running off 5v and I understand how to hook up the 12v. But how to I make the terminals of the relays 12v? Because right now Im just using an external power supply for my solinoids, I would like to plug them in directly to the relay using the relay as the power sorce.


----------



## TheMikeBarrera

mikkojay said:


> If using this PIR:
> http://media.frightprops.com/downloads/manuals/0657Manual.pdf
> You could just hook the black and red wires up to the 12v raw input from your controller's 12v adapter. Then hook the green and white wires up to pin 11 and GND on your nano. This is the same as the orange and black wires on this diagram:
> 
> 
> 
> 
> 
> 
> 
> 
> The green and white wires can be flip-flopped, it sounds like all they do is close the circuit (act like a switch) when the PIR detects motion.
> Looking at the manual again though, I see that they recommend white to GND, and green to input. Therefore, I would put white to GND and green to pin 11 (orange wire in the pic above)
> The PIR in the picture above is running off of 5vdc. The 12v PIR would need to have the red wire connected with VIN, or the raw +12vdc coming in from your 12v regulated adapter. I see no reason why it shouldn't work. Good luck with your project.
> -Mike


Great! yes! This is the sensor I have! I will give this a shot! Thank you


----------



## mikkojay

TheMikeBarrera said:


> Great! yes! This is the sensor I have! I will give this a shot! Thank you


Sounds good- hey, I forgot to ask, why do you not just want to use the cheapie $1 PIR? Is it the fact that it lacks an enclosure? Just curious.
-Mike


----------



## TheMikeBarrera

mikkojay said:


> Sounds good- hey, I forgot to ask, why do you not just want to use the cheapie $1 PIR? Is it the fact that it lacks an enclosure? Just curious.
> -Mike


I was looking to use the 12v pir because there easly mountable an the case is a bonus. But mainly because they have a ball and joint on the back that works really well for us here in our attraction. Update, I tryed hooking up the the sensor as listed above but the nano seems to just be running the sequence on its own over and over. This sensor seems to have to effect on the controller at all. Any thoughts? Should I change the programing so the controller sees it as a hand trigger instead of a sensor?


----------



## TheMikeBarrera

*12v pir update*

So great news! So it does indeed work the way you said to wire it. The wiring wasn't the issue. For some reason when I uploaded the firmware It detected no pir, and once it cleared as NO pir than it worked perfectly. Im pretty new at this controller, But im assuming the reason for this is because the nano is now seeing the pir as a manual trigger kind of thing. But when I run the pir test It does indeed say no pir but then as it triggers it shows the pir triggering the show. So alittle confused on why it all works, but it does!  So regardless I am soo happy with this project, I can not thank you enough.

Lastly, how can I set my relay board up so that its sending 12v power to the terminals? I would like to get rid of the wall power sorce im using for my solenoids. At this point im powering everything using the usb 5v. I know I have to wire up the 12v to the vin but how to I get the terminals up to 12v? 
Thank you so much, this is simply amazing.


----------



## mikkojay

So you are currently running your 12v PIR with 5v? 
Or are you using a physically separate 12v adapter for the PIR as it sets right now?
How many solenoids are you running, and what are the current requirements for each one?
The easiest way to wire up your relays would be to use a separate 12v adapter that has enough current capacity to match the solenoids you are using if all of them are fired at the same time.
Do you have a picture of your setup?
-Mike


----------



## TheMikeBarrera

Hi there, so yes the PIR has its own power source at the moment, But on my final build I will splice it in and everything will run off the 12v as you have designed. The 12v is perfect for our haunt, as I was worried the $1 PIR would get broken or hit or something because there will be a high number of people walking by. 

As of now I have one 110v light spliced in and one 12v solenoid. Each have there own power supply and of course are using the relays as just the switch. What im looking for now is to take two of my 12v solenoids and plug them directly in to the relay board (Channel one and two) with out having to use a separate power supply. Just like on the normal fright ideas controllers. Is this possible? If not im happy to stick with this build. But if it is I would like to use this method as a way of using less wires and keeping things more compact. 
Thank you


----------



## mikkojay

OK, that gives me a better idea for what you are working with.
If you can give me a few days, I may build a full "example project" that shows one of these being integrated into an actual prop.
I may then create a video for it like Billy V suggested just a while ago.
The one I am thinking of is a Casa Fear style ground breaker with two 12v solenoids and 115vac lighting. I could document the steps and then incorporate this into the project's documentation folder.
I think I'll start on this tonight- stay tuned...
Thanks, Mike

edit> After sizing things up, for this one I am going to do version 1 of this with 12v lighting VS 115vac lighting.
I am on a trend towards using 12v more and more, and 115vac less and less.
That might even deserve an entirely new thread (i.e. using buried low voltage landscape lighting wire as a 12vdc bus for most of the yard props).


----------



## BillyVanpire

great ideas Mike, i like the landscape wire method.

in some cases i need a mix of 115v & 5v & 12v.

i was thinking if i run 115v into an enclosure & connect an iphone wall wart to power the arduino.
split the 115v neutral wires into the relays then back to separate power outlets 1 thru 4.
115v ground & hot wires get split directly to the outlets.
this way i can plug in & control any 115v device or a wall wart to get 5v or 12v without hacking any devices original power cord.

so the enclosure would have one 115v plug going in to power everything inside, with 4 switched power outlets.

the iphone wall wart charger plug is the smallest stepdown device i can find lying around. i might be able to fit it all into a power-bar outlet strip of some kind.

i'll post pix of what i come up with.
i started on this here: http://www.hauntforum.com/showthread.php?t=41652


----------



## Rooey

Mike's PayPal account is listed in the software itself, under "Help" and then "Donate". Just sent my $20 donation!! We should all throw some cash his way.


----------



## BillyVanpire

i started on the power side of this project, still need to add the iphone wall charger & fourbanger to it.
i will start a new post with this, instead of post-jacking here..

http://www.hauntforum.com/showthread.php?t=41652


----------



## mikkojay

Rooey said:


> Mike's PayPal account is listed in the software itself, under "Help" and then "Donate". Just sent my $20 donation!! We should all throw some cash his way.


 Hey Thanks! I really appreciate it 
-Mike


----------



## Dminor

Mikkojay, any chance you'll be selling the host board you created? (sorry if this has been asked, I didn't see it in the thread)


----------



## mikkojay

Dminor said:


> Mikkojay, any chance you'll be selling the host board you created? (sorry if this has been asked, I didn't see it in the thread)


Not at this time. If I ever do it will be in the marketplace area most likely.
Thanks, Mike


----------



## mikkojay

*All Chinese Adapters are NOT created equal!!!*

Man, I have been going round and round testing a new prop and I finally had the "ah ha" moment- it took me a few hours and a bunch of frustration to realize that most of the Chinese power adapters I have are WAY overrated. I was using one that said it was rated at 12v 2A, but when I tried to run about 1.5A worth of load, the thing just fell on its face!

I then swapped over to a "known good" 12v 1A adapter, and things ran much better. This whole experience is making me hate Chinese adapters. I am starting to lean towards a few brick type power supplies that run a 12v bus line between multiple props.

I guess I at least learned something- don't trust the output ratings on the cheapest adapters you can find, or maybe you really do get what you pay for.
-Mike


----------



## BillyVanpire

glad you found the issue..frustrating as it's probably one of the last things i would've checked. 

cant wait to see it working


----------



## Jaybo

I get my power supplies from Holidaycoro.com. He has both 5v and 12v power supplies from 3.75 Amps up to 33 Amps. Several of the power supplies are sealed and waterproof. Prices aren't too bad either considering what you get.


----------



## mikkojay

Jaybo said:


> I get my power supplies from Holidaycoro.com. He has both 5v and 12v power supplies from 3.75 Amps up to 33 Amps. Several of the power supplies are sealed and waterproof. Prices aren't too bad either considering what you get.


Oh yes, big HC fan here! I actually installed some of their WS2811 strip lighting last month, so I have 2 of their 12v 29A supplies. That is partially what got me on this kick, so your intuitions are spot-on!

The LED strip is also one of the reasons I want to wrap this (fourbanger) project up and call it good, so I can move on to the next project which will be a custom LED strip controller using an Arduino Mega clone. I am thinking of borrowing this project's architecture where simulations are made on the PC (color choices, oscillator types and frequencies, etc) then are uploaded to the Arduino's eeprom. I bought the Chinese controller that many people use for these, and it does work, but I believe the one I am picturing in my head will be pretty cool. That, and I could build it with a remote control that makes it go ballistic with red & white patterns every time the NU Huskers score a touchdown 

-Mike


----------



## IMU

Got a stupid question: been fighting to get this thing in a "project box" and when I finally crammed everything inside, I noticed only 1 speaker has sound. Is this a stereo player or just mono?

After I got everything closed up, something is wired wrong with the relays and things aren't going on & off like they are supposed to in my "plan". So, I'm going to gut the entire "project box" and put in something a lot larger. I don't know how any of you got this in that thing but I'm done messing with it.

I must really be an idiot because I can't figure out how any of this works on the relay side.


----------



## BillyVanpire

the player is stereo, you must have pinched a wire or something..?

pull it out then test it, once working i would put in a new box.

here's how i did the relays on mine:
http://www.hauntforum.com/showthread.php?t=41652


----------



## mikkojay

*Sample Project*

Hey everyone, here is a video I created to document a sample project using a FourBanger controller in a real-world prop project:




I will likely take much of the info and wrap it into a tutorial doc and put it in with the rest of the downloadable documentation. Maybe tomorrow- I'm pooped for this weekend. Time to eat tacos and watch a horror movie 

Thanks, Mike


----------



## IMU

I'll have to check out your video and see how things are supposed to go together.

Finally got mine working now ... won't take it apart again so whatever changes/improvements will happen on the next build.

Thanks again Mike ... it is a very good little controller.


----------



## BillyVanpire

nice work on the video mike, pretty easy to follow along.

was there ever a video on how to use the software?
how to create and delete events, etc.


----------



## mikkojay

BillyVanpire said:


> was there ever a video on how to use the software?
> how to create and delete events, etc.


Not yet, I am still working on the main help manual, but it is pretty slow going.
That would be a good video though. I'll have to try that next.
Thanks, Mike


----------



## BillyVanpire

Hey Mike, sorry to keep making work for you 

I think the videos will help people wrap their heads around all this.


----------



## IMU

Watched your video twice and I keep learning new things. Glad you put this video together, I know it helped me a bit more. Still have no clue how you crammed all that in the little project box.

Just curious ... how well will this hold up outside if it's protected from direct rain & weather? I know electronics & moisture don't mix. I made mine where I could bring it in each night without too much fuss (Coax Power Jack, Panel Mounts & Plugs).


----------



## BillyVanpire

IMU said:


> Still have no clue how you crammed all that in the little project box.


what size is your box?
mike used 121mm i think...
they come in a variety of sizes, maybe yours is smaller.


----------



## mikkojay

IMU said:


> Just curious ... how well will this hold up outside if it's protected from direct rain & weather? I know electronics & moisture don't mix.


Here is a picture of the closed box with some sealer around the wire holes:








I think the least water resistant part of the while thing would be my Goodwill surround speaker. Even so, I would not worry if it got rained on. It would need to be an outright storm for rain to get under the suit coat anyway.

The landscape light is built to be outside, same with the red LED. I sealed my PIR into a small box & will run a small smear of silicone around the seam on that to make it waterproof. I could also put a couple drain holes on the bottom of the PIR box in case water finds its way into the box, like thru the super high-tech mounting bracket


----------



## mikkojay

Here is another case from China that I am going to try.
It says it is waterproof and may be use for fishing lures:








Here is where I found them on *EBAY*
They are a little flimsy, but what do you want for 3 bucks. 
-Mike


----------



## Jaybo

Mikkojay, take a look at these waterproof tackle boxes you can get in the fishing area of Walmart and other sporting good stores for about $5.










They are roughly the same size as the one you linked to on eBay. I've used larger ones to contain DMX lighting boards in the past.

Here's a link to one at Walmart.


----------



## mikkojay

Jaybo said:


> Mikkojay, take a look at these waterproof tackle boxes you can get in the fishing area of Walmart and other sporting good stores for about $5.
> They are roughly the same size as the one you linked to on eBay. I've used larger ones to contain DMX lighting boards in the past.
> 
> Here's a link to one at Walmart.


Score  I like the beefier hinge on that one for sure. It is a nice price/quality ratio. That, and the fact that you don't have to wait 2 weeks for them to show up in the mail is a plus.
Thanks, Mike


----------



## BillyVanpire

Jaybo said:


> Mikkojay, take a look at these waterproof tackle boxes you can get in the fishing area of Walmart and other sporting good stores for about $5.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> They are roughly the same size as the one you linked to on eBay. I've used larger ones to contain DMX lighting boards in the past.
> 
> Here's a link to one at Walmart.


that box at Walmart in Canada is $11 ... 

i am putting the relays into power bars/strips so i'm able to use an even smaller box for the rest of the fourbanger parts.


----------



## BillyVanpire

i'm using a small box that screws came in, from the dollar store.









added the mp3 sound board & arduino with hot glue









holes for the wires, usb & audio out..and a paint job 









relays are mounted in the powerbar, more on that soon.


----------



## mikkojay

Nice and tidy BV! That's one heck of a paintjob 
Thanks, Mike


----------



## TheMikeBarrera

Hey Mike, So im looking to purchase the flyback Dioed. But I sees in the docs that you list two diffrent ones. You list the "1n4007" than in the next paragraph you call it the "2n4007" im not familiar with these. Was this a typo? Also I was not able to find them in my local raido shack. As they said they only sell up to 1n4005. Where do you buy yours? 
Thank you


----------



## mikkojay

It is a 1n4007. I just searched on ebay for that number and found hundreds of results.
Here is a listing where you can get 100 of them for 99 cents with free shipping.
http://www.ebay.com/itm/High-Quality-100PCS-1A-1000V-Diode-1N4007-IN4007-DO-41-Rectifie-Diodes-/381321191302?hash=item58c8839f86I'll fix that typo.
Thanks, Mike


----------



## TheMikeBarrera

Thanks bud, I just purchased them. Do I need to add one on every relay, or I can use one hook it to a terminal and do all of my jumping off that one terminal? and use the relays just as a switch? 
Thank you


----------



## mikkojay

Please read the documentation and watch that last video I posted. That should answer all your questions, with diagrams and everything.
Thanks, Mike

edit- here are two of the images from the video.
Note, this is just an example for a one-off prop, there are multiple ways things can be connected- this is just how I did this one.
You can see that yes, the relay is acting like a switch to ground.
This is for both the solenoids and the flood light I am turning on and off.
I use diodes on the solenoids as shown, while the light does not need a diode (it is not an inductive load) 

















I just noticed that I made a note in the video that said 2n4007, I will go add a note to correct it.
Thanks for pointing out the error!
-Mike


----------



## TheMikeBarrera

Hey again, 
Thank you for the reply. I did go threw all the wonderful info you put together for us. An I may have worded my question wrong as it is still unclear. So basically what Im looking to do is split off the 12v arduino power, and run the split off wires to a basic 2 block terminal. My question is, can I hook up ONE diode to the block terminal and than jump all of my 12v solenoids off of that block well still on using the only one diode vs having to hook up one diode per solenoid. Below I put together I poorly drawn diagram of my question. Hope this helps clear up my question. Thank you once again.


----------



## TheMikeBarrera

http://postimg.org/image/sid0i2nxb/


----------



## BillyVanpire

i think you'll need 1 diode per solenoid, but i'm not an expert.


----------



## mikkojay

One diode per solenoid.
An additional benefit of using these is that they help limit arcing on the relay contacts. This will help increase the longevity of the relays.


----------



## TheMikeBarrera

Is there any other option? I would really like to add one terminal port to support all of my jumping with out having to solder on a diode for each one.


----------



## mikkojay

Tell you what, wire it up how ever you like.
See ya


----------



## TheMikeBarrera

Hey bud, Sorry if that came across picky or pushy or something? As I was just trying to explore different options as this is such and amazing thing you have created. I apologize if i sounded rude? I definitely didn't mean anything by it. Thank you for all the time you have donated to everyone here.


----------



## BillyVanpire

I hope that answers your question about the diodes... 

you could even install them on the solenoid's connections inside the housing where the wires come out, i think. Mikkojay did say as close to the solenoid as possible.

did you order the 100 lot of diodes?

good luck with your fourbanger.


----------



## TheMikeBarrera

Hey thanks! Yea it definitely did! I'm VERY new at this whole concept so I'm trying to learn everything from scratch an so I tend to ask a lot of questions simply because I just want to learn and understand why things work the way they do so I can fully understand what I'm doing when I'm putting things together. An yes I did place the order for the diodes. I'm so greatfull for this project, it's amazing forsure! I'm having so much fun learning all of this. An I'm just learning about diodes for the first time, so I was trying to figure out why there had to be one on each solenoid vs just one at the beganing of the power supply terminal an then just split all my power from there. Just trying to expand my understanding of the way things work Thank you for your time


----------



## IMU

I actually just started messing around with another idea and hooked up a solenoid without a diode (because I forgot about it) and it triggered just fine for about 2 cycles. Then when it triggered a 3rd time the controller went a little funky and stopped about 5 seconds after it began and went back to standby mode. It definitely needs that diode to "clean up" the noise. I ordered some diodes and will be making the change when they come in.

I believe that when Mike makes a recommendation about his controller & how to wire and hook things up, he's tested it and that it is a good idea to follow along.


----------



## TheMikeBarrera

Sounds good Thank you! Mike knows best! Such a great thing he has put togeather!👍👌


----------



## mikkojay

TheMikeBarrera said:


> Mike knows best!


Oh man, that might be a stretch 
I just tried to layout examples that are "known to work".
There are always exceptions to the rules, and I actually like to try and bend those myself once in a while.

I have started to compare electronic circuits to math equations, where electronic components are the variables in those equations. Math has rules and formulas that work "just because that is how it is". Sometimes you can get creative and find your way to the end sum you want, but usually when that happens it is a shot in the dark.

I think it is great to try different configurations to see what works and what does not. It is usually when you try something that does not work, and you have to logically reason why it did not work, that the light goes off and you have just learned something that will make your next attempt just that much more likely to succeed. That's the hope anyway (and why feel that time is never wasted on a failed experiment).

I am now trying to shift gears away from this project to start ramping up progress on some of the props I want to build for this year. I am glad to see that multiple folks are jumping in to offer their experiences & tips, the collective approach makes a project like this so much better than any one person could ever hope to wrangle individually.

Cheers, Mike


----------



## TheMikeBarrera

Thank you so much for the kind words, I totally hear you! An your right time is never wasted on a failed experience, thank you for helping all of us here make this year a success. We are so greatfull an again, thank you for all of your time


----------



## MBrennan

Great big THANKS to Mikkojay for this project.

The slow boat arrived, and my Version 2 is up and running flawlessly (no magic smoke)!

I do have a question about the scare track.

Back in Post #8, you mentioned just using the 2 tracks. Does the possibility exist to have several different "scare tracks" that play sequentially when triggered? (ie. Trigger plays Scare Track 1 - Sequence Runs - Sequence Completes - Next Trigger plays Scare Track 2 - on so on...)

I have a telephone prop in mind that I would like to have different tracks play when triggered, along with the relays, etc.


----------



## Jaybo

I just received another order, this time from DXSoul.com. It only took 12 days. This is Deal Extreme's other site that is geared toward the US. I now have enough to build four of these!


----------



## mikkojay

MBrennan said:


> The slow boat arrived, and my Version 2 is up and running flawlessly (no magic smoke)!


Excellent! That is great to hear 


MBrennan said:


> Does the possibility exist to have several different "scare tracks" that play sequentially when triggered? (ie. Trigger plays Scare Track 1 - Sequence Runs - Sequence Completes - Next Trigger plays Scare Track 2 - on so on...)


That might be cool, but the only thing is that if you were to want to play > 1 scare track, you would need to make the controller know how many tracks you have available so it knows when to loop back around to scare track 1.

Option 1) There is a way to query the Catalex module to ask how many tracks it sees, but that gets complicated. You would have to add another wire from the TX of the MP3 module to one of the pins on the Arduino. You would then have to add a SoftwareSerial library to read the incoming serial data because the nano only has one UART. Even then, as it sits now, the only unused pins in the sketch are 13, A4, A5, and A7.
13 is what the onboard LED is hooked to, so that would not work.
A7 can only be used for analog read, so that's out.
A4 and A5 are the i2c bus, so if I used one of those, I could forget about ever being able to use i2c expansion modules. So that makes that option less than desirable.

Option 2) use one of the 5 remaining free bytes available on the eeprom to store the number of scare tracks you plan to use. This could default to 1 as it is now. If a number > 1 was entered, then it could behave as you describe. This would require a modification to the PC application too, to create & store a new configuration byte for this new purpose.

Option 3) make a custom "one off" compiled hex file. I could temporarily hard code this functionality, compile it and save off the custom hex file, then revert the code back to "normal". Uploading the custom hex file would run the custom code. The only trouble with this is that if something changes with the app in the future, the custom hex file could become obsolete and the whole custom hex compile process would need to be recreated.

Lastly, there is the deal with copying the extra mp3 files to the SD Card.
I would have to beef up the audio copying utility to handle copying the extra audio files over to the SD Card for you. If the configured number of scare tracks and the actual number on the SD Card did not match, things could get messed up.

I could probably do option 2. I was thinking of starting a "FourBanger wishlist" for new functionality requests, but quite frankly, I was hoping to call this one done pretty soon. I do like this idea though, I always thought it does seem like a waste to just have the one scare track.

One final, final option is to wait for another project that I have on the backburner- it is like this one, but has no manual button board programmer. That is because those pins are used to support the total of 8 outputs instead of 4 like in this project. That one is pretty far out into the future though. It would also be a more complicated build (especially without a host board) because it uses an external memory module to allow for multiple scare sequences, etc...

Thanks, Mike


----------



## mikkojay

Jaybo said:


> I just received another order, this time from DXSoul.com. It only took 12 days. This is Deal Extreme's other site that is geared toward the US. I now have enough to build four of these!


Cool, which part did you order- the Catalex module? That's great to hear real-world feedback for different suppliers. Could you give a link to the store you used? 12 days may be a new record!

Thanks, Mike


----------



## Jaybo

Yes, I ordered three Catalex MP3 boards, three Nano 3.0 modules, and three 4 Relay modules. The website was dxsoul.com, and the shipping was free.


----------



## BillyVanpire

that site will come in handy for the last minute folks 

thanks jaybo


----------



## BillyVanpire

i wanted to edit my ambient sound's volume and loop timing after loading it onto the fourbanger.
figured i would just remove the sd card and replace the 001.mp3 with it's edited version..
when i put the sd card back into the fourbanger the ambient & scare sounds had swapped.

to fix the issue i had to wipe the sd card then add the files in order, 001.mp3 and then 002.mp3 and it was back to normal.

the mp3 player looks at date added for the order, not file name it seems.


----------



## mikkojay

Yes this seems to be pretty common for these types of players. The mdfly one does the same thing. If you use the utility that is built into the pc app, it clears the card and copies the files in the correct order for you.


----------



## BillyVanpire

thx mike

if someone's using the button board only, they might run into this issue i figured?
is there a way to just replace the audio file in a sequence i had made?

i just re-read this in the manual:

"If a scare audio file was not selected when the controller project was created, or a different file is desired, 
select the "Scare Audio File" property then click the [...] browse button that appears to the right."

took me ten minutes to find the lil box..waaay over on the right. lol


----------



## MBrennan

mikkojay said:


> Excellent! That is great to hear
> 
> That might be cool, but the only thing is that if you were to want to play > 1 scare track, you would need to make the controller know how many tracks you have available so it knows when to loop back around to scare track 1.
> 
> Option 1) There is a way to query the Catalex module to ask how many tracks it sees, but that gets complicated. You would have to add another wire from the TX of the MP3 module to one of the pins on the Arduino. You would then have to add a SoftwareSerial library to read the incoming serial data because the nano only has one UART. Even then, as it sits now, the only unused pins in the sketch are 13, A4, A5, and A7.
> 13 is what the onboard LED is hooked to, so that would not work.
> A7 can only be used for analog read, so that's out.
> A4 and A5 are the i2c bus, so if I used one of those, I could forget about ever being able to use i2c expansion modules. So that makes that option less than desirable.
> 
> Option 2) use one of the 5 remaining free bytes available on the eeprom to store the number of scare tracks you plan to use. This could default to 1 as it is now. If a number > 1 was entered, then it could behave as you describe. This would require a modification to the PC application too, to create & store a new configuration byte for this new purpose.
> 
> Option 3) make a custom "one off" compiled hex file. I could temporarily hard code this functionality, compile it and save off the custom hex file, then revert the code back to "normal". Uploading the custom hex file would run the custom code. The only trouble with this is that if something changes with the app in the future, the custom hex file could become obsolete and the whole custom hex compile process would need to be recreated.
> 
> Lastly, there is the deal with copying the extra mp3 files to the SD Card.
> I would have to beef up the audio copying utility to handle copying the extra audio files over to the SD Card for you. If the configured number of scare tracks and the actual number on the SD Card did not match, things could get messed up.
> 
> I could probably do option 2. I was thinking of starting a "FourBanger wishlist" for new functionality requests, but quite frankly, I was hoping to call this one done pretty soon. I do like this idea though, I always thought it does seem like a waste to just have the one scare track.
> 
> One final, final option is to wait for another project that I have on the backburner- it is like this one, but has no manual button board programmer. That is because those pins are used to support the total of 8 outputs instead of 4 like in this project. That one is pretty far out into the future though. It would also be a more complicated build (especially without a host board) because it uses an external memory module to allow for multiple scare sequences, etc...
> 
> Thanks, Mike


Thanks for the explanation - sounds like a lot of additional work, and I understand the want to move on. Since I don't know any coding (yet), I'd be completely lost.

I did see this MP3 Trigger how-to that I thought might be interesting.

http://www.garageofevilnetwork.com/profiles/blogs/sparkfun-mp3-trigger-howto

He mentions the ability to control up to 255 tracks with a single pin from a micro-controller (in the article, he is using a Picaxe 18).

Food for future thought.

For now, I've got plans for a couple more of these little beauties - MWA-HA-HA-HA!!! :jol:


----------



## Richie4540

Hi, just thought I would post yet another version of Mikes controller, I am making more with his new host board but this was one I made earlier and is to drive a input into the raspberry pi2 that hosts the Falcon Player program that will play video as the scare, I know its possible to do this directly with the FPP but using mikes 4banger will let me modify timings once I have built the scene on the front gate and not have to go back into coding changes.










this is the sensor mounted in a small box and waterproofed.










and the cover for the whole lot - i will spray this black when installed to hide it all - its a $5 lunch container from the local supermarket.










thanks again goes to Mike.


----------



## Jaybo

So, I finally made a trip down to WalMart to look at the $5 waterproof box below in the fishing tackle box area:



I was concerned the box would be too small, and did not have measurements on hand to verify. So, I walked over to the camping aisle and found these for $5.88:



I ended up buying both boxes. That blue box is over $10 online, but only $5.88 in the store. I think they may be phasing those out. That's ok, because they are actually not needed.

The first clear Plano waterproof box is more than big enough to house all of the electronics, so the bigger blue box is overkill. If you had more items that needed more clearance, they are still a good option. The pictures above link to the product on WalMart's website if you are interested.

I can't make up my mind how I want to mount these in the box, so I'm open to ideas. I keep placing them inside, then changing my mind. I like how Richie4540 mounted his on a small piece of plywood. That way I can pull it in and out if I need to work on it.

The Christmas Light guys do this stuff all the time. I think I'll snoop on their sites and look for mounting ideas. I'm good at making a spaghetti mess, not so much at making things neat and organized.


----------



## Richie4540

Jay of, the plywood is actually on the outside of the lid, I wasn't going to use it but the lid is too floppy without it, I also mounted everything on the lid so when you take the bottom off its easier to access all the screw terminals and such, 

Richie


----------



## IMU

I'm in the same boat Jaybo ... I make a mess of the wiring and end up cramming everything in and forcing the lid closed. I'm going to pick up one of those fishing tackle boxes and work on making this one better & easier to work on.


----------



## Rick

DXsoul had some bad reviews. Anyone else order from them?


----------



## mikkojay

I have not, but if you open the FourBanger application, you can click on the Help menu, "Release notes and links", then click on the "Cool links and info" tab. There is a link that will take you right to the Catalex store on Aliexpress where you can get the audio modules for $6.60 with free shipping. They have outstanding feedback (some from me  )
-Mike


----------



## iowachap

*questions*

I just ordered all the parts, I am curious i see in the four banger diagram 2 resisters for the 5 button control board, but did not see those listed in the parts list. Are they needed to connect from the arduino board to the 5 button control panel board? If so what are the parts?

Second if one wants to power a light bulb would a 12vdc 5a power supply work? I am thinking that a LED type colored bulb would be ok, but like a 100 watt bulb would be too much, or am I just wrong on that, complete newb on this stuff, sorry.

I also noticed in instructions it says if using a 9v-12vdc power supply to apply to the vin pin but if using regulated 5v attach to the arduino vcc.

I am looking on the boards for where the vin pin is located, and want to be sure the wiring diagram is the same for using 12vdc?

This might help, i am looking to power a wiper motor, possibly 2, and also a LED light, Incandescent Equivalent	15 watt link here https://www.goldengadgets.com/l-18s-18-led-spot-light-white-red-blue-green-orange.html

the wiper motors would be from monster guts, thanks for any help


----------



## iowachap

The link is not working


----------



## iowachap

oops I thought it was going to add reply to Mike, this is the link that is not working,

Hello All, I have had a few people ask questions about triggering so I put together some additional documentation regarding that topic HERE. If you are going to attempt this project, reading and understanding this document will be very beneficial (if not crucial) for your success.

http://buttonbanger.com/downloads/triggering.pdf


----------



## iowachap

Ok, I think I have found answers to most of my questions, and I have downloaded instructions. Only one I have is could a wiper motor be used? 

I ordered all da stuff, just waiting. Anybody have any tips on a decent soldering gun? and or extra little things like shrink tubing and the like that is good to have?


----------



## Jaybo

iowachap said:


> I just ordered all the parts, I am curious i see in the four banger diagram 2 resisters for the 5 button control board, but did not see those listed in the parts list. Are they needed to connect from the arduino board to the 5 button control panel board? If so what are the parts?
> 
> Second if one wants to power a light bulb would a 12vdc 5a power supply work? I am thinking that a LED type colored bulb would be ok, but like a 100 watt bulb would be too much, or am I just wrong on that, complete newb on this stuff, sorry.
> 
> I also noticed in instructions it says if using a 9v-12vdc power supply to apply to the vin pin but if using regulated 5v attach to the arduino vcc.
> 
> I am looking on the boards for where the vin pin is located, and want to be sure the wiring diagram is the same for using 12vdc?
> 
> This might help, i am looking to power a wiper motor, possibly 2, and also a LED light, Incandescent Equivalent	15 watt link here https://www.goldengadgets.com/l-18s-18-led-spot-light-white-red-blue-green-orange.html
> 
> the wiper motors would be from monster guts, thanks for any help


You don't want to power your lights and props from the same power supply that the fourbanger prop controller is using. First, it's just asking for trouble and second you mention 120V AC powered lights which won't work with the prop controller's power supply. It runs on DC power.

The relays on the prop controller act like switches turning the attached prop off and on (either AC or DC) based on a sequence programmed into the controller. So, you provide power to your prop, but you take one leg of the power through the relay so that it can control when to activate the power. Just like a light switch, only this switch is automated. The controller itself is not powering the prop. There are times when you have low voltage props that you can power from the same power supply that the prop controller is using, but it's a good practice to keep them separate.


----------



## halstaff

For those that are just starting out with prop controllers, you should check out Darklore's sticky thread - http://www.hauntforum.com/showthread.php?t=19719 
It will answer many of your questions on how to set them up.


----------



## iowachap

Thanks Jaybo and Halstaf, 

I got most questions answered, looked at the relay power link too, so we are saying that the 12vdc wiper motor would work with the relays on this? It of course would have it's own 12vdc 5amp power supply and the relay switch only completes the circuit ?

The link shows a relay with many connect points, i dont have the relay board yet but the photos make it seem like there are only 2 or 3 connection points per relay. 

Then of course the bulb question, i would use a 15 w LED bulb that goes into regular light socket, I noticed the video of ground breaker has a light. 

greatly appreciated.


----------



## mikkojay

iowachap said:


> Then of course the bulb question, i would use a 15 w LED bulb that goes into regular light socket, I noticed the video of ground breaker has a light.
> 
> greatly appreciated.


Jaybo and Halstaff beat me to it- there is a lot of great info in the sticky link above.
Regarding the ground breaker light, mine was a 12vdc LED. The floodlight was also run from 12vdc. If the one you are thinking of screws into a light socket, it is a 120vac bulb. If you are not experienced with electrical circuits, you MUST read the sticky linked to above. I would never suggest that an inexperienced tech start with high voltage even before they know what's what.

I have had formal training & years of military experience working with electronics and killer voltages, and even I will pick low voltage DC over high voltage AC when I have the choice between the two. I have shocked myself multiple times over the decades, blown many fuses, etc, but luckily I have never caused a fire or caused myself or any others permanent injury. Electricity should really be understood at a fundamental level before one sets about snipping wires IMHO.

Good luck with your project & please be safe and conscious of what you set about to do.

Thanks, Mike


----------



## iowachap

*Thanks Mike!*

Ok, yeah that is what I was asking about on the light, as I thought well the LED is low but still plugged into light socket, so now I need to watch your video again and see if I missed the info for what your using, as indeed I want to stick to the 12vdc stuff as = safer realm for a newb. You probably mentioned it was a 12vdc bulb, but for some reason I am thinking it looked like a normal light and thought it was normal a/c.

Thanks for the info Mike, oh someone mentioned you had a paypal link that we can donate to you, I was looking on your main blog page and did not see the link, am I missing it, as I would like to send you a few bucks for sure for everything you have done/doing.

Thanks,

Iowa


----------



## iowachap

*12v flood light*

Ok, so here is a 12v light that I found, that would work with a 12vdc 1A power supply

Trendmart® Dc 12v 10w RGB Led Flood Light Outdoor Landscape Lamp - - [email protected]@[email protected]@http://ecx.images-amazon.com/images/I/[email protected]@[email protected]@51yYo7OAh0L


----------



## Jaybo

iowachap said:


> Ok, so here is a 12v light that I found, that would work with a 12vdc 1A power supply
> 
> Trendmart® Dc 12v 10w RGB Led Flood Light Outdoor Landscape Lamp - - Amazon.com


That's a good option. According to one of the reviewers the light has a memory function which is very important with these RGB lights. It means that once you use the remote to program the color and pattern you want on the light, that the light will remember that the next time it is powered on. The only thing we don't know is if there is a delay when the light is turned on. If you are switching this on and off with a relay, and there is a delay, you might get some erratic behavior. I would only order one of those lights and test it out.

Heck, I have been planing on getting some of these for a while, so I'll order one and let you guys know how it works.


----------



## iowachap

*Lights, 12vdc car air horn?*

Cool deal Jaybo, yeah I will probably get one too, at the very least I can see converting many of our low watt LED bulbs to these low 12vdc, we loved switching to the little LED floods as they used only 18 w and for our graveyard they were excellent as no heat, lower power which means less chance of kicking a circuit breaker, and with these 12vdc ones even better.

I was also thinking of getting one of those 12v car air horns, its 2 horns, with a little mini air compressor that is a very loud horn like on a 18 wheeler, just as a startle effect.


----------



## Jaybo

Jaybo said:


> That's a good option. According to one of the reviewers the light has a memory function which is very important with these RGB lights. It means that once you use the remote to program the color and pattern you want on the light, that the light will remember that the next time it is powered on. The only thing we don't know is if there is a delay when the light is turned on. If you are switching this on and off with a relay, and there is a delay, you might get some erratic behavior. I would only order one of those lights and test it out.
> 
> Heck, I have been planing on getting some of these for a while, so I'll order one and let you guys know how it works.


Well, I ordered two of the lights and they arrived today. They do have a memory function, so they will remember the last mode/color you had set when power is removed and reapplied. There is a delay though. When power is applied, there is about a 1 second delay before the light comes on. You could still use these with a relay, but you won't be able to get a fast strobe effect using these in that manner. They are still really good little lights. Very compact and rugged, but also very bright.


----------



## iowachap

*Good deal!*



Jaybo said:


> Well, I ordered two of the lights and they arrived today. They do have a memory function, so they will remember the last mode/color you had set when power is removed and reapplied. There is a delay though. When power is applied, there is about a 1 second delay before the light comes on. You could still use these with a relay, but you won't be able to get a fast strobe effect using these in that manner. They are still really good little lights. Very compact and rugged, but also very bright.


Good to know Jaybo, yeah I was thinking would be good to light up the prop just as its going into the animation.


----------



## iowachap

*wiper motors?*



mikkojay said:


> Please read the documentation and watch that last video I posted. That should answer all your questions, with diagrams and everything.
> Thanks, Mike
> 
> edit- here are two of the images from the video.
> Note, this is just an example for a one-off prop, there are multiple ways things can be connected- this is just how I did this one.
> You can see that yes, the relay is acting like a switch to ground.
> This is for both the solenoids and the flood light I am turning on and off.
> I use diodes on the solenoids as shown, while the light does not need a diode (it is not an inductive load)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I just noticed that I made a note in the video that said 2n4007, I will go add a note to correct it.
> Thanks for pointing out the error!
> -Mike


I have enough parts to test now, only thing I need is PIR and the mp3 board.

I have a question, has anybody hooked this up to a wiper motor yet? I am curious as I was going to have 2 wiper motors running with of course their own power supplies. Would I need to do a slight change from Mike's diagram ?

So the 12vdc wiper motors would have their own power supply they would not need a GND jumper wire to the other relays, they would have their power so black to GND on common center from power supply, then load normally open to the GND on wiper motor, positive on wiper motor to the red+ on power supply.. does that sound correct?


----------



## Jaybo

iowachap said:


> I have a question, has anybody hooked this up to a wiper motor yet? I am curious as I was going to have 2 wiper motors running with of course their own power supplies. Would I need to do a slight change from Mike's diagram ?


Look at the last diagram of this link from Frightprops. This is how you would attach 2 or more wiper motors (with separate power supplies) to the prop controller. If you look closely at the Picoboo in the diagram, you will notice they have the markings of NO (Normally Open), C (Common), and NC (Normally Closed). NO means the device attached to the relay is normally off and the relay will be turning the device on. NC is the exact opposite of NO. The device attached is normal turned on and the relay will be switching it off. That corresponds to the same setup on the Relay Module on our prop controller.


----------



## Jaybo

Actually, our prop controller works a lot like a Picoboo and Frightprops has lots of tutorials on how to setup and attach items that are helpful even for us. We handle the programming and sound differently, but the wiring to the triggers and the relays is practically the same.

Check out their tutorials here.

Oh, and they are a great company, so please show them some love so that we aren't just stealing all of their hard work for our own benefit.


----------



## iowachap

Jaybo said:


> Look at the last diagram of this link from Frightprops. This is how you would attach 2 or more wiper motors (with separate power supplies) to the prop controller. If you look closely at the Picoboo in the diagram, you will notice they have the markings of NO (Normally Open), C (Common), and NC (Normally Closed). NO means the device attached to the relay is normally off and the relay will be turning the device on. NC is the exact opposite of NO. The device attached is normal turned on and the relay will be switching it off. That corresponds to the same setup on the Relay Module on our prop controller.


Awesome Jaybo, thanks, by what I wrote in jibberish I think I was right then.. lol.. the diagram will help as I am very much a visual learning type and one to ask a few extra questions, I must have read the entire string last night looking for the answers. I am very tempted to try to start testing before work but do not want to get only 2 hours to play and get stuck only to have to walk away so will wait until have a bigger window of time so i do not have to walk away and come back as I will lose track because my mind never stops wandering on ideas, thoughts etc.. lol


----------



## Jaybo

Iowachap, I'm the exact same way. That's why I posted the diagram. I'm a visual, hands on kind of guy.


----------



## iowachap

*parts info*

So Just wanted to post that the arduino nano boards i got on ebay/china came with all the headers already soldered on, I like that  ready for jumper wires. They were 3.06 each, ordered on Aug 19th and got here on Saturday Aug 29. However For those who need them faster, they are about double the price but Amazon prime does have them for 7.99 and looks like the headers are on by the pictures here


----------



## Batbuddy

Can I just say how tickled I am with this Arduino controller! Awesome job Mikkojay! I ordered 20 Arduino nanos and Relay boards for them as well as MP3 players. Got it all put together and it works great. (Love Aliexpress BTW)But the best part is your Application and meticulous documentation. I have used other controllers, but you have made this sooo much easier for everyone. Thanks again for sharing this with us all. Now I want to learn more about writing Arduino sketches...


----------



## mikkojay

Hey guys, it is great to see folks having fun with this project  One recent thing I thought that I would mention- A little over a week ago I was working on a prop that needed a controller, so I grabbed an Arduino UNO I had laying around and made a FourBanger out of it. When I got to the part where I was going to hook up the PIR, I said, "WTF, no A6 pin on the UNO?!" That's right, the UNO has NO pin for A6 or A7.

So... I went in and made the PIR input to be on A5 (the last pin on the UNO). I changed the wiring documentation as well. So, if you have downloaded in the last week or so, that will be the PIR input to use going forward.

Keep on Spookin!

-Mike


----------



## iowachap

*12vdc main power supply*

I noticed in the parts list it shows a 5v 1a power supply, but it seems after looking at the diagrams that if one is going to power up say some 12vdc solenoids one would want the 12vdc power supply, would 1A be good enough or should one have 2/3/A etc..


----------



## mikkojay

Hey IC, I like to error on the large side so I have been using 2.5A+ "brick" type power supplies. You could even use an old PC power supply, then run a 12v & ground bus line from prop to prop. I am strongly considering doing that this year.

I also have some of these:
http://www.ebay.com/itm/DC-DC-5V-12...pply-Output-/391003172583?hash=item5b099aeee7
They are adjustable dc-to-dc converters that I am going to use in order to run 6v Spirit props from my 12v line. You just hook a meter up to them and adjust the trimpot until it hits the output voltage you want. They are cheap too!
-Mike


----------



## iowachap

*four banger swaying zombie test*

Hey Mike, I sent you a donation as promised once I completed my first working four banger controller, and here it is working on the swaying zombie I had put together, this was just a quick test after I did the initial pre packaged test, I zipped through that with no issues, then added the sound card, that too worked no problems. I then moved on to creating my own sequence to test on the zombie.. and it was also a success.








mikkojay said:


> Hey IC, I like to error on the large side so I have been using 2.5A+ "brick" type power supplies. You could even use an old PC power supply, then run a 12v & ground bus line from prop to prop. I am strongly considering doing that this year.
> 
> I also have some of these:
> http://www.ebay.com/itm/DC-DC-5V-12...pply-Output-/391003172583?hash=item5b099aeee7
> They are adjustable dc-to-dc converters that I am going to use in order to run 6v Spirit props from my 12v line. You just hook a meter up to them and adjust the trimpot until it hits the output voltage you want. They are cheap too!
> -Mike


----------



## iowachap

*Power cord to use for PIR connection*

I was wondering if anybody had used a 3 prong extension cord cut in half as the connection between a PIR external box to connect to the project box with all the brains in it? Once cut in half use the wires to connect to the PIR side, and then the other wires to connect to the inside of the brain box, this would allow one to easily connect and disconnect their PIR box and even add another 3 prong extension cord to make it longer if needed for PIR motion sensor placement.. I like to have the external wiring with connections so it would be easy to connect and then take apart


----------



## mikkojay

Hey IC, glad to see things coming together 
For extending PIR wires, these work great:
http://www.ebay.com/itm/10Pcs-500mm...rvo-Part-US-/151511779346?hash=item2346ce4812
The PIR's use hardly any current, so the wires might as well be tiny to make them easy to hide & deal with. The RC Servo extension cables can be cut in half and that makes for a nice little disconnect/plug since one end has the male and the other is female.

I also recommend a spool of this stuff:
http://www.ebay.com/itm/22-Ga-4-Con...-Alarm-Wire-/181528012540?hash=item2a43e9a6fc
I looked high and low for good general purpose 4 conductor stranded cable and this stuff is great. The price per foot is about the best I could find (for black stranded). I find myself using it for all kinds of low voltage wiring jobs. I also use it for things that just need 2 or 3 wires- I just trim off the wires I'm not using.

Thanks, Mike


----------



## iowachap

*awesome!*

Lol you are the man of resources.. great!



mikkojay said:


> Hey IC, glad to see things coming together
> For extending PIR wires, these work great:
> http://www.ebay.com/itm/10Pcs-500mm...rvo-Part-US-/151511779346?hash=item2346ce4812
> The PIR's use hardly any current, so the wires might as well be tiny to make them easy to hide & deal with. The RC Servo extension cables can be cut in half and that makes for a nice little disconnect/plug since one end has the male and the other is female.
> 
> I also recommend a spool of this stuff:
> http://www.ebay.com/itm/22-Ga-4-Con...-Alarm-Wire-/181528012540?hash=item2a43e9a6fc
> I looked high and low for good general purpose 4 conductor stranded cable and this stuff is great. The price per foot is about the best I could find (for black stranded). I find myself using it for all kinds of low voltage wiring jobs. I also use it for things that just need 2 or 3 wires- I just trim off the wires I'm not using.
> 
> Thanks, Mike


----------



## iowachap

*Blue 3 terminal block screw in project box*

What and or where did you get those 3 screw terminal blocks that you have mounted in project box with super glue for the pir wire connection? Also are you using a type of dremil tool to make all those little openings in that project box? Grin if so which one, another little tool to put on my need list



mikkojay said:


> Hey IC, glad to see things coming together
> For extending PIR wires, these work great:
> http://www.ebay.com/itm/10Pcs-500mm...rvo-Part-US-/151511779346?hash=item2346ce4812
> The PIR's use hardly any current, so the wires might as well be tiny to make them easy to hide & deal with. The RC Servo extension cables can be cut in half and that makes for a nice little disconnect/plug since one end has the male and the other is female.
> 
> I also recommend a spool of this stuff:
> http://www.ebay.com/itm/22-Ga-4-Con...-Alarm-Wire-/181528012540?hash=item2a43e9a6fc
> I looked high and low for good general purpose 4 conductor stranded cable and this stuff is great. The price per foot is about the best I could find (for black stranded). I find myself using it for all kinds of low voltage wiring jobs. I also use it for things that just need 2 or 3 wires- I just trim off the wires I'm not using.
> 
> Thanks, Mike


----------



## mikkojay

The trick to finding the terminal blocks in an ebay search is to use 5mm in the search criteria like this:
3 terminal block 5mm
Try that and see the results. That is because the pins have a distance (also called pitch) between them that is 5mm.
For the box holes, yes I often use a Dremel. I use an old tiny drill bit and just let the high speed melt the plastic as I move the tool along. For teeny holes I use a pcb drill, but that is a specialty tool that I wouldn't expect too many people to own.

-Mike


----------



## GPSaxophone

iowachap said:


> I was wondering if anybody had used a 3 prong extension cord cut in half as the connection between a PIR external box to connect to the project box with all the brains in it? Once cut in half use the wires to connect to the PIR side, and then the other wires to connect to the inside of the brain box, this would allow one to easily connect and disconnect their PIR box and even add another 3 prong extension cord to make it longer if needed for PIR motion sensor placement.. I like to have the external wiring with connections so it would be easy to connect and then take apart


I would caution against using standard power cords for anything besides their intended use. All it takes to fry your electronics is to plug the wrong cord in. Besides, power cords are very expensive compared to using signal wire or even Cat5.


----------



## Batbuddy

I was just going to suggest cat5 cable as well. Also you may be able to find some phone cable for real cheap that does not have the twist like cat5 and hence is less popular and cheaper (cat3). Also I get the screw terminal blocks etc. from Tayda Electronics. They are fast and inexpensive. http://www.taydaelectronics.com/connectors-sockets/terminal-blocks/pcb-mount.html This is where Halstaff gets his components from for the boards he makes as well.


----------



## iowachap

*great ideas*

Great suggestions, thanks for the link!


----------



## halstaff

Batbuddy said:


> I was just going to suggest cat5 cable as well. Also you may be able to find some phone cable for real cheap that does not have the twist like cat5 and hence is less popular and cheaper (cat3). Also I get the screw terminal blocks etc. from Tayda Electronics. They are fast and inexpensive. http://www.taydaelectronics.com/connectors-sockets/terminal-blocks/pcb-mount.html This is where Halstaff gets his components from for the boards he makes as well.


Tayda often has 15% discount codes if you like them on Facebook.


----------



## iowachap

*question on audio board*



mikkojay said:


> Hey question Mike, on my 2nd one putting together, I had the audio board already connected to the arduino when doing the firmware update and uploading of the test sequence, could this have caused any damage to the mp3 module and or relay module, the relay module was clicking and flashing, i never saw the power light come on for the mp3 module, not sure if it was just bad or if having it connected to the arduino before firmware was installed could have done anything, and same on the relay module, the relay module lights flash as they go through sequence but the relays are not switching.


----------



## iowachap

*ok mp3 module is fine*

Ok, I had the wrong memory card in it, the mp3 module is fine, relay however still flashing but no clicks the relays not working it seems, maybe just a bad relay board?



iowachap said:


> mikkojay said:
> 
> 
> 
> Hey question Mike, on my 2nd one putting together, I had the audio board already connected to the arduino when doing the firmware update and uploading of the test sequence, could this have caused any damage to the mp3 module and or relay module, the relay module was clicking and flashing, i never saw the power light come on for the mp3 module, not sure if it was just bad or if having it connected to the arduino before firmware was installed could have done anything, and same on the relay module, the relay module lights flash as they go through sequence but the relays are not switching.
Click to expand...


----------



## iowachap

*wierd, all is good*

Ok, uhh that was strange, all is good, I just pulled the jumper off the relay board, put it back on, switched my little 5v power jumpers back to their original devices as i switched to one i knew was working on PIR to MP3 for power to make sure it was not a bad wire, so put those all back to where they were re hooked up and then wallla... the relay board is now functioning.. crazy.. but all good on 2nd build. Laugh, I had it wired in like 20 minutes, I spent more time after. I got enough parts coming to put like 3 or 4 more together..


----------



## iowachap

*shuffled/random trigger sounds?*

Hey Mike,Grin never mind, found it yes you are working on that thought .


----------



## Erebus

Is there a way to not have any ambient sound or to disable the ambient sound? I tried just deleting the sound from the memory card, and then all it plays is the 002 file over and over. I saw that if I left the ambient sound box blank, when I tried to transfer the files to the memory card, it won't do it and it says there should be a silence.mp3 file. Is that how you were making it work?


----------



## mikkojay

Is there still a sound files in the sounds subfolder called silence.mp3? If not I can add one. You can use an audio editor to make a short audio file that is basically silent. That will do what you want.


----------



## IMU

I checked the latest download and that file wasn't there so I'm guessing it wasn't included. It shouldn't be difficult to make with Audacity.


----------



## BillyVanpire

here's a handy 30 second clip of silence on youtube


----------



## mikkojay

Yep, Audacity is what I used- that app rocks. Anyway, I updated the download zip file out there and the sounds subfolder now has a 5 second silence.mp3 that may be used as an ambient sound track if you would like.
Thanks, Mike


----------



## MadMedInc

Anybody know where to get the Catalex MP3 player from within the US? We open in a few days and would like to build a couple of these and the only part I can't find within the US are the MP3 players.

Any help is greatly appreciated.


----------



## iowachap

*I haven't seen in US*



MadMedInc said:


> Anybody know where to get the Catalex MP3 player from within the US? We open in a few days and would like to build a couple of these and the only part I can't find within the US are the MP3 players.
> 
> Any help is greatly appreciated.


I have looked myself and could not find them in the US, I wonder if there is an alternate that would work the same. There are other MP3 Module/Shields for Arduino odd thing is sites like sparkfun they are much much much more expensive, I checked for similar parts like even the arduino board on adafruit and sparkfun holy price difference batman..


----------



## mikkojay

MadMedInc said:


> Anybody know where to get the Catalex MP3 player from within the US? We open in a few days and would like to build a couple of these and the only part I can't find within the US are the MP3 players.
> 
> Any help is greatly appreciated.


You can send me a PM, I may be able to help depending on what you are looking for.


----------



## iowachap

mikkojay said:


> You can send me a PM, I may be able to help depending on what you are looking for.


Looks like we could use a US supplier..


----------



## IMU

Just fried everything for my cannon project controller ... guess I was too full of myself. The project is officially trashed and I'm giving up. Thanks to everyone that helped answer my stupid questions and a big thanks to Mike for putting all this together. I really am not cut out for this type of prop work.


----------



## mikkojay

What?!? No way! What happened, loose wires sink ships?
You gotta give more detail!
The thing is in modules:
1) Arduino
2) Relay Module
3) Sound Module
Did you have an "oops" and hit VCC with mega voltage or something?
You were soooo close, I hate to see you walk the plank!

-Mike


----------



## Jaybo

IMU said:


> Just fried everything for my cannon project controller ... guess I was too full of myself. The project is officially trashed and I'm giving up. Thanks to everyone that helped answer my stupid questions and a big thanks to Mike for putting all this together. I really am not cut out for this type of prop work.


I did the same with one of mine. I had a different relay board and like a dummy I sent voltage back into the Nano. Yep, I got to see the magic smoke.

Normally I would be freaking out because it's so close to haunt time, but I decided I would not be using these this season before I even started building one. I've overloaded myself too many damn times to revisit that ulcer.

I feel for you. Keep it on the back burner and make it a project for this winter.


----------



## iowachap

*sorry to hear*



IMU said:


> Just fried everything for my cannon project controller ... guess I was too full of myself. The project is officially trashed and I'm giving up. Thanks to everyone that helped answer my stupid questions and a big thanks to Mike for putting all this together. I really am not cut out for this type of prop work.


Man that sucks IMU, but the parts are pretty cheap, I would do like suggested above work on it this winter. Or try to get more parts in time, but just go on the assumption you wont have it this year but if they get here in time it still could be possible.

dont throw the towel in..


----------



## IMU

I spent hours upon hours trying to figure out where I went wrong. Figured out that when I was taking everything apart I ended up wiring the 12v supply to everything and fried every single component. I was not able to save anything except the PIR ... even fried the micro SD card.

I had bought an extra 1 of the nano, relay board and the sound & micro SD card. So I took almost 24 hrs of work to try everything again to make 1 controller. I checked, rechecked and must have made sure EVERYTHING was done as per the sketch. Everything was wired correctly so I used a USB to turn the power on. It worked, the sequence played so I let it go for a few times and then stopped. I'd go back every hr or so and try it again. It worked. So, I decided I'd wired it to the 12v power supply. Took me 2 hrs to get the nerve up to actually try it. It worked.

Today, I hooked it up to my cannon. The same power supply used to power the nano is used to power an LED light & a small computer fan. It was spotty. Everything would trigger but the LED light & fan wouldn't always get power. Any time I rewired something, I'd quadruple check before turning the power on. I just took it out of the "project box" to check the wiring and placed it back in. Turned power on and everything worked but not to the LED light or fan ... I watched it trigger and POOF ... the flippin magic smoke again! I don't get it ... I don't understand ... how can it be wired correctly, work and then somehow it burns up?

I really really thought I'd figure out how to make one of these and get everything to work. Again, I was wrong. I can't ask for help because you'd have to see it in person and that isn't possible. All of you who have this thing down ... more power to you ... guess I'll stick to making stuff out of cardboard and tell people to "imagine" things moving and being cool. I have no other choice but to throw in the towel. So far, I've burned up and wasted at least $100 in this project that will never work and has since gone in the trash.










(You'll have to picture that the NO Relay wiring is what is in the Relay Module at the lower left corner.)


----------



## mikkojay

Dave, what kind of fan were you using?
It sounds almost like having the fan motor turn on and off, while tied directly to the ground of everything else, could have induced a massive negative spike back into the system.

When you had everything working in your video, were you running the fan from a separate power supply?
It sucks that you had to experience this- send me a PM, that canon is too kick ass to not put on a show like it should

-Mike


----------



## iowachap

I am with Mike, the cannon has to be brought to life, my guess would be something in the fan, has the fan been connected to a 12v power supply all on it's own and tested to function, wondering if it needs its own power supply separate from the arduino.


----------



## mikkojay

Yes that has to almost certainly be what is going on.
I did a quick Google search for "DC Motor Inductive Kickback" and this was one of the first links I found that spelled a lot out:
http://electronics.stackexchange.com/questions/95140/purpose-of-the-diode-and-capacitor-in-this-motor-circuitThe relay in Dave's setup is basically the same as Q1 in this setup:








The diode across the motor is helping to dampen the spike that would result when the relay opens (after being closed).
This is the same phenomenon that is discussed in the "flyback diode" document. I was having all kinds of issues trying to use a single power supply while toggling 12v solenoids without using the protective diode.

Dave, I know this sucks, but on the flipside this is something that we can all learn from if we follow Quincy's lead and get to the bottom of what killed this thing. I have Sam running it through the lab right now- check your PM!

-Mike


----------



## iowachap

So if he runs a separate power supply to the fan it would not have this issue?


----------



## mikkojay

That would definitely help. I actually ran into an issue with solenoids on a separate P/S that STILL caused ghostly reset issues because of the huge amount of electrical noise they generated. Once I installed the flyback diodes, the problem totally went away. I was even able to use a single P/S.

I am currently trying to recreate this scenario. I am setting up a 5 amp DC automotive motor that will be toggled via the nano. I am going to use a 29 amp 12v regulated power supply. No diode first- I actually want to try and fry one for testing purposes 

-Mike


----------



## mikkojay

*First Test Flopped*

Well, the motor I used in my first test didn't fry it like I hoped it would :zombie:
Maybe I will try another motor.






Mike


----------



## Batbuddy

I bet your right about the flyback diode. any time you are coupling an inductive load, (think; motor, relay, coil, etc) with a low volt sensitive electronic circuit, you should always have a diode installed as Mike pictured. Man I am sorry it all fried, I got a bunch of extra's of everything when i ordered from China and it all was fairly cheap. I could send you stuff if you want to try again. We can help you carefully draw up a schematic and make sure it is all protected. The relay boards have the diode built in and hence why they don't fry the Arduino. I bet the reason that Mike's test above didn't fry the Arduino is because the relay board has the diode built in. If IMU was running the fan without the relay board then that would explain why it fried. According to the diagram that IMU posted he had no protection diode (flyback) on the motor. Seriously IMU I want to see you succeed so let us help you and I can send you stuff to get that cannon shooting Hot Lead!


----------



## Batbuddy

Mike, Try running the motor directly from the power supply and have the Arduino run some thing else via the Relay board. So that the motor is constantly running, and the motor is being powered on the same lines as the Arduino. That will be more like IMU's set up. Or maybe even better, don't try it, and add a diode on the motor first and see if it will protect the Arduino. I am wondering if the MP3 player and relay board would really have fried, because the kickback would have to go through the 5v regulator and I speculate it would kind of protect the other boards from over voltage by blowing out. It would be interesting to see some pictures of the fried boards if they are still around to see what actually fried on them.


----------



## IMU

I went and spoke to a Master Electrician I work with and him & and his assistant both suggested I keep the 5v & 12v separate. They both believe it was with the grounds being tied together.

In all my testing before this weekend I had a separate power source for the nano and the LED & Fan were tied together to a second power supply. I also had wired the relays to switch the black wires & not the red. I have since changed that because I was told not to switch the ground?

This project was going to have 2 controllers going and also 7 "devices" so it brought me up to having 4 separate power supplies and I was trying to cut that down. If I could get the 1st controller powered by the same wall wart and power the LED light & fan as well, I wouldn't need 2 supplies for each setup?

Here is the fan I'm using: 




This is an Ultra Strong and high flow rate DC Fan and you will be amazed by the amount of wind it blow! Ideal for computer cooling system or any kind of cooling and you won't be disappointed. Must be careful for the blades as it spins in very high speed!

Specification
Power: DC12V
Current: 1.8A (3A max)
Watt: 36watt
Fan size: 120mm x 120mm x 38mm(4.725" x 4.725" x 1.5")
Flow rate: 200CFM
Max speed: 4000+/- 10% RPM
Noise(max): 59dBA
Number of wire: 2
Length of wire: 30cm or 12"

The description says it's a 2 wire fan, it actually has 3 wires. It is polarized [only works wired correctly (red to red & black to black) and the 3rd wire I believe is a control wire (blue)]. I didn't do anything with the blue wire but the black & red are wired accordingly. I did check and if the fan isn't wired correctly, it will not power on.

I would like to get this working again and I really appreciate all the offers and support. It means a lot. Right now I'm way to "gunshy" to keep at it. If it makes a difference, I am using barrel jacks/plugs & panel jacks for my relay connections (not direct wired from relays to LED light & Fan).

I have not tried any of the parts from the second attempt to see what actually got fried. It could be just the MP3 module. It was next to the nano when I saw the smoke and quickly pulled the plug.


----------



## iowachap

interesting about the note to switch hot not the common/gnd, I too have my 2 110v ac motors being switched on the relay on the gnd, i did a search and it seems other say the same switch the hot with relay not the gnd/neg.. but i also have everything plugged into a powerbar with a breaker switch for extra safety.


----------



## iowachap

*ch340g not in sync: resp=0xff*

Ok, I purchased these from dxsoul.com they use a micro usb vs mini usb, and from reading a ch340g serial chip, I wanted to try this company as I was under impression they shipped out of US, DOH, only realized after that they ship from china, and i had a feeling i should have stuck with the ones I knew for sure worked for me, I do have 2 more coming, so wanted to see if anybody else had this, I have downloaded the driver for the ch340g and continue to get the message in title not in sync: resp=0xff, I even removed all wires just connecting USB, i can see power on, and i do when trying to upload see a few rx blinks before message. here is the link to the nano, it is yellow.

http://www.dxsoul.com/product/new-n...improved-version-for-arduino-yellow-901369070

here is the complete output

-Cavrdude.conf -v -v -v -v -patmega328p -carduino -b57600 -P\\.\COM5 -D -Uflash:w:"C:\Users\cchapman\Downloads\fourbanger\fourbanger\Hex\FourBanger_Standalone_1.2.hex":i

! > 
! > avrdude.exe: Version 5.11, compiled on Sep 2 2011 at 19:38:36
! > Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
! > Copyright (c) 2007-2009 Joerg Wunsch
! > 
! > System wide configuration file is "avrdude.conf"
! > 
! > Using Port : \\.\COM5
! > Using Programmer : arduino
! > Overriding Baud Rate : 57600
! > avrdude.exe: Send: 0 [30] [20] 
! > avrdude.exe: Send: 0 [30] [20] 
! > avrdude.exe: Send: 0 [30] [20] 
! > avrdude.exe: Recv: 
! > avrdude.exe: stk500_getsync(): not in sync: resp=0x00
! > 
! > avrdude.exe done. Thank you.
! >

! >


----------



## Richie4540

Do you have the arduino IDE software on your computer if so see if you can talk to the board without using the FB program, check you have selected the correct port, correct board type, and then try to upload a simple example program, doesn't matter what it is just check you can connect, if you can get that to work, then go back and try the FB program. Also check your driver the link you postage a couple of the people seem to mention different driver, and I think earlier in the post there were other drivers mentioned.


----------



## iowachap

yep tried the IDE and same error, i installed the CH341SE driver, and tried on desktop PC and laptop PC both same, I have 1 more to try when I get home from work, and will see if that one does the same or not, I verified in the IDE that it is the right port showing same as DEvice Manager, several hours of screwing with it.. lol..


----------



## mikkojay

That is a different board than the blue ones I usually use. The message from avrdude makes me think it may have an arduino uno boot loader (total guess) how about trying to upload the firmware with the uno option selected vs the default nano selection. Just a fluke guess, but worth a shot
-Mike


----------



## Batbuddy

Not to make things more confusing, but I have been wiring houses for over 20 years I always switch the Hot lines not Neutral, just like your Master Electrician friend said, That is the right way and building code requires it. BUT when dealing with DC stuff like we are with these boards etc. it is customary to switch the ground/negative line, at least that is usually what the configuration is with micro controllers, transistors etc. it is easier to pull an output to ground than take it high or to positive rail voltage. In DC circuit design it really doesn't matter which you switch because voltage only flows one way, but with AC it flows both ways. So to summarize when switching AC ALWAYS switch the hot or Black(usually) Never the Neutral or common(usually white). with DC it really doesn't matter but to make it simple to remember just switch the Positive or Red (Usually) I still think that what fried you circuit was "flyback" voltage (really called Back EMF) from the fan shutting down which would have been stopped by the diode configuration Mike posted. Not trying to sound like a "know it all" but hoping that this might be helpful. For safety sake it will help to operate separate power supplies, but they are all plugged into the same AC circuit, so what is really separating them from one another?... The diodes in the power supplies.


----------



## iowachap

mikkojay said:


> That is a different board than the blue ones I usually use. The message from avrdude makes me think it may have an arduino uno boot loader (total guess) how about trying to upload the firmware with the uno option selected vs the default nano selection. Just a fluke guess, but worth a shot
> -Mike


Grin, yeah i tried that too, i was trying with the IDE all the options, but it seems that nano is no good, because I got home pulled out the 2nd one I got in same order from them, and connected just it to usb and uploaded firmware and it took it no problem, then i rehooked all wires up and tried to connect, nope, so i figured only 2 things it could be the relay board or the PIR as i did not hook up the audio yet. Now the relay board i have from them is a pinch different in that all the lights for the relays are ON and there is a POWER light also which is on, and when the relays kick off they go blink off. So i disconnected the PIR yellow wire from the nano, then re connected the usb and it was able to connect and upload all, very odd I had read folks saying if you had something connected to the 0 pin it would not RX, the thing seemed to function but would not send data but the relays were kicking off.

So for kicks i thought what if something is wrong with this PIR, so I pulled out my 2nd one I ordered and connected it and tried to upload, BINGO no problems all good, so it seems odd that the PIR and Nano on first set were not good unless the nano or the pir jacked each other one way or other.

All that time wasted on that first nano lordy.. lol oh and here is the relay board I got from them.. http://www.dxsoul.com/product/4-cha...ay-module-w-high-level-trigger-blue-901223433


----------



## iowachap

Ok so Batbuddy, I used a 2 prong extension cord as the 2 motors I am using for my hack in the box are from spiderhillspropworks, so it is just a 2 prong plug, I cut the common side and tied each leg to the relay common and NO, so I should cut the hot side and tie those across the relay? Grin I got all those wires stuffed inside that little black box..

So yeah what I did was use an extension cord that has 3 plugs and using 1 relay i have the 2 motors and then 12v LED lights plugged into that plug that is switched on with 1 relay.. I can switch it, if you say it really needs to get swapped, let me know what you think on the above. Also if i would be ok to re splice the neg side back together solder and shrink tube it and be ok, or toss the cord in a junk box and buy another...



Batbuddy said:


> Not to make things more confusing, but I have been wiring houses for over 20 years I always switch the Hot lines not Neutral, just like your Master Electrician friend said, That is the right way and building code requires it. BUT when dealing with DC stuff like we are with these boards etc. it is customary to switch the ground/negative line, at least that is usually what the configuration is with micro controllers, transistors etc. it is easier to pull an output to ground than take it high or to positive rail voltage. In DC circuit design it really doesn't matter which you switch because voltage only flows one way, but with AC it flows both ways. So to summarize when switching AC ALWAYS switch the hot or Black(usually) Never the Neutral or common(usually white). with DC it really doesn't matter but to make it simple to remember just switch the Positive or Red (Usually) I still think that what fried you circuit was "flyback" current (really called Back EMF) from the fan shutting down which would have been stopped by the diode configuration Mike posted. Not trying to sound like a "know it all" but hoping that this might be helpful. For safety sake it will help to operate separate power supplies, but they are all plugged into the same AC circuit, so what is really separating them from one another?... The diodes in the power supplies.


----------



## Malaki

Hey all, new to haunt fourm and just wanted to say I really look forward to putting some of these together. I ordered enough parts for 10 of them yesterday. I also wanted to toss my experience in the mix, I am an electrician and an industrial instrument mechanic so I have a few things to say.

Firstly, the back EMF produced by switching a DC inductive load(anything with a coil in it, solenoid, motor, fan etc.) can be massive. It's been a while since I did the calculation but if memory serves, you can get up to 100,000VDC induced back into a circuit when switching and the magnetic field is collapsing. There is VERY small current but more than enough voltage to fry electronics. My suggestion is to use the diode's that were mentioned earlier and put them as close to the terminals of the load(motor, solenoid) as practiable.

Secondly is re-iterating what Batbuddy said earlier, it is against electrical code to switch the neutral conductor on an AC (household) circuit, the hot or designated switchleg are the only thing that can be switched.

I hope that cleared a few things up and if you have any questions feel free to shoot me a PM, I don't often get to browse the fourms, especially since I've got some controllers to build.


----------



## iowachap

Welcome to the thread Malaki, good to see another experienced electrician on board. So sounds like I need to go back into my prop controller project box and switch my relays to the positive line from the neg leg on my 2 little motors.


----------



## iowachap

*jumper on PIR motion sensor yellow arduino ch340g*

So more to add on that yellow arduino board (note i will never get those again) The PIR sensor with the jumper and in directions states to put in upper position, I read this is the re-trigger option? I noticed that the scare sequence was just continuously firing off, even when I would completely enclose the PIR so nothing could be seen. I also was never able to get into the PIR test mode as it was just continuously firing off. I thought it might be the sensor itself or maybe my wiring job, I cut the wire re did them for PIR, same, then I figured I would use a PIR I got from my first ebay order that did not even have the pins for the jumper, so there is no jumper on it but both work fine. When I hooked that one up it worked, and I could also get into PIR test mode.

So I thought well maybe it is that jumper, so I took the jumper off, and sure enough it worked with no issue, I put the jumper back on while in PIR test mode and i could see that the PIR was just continuously firing off, ture, false, true false, take the jumper off, works.

So I thought well maybe its just those PIR sensors acting odd so I hooked up the PIR sensor to my other set up controller with my blue arduino nano board, the PIR had the jumper on, and no problems works just fine.

So chalk that up to another reason to stay away from the yellow arduino nano CH340g

Ok now time to hook up my fog machine controller... I got a single air cylinder also hooked up and its working for a air blast, for the zombie area.


----------



## Batbuddy

Yes Iowachap switch the wire on the relay to the hot ones. It should be the black ones in the cord and you should not have a problem soldering the white and heatshrink tubing the solder joint. I am guessing that the 12v LED light has its own walwart or something as its power supply? You aren't trying to use the relay to switch AC and DC on the same relay are you? I sounded a bit confusing the way you explained it... Sounds like the yellow boards are goofy. I got some blue nano's from China and they have the ch340 serial decoder as well, but they are working fine for me. So who knows?


----------



## IMU

*The cannon controller saga continues ...*

After the last puff of magic smoke I pulled all the components apart and let this sit in a box. Yesterday, I hooked up the nano to my laptop and it seems to be fine. I pulled the micro SD card out and it too was fine. The relay board looks line but 2 of the relays are missing part of the paint marking on the top. Wasn't sure if it fried any of the relays so I took it easy.

I hooked up the nano to the relay board & the PIR. I set off a test sequence using the PIR and it worked. The relays clicked so looks like that was fine. Next I decided to see if the MP3 board was still good. I wired it up and set off the sequence again. What do you know ... I had sound as well. So, whatever let out a puff of magic smoke didn't release it all.

I tried my power supply without the relays and both the fan & LED comes on. I figured I'm good right, but no.

When I plug the power supply into the relays (separate from the nano) and trigger the sequence nothing happens. The relays close but no power goes out to the LED or fan. I took the fan out and wired in a flyback diode just in case that was the issue. Again, nothing. I checked all the wiring and then it worked. Wow, I got it working. Here is where it gets strange ...

This morning I tried everything again and the LED & fan wouldn't come on. Checked the wiring and still nothing. I plugged the fan & LED directly into the power supply (without the relays) and they come on. Now I'm thinking the relays might be bad. Just for the heck of it I used a different power supply (its too small to run both the fan & LED because its only a 500mA) and everything worked. I ran it several times and each time both the fan & LED came on. When I switched back to my other power supply, nothing would work. Do you think the power supply got messed up somehow when the magic smoke came out the last time?

I don't understand ... why would the power supply work without being run through the relays but when switched ... nothing happens/gets power?


----------



## IMU

I have another 12V 5A power supply and gave that a try. Still very spotty ... most times it won't turn on the LED or fan with the relays. It isn't a power supply issue. Do you think that it might be the relays? If I use a power supply that is 12V 500mA it works but anything higher and it rarely works. The controller is working just fine but not sure what else it could be.


----------



## iowachap

IMU said:


> I have another 12V 5A power supply and gave that a try. Still very spotty ... most times it won't turn on the LED or fan with the relays. It isn't a power supply issue. Do you think that it might be the relays? If I use a power supply that is 12V 500mA it works but anything higher and it rarely works. The controller is working just fine but not sure what else it could be.


I am saying yes, I have a relay board, I posted a few days ago about how it was not clicking the relays but the lights on the boards indicated it was. Then all of a sudden they started to click and work. Last night I went to run it and again that relay board would not work, I figured it had to be the relay board, so I pulled out another I just got in the mail and bam it worked no problems.


----------



## iowachap

Batbuddy said:


> Yes Iowachap switch the wire on the relay to the hot ones. It should be the black ones in the cord and you should not have a problem soldering the white and heatshrink tubing the solder joint. I am guessing that the 12v LED light has its own walwart or something as its power supply? You aren't trying to use the relay to switch AC and DC on the same relay are you? I sounded a bit confusing the way you explained it... Sounds like the yellow boards are goofy. I got some blue nano's from China and they have the ch340 serial decoder as well, but they are working fine for me. So who knows?


For my hack in the box I took a extension cord that has 3 2 prong outlets on the end, I cut the negative side so one leg goes to NO side of relay and the other side goes to common, I have the 12vdc plugged into one outlet and then the 2 110v ac outlets plugged into the other 2 outlets, the 2 prong end of the extension cord is plugged into a power bar that is standard 110v ac power, my led lights are converted by its power supply.


----------



## Batbuddy

Yeah I am betting on the relay Board being bad. The contacts in the relay may have gotten burned or deformed some way though that usually only happens from high current and not a high voltage. But awesome that the Nano and MP3 player survived. What is the ratings on the actual relays? I think mine are like 250V 10 A but it might be that the relays are able to handle the small power supply but not the larger one although that seems odd.


----------



## Batbuddy

iowachap said:


> For my hack in the box I took a extension cord that has 3 2 prong outlets on the end, I cut the negative side so one leg goes to NO side of relay and the other side goes to common, I have the 12vdc plugged into one outlet and then the 2 110v ac outlets plugged into the other 2 outlets, the 2 prong end of the extension cord is plugged into a power bar that is standard 110v ac power, my led lights are converted by its power supply.


OK that makes sense, one way to fix the safety of the switching is to plug the hacked extension cord in to the power bar backwards flipping the prongs to the opposite poles. Usually those type of cords have a wider blade on the neutral and a narrow on the hot but you could cut it down or file it down and then mark it with a Sharpie or something to be sure to plug it in the right way... Maybe not the best way but it would make it so you didn't have to redo everything else.


----------



## IMU

Here is one of the boards I ordered:










On mine, after the puff of smoke some of the white paint disappeared so only some of the writing is still visible on 2 of the relays. I am only guessing that would be caused by something happening to the relay?

I ordered 3 new relay boards and 3 nanos so hopefully they will arrive before halloween so I can swap out the relay board and see if that does it.



Batbuddy said:


> Yeah I am betting on the relay Board being bad. The contacts in the relay may have gotten burned or deformed some way though that usually only happens from high current and not a high voltage. But awesome that the Nano and MP3 player survived. What is the ratings on the actual relays? I think mine are like 250V 10 A but it might be that the relays are able to handle the small power supply but not the larger one although that seems odd.


----------



## iowachap

In that photo it does not look like it has the jumper on the jd-vcc / vcc, 3 boards i have are exactly like this one but they have the jumper on the jd-vcc / vcc the other board i got from dxsoul has vcc/vcc1 jumpered and a a extra pin.. this is the relay board where it also has a PWR light and when powered up all the IN1/2/3/4 lights were lit up..


----------



## IMU

*The cannon controller*

iowachap - that was just a product photo. If you look at my photo, it has a yellow jumper on the relay board.

Here is my controller setup:










The nano has a separate power source. The 2 panel jacks connected to the relays have their own power supply. The nano & all the components run fine. The 2 panel jack won't get power when the relays activate the NO position. The 2 white wires are connected to a 3rd relay that plugs into my fog remote hack. When the relay closes, the fog remote triggers the fogger.

Up until I starting frying components, everything worked just fine. Now, the relays won't let the power go to the panel jacks. Mike suggested that maybe it was the barrel connectors but I don't think it's that.


----------



## iowachap

*Ok i thought that would be it*

Hey what box are you using?? Also what type of connectors are you using to the relays that are mounted on the box..  I like your box, i been using those black ones, I like the clear because you can see the lights working, I have a hard time even hearing the relays clicking on those black ones.


----------



## iowachap

*Good idea!*

That is a good idea Batbuddy, I think the plug does have that fatter/wider prong side, if so yes I could even find another cord that does not have the wider one and then use my multimeter to know which one is the hot and then mark with perm marker the neutral so the hot gets into right socket





Batbuddy said:


> OK that makes sense, one way to fix the safety of the switching is to plug the hacked extension cord in to the power bar backwards flipping the prongs to the opposite poles. Usually those type of cords have a wider blade on the neutral and a narrow on the hot but you could cut it down or file it down and then mark it with a Sharpie or something to be sure to plug it in the right way... Maybe not the best way but it would make it so you didn't have to redo everything else.


----------



## IMU

iowachap - I used the fishing tackle box Jaybo posted here: http://www.hauntforum.com/showpost.php?p=835445&postcount=219. I just popped off the two side clamps since I needed access to the sides.

The connectors are dc panel jacks ... used for barrel plugs:











iowachap said:


> Hey what box are you using?? Also what type of connectors are you using to the relays that are mounted on the box..  I like your box, i been using those black ones, I like the clear because you can see the lights working, I have a hard time even hearing the relays clicking on those black ones.


----------



## Batbuddy

If the writing on the relays has disappeared I bet that they got hot and are likely the thing that fried. You could get new relays from tayda electronics that would solder into that board, but with the boards being so cheap, it may not be worth the trouble. That box looks top notch BTW.


----------



## jasonsbeer

Mike- 

I'm looking for the sketch file. It must have been included in the original version of your software, because I made one or two edits, but darned if I can't find it after installing the newest version. Are you able to share it? Need to get that electric chair running just right.


----------



## mikkojay

I didn't include the source in the last few downloads. Sharing the source ended up being more trouble for me than it was worth at the time because it caused a tidal wave of questions that I just don't have the time to deal with. The way it is now, you can configure the heck out of this thing to use a PIR with high or low trigger, or just a TTL trigger. The TTL outputs can be defaulted to high or low outputs. 

So what are you needing yours to do that the current version does not do? What did you change to make yours different? 

-Mike


----------



## jasonsbeer

mikkojay said:


> I didn't include the source in the last few downloads. Sharing the source ended up being more trouble for me than it was worth at the time because it caused a tidal wave of questions that I just don't have the time to deal with. The way it is now, you can configure the heck out of this thing to use a PIR with high or low trigger, or just a TTL trigger. The TTL outputs can be defaulted to high or low outputs.
> 
> So what are you needing yours to do that the current version does not do? What did you change to make yours different?
> 
> -Mike


Thanks for the response. PM sent.


----------



## smarts

Hi Mike,

Thank you and a few others on this site for all that you have done for us newbies to understand the process of making all the components work together. 

I downloaded your software for the Fourbanger, but am clueless on how to operate it. I understand after watching your youtube videos on how to upload all the software and the media files, but I am having a difficult time creating my own sequence. I know you have been trying to work on a video for that but is their at least a few steps you can state that can get us newbies started.

Thanks in advance

AJ


----------



## IMU

*Very quick & basic saftware operation*

Real quick:

Start the program and from the file menu, choose: new controller.

Under media, choose the MP3 file for background sounds.

Then choose the scare option (left side menu)

Pick the scare audio MP3 file.

Bottom section, the 4 relay channels

Click the pointer square and turn that into the pencil icon.

Click the left mouse button to draw a solid line in the channel associated with your relay. Right click to erase the solid line to adjust timing.

Do that for each relay channel and then save.

When your done, upload it to your controller and trigger the sequence.

Your best bet is to play around with it, its very simple and easy to use. Mike did a great job writing the software so you don't have to code anything.



smarts said:


> Hi Mike,
> 
> Thank you and a few others on this site for all that you have done for us newbies to understand the process of making all the components work together.
> 
> I downloaded your software for the Fourbanger, but am clueless on how to operate it. I understand after watching your youtube videos on how to upload all the software and the media files, but I am having a difficult time creating my own sequence. I know you have been trying to work on a video for that but is their at least a few steps you can state that can get us newbies started.
> 
> Thanks in advance
> 
> AJ


----------



## iowachap

just dont forget it does not transfer the audio files over, have to put your audio chip into usb so you can export the audio files to the micro memory chip to be put back in the mp3 uart board.


----------



## mikkojay

Dave's recap sums it up very well- the best part was at the and where he mentioned that you just have to play around with it a while 

Anyway, I know I had been meaning to throw together a quick and dirty overview video so I threw this one together:





It should help those who have not had a chance to dig in too far and need a place to start.

Thanks, Mike


----------



## Malaki

Hey Mike, is their any reason to not soldier all of the headers on the nano except that they are not all used for this project?


----------



## mikkojay

Malaki said:


> Hey Mike, is their any reason to not soldier all of the headers on the nano except that they are not all used for this project?


Nope, that's it. Just being lazy. I sometimes skip the headers altogether and just solder wires right to the board. It just depends on what it will be used for, what kind of jumper wires I have in my junk box at the time, and what kind of mood I'm in. No specific recipe here.
-Mike


----------



## MBrennan

This thing is SO fun!

I have a question about triggering. 

When I initially uploaded my sequence and powered everything up, it acted as I expected. The ambient track started playing, and it didn't trigger until I manually triggered it with a switch (No PIR connected). Scare sequence played and went back to ambient track until the next time I triggered it. All's Good.

Then I powered everything down, and the next time I powered everything up (and subsequent times thereafter), the ambient track would play shortly, and the scare track would then play (without triggering). And then after the reset time, the scare track would play again (again without triggering), until I shut everything back down.

Do I need to upload the sequence again, or is there another solution?


----------



## BillyVanpire

MBrennan said:


> This thing is SO fun!
> 
> I have a question about triggering.
> 
> When I initially uploaded my sequence and powered everything up, it acted as I expected. The ambient track started playing, and it didn't trigger until I manually triggered it with a switch (No PIR connected). Scare sequence played and went back to ambient track until the next time I triggered it. All's Good.
> 
> Then I powered everything down, and the next time I powered everything up (and subsequent times thereafter), the ambient track would play shortly, and the scare track would then play (without triggering). And then after the reset time, the scare track would play again (again without triggering), until I shut everything back down.
> 
> Do I need to upload the sequence again, or is there another solution?


my guess is the audio player or sd card..
try formatting the card then transfer audio files to it using the fourbanger app. failing that , re-uploading the sequence might help, might not.

or is this just a pir sensitivity problem? try adjusting the set screws maybe

anyone else had this issue?


----------



## MBrennan

BillyVanpire said:


> my guess is the audio player or sd card..
> try formatting the card then transfer audio files to it using the fourbanger app. failing that , re-uploading the sequence might help, might not.
> 
> or is this just a pir sensitivity problem? try adjusting the set screws maybe
> 
> anyone else had this issue?


I'm not sure the audio player or sd card are the issue. The audio plays fine.

I did use the app to init and upload the audio files, and I also re-uploaded the sequence to see if that would help. It didn't.

It's almost like the trigger input is shorted (which I checked with an Ohm meter and it isn't).

I'm not currently using a PIR (maybe that's the issue?). On initial power-up, the ambient track plays for 25 seconds, then the scare track plays.

When the scare track is finished, the ambient track plays for the 2 min delay, then the scare track triggers again - uncommanded.

It's probably something simple, like having something toggled incorrectly.

I posted a short video in the Showroom of the set-up.

http://www.hauntforum.com/showthread.php?t=42163


----------



## iowachap

i had the issue when i had that yellow arduino nano board, i thought it was the PIR sensor which had the jumper pin that in instructions says make sure is in the upper most position, my first 2 PIRs did not have that jumper pin installed, so I thought maybe that was causing an issue. I took off the jumper pin and it then worked ok with the yellow arduino board. It was like it was constantly going into trigger, it would not even allow me to upload to the board once it triggered the first time, had a hard time going into the PIR test mode too until I took that jumper pin off.


----------



## MBrennan

Here is a few pics of my FourBanger.

I enclosed everything in a standard 2-gang electrical box with an extension.


























I can still even get to the SD card without removing the outlets (still have to remove the cover).


----------



## MBrennan

iowachap said:


> i had the issue when i had that yellow arduino nano board, i thought it was the PIR sensor which had the jumper pin that in instructions says make sure is in the upper most position, my first 2 PIRs did not have that jumper pin installed, so I thought maybe that was causing an issue. I took off the jumper pin and it then worked ok with the yellow arduino board. It was like it was constantly going into trigger, it would not even allow me to upload to the board once it triggered the first time, had a hard time going into the PIR test mode too until I took that jumper pin off.


Strange!

Since I'm not using a PIR, it rules out the issue(s) you were having.

Still scratching my head...


----------



## Batbuddy

I had a similar issue and couldn't figure it out either, so I switched SD cards and uploaded the mp3 files again and re installed the Arduino sketch and it all worked again and stayed working it won't hurt to reformat the SD and try again. Incidentally the first SD was a 64GB (SDHC) and so I thought it might be an issue with that card not being supported by the MP3 player so the second SD was just a 1 GB.


----------



## MBrennan

Billy and Batbuddy I think you were both right!

I re-loaded the sketch and re-formatted and loaded the SD card, and it seems to be working correctly now.

This happened once before and I re-did everything too. Might have had a stray electron taking up residence causing the issue.

Thanks for the input, all!


----------



## joker

This looks great! Thanks so much for sharing mikkojay.

I'm in need of an audio only controller for 3 separate audio tracks, but I need them to all start at the same time for the effect to work. Would it be possible to control say three mp3 boards simultaneously or if that's not possible could I trigger 3 separate 4bangers with one input?


----------



## IMU

joker said:


> if that's not possible could I trigger 3 separate 4bangers with one input?


You can trigger a separate 4banger with another without using another PIR. I was messaging Mike about this for another part of my cannon project a month or so ago and here is what he said:

_When the controller is triggered (either from the TTL pin 11 or PIR A5) the controller will output a momentary LOW on pin 12. That means that pin 12 on the "main" controller can be wired to a second controller's TTL input of pin 11. When a sequence gets kicked off on the main controller, the sequence on the second controller will go off at exactly the same time._

Hope that helps. When I got it to work, I ended up having to tie the grounds together from both boards since I was using different power supplies for each nano. I would imagine, if you daisy-chain them together you could have each trigger another. I haven't tried this past 2 so I can't confirm this will work.


----------



## IMU

Latest update: I received my replace relay boards and a few extra nanos. I took out the relay board I thought was the issue and replaced it with a new one. Wired everything back up and again ... still the same issue. Maybe it will supply power to my jacks but usually not. Looks like I chose the correct path and scraped this project. Actually, I cancelled the display this year anyway (due to personal issues) so I have a whole year to tear it apart and try again.


----------



## joker

IMU said:


> You can trigger a separate 4banger with another without using another PIR. I was messaging Mike about this for another part of my cannon project a month or so ago and here is what he said:
> 
> _When the controller is triggered (either from the TTL pin 11 or PIR A5) the controller will output a momentary LOW on pin 12. That means that pin 12 on the "main" controller can be wired to a second controller's TTL input of pin 11. When a sequence gets kicked off on the main controller, the sequence on the second controller will go off at exactly the same time._
> 
> Hope that helps. When I got it to work, I ended up having to tie the grounds together from both boards since I was using different power supplies for each nano. I would imagine, if you daisy-chain them together you could have each trigger another. I haven't tried this past 2 so I can't confirm this will work.


Thanks for the reply IMU that's what I was hoping.


----------



## BillyVanpire

regarding erratic audio & relay behavior , i noticed after connecting a wall adapter to the nano clone's 5v & ground *in reversed polarity* that things go screwy.
(plug didn't have a fat prong.. and i guessed wrong without my trusty multimeter)

first time it plays the ambient 001.mp3 but then triggers before the 30 sec boot delay. after that it only plays the 002.mp3 as both ambient and scare.

un-reversing the polarity and hitting the reset on the nano seems to make everything work as it should. (so far)


----------



## Malaki

Finally got most of my parts and was able to do a firmware upload as well as upload the test sequence and my own sequence for a TCT that I'm hoping to get filmed and posted but time is an enemy now!!

I do have a question tho - After the sequence plays and is waiting for the "End sequence delay" to time out, the pre-loaded blink sequence runs on pin 13 and the internally connected led. I guess my question is shouldn't uploading a new sketch wipe the pre-loaded blink sketch??

BTW Mike, great little project and thanks for sharing:googly::googly::voorhees::googly::googly:


----------



## PYROZMAN29

*4 gang outlet*



MBrennan said:


> Here is a few pics of my FourBanger.
> 
> I enclosed everything in a standard 2-gang electrical box with an extension.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I can still even get to the SD card without removing the outlets (still have to remove the cover).


Do you have more pictures of how you have all this put together?


----------



## PYROZMAN29

Built my first one and used it this weekend. With the help of Mike through email I was able to get some questions answered and get it completed. I will try to post a video sometime. I was wondering what some of you may have used for some sort of bulkhead connectors for power and such? I am looking at building several more in the next year. Some will run 12 volt props and others will run 120 volt. I was looking into something on ebay called an aviation GX16 headphone connector. It looks like it will handle up to 5A and definitely can handle the 120 volt load. Just looking for an easy way to connect and disconnect things.

By the way Mike great job on this controller and the tutorials that come with it. Also for answering all the questions. Looking forward to more form you on prop controllers. I am thankful for the ease of use of the programming software. I think if I had to manually program the Arduino I would have thrown in the towel a long time ago.


----------



## MBrennan

PYROZMAN29 said:


> Do you have more pictures of how you have all this put together?


Yessir:

The Box with MDF to mount components to:









Power Cord and Wall Wart Plug (I use a 9 volt DC since the 12vDC adapters I have measure WELL over 12v on the meter)).









Wiring Harness: 9vdc to the Nano Vin, three 5vdc off the Nano vcc. Grnds all tied together. The screw terminals are (from L to R): 5vdc+, Signal, Grnd (for PIR), then two wires to use for a trigger switch.









Relays: 4 black wires on the right go to the black wire from the 120vac power cord. The colored wires go to the corresponding plugs on the back of the outlet(s).









Break the tab off that connects the top and bottom outlets (HOT side ONLY - small blade slot).


----------



## MBrennan

Pic of the Nano and MP3 mounted to the wood before glueing into the box:









Everything in place ready to connect:









The 4 large colored wires (on the left) from the Relay go to the LINE (small slot) side of the each outlet









What you can't see is that I left the Neutral tabs on the opposite side of the outlet connected on BOTH outlets; therefore, I only needed ONE neutral (white) wire for each outlet (which both get connected to the white wire from the power cord.
You can also see the bare copper wire attached to the green screw, which is connected to the box and green wire from the power cord).









I hope this makes sense and helps a little.


----------



## PYROZMAN29

No that helps a ton. So the wires going to the terminal block for the PIR you just drilled tiny holes an ran them directly to the terminals on the block? Also what gauge wire are you using for the relay to outlets? I think my future builds will probably have 2 AC connections and 2 DC where I can still just use outlets to plug them in and they are cheap. I like the clean look of this. I just quickly threw mine together and put it in a clear snap lock container but want to make it a little nicer since I have a year now. As soon as I get enough posts to add attachments I will try to post a picture and video of mine in action. Thanks for the reply. I love it when we can all help each other out with our ideas. I used the Uno for mine as Mike suggested since it was a first time build, so I ran everything from a portable jump start unit with ac power
and a small radio with an audio in for my sound.


----------



## MBrennan

Yes, I actually mounted the terminal block first, then drilled small holes in the bottom screw terminal to run the wires through.

Here's a little better (albeit blurry) picture. You can also see the extension that mounts on top of the box, which just gives a little more room to help things fit.









Here is the side with the USB access. The opposite side has the hole for the audio jack (seen from the side in the above picture).










The back of the outlets is basically flush with the bottom of the extension, and I used #14 wire for the 120vac. Just pushes right into the back of the outlets.

Glad this helps.

Again, HUGE thanks to Mikkojay for all the work he put into this!


----------



## PYROZMAN29

Thank you for the detailed photos. And yes thanks to Mikkojay for a great project and all the help he provides.


----------



## iowachap

great work Mbrenan I think I will be trying to port mine over to something like this, I too used the clear snap boxes, and the black project boxes, using hot glue to mount them in the boxes with holes drilled for the ports etc.. but yours is one of the best put together I have seen so far.


----------



## MBrennan

Thanks for the kind words.

Not the cheapest way to do it - I just used what I had laying around.

Started shopping to make another one and got sticker shock at the extension-$11.00!?

I may change the terminal block on the next one too.


----------



## IMU

As long as its safe and works, doesn't matter what it looks like... unless it's part of the prop that is seen.  Does look good.


----------



## Jzwilliam

I built the four banger but I am having problems getting the PIR to work. Have it all wired correctly and the serial test shows it recognized but it will not trip. I have read else where that some boards require a pull up resistor to make it work. Has anyone else had this issue and does the resistor fix it.


----------



## Jzwilliam

I built the four banger but I am having problems getting the PIR to work. Have it all wired correctly and the serial test shows it recognized but it will not trip. I have read else where that some boards require a pull up resistor to make it work. Has anyone else had this issue and does the resistor fix it. I am using a clone board from China and can't find any documentation on it.


----------



## IMU

Jzwilliam - have you tried the PIR tester in the software? You may need to adjust the knobs and check to see if you need the jumper. The other option is to try another PIR and see if that is the problem? As for the pull up resister, I don't think that will help this issue.


----------



## BillyVanpire

i hooked up a small strobe light's common wire to relay and im getting an audible clicking through speakers on the same circuit.

anyone had this problem?

strobes are an inductive load like a solenoid i believe..

can i use the same diode trick from the solenoid fix?


----------



## Malaki

I built a few of these and ran into a problem when using the same 12V supply to VIN and power for the relays, even with the diodes I would get erratic audio and relay action. To solve this I did completely separate power for the relays so the controller part and switched part are separate. Little bit of a pain in the @$$ using 2 wallwarts but it solved my issues.


----------



## IMU

I ended up having to keep the power supply separate as well. I don't mind it that way ... it also keeps me from frying the components.



Malaki said:


> I built a few of these and ran into a problem when using the same 12V supply to VIN and power for the relays, even with the diodes I would get erratic audio and relay action. To solve this I did completely separate power for the relays so the controller part and switched part are separate. Little bit of a pain in the @$$ using 2 wallwarts but it solved my issues.


----------



## David_AVD

Could it be that whatever you're switching with the relays is causing the 12V to drop down a lot ?

Maybe a higher current power supply or heavier cabling is required.

Also, I haven't checked the 4-banger design lately, but maybe a series diode and reservoir capacitor for the board supply will help. This would stop short power dips from affecting the power rail of the board.


----------



## BillyVanpire

Thx for the replies. 

I should say the strobe is ac powered. 
Its plugged into a power strip along with powered speakers 
and an atx power supply for the 12v & 5v.


----------



## David_AVD

No, the "diode trick" is not applicable in the case of AC powered devices.


----------



## GPSaxophone

Got my Fourbanger installed in my grandfather clock. It works beautifully! Thanks for putting this together, Mike. I look forward to building a few more items now.


----------



## Jzwilliam

IMU said:


> Jzwilliam - have you tried the PIR tester in the software? You may need to adjust the knobs and check to see if you need the jumper. The other option is to try another PIR and see if that is the problem? As for the pull up resister, I don't think that will help this issue.


IMU I did try the PIR tester but it was not tripping. I was recognized in the serial connection but could not get anything even with the pots turned to the highest settings. I may have got a bad PIR. I bought one from Radio Shack and got it to work except it is not adjustable. I'm going to have to work with it to narrow its area of response. Thanks.


----------



## BillyVanpire

Jzwilliam said:


> IMU I did try the PIR tester but it was not tripping. I was recognized in the serial connection but could not get anything even with the pots turned to the highest settings.


did you read the pir pdf?

the pot on the ground pin side if for sensitivity (distance)
the other pot is for sending a pulse to the arduino, 
it should only be moved a tiny bit (16th of a turn) to send a short pulse.

i thought i had a screwy one too, til i set it properly, hope that helps


----------



## iowachap

Pre halloween night fun with neighbors, friends I have found a few little issues, seems that the small server wire connectors may not be good for running 12v power to a solenoid to blast air, i have the four banger prop relay set to blast air like 15 times off and on and sometimes it will work, sometimes it blasts a few times, sometimes a couple, and then sometimes like once or none, the spirit props get triggered so i know thats fine they get triggered on 2 relays to do a foot pad type connection trigger. I have a separate 12vdc power going to the single air solenoid, i figure it is the very small wire in the server connector wire i wanted to use thse for this so I could easily connect and disconnect and now I think tomorrow i am going to just cut the connector and the short wires out and completely use the thicker 4 wire strand direct to the solenoid and see if that will resolve the issue. 

I do know that the server wire was the issue with not triggering another spirit prop from the relay, took like 3 hours to figure out, first I thought it was bad connector and or wire so i replaced one side of connector, then the other i even tested to be sure i got a beep on my tester from one end to the other but at the connection, that was where i went wrong, should have tested from the other side of connector, once i removed that small server wire and connector and used the 4 wire strand direct to the relay, bingo the pir motion, relay sent signal to spirit halloween prop footpad connection to kick the prop off and works perfectly, the problem was the servo wire on that. Now I am thinking it is causing the intermittent issue with solenoid. First thing in morning i am going to cut out that servo wire and go direct with thicker wire. hope it will solve that problem. 

The only other issue is that the PIR for exorcist prop seems way over sensitive, going to adjust the pots to minimum if that dont help, next step is remove the server sensor connection and that thin wire.


----------



## PYROZMAN29

Check out the PIR document. There is a part that discusses making a piece to narrow the beam down with electrical tape. I used it in mine and it works great. 


Jzwilliam said:


> IMU I did try the PIR tester but it was not tripping. I was recognized in the serial connection but could not get anything even with the pots turned to the highest settings. I may have got a bad PIR. I bought one from Radio Shack and got it to work except it is not adjustable. I'm going to have to work with it to narrow its area of response. Thanks.


----------



## PYROZMAN29

Iowachap- I would start with a heavier wire. Also how many amps is the power supply for the solenoid. I'm not an electrical engineer but I assume to create that magnetic field in the could it would take quite a few amps since it is an inductive load. My assumption is that it draws a bigger amount at first. I don't have any 12 volt solenoids to experiment with but I would think maybe some sort of capacitor would help for quick triggers.


----------



## iowachap

PYROZMAN29 said:


> Iowachap- I would start with a heavier wire. Also how many amps is the power supply for the solenoid. I'm not an electrical engineer but I assume to create that magnetic field in the could it would take quite a few amps since it is an inductive load. My assumption is that it draws a bigger amount at first. I don't have any 12 volt solenoids to experiment with but I would think maybe some sort of capacitor would help for quick triggers.


Yeah, it seems it was the actual relay, after doing a few diff things like swapping power supply which i think had 700ma and one had 1.2 A we could touch the wire directly and air solenoid would blast air no problem, so we figured ok lets try switching to another relay, my fog machine was not functioning so i removed the wires for that and moved the air solenoid wires to that relay, and tested without reprograming with laptop, it was a 30 second blast, and it worked, i said to brother maybe it was because the original had many on off blasts.. so i went ahead and moved it on the program in laptop and then connected and reuploaded the new sequence on that relay and tested, it worked, and we did few more times, still worked.. and i put the box back together hoping that was it.. and sure enough it worked through the entire night without a hitch, matter of fact all the props worked through the night and did not falter, we only had to stop traffic flow once when one guy ran so hard into one of the walls a board above that is a very light thin board i put up to keep the ran from sagging the tarp roof fell down, i got ladder fixed and back in biz.. made my night very easy as I was thinking i was probably going to have to fiddle with a prop or 2 at least once.. and I didnt was awesome night.. our donation box only got 17 bucks but hey thats 17 bucks.. awesome turn out one neighbor said they stopped counting at 400 when they ran out of candy and turned the lights out, and yeah we knew we were killing it lol when all neighbors but us had their lights out due to running out of candy.. they were lining up at our driveway at 5:30pm, we start at 6:30pm and there was like 30 people waiting.. and it was steady stream until 9:30pm


----------



## PYROZMAN29

Has anyone tried one of the 75watt 12 volt halogen light transformer to power everything? I ordered one through Amazon to try on my next setup. figured it may simplify setup having one 120volt connection and then stepping down voltage inside the enclosure to run 12 volt items.


----------



## BillyVanpire

PYROZMAN29 said:


> Has anyone tried one of the 75watt 12 volt halogen light transformer to power everything? I ordered one through Amazon to try on my next setup. figured it may simplify setup having one 120volt connection and then stepping down voltage inside the enclosure to run 12 volt items.


nice idea, how many amps is it?


----------



## David_AVD

PYROZMAN29 said:


> Has anyone tried one of the 75watt 12 volt halogen light transformer to power everything?


If it's an old style (heavy) iron cored transformer it will be AC so not suitable.

If it's a (lightweight) switchmode type, it may no be smoothed DC and have way too much ripple on the output.


----------



## PYROZMAN29

Billy vampire it is 75 watt making it a little over 6 amps.


----------



## bjpc2716

it great reading learn alot one questionwhen upload firmware software do you need a pick 3 kit? and to dave what power supply you think we should use here?


----------



## Batbuddy

No, you just need a mini usb cord. Arduino nano's have the USB jack built into them.


----------



## Batbuddy

So I don't want to high jack this thread but I am totally a fan of this controller setup and want you to see what this thing is capable of. This link is to the Doom buggy ride that used this controller to start and stop the ride, and play audio that was synced with the stuff happening in the haunt. :winketon:http://www.hauntforum.com/showthread.php?t=41883


----------



## bjpc2716

thanks mate


----------



## iowachap

Batbuddy said:


> So I don't want to high jack this thread but I am totally a fan of this controller setup and want you to see what this thing is capable of. This link is to the Doom buggy ride that used this controller to start and stop the ride, and play audio that was synced with the stuff happening in the haunt. :winketon:http://www.hauntforum.com/showthread.php?t=41883


very interested in seeing the cart set up, more with the motor, what motor you used and how did you keep the cart insync with the audio being played, or did you use a sensor that when the cart got to a point would set off the trigger for that area?

Back in the 90s when we started in California we always wanted to have a cart system on a type of rail that we would not need to worry about the trick or treaters running/falling etc.. like this year a trick or treater got scare and ran into the wall about like full run speed, good thing was our walls held.


----------



## Batbuddy

Keeping things in sync was easy, because the cart moved so slowly there was no coasting going on. We timed the cart going around the circuit several times and it was pretty exact each time. The audio was being played by the 4 banger and the cart was started by a relay board hooked to the 4 banger as well. So the only trick was to make the audio track timed to various points in the haunt. For example we wanted to say "Look over at the Garden wall" at about 8 seconds down the track, because they would be in front of the wall 8 seconds from the start of the motor. I don't think that the timing would be perfect enough for the audio on the cart to coincide with a prop that was triggering outside of the cart on its own circuit, but it did work for general purposes where exact timing was not an issue. As far as the motor and stuff is concerned i will post more over in the Doom buggy thread...


----------



## PYROZMAN29

View attachment CONTROLLER.docx

Here is my controller with it's enclosure and wiring. I know it's rough but worked great being put together kind of last minute. I have great plans for the next one as soon as I get my boxes. They should look a little better from now on. :xbones:


----------



## S L A M

Hey Mike, you went above and beyond on this project. Thank you! I took your advice on getting the UNO being a noob to these. I'm having troubles identifying some of the pins on the UNO while cross referencing from the Nano diagram. Any chance you would have a diagram or picture of an UNO wired up? (Or anyone for that matter)


----------



## IMU

Have you tried looking at a pinout diagram:


----------



## mikkojay

Yes the individual pins on the UNO are all labeled. You can use the same documentation (nano_wiring.pdf) as far as the pin numbering/labeling goes for a nano or uno. The physical locations of the pins may be different between the two, but if you use the pin labels to go by, you should be able to figure it out.
-Mike


----------



## S L A M

PERFECT! Thank you IMU and Mike!


----------



## S L A M

One question, since the UNO has the power barrel jack, do I need to provide power to the VIN pin like the Nano?


----------



## mikkojay

You can just plug your regulated 12v adapter into the barrel Jack and you are good to go. The uno will also be powered by the usb cord while you are programming it, so that is all you need until you plan on running it standalone


----------



## S L A M

Hey Mike,

Thanks again for this! I successfully assembled my controller with little hiccups. I recorded my experience attempting to capture what it's like from a noob perspective. I gave all credit to you and linked your website along with a donation for your efforts. Thanks again!


----------



## mikkojay

That's great- nicely done (video too) here is a copy of the comment I made on your youtube video because I am too lazy to type it again :



> Hey man, great job! This is mikkojay  It is neat to see others have success with this project. After watching your video, I would say that the first thing that jumps out at me is that you could have used MALE-TO-FEMALE jumper wires. This would have saved you a bit of soldering. No big deal though, you used what you had & made it work- so thumbs up for that. I may add a note to the shopping list document to mention this.
> 
> Regarding the manual button programmer board- I added that functionality because "everyone else had it". I added the button board to the first prototype I ever built, then got it to work. I then disconnected it, and never used it again! Programming from the PC is so much easier, I have since gone that direction and not looked back. I have built no less than a dozen of these and when set up correctly, they do what you tell them to!
> 
> If anyone attempts this project who is uncomfortable around electricity, I would encourage them to try it, but maybe go with 12v loads first VS 115v line voltages (i.e. don't try to use it to turn your dryer on and off) That, and PLEASE READ THE DOCUMENTATION- there's a lot of it!


Thanks, Mike


----------



## S L A M

LOL Thanks again Mike!


----------



## S L A M

Hey Mike, did I overlook a document for how to make/upload a sequence to the Arduino?


----------



## IMU

I don't believe he wrote up a document just for creating a sequence but uploading one is (I believe). In one of Mike's videos, he does touch on doing both. Play around with the test script ... changing the length of the colored bars will change the sequence. It also depends on how you wired the relays ... NO or NC ... if that makes sense? The sequence will either turn the relay on or off (cutting power on or off) depending on how you have it wired ... your choice. It's basically a click of the mouse ... left or right ... to either erase or create a line.

EDIT: if you look at the uploading_firmware.pdf (in the Help section of the software), it tells you how to upload the test sequence (page 3).

His video here shows you how to upload the test sequence if you're a visual learner:


----------



## mikkojay

There is also another video (quick and dirty but with lots of info) on page 32 of this thread, towards the middle.
I worked on documentation for about 3 hours and uploaded a new parts list and uno wiring diagram to the website last night.
More documentation is on the to-do list, but tonight I am eating tacos and watching a movie 
-Mike


----------



## LastStopHaunt

*Trigger and PIR*

Mikojay,

I was wondering why there are basically 2 triggers and also is there a way not to have a delay on the PIR side?

Thanks


----------



## IMU

The 2 triggers gives you several options to activate your sequence ... either a button an actor could push, a step pad someone walks on or the PIR when someone walks by. It's not unusual, most controllers gives you the same options.

As for the delay on the PIR, I don't think I've notice a big lag when triggered.


----------



## mikkojay

I don't know what you mean by a delay on the PIR side. There is a configurable reset delay that makes the prop un-triggerable for a number of seconds after a sequence completes, but this has nothing to do with the PIR. You can set it to zero if you want no delay between triggers. You could even jumper the TTL trigger pin to GND and watch it trigger over and over in a loop if you felt the need to do so.

The separate PIR input VS the TTL trigger input was the easiest configuration I could come up with to handle multiple input configurations WITHOUT EXTERNAL PULL RESISTORS. The problem was, you couldn't leave input pins "floating", so you need to enable the Arduino's internal pull-up resistors. Doing so screws things up when you try to hook up a PIR to the same pin. Without going into a long-winded breakdown of each logical combination and how each must be wired, I'll just say that using 2 pins was "the least pain in the ass". Doing it this way also alleviated the need for soldering external resistors and that was one of the project goals.

-Mike


----------



## LastStopHaunt

Thanks I appreciate the answer for sure. I noticed when triggering the PIR there was a 10 second delay before it started the sequence and it didn't seem I was able to change that on the PIR.


----------



## LastStopHaunt

I love this lil controller.... Is there a way within the software to program the relay like you would with the button banger? Like I want each to control a solenoid for the mouth on 4 props and I could bang out the sequence in the software versus the button banger?

Thanks for the great work and continuing updates on this.


----------



## mikkojay

The scare sequence should kick off instantly. If you look in the Help menu, you will find a document called pir_info.pdf that may be able to help you diagnose the cause for your delay. Good luck and let us know how it goes.
-Mike


----------



## mikkojay

LastStopHaunt said:


> I love this lil controller.... Is there a way within the software to program the relay like you would with the button banger? Like I want each to control a solenoid for the mouth on 4 props and I could bang out the sequence in the software versus the button banger?


Yep. If you have the controller plugged in and connected to the PC app, 
click the grey (far right) button on the menu bar of the Serial Communication tab. It has what looks like 3 radio waves on it.

Next, check the red record button on the player toolbar (the one with play/stop/record).

Click the stop button to "rewind" the sequence to the start.

Now press the space bar on your PC to begin recording. While recording, use the 1,2,3,4 buttons to actuate the relays. The button bangs on the PC keyboard will be routed to the controller and will be played in real time.

Press the space bar to stop recording.

The method above emulates the old-fashioned button banger programming. This is also one of the reasons why I try to tell people that the button board is obsolete. That, and it frees up pins that may be used to make an 8-banger if I can justify it 

-Mike


----------



## LastStopHaunt

Thanks for everything you do and the prompt answers. I will give it a try.


----------



## mroct31

Any problems using a 2 output relay board as opposed to a 4? I only need 2 for some props but I'm wondering if I shouldn't just go with 4 for future growth. However, I pretty much see always needing just 2 outputs for many props so just wondering what the feeling on that is. Thanks


----------



## mikkojay

mroct31 said:


> Any problems using a 2 output relay board as opposed to a 4? I only need 2 for some props but I'm wondering if I shouldn't just go with 4 for future growth. However, I pretty much see always needing just 2 outputs for many props so just wondering what the feeling on that is. Thanks


No problem, these are great. I use these to save space and money when 1 or 2 relays is all you need (like for a monster in a box, etc...). I just checked AliExpress and you can get 5 of them shipped for $1.52 each:









-Mike


----------



## jdjuggler

I got this setup and working finally. I wanted to say that I purchased these parts quite a while ago, but just put it all together now. So, I did buy the "button board". I like the flexibility that the button board provides. I think I may have missed the reason for possibly moving away from this. Hopefully, there's no intent on removing the code for the board. If others are interested, the HanWood button module still works fine.
JD


----------



## IMU

I believe he moved away from the button board because you can program it with the software and also use the keyboard as the 4 button banger without adding the 4 button board.


----------



## bhoskinson

*Config Application*

Mikkojay, would you be wiling in the spirit of Arduino open source sharing the code for the config application and the firmware?


----------



## mikkojay

bhoskinson said:


> Mikkojay, would you be wiling in the spirit of Arduino open source sharing the code for the config application and the firmware?


I put a copy of the Arduino code on the web at one time, it should still be out there. I think there is a link in this thread somewhere. As far as the .Net app, I do not plan on making it open source at this time. 
-Mike


----------



## Montclair

Hi Mike, I just got done doing a 2 part video on building these, chaining them together, and using the software.

I did find a bug in the PC application relating to changing audio files. I'm not sure if this has been discussed or not at all. I left it out of the video, but saved the footage and can upload that so you can review.

Essentially, changing the mp3 files in the properties is problematic. I wasn't able to change one of them and get it to stick, until I restarted the program. There may be a variable not getting reset somewhere.

Also, the image of the Uno in the wiring documentation is for one of the CH340 boards. The first Uno R3 I did doesn't use that chip and doesn't have power connectors where you've got the PIR connected. You might want to add an image to the docs for those kinds of boards which are using the official spec (I think). An image is here:










Lastly, I had a great deal of fun building these, and you've done one hell of a job with all of this, including that software. This is top notch stuff, and I'll be making a donation to show my appreciation. *THANK YOU!*

If anyone wants to watch the vids, they're here:


----------



## mikkojay

Hey Montclair, it's nice to see that you are having some fun with this project. I am watching your first video right now. The first thing I see with your driver issue is that you seem to be using an older "non clone" Arduino. Anyone else who buys a newer cheap Chinese clone, they will want to install the driver for those that is located on the buttonbanger.com website. *** It looks like you figured that out by the second video! 

Good to see you exercised your resourcefulness to figure out your wiring needs. I know that the newer Chinese clones also come with a set of male header pins that make using the female-to-female jumpers much easier. That, combined with the fact that they are like 4 bucks, AND the multiple 5v & Gnd outputs, makes them my Arduino of choice. I have been using the male-to-female jumpers on these though, and that allows wiring one of these up in literally 2 minutes like you seemed to discover in your second video.

Regarding your audio file issue, this is the first report I have had of that issue in the 2 years or so that the project has been out there. I heard in your video that you are using XP- that is usually my first question. If you have a video clip, yes I would like to see the steps you took to find an issue. Maybe you can upload the video snippet as unpublished and message me a link to it. Then I can try to recreate the steps on my end. I have really found that most people just need to play with the application for a few hours in order to get the methodology down. 

Lastly, I must say- hats off to you and your channel! I appreciate it when folks take the time to document this type of information for the benefit of others. Your videos are really nicely edited- which video editing software do you use?

Thanks, Mike


----------



## Montclair

Hi Mike,

Thanks for the compliments and the great project! On the boards, yeah... I should have just read the page a little more carefully. And, yeah, they all came with male header pins but I didn't want to de-solder the female connectors and put those on. Soldering isn't my strong point, although, I did just revive my LCD monitor by doing a cap job on it and did my best soldering work, ever, thanks to knowledge I gained from a video posted by Halstaff (if I recall correctly). The wealth of knowledge haunters have is impressive!

Regarding the audio selection bug, the PC I was working on is Windows 7. I'm a programmer as well and have been since the 80's, so I think chance of user error may be low on this one. The bug may be related to the audio timeline and setting the end point on the ruler, then trying to change the audio file, perhaps to one shorter. I really didn't investigate it that much to try and debug, but I do have the footage and will upload and PM you today.

As for the editing software, ungh! Don't get me started! I -hate- it. It's Davinci Resolve 12 by Blackmagic software. I talk about it at the start of episode 8. Episode 7, a 40 something minute video, took me 7 hours to edit. Seven hours. As soon as I have some time, I'm going to dump the software and go with something simpler like Vegas. Resolve is just too complicated and the timeline editing is too cumbersome for all the cuts I need in my videos.

Anyway, I'll get that info up and PM you today. Thanks for responding, the compliments, and for the great project!


----------



## IMU

*3rd Controller, weird issue again.*

OK, I have been building these little controllers over the past few months. This one was my 3rd one I've built. I'm getting better at making them but I always seems to run into issues when I use the relays. My cannon controller acts a bit flaky at times. I went with it on Halloween night and no issues. I haven't tried it again since so I'm not sure if it still acts up or not.

This past weekend I build another controller. Didn't take long and I had it running in about 1/2hr. I use panel jacks as my quick plug-ins for the relays since I only use 12v. I kept the power to the controller separate from the relays (what I plug into it to activate the props).

A quick rundown:
1 - 12v 500mA power supply to the controller
1 - 12v 5A power supply to the relays
I used 2 12v LED spotlights to test

I plugged 2 LED spotlights into 2 relays and ran the sequence 2 times.

Relays 3 & 4, Relays 1 & 2, Relays 1 & 3 and Relays 1 & 4

All sequences fired off fine, ran fine twice and when I got to the last "group" of relay tests ... the second time the controller got flaky. I could hear a buzz and the relays all lit up and then it reset. No magic smoke, nothing got fried ... it's like it got some interference?

The boring video of the test:





Any ideas what is causing this issue? I seem to run into some very frustrating issues doing any electrical or electronic projects. :googly:


----------



## Batbuddy

I watched the video. I wonder if the relay board you are using just has some really low quality relays on it. If they are buzzing and flickering like that it seems like they are sticking or some thing like that. Can you post a close up Pic of the board where I can see the printing on the relays. I am just curious of their ratings and want to see if they are the same as the ones I have been using. I have had no trouble with mine... yet. Also did you get them from China and all at once or are some from different suppliers etc. I got mine from China so that is not necessarily a bad thing. Just trying to get a picture of what you have. Also are you using Nanos or micros for your controller, and maybe a pic of them too.


----------



## mikkojay

The Nanos really have a wimpy 5v regulator on them. You should check out some of the new Chinese clone UNO's. They are on Aliexpress for about 3 bucks. They are much simpler to hook up, resulting in much less "spaghetti factor" and the 5v regulator can provide probably twice the current as the one on the nano. If you are supplying all 4 relays, audio module & PIR from the nano's 5v pin, you could be approaching the threshold of its current capacity. That might cause a "brown out" and make the Arduino reset. Oh man, look at the clock! Need to sleep...
Talk to ya later, Mike


----------



## IMU

OK, lets trying posting these again ...









My cabinet jacks wired to the relays









Controller without the nano









Whole setup inside its box









Relay board









Nano

Yes, it looks like a rats nest but I've done a lot worse. I bought several spare components since I tend to fry things when working with these types of projects. Doesn't take me long to wire them but weeks to try and sort out all these weird "issues".


----------



## mikkojay

That actually looks nice and tidy compared to most of my stuff! 
Does the reset issue go away when there are no loads hooked up to the relays?
Does the reset issue go away if you run with it powered by the USB cable? I noticed you said you have a 12v 500ma adapter- in the parts document I recommend 1a minimum (that is 1000ma).
-Mike


----------



## IMU

Actually, you should have seen my first one I built ... was really a mess.

I won't actually get to test anything out until later today so for now all I can say is that with no load, I don't have any issues with the controller. I never have had a problem (once the wiring is done correctly) with the controller without any loads on the relays. It triggers fine and runs as expected for at least 20 minutes (my unofficial burn-in time).

As for the power supply for the controller ... I'm sure you're correct. It's what I had laying around. I can switch the 2 power supplies and test it again. I will run the tests again (and not bore you with the video) and let you know how it goes.

I really do hate bothering you guys with my stupid issues all the time. Thanks for being patient.


----------



## mikkojay

Hey Dave, maybe you could try running a long test with the nano powered by the USB cable. This would be an easy test that may help isolate what is going on.
I have found that the UNO has a beefier power regulation circuit. The nano has a smaller regulator with virtually no capacitance. If the nano is running at the threshold of its 5v regulator's load capacity, this might make it more susceptible to electrical noise induced fluctuations. 

Another thing I am wondering about is the potential that the lights you are using may have a bit of inductance to them. The only way to know would be to check it with a scope. If this were true, you might be able to benefit from noise suppression diodes on the relays, but that would be a last resort.

Running from the USB cable provides the 5v circuit with a known steady supply of regulated 5vdc. If it runs like a champ that way, that would point to a power regulation issue. That is what my best guess would be at this point. The first few of these I built with the nanos, but the last 5 or so that I have built have all been UNOs. I have a bunch of UNOs- send me a PM if you would like me to send you one.

Thank YOU for your perseverance!
-Mike


----------



## David_AVD

What type of loads are you switching when you have the issues?


----------



## IMU

Well, I've spent almost 1 1/2 hours messing with this thing and I can't even test this now. I've switched out 2 nanos & 2 PIR sensors but it will not recognize that a PIR is wired. There is no way ALL those parts are bad which leads me to having to rewire something.

Somewhere I thought I read that the software was upgraded again recently? I re-downloaded it again but that didn't "fix" my PIR issue.

I'm beginning to think I shouldn't be doing these "easy" electronic projects since they obviously aren't meant for me to build.


----------



## mikkojay

Hey Dave, The software on the website was last updated September of 2015. I would just skip the PIR and remove it for now. The more things you eliminate, the easier it will be to figure out what the problem is. Did you get all of your nanos from one supplier, or have you gotten them from different vendors?
-Mike


----------



## IMU

I don’t work well when I’m pissed off so I didn’t do much after I posted about the PIR not working.

After a “cooling down” period I took the controller and plugged it into the laptop. I got nothing but a red light on the Nano (I’m assuming a power indicator) so I pulled the plug & wires and reloaded the firmware. I hooked the wires back up & reloaded the test sequence. The PIR still isn’t found so I had to manually trigger the controller via the software. I didn’t power the relay connectors or attach any load to them but the controller did trigger and the relays clicked in sequence. I only ran it once just to see if anything worked. It is sitting on a shelf waiting to see if I throw it away or into a drawer to collect dust.

I did swap out the PIR with the 3 spares and none work. My guess is somehow the wiring to the PIR is messed up. I have 2 different types of wires for these projects. I have female to female & male to female cables for these setups. I use the male to female to extend the PIR sensor connection which gives me the option to remove the PIR for storage or extend it in the prop.

To answer your question Mike, I buy the Nanos from different “sellers” so I don’t know if they come from different suppliers. I have a few I bought that didn’t come with the pins attached. I have about 8 total in various states of assembly. Since I fried my very first controller I always keep a few spare parts handy - relays, sound cards, PIR sensors.

David_AVD … the load shouldn’t be much? The LED spotlights each came with a 12v 500mA power supply. I used a 12v 5A power supply for the relays so I could have at least 1A available for each connection. I don’t have anything else to attach to the other 2 relays in the test sequence to see if the issue got worse.


----------



## David_AVD

The reason I asked about the loads was to see if they were inductive or "weird" in some other way. It seems not.

Did the load (LED) power supply purely wire to the relays and loads or did you common the -ve connection with the small power supply for the Arduino?


----------



## IMU

I used two separate power supplies that are wired as such. I've had issues using one power supply for everything in the past.

So for the latest headache ... I messed around with the PIR issue but no luck. I attached the controller to the computer to trigger it. Still didn't attach any loads yet, just testing the controller. First trigger went fine. Second time, it triggered but then the scare track wouldn't stop. I am guessing this controller is now toast. Time to consider taking it apart and trying some new parts.


----------



## IMU

Latest update. After a quick message from Mike, I was pointed to my PIR issue. The updated software uses Pin 5 instead of Pin 6. So I rewired but still wouldn't work. I checked my software and notice when I downloaded and installed, I didn't overwrite the old version. Now, everything works again. Not to push my luck, I won't hook up the power to the relays until Mon or Tues and see how it goes.


----------



## Montclair

Good Lord, so many issues! Sorry to hear about this, Pirate! Sounds like you may have figured it out, though. Hope so!

While I'm here, I have some questions on the relay wiring. I've never worked with relays before so excuse my stupidity here. I want to run 120V AC through them. That's fine, right? Next question, is there an example wiring diagram anywhere for them? I think I get how to do it, but if someone has a diagram, that would be great.


----------



## mikkojay

Montclair said:


> is there an example wiring diagram anywhere for them? I think I get how to do it, but if someone has a diagram, that would be great.


THIS THREAD has some great info and diagrams. Check it out- it is so awesome, they made it a sticky
-Mike


----------



## IMU

Actually, I've put things on hold while I deal with a family tragedy so it might take me a bit before I get back to this project.

As for an example wiring diagram, Mike's post is where I was going to point you. Good luck.


----------



## GhoulishCop

My apologies if this has been asked, but I did make a good faith effort to search this thread first to find the answer, but couldn't locate one:

Does this program work with Windows XP? I'm a Mac user, but I just dug up out of mothballs an old Windows XP PC I used to have. I'm wondering if it will work on it. Thanks!

Rich


----------



## Montclair

Worked fine for me on XP. I did it all on the first Arduino on my XP box before making the video on my Windows 7 machine.

//edit: Here's proof:


----------



## dangersahead

When I seen Jason's you tube video on this. I decided to give it a go. I bought 2 of everything. I have 2 working controllers. I Wil not be using PIRs. I did hook them up and found one pir was junk it would not work correctly no matter how I adjusted the pir dials. I even went as far as the banger with the resistors flawless. Only issue I did have was that even with 2 separate power supplys I still needed fly back diodes to avoid reset/standby every time the relays trigger the solenoid. Thanks Jason for pointing me to this and thanks mike for the time and easy to follow instructions. Everything works great.

Matthew


----------



## David_AVD

How you "dress" the cabling can sometimes have an effect. High current / voltage pulses caused by the switched load can be induced into the control side.

This can be really bad if the cabling has been all bundled together. Thinking about the cabling layout and keeping it separate where required is all part of the art.


----------



## S L A M

Hey Mike,

What do you make of this? I have 3 12v solinoid valves hooked up to a single 12v 3a power supply. As soon as the first valve is triggered I get this?


----------



## IMU

Did you happen to add the flyback diodes to each solinoid valve? I know he said something about getting some funky electronic interference with solinoid valves. I had to add them to mine in a project and it cleaned that all up.


----------



## S L A M

I was programming it in real time and I would get that air. So I unhooked all the solenoid valves and programmed my sequence then uploaded it to the controller and re-hook the solenoid valves and everything worked OK. So I guess it had something to do with the power hooked to the computer via USB?


----------



## David_AVD

Sounds like the USB connection was "dropping out" which can cause an AV (access violation) in the software when it unexpectedly disconnects.

The dropping out could be in turn caused by excessive noise on the power rail or a ground loop (current flowing in the USB wiring).


----------



## mikkojay

Are you using Flyback Diodes? If not, look for the document flyback_diodes.pdf in the help files. If you are not, and everything runs fine when the solenoids are not actually connected, then that is likely your problem. I have not seen it manifest itself in that way, but if the Arduino resets, that will cause the COM port to go away, and that would cause a software issue trying to communicate with something that is all-of-a-sudden gone.
Thanks, Mike


----------



## mikkojay

David_AVD said:


> Sounds like the USB connection was "dropping out" which can cause an AV (access violation) in the software when it unexpectedly disconnects.
> 
> The dropping out could be in turn caused by excessive noise on the power rail or a ground loop (current flowing in the USB wiring).


^ right on the money, David. I think it is due to an un-suppressed spike. I will have to put a more gracious error handler around that section of code.
-Mike


----------



## Montclair

GhoulishCop and I were talking about the relays. I drew him a picture of how to wire them. I told him I wasn't 100% sure but it seemed logical, but not to kill himself. Is this right?


----------



## IMU

The little I know about wiring is if it's low voltage, it doesn't matter too much but if it's A/C then switch the neutral. You will want to have the neutral attached to the common terminal (center) and the either NO or NC depending on if you want it on or off when when the relay triggers.


----------



## David_AVD

IMU said:


> The little I know about wiring is if it's low voltage, it doesn't matter too much but if it's A/C then switch the neutral.


Really? This is the opposite of Australian wiring rules. You must always switch the active (live) over here.


----------



## IMU

Now that you said that ... I'm fairly certain I'm wrong ... so don't bother listening to me. :googly:


----------



## Montclair

Yeah, I wasn't sure which terminal he should use because I can't see the thing. If wiring either side requires the center terminal be used, that should be sufficient. In other words, it's either the top 2, or the bottom 2, but not the outer screws, like I've illustrated, right? And, yeah this will all be AC power.


----------



## IMU

On my relay board, the center post is common so I wired mine to NO and C so when the relay triggered my prop came on. So, to answer your question ... yes.


----------



## mikkojay

Pretty much- I would probably do something like this:








Old computer cords with the "computer" end cut off make nice donor cords.
-Mike


----------



## IMU

If I knew what I was talking about I would have posted the same thing as Mike.


----------



## Batbuddy

David_AVD said:


> Really? This is the opposite of Australian wiring rules. You must always switch the active (live) over here.


He is right Always swtich the black "Hot" lead when using AC voltage from the Mains supply. I do residential wiring and always switch the hot, or black. Mike's picture is just right.


----------



## Batbuddy

No worries, IMU, Dont beat your self up about it. Half the time I don't know what the best way to do something is either. That's what this whole forum thing is all about. ;-)


----------



## Montclair

Awesome, thanks Mike, and guys!


----------



## Montclair

According to the specs, these are 250V, 10A max, so I could run up to 2500W through each one, right? A 1000W fogger wouldn't be an issue, right? Just trying to get a clear picture on this before I start connecting stuff, or telling other people how to do this.


----------



## David_AVD

There are several things to consider when working out how much load you can switch with a given relay board.

1) Relay. The marked rating is usually for a resistive load (simple light bulb, etc) and needs to be derated (sometimes substantially) for inductive loads.

2) PCB track thickness and width. The tracks may not support carrying as much current as the relay can switch. Assuming 1oz copper, 10A capacity needs a track width of around 0.2" to 0.3" unless they are quite short.

3) Terminal block. Smaller ones are only good for 5A - 8A so I'd be leery about pushing 10A through them.

So it's a combination of things that determines the real switching capacity of the relay boards. Sometimes the terminal blocks and tracks will be rated for 10A and a 30A rated relay will be used so that it is safe to switch a 10A inductive load.

Hope this helps.


----------



## mikkojay

Here is a neat solution from the Frightprops website using a solid-state relay:









Like David mentioned above, there are a lot of other considerations to be conscious of when determining loads. I personally steer clear of switching line voltages when I can help it. You mentioned turning a fogger on and off- if you use the wired "remote button", I would think that the "turn the fog on" circuit may very well be a low voltage circuit already, making much of this conversion moot (although good stuff).

I found a page online where someone hacked a remote like this one:
















Couldn't you just solder 2 wires onto the back of the button like above, then put a 2 pin connector/jack on the end of the control. You could then make a cable to plug into the jack, then run the 2 wires to the relay.
That is, of course, if you are using a fog machine with a timer/switch like the one above.
What about that?
-Mike


----------



## IMU

I hacked a push button remote for my fog machine in the cannon prop. I soldered 2 wires (one on either side of the switch) so when the relay came on, it completed the circuit and the fogger came on. I kept the fog machine power separate from the rest of the prop (everything else was 12v).


----------



## David_AVD

Just be aware that the remote shown above could still be at full mains voltage. It's a much reduced current, but normal (cautious) mains voltage practices should be followed.

The real low voltage remotes have a DIN or similar connector. The mains ones sometimes use an IEC connector.


----------



## IMU

Yes and since he is using mains voltage I assume he knows to be cautious but it's good to mention.


----------



## Montclair

Thanks guys. I had thought about this more and realized I needed only to hack the switch. I came back here to find all of you telling me the same thing -- LOL! Well, Pirate has done it so I should be good. 

Thanks for all the detailed replies and electricity info. I did take an electricity shop class in high school, but that was 30 years ago and I don't remember much -- just enough to make me ask more questions.


----------



## iowachap

*push button fog machine*

Yeah the push button fog machine is the easiest to hook up the relay too as it is just 2 wires and its a matter of the relay completing the circuit, the one with 2 buttons and 2 dials is much more difficult I jacked one of mine trying to solder the wires on to the 2 spots of the circuit and they never would stick so i found my cheaper push button manual remote that is push on let go off.. that worked very easily connected to my four channel controller that I made.


----------



## IMU

Montclair said:


> Well, Pirate has done it so I should be good.


You ain't lying!  :googly:


----------



## Montclair

IMU said:


> You ain't lying!  :googly:


LOL, I didn't exactly mean it that way. Heh.


----------



## IMU

Montclair said:


> LOL, I didn't exactly mean it that way. Heh.


Yeah sure ... I know buddy, I know! 

I threw together a quick little video showing how I enclose my controller. This is by no means the perfect way, just happens to work nicely for me. As you can see, I built this one with the Uno and it all still fits.






I usually only use 12V to power my stuff connected to the relays so I add panel jacks so it makes connecting things to the relays very easy. This one doesn't have the panel jacks in yet but there is plenty of room.

Maybe this will help those who are looking for options on enclosures.


----------



## mikkojay

Looks real nice Dave, just like it was made for it!
-Mike


----------



## Montclair

Looks great, Pirate! I might just go pick some of these up today because I need to get mine enclosed. I was going to use some tupperware containers (I still might), but I like this little tackle box!

On the wiring, I hate to keep asking for help, but can one of you help me wire this? I'm not terribly interested in frying my motor, electronics, or self at the moment. :googly:

This is a shiatsu neck massager motor. It has a three position rocker switch. On, off, reverse. It runs off of 110v AC. I want to replace the rocker switch with the relays and I think I need two of them. I want to be able to have the motor completely off during the ambient portion, then be able to have it switch directions during the event.

My impression is that one relay would control on / off feeding power into another which handles forward / reverse. Here's my attempt at the wiring. I really think I've got it right, but who knows? LOL!










Here's a blank image for anyone who cares to help me out and draw some wires on this.


----------



## IMU

Here is how I have my linear actuator wired up to 2 relays for the up & down movement.










Red wires going to the 2nd relay are positive, jumped that to the 1st relay using another red wire. The black wire that goes to the left terminal on the 2nd relay is negative. I jumped that with the white wire to the 1st relay (that is my 12v power supply). The red wire that is connected to the 2nd relay in the center spot is from my actuator. The black wire attached to the 1st relay in the center position is also from my actuator. When power is applied to the actuator it rises, when you switch the power, it lowers.

Not sure that helps you much, but this worked for me. I also try and stay away from anything over 12v.


----------



## David_AVD

Montclair said:


> My impression is that one relay would control on / off feeding power into another which handles forward / reverse.


That's the best way to do it as it. The other way (one relay per half of the switch) can be a problem if two direction relays ever came on together.

It's hard to see in the photo where that original red wire is going, so that makes it a little hard to confirm your proposed wiring.


----------



## Montclair

David_AVD said:


> That's the best way to do it as it. The other way (one relay per half of the switch) can be a problem if two direction relays ever came on together.
> 
> It's hard to see in the photo where that original red wire is going, so that makes it a little hard to confirm your proposed wiring.


That paricular one is in a prop already. I'll take another one apart and take a better picture. My guess was that it was the common hot that the rocker was switching. I don't know how that is causing an ac motor to run in reverse but I really am not educated on this stuff.


----------



## David_AVD

The wire that was originally going to the centre of the 3-way switch needs to go to the 1st relay's COM terminal. 

The first relay's NO terminal will link over to the 2nd relay's COM terminal.

One outer wire from the original switch will go to the 2nd relay's NO terminal.

The other outer wire from the original switch will go to the 2nd relay's NC terminal.

So, that's pretty much what you already have except you are using that red wire instead of the switch's centre wire.

Relay 2 will select the direction and relay 1 will activate it.

I would always turn relay 2 on (if needed) before relay 1 (direction then power) and do the opposite when switching off (power then direction).


----------



## Montclair

*David, thank you so much!* I think I got it right now based on your instructions. Does this look right?


----------



## David_AVD

Looks good. You should disconnect the original switch of course, just in case it gets switched one way and the relay connects the other.

Another thing, the outer terminals are transposed compared to the markings on the switch; the one directly behind the REV marking will actually be the FWD wire and visa versa.


----------



## Montclair

Cool! Thanks very much for the help, Dave!

--Dave

(Too many Dave's around here!)


----------



## Montclair

Got it wired up to the shiatsu motor, Dave, and it works perfectly! Check it out! Thanks very much for the help!


----------



## IMU

Yay for not electrocuting yourself or frying one of the controller parts!


----------



## David_AVD

Well done on your project. 

A reasonable crimping tool like this will help:


----------



## MBrennan

I couldn't help but notice that a couple of days ago, there was a Octobanger teaser on Mike's site - and now it's gone?! 

What awesome new things are you up to, Sir?


----------



## sreynolds

Mike has two videos on youtube on the octobanger


----------



## BillyVanpire

the wire stripper image on page 46 of this thread sets off my antivirus..

malware from here
ht-tp://www.blf-tools.com/images/blfimages/automatic_wire_stripper_HS-D2.jpg

false positive or are others getting it too?


----------



## RoxyBlue

BillyVanpire said:


> the wire stripper image on page 46 of this thread sets off my antivirus..
> 
> malware from here
> ht-tp://www.blf-tools.com/images/blfimages/automatic_wire_stripper_HS-D2.jpg
> 
> false positive or are others getting it too?


Just to be safe, it's been removed from the post.


----------



## Montclair

David_AVD said:


> Well done on your project.
> 
> A reasonable crimping tool like this will help:


Thanks, Dave. And... oh geez... I think my strippers have those. :googly: I didn't even know what one looked like until you posted that picture. D'oh! Thanks, again, for the wiring help. It definitely helped me better understand how to wire the relays for various things. Much appreciated!


----------



## Montclair

It's a false positive. Jpegs cannot contain viruses that are executable by themselves. It's safe to display any jpeg image.


----------



## BillyVanpire

It wasnt the jpeg itself..it was coming from the 3rd party url somehow..


----------



## JeffHaas

Probably an infected website. Here's the same thing on Amazon:

Irwin Industrial Tools 2078300 8-Inch Self-Adjusting Wire Stripper with ProTouch Grips - Wire Stripping Tool - [email protected]@[email protected]@http://ecx.images-amazon.com/images/I/[email protected]@[email protected]@41a15k7CKiL

I have a set of these, they save a LOT of time.


----------



## BillyVanpire

Montclair said:


> It's a false positive. Jpegs cannot contain viruses that are executable by themselves. It's safe to display any jpeg image.


actually, no

http://lmgtfy.com/?q=malware+jpg


----------



## Montclair

BillyVanpire said:


> actually, no
> 
> http://lmgtfy.com/?q=malware+jpg


Actually, yes. That has all been debunked or is not applicable, referring to the age old trick of .jpg.exe file extension, which is going to do nothing in your web browser. Additionally, while they can contain virus code, jpgs are not executable and the code cannot be run unless acted upon by another application. No need to use the insulting "let me google that for you." I did my research before posting and actually read the articles. Thanks.


----------



## IMU

Ok guys ... let's not get the mods upset. The image was removed so let's keep on topic please.


----------



## BillyVanpire

Montclair said:


> ..No need to use the insulting "let me google that for you." I did my research before posting and actually read the articles. Thanks.


i didn't mean to insult you, i just wanted to show multiple results.

sorry for thread jacking.


----------



## David_AVD

Sorry for the image guys. I just linked in a picture I found online. Hopefully we all know what a reasonable pair of strippers ( no, not that kind! ) and crimpers look like now.


----------



## mikkojay

MBrennan said:


> I couldn't help but notice that a couple of days ago, there was a Octobanger teaser on Mike's site - and now it's gone?!
> 
> What awesome new things are you up to, Sir?


OK, you asked... 

I threw that up as a placeholder, but then took it down as I shifted gears. I started to make another config app that did 8 channels, but then that left me with 2 separate config apps to support & maintain. Then there is the third one that I am working on that adds completely different twists... This started getting out of hand, so then I started down the road of abstracting everything so that one config app will be able to handle multiple firmware versions.

Then there is the whole philosophy of how these controllers store state data in the eeprom. The easy way is to just use one byte per frame (for 8 ch) or 1 byte per 2 frames (for 4 ch) in a big continuous sequence. When you are not changing states every other frame, this approach is very wasteful. This then requires a bunch more memory or limited sequence length. I am playing with an approach similar to the way that MIDI files are saved into a physical file. I am sure someone will come along and tell me why I don't want to do it that way, but at this point I am having fun seeing how much state data I can stuff into a small space, so that is what I am doing.

Even with the fourbanger app there were instances where I posted something out there that was premature, just so people could have something to experiment with. Then I would make major changes, then have to deal with the fallout of people getting confused as to why things changed. This would then eat time that could be used to move forward on bigger better things.

Anyway, I was thinking of uploading a "manually programmable 8ch banger" out there for the L923d shield like I showed in my last video. This would still probably require a day's worth of documentation, which would detract from current project progress. If there are a few people that would be interested in that while I am working on a modified PC app, please let me know and I will make that a to-do item.

Don't get me wrong, I like banging these projects out- it just seems that over time as I put more and more of them out there that trying to support them all nickle and dimes my time to death. That is what I think is moving me towards the notion of consolidating multiple apps into one.

Thanks, Mike


----------



## Montclair

Thank you for your selfless dedication to these projects, Mike. I know I've learned a lot (and still am) about this stuff, and have really enjoyed working with the 4 banger project. Just in case anyone is in a rush and needs an (insert number here) relay controller now, you can connect these things together so that one 4 banger can trigger another, and that one, another, etc. IMU / Pirate taught me that one and I did cover it in a video.


----------



## David_AVD

I checked out your banger software on the weekend and I like it. So much so I threw you a few bucks even though I haven't used it 

I think moving to a version that can create projects for different platforms is the way to go. You don't want to be supporting a bunch of similar apps.


----------



## mikkojay

Hey thanks for the support guys, I appreciate it. I am running into a very similar situation at work, so consolidating and streamlining is turning into a real theme for me.
In the case of my work, there have been many instances where someone (I am guilty of this as well) created a small mini-app just to solve a single problem at a given point in time. As time goes on, you wind up with a sea of bits and pieces, and the environment on the whole becomes chaotic. You then have to go back and "do it right". Oh well, it is all part of the learning process 
Thanks, Mike


----------



## IMU

After all you've done for us ... how can we not support you Mike. Thanks again.

Oh and Montclair, I have to give props to Mike for teaching me the triggering multiple controllers.


----------



## Batbuddy

David_AVD said:


> I think moving to a version that can create projects for different platforms is the way to go. You don't want to be supporting a bunch of similar apps.


Ditto! I like your current thinking, Mike.


----------



## scubaspook

Last year I built several of the nano version of the banger but never used them. They tested fine but never implemented them. Now I am wanting to try them out just to find that my pc hard drive had failed and the original documentation for the controller is gone. So I have reread every thread here again to find that there has been some changes to the software, changes in what is suggested to use (uno vs nano) and so on. Well to get on with the question. Would these solid state relays work so there would be no need for flyback diodes and such and plus there would be no clicking sounds of the relays. http://www.ebay.com/itm/1pcs-5v-4-C...5463153?hash=item5d5c989971:g:uOcAAOSw~gRVinY~


----------



## IMU

Hey scubaspook, the old nano setup still works even with the updated software I still have several of the nano ones built & working fine. The only thing I had to do was move the PIR control/signal wire from A6 to A5. Other than that, nothing changed. I've built 1 of the uno controllers but not tried it out yet. It was easier to build but a little bit bigger.

As for the relay board you linked, I can't comment but I'm sure someone else will. I'm curious as well.


----------



## IMU

OK, I have a different question/issue maybe someone could clue me in on. Now that I have my controller all wired up and working (my pirate cannon prop from last year) I notice that I get a little static/interference come through my speakers during part of my sequence. Any ideas what that could be caused by? I don't notice it when my 12v stuff gets switched on & off ... more with the AC switching on & off (fog machine). Someone else noticed it as well and they are running just AC stuff.


----------



## David_AVD

Depending on the type of AC load, it could be arcing in the relay contacts.

You could try a 22nF 275V capacitor (*must* be class X2 rated) across the contacts.


----------



## Batbuddy

scubaspook said:


> ... Would these solid state relays work so there would be no need for flyback diodes and such and plus there would be no clicking sounds of the relays. http://www.ebay.com/itm/1pcs-5v-4-C...5463153?hash=item5d5c989971:g:uOcAAOSw~gRVinY~


I am sure they would. I think that the only real advantage of SSR's over normal ones is that they switch faster and last longer (Supposedly). Not sure if they are worth the extra expense. However on a side note the Relay boards I got already had the flyback/protection diode built into them so it really did not need to be added.


----------



## IMU

Batbuddy said:


> However on a side note the Relay boards I got already had the flyback/protection diode built into them so it really did not need to be added.


Do you have a link or part number for these?


----------



## JeffHaas

Two other things with solid-state relays:
- They're silent! Very nice for some applications.
- Some things don't work well with them. I had some LED spotlights that would stay dimly on, so I had to switch them over to mechanical relays.


----------



## Batbuddy

IMU said:


> Do you have a link or part number for these?


 These are the ones I got. There are various versions out there, but most of them have the diode. This one also has an opto coupler which is added protection for the micro controller. The reality is that if you were doing low voltage switching, these boards are major over kill, but for ease of use and $2.50 it isn't worth messing around with your own circuit.


----------



## mikkojay

The diode on those is a kickback diode, but it is a small diode on the coil side that is there to protect the switching transistor. I have yet to see a relay module that does not have those. The flyback diodes that I always warn about are the ones that are placed on the contact side of the relay. This helps with arcing on the contacts and avoids big DC spikes from being induced into the common ground.


----------



## David_AVD

Just to add to this, the diode should go across the load (as close as possible to it in fact), not across the actual relay contacts. That's why you don't see them on relay board itself. I'll do up a little diagram shortly.


----------



## mikkojay

Has anyone read the document called flyback_diode.pdf that is in the documents folder of the FourBanger project? It mentions all of this, has diagrams, pics, part numbers, etc... I have mentioned it multiple times in this thread, but now that it is nearly 50 pages long, those details get buried.


----------



## David_AVD

I must admit I haven't read all of the docs yet. Not sure if this helps or confuses.


----------



## mikkojay

Yes that looks great David, thanks for helping to clarify the concept!


----------



## Montclair

Could this lack of a flyback diode be causing the clicking sound IMU and I are getting over our speakers when A/C is run through the relays? Example:


----------



## David_AVD

Montclair said:


> Could this lack of a flyback diode be causing the clicking sound IMU and I are getting over our speakers when A/C is run through the relays?


You can't have a flyback diode with an AC load.

Is the clicking in time with the shiatsu motor reversing ?


----------



## IMU

I'm glad you mentioned that David_AVD, I was going to solder one on my fog machine remote. Oh well ... guess I'll leave it be.

I know I only hear it when I have the fog machine remote on & connected to the controller. When the for machine is activated, I hear a distinct "pop" sound through the speakers. Like Montclair said, with the sounds turned up you can't really notice it.


----------



## mikkojay

Hey IMU, were you going to try the cap suggested by David_AVD in this post?
I am curious to see if that will make an audible difference.
If you try it, let us know how it goes. I could add that scenario to the documentation.
Thanks!
Mike


----------



## IMU

Actually Mike, I might just to see if it helps or not. I'll be sure to let everyone know.


----------



## Montclair

David_AVD said:


> You can't have a flyback diode with an AC load.
> 
> Is the clicking in time with the shiatsu motor reversing ?


D'oh! I knew that, too. I actually know what diodes do. I have no idea what I was thinking when I posted that. :googly:

Where would you connect the capacitor you're talking about? Across the positive and negative DC pins on the relay board?


----------



## IMU

I was going to put mine in the fogger switch between the White & Green wires?










Not sure if that's correct, but that is where it completes the circuit to shoot the fog.


----------



## Montclair

I think it actually goes across the relay contacts. Look at this somewhat related video: 




I dunno. That seems to be switching DC voltage, so it may not be applicable. I really need to learn more about this stuff.


----------



## IMU

The only other place I could put it is where the 2 wires go into the relay to get it the closest I can. I ordered a couple that were recommended so when they come in, I'll give it a go. They are coming on a slow boat from China.


----------



## scubaspook

Got in the uno yesterday and have 2 questions. How do I change the FPS? It is greyed out and is on 20. From what I have read it appears that I should be able to change it. Next it appears that I am missing the Recording Lock under the select properties panels. Why does it not show up?


----------



## mikkojay

To change FPS, Right click the controller in the tree view at the upper left of the main window. The recording lock is gone because I removed it  It was causing more confusion than benefit because 99% of people do not use manual button programming after they learn how to use the PC app.
-Mike


----------



## IMU

OK, so I've been poking around and came across this video:






This is all new to me but I'm sure some of you knew all this. Just thought I'd share.


----------



## David_AVD

IMU said:


> The only other place I could put it is where the 2 wires go into the relay to get it the closest I can.


The capacitor would go across (in parallel with) the relay contacts.

Remember it needs to be a "class X2" rated capacitor.

Dare I post an image example? Yeah, I do dare....


----------



## IMU

This is what I ordered: http://www.ebay.com/itm/162031917978

As far as placement. As the other picture shows ... I can put it across the wires in the fogger remote or here in the control box:










I thought it would be better to have it closer to where the power comes from (the trigger in the remote)?


----------



## David_AVD

Oh, so that's low voltage being switched in your case? (judging by the DC connectors)

I assumed the remote on yours was at mains potential.


----------



## IMU

No, it is at mains potential and I was warned about using those connectors. I can take that one off and wire directly into the relay? Everything else is 12v I just don't have a way to switch the fogger on & off with what I had.


----------



## David_AVD

Yikes! Yes, please get rid of those low voltage connectors on the mains part.

The capacitor could go at the relay or in the remote in your case.


----------



## IMU

David_AVD said:


> Yikes! Yes, please get rid of those low voltage connectors on the mains part.


OK, I don't know what the heck is up with the forum but I know I posted a message on here and it's gone. Either I'm going crazy or something is up. Anyway ... back to my post, again:

I cut the barrel jack off the wire & removed the panel jack. I wired the end into the relay. I set everything back up and tested the cannon. 3 out of 4 times the sequence would begin, the fogger would begin to trigger and then the controller would reset. It was similar to when I used a solenoid valve without a flyback diode. So, now I'm back to having intermittent issues with this controller and it's the fog machine that is causing the issues.


----------



## David_AVD

So no reset issues with the fogger unplugged from the mains?


----------



## IMU

If I just run the sequence with the 3 - 12v appliances I don't have it reset. When the fogger is plugged in and the relay triggers the switch to make the fog, it will either work fine once or resets the controller. Don't know why the barrel Jack would do anything to help, but it didn't reset at all last weekend why I tested it.


----------



## David_AVD

Sounds like it's teetering on instability and last weekend was luck.

The capacitor may rein it in.


----------



## Batbuddy

mikkojay said:


> Has anyone read the document called flyback_diode.pdf ...


I read everything initially and reread the Flyback doc just now. I have used the same set up as you mentioned in the flyback doc, but with out the diode and haven't noticed any problems. Maybe I was just lucky, but now I will have to set everything back up and test it. Anyway I can't imagine why it would cause interference when it is isolated on the positive side. (Guess I am not as smart as I thought.):googly:


----------



## Batbuddy

IMU, Maybe I missed it in a previous post, but are you sure the fogger control is AC inside? Is it just a switch inside the control dongle? maybe send a picture of the fogger control internals. and how you hacked it to attach it to the relay. If you are certain it is Mains voltage AC then it is odd that it is resetting the controller. Is the relay board the same one you showed in the picture of everything in the case that looked so awesome? I am racking my brain and can't think of any reason you would be getting a reset issue if it is AC. I really wonder if that Fogger control is DC. Is there any sort of intermittent setting or delay setting on the fogger control? If there is then it is even more likely to be DC because AC timer controls are more expensive to make. Did you measure voltage with a meter or anything? Sorry for all the questions, man. Just trying to help you trouble shoot the project. Hopefully I am not too annoying ;-)


----------



## IMU

Batbuddy, here is the inside of the fog trigger/remote.










There is no electronics inside the remote, just the button & the status light.

I will admit that when I first was wiring this remote hack up to the relay I not only zapped myself but also one of the relay boards (now used as a 2 relay board). :googly: If I take the end of the 2 wires that are to the relay and touch them together, the fog machine will activate.

As for the setup inside the box, not exactly. This was the very first controller I built so its not as "refined" as the one I posted recently. I used a nano and have all the splices because of the multiple Ground & VCC requirements and no multiple locations (if that makes sense).

I will setup the cannon and test it out again later today. I'm just not getting why I am having so many issues with this thing.


----------



## Batbuddy

Well If you zapped yourself then it must be AC mains voltage. Which means that inside the fogger there is an AC relay, (usually they are called a "contactor" when they are handling AC mains voltage on the coil end of the relay.) Or it is wired directly to the pump that pumps the fog juice.The capacitor idea mentioned previously may smooth out the issue, but if all of the AC circuit completely isolated form the boards except for the two connections to the relay board then it doesn't make sense that there should be interference.Whether there is a Contactor/relay or a direct connection to the pump, both are inductive loads and pull a lot of current on start up and also surge when disconnected same as DC inductive loads. A little "light" reading may be helpful. J/K http://www.artisancontrols.com/UtilityImages/ProductSupportPdf/Switching%20Inductive%20Loads.pdf Specifically the part about AC suppression techniques. I don't know if you really need to go to this extent, but it is the prescribed way of suppressing AC voltage spikes. I used a Nano and one of the regular relay boards to switch on and off an AC 3/4 HP swamp cooler motor last Halloween and it did just fine with no extra components.














I am still mulling this around in my head...


----------



## David_AVD

Oh, I meant to ask if the Nano is being powered by 5V or 12V ?


----------



## IMU

So, after some more testing this morning ... I have not had any other reset issues. I did however find one of the 12v appliance wires (the fuse LED) was loose and then broke at the solder point. After I fixed that and ran it about 10 times ... no reset. I have to guess that the reset was caused by the loose wire tied to the 12v power supply.

Here is a video of just the controller without anything but the fogger on and me triggering the switch manually. That loud pop is when I push the button to activate the fog machine.






I may run the cannon sequence a couple more times to see if the controller resets again.

David_AVD - The nano has it's own 5v power supply. I tried supply 12v to the nano & use it for the appliances but I ended up frying the controller so I kept them apart.


----------



## Batbuddy

Cool IMU. Sounds like you may have got it going.


----------



## David_AVD

In these situations, a good way to avoid reset issues is power the Arduino from 12V and leave its 5V terminal not connected to anything.

If you need 5V for something else, use a separate 12V -> 5V regulator for that.

Using the Arduino's 5V output to power other devices is somewhat application specific and should be done with care and consideration.


----------



## Montclair

I hear the relay popping over the speakers that IMU is describing above, in my setup as well. Hopefully, that capacitor will solve the issue.

Also, I am experiencing reset issues now. In testing my shiatsu motor while connecting PVC to the motor shafts, if there is any kind of strong resistance on the motor, the prop controller completely resets. 

Essentially, I had things positioned so that the shiatsu motor was having a tough time moving the stuff connected to it. When it hit a really tough rotation spot, everything reset.

I know, obviously, the solution is to reposition things so that there's smooth movement, but I'm a little wary now of the prop controller resetting on something like that. Any ideas on what can be added to prevent this reset? I am not powering anything with the Arduino's power, other than the controller's components.


----------



## David_AVD

Where does the relay board get it's power ?


----------



## Montclair

Sorry, I guess I was a little unclear. All controller components are powered by the Arduino's power supply per Mike's wiring diagram (Arduino, MP3 player & relays). The relays are switching A/C power.


----------



## mikkojay

*Nano VS UNO Regulators*

A while back I started steering away from the Nano towards the UNO for these projects. The main difference is the regulator used by each.

NANO: uses uA78M05 datasheet here. This regulator produces 500ma. Since the processor itself consumes ~150ma, not counting LED's etc, lets say that leaves 350ma. The 4 relay 5v modules we use consume ~80ma per relay. So if all of them are on simultaneously, (80x4) = 320ma. This does also not count for the additional LED's, transistors, MP3 module, PIR, etc... You can see after adding these things up that you wind up with the 5vdc equivalent of this:









The regulator on the Nano also has no significant capacitors to speak of.

The UNO uses a completely different regulator, the NCP1117. Datasheet here. The output of this regulator is 1000ma, and the UNO also has more supporting capacitors.

The difference between these 2 regulators is why I have leaned towards the Uno VS the Nano. The Nano can be great, but it seems to need a supporting external regulator- especially if you are using all four channels/relays. You could put a 10 cent 7805 on your four relay module and run it from 12vdc. This is what David_AVD was leaning towards above, I believe. Once again, a good call.

After making my first couple of prototypes of this project, I started using a small PCB of my own design that used an external LM7805. This external regulator and caps helped to stabilize the 5v circuit, and explains why I had no issues. That worked for me, but for others looking to build one of these with little to no external components, I tried to steer them towards the UNO.

I just took the Nano video down again. I took it down once and people freaked like it was gone for good, but this topic is a good example of legacy information that remains out there potentially "steering people awry".
I will make a replacement video for it using an UNO most likely. I may also create an updated Nano version with an external regulator.

This all may seem like a pain, but it is really a worthwhile topic for everyone to think about and learn from. If you can nail down this concept for this project, it is a concept you can take with you to make other subsequent projects a success too.

Thanks, Mike


----------



## David_AVD

I do think that using the 5V output of the Nano could be the cause of some of the reset issues.

Adding a regulator (7805 with the 2 required capacitors) or a cheap 5V regulator board ($1 or so on eBay) to power the relays and PIR would be the way I'd go.

This keeps the 5V supply rail on the Arduino clean and should pretty much eliminate any problems.


----------



## mikkojay

Another thing worth mentioning is that most of these generic PIR's are happy with 5 to 16v on the VCC pin, so powering them right from the +12v could be an easy way to take a little extra load off of the 5v circuit with zero effort. The power consumed by the PIR is negligible compared to the relay modules, though.


----------



## iowachap

Not sure if this is similar, but last couple days after putting in 12vdc motors and taking out the 2 110v ac motors I noticed that sometimes after it goes through a cycle the trigger audio will automatically restart but the motors dont, only the audio, and then if i move in front of PIR it will reset like it should and then movement will then kick off the motors and audio trigger track. Sometimes it will do it after the 2nd cycle sometimes it takes more, almost random. I am wonder if due to being upstairs that if its hot I might need to re upload the software, this was my first controller I put together last year, it is using the nano. Only other thing I was thinking of was re loading the audio tracks, but just seemed odd that only the trigger audio just continued to loop, unless i retrigger with the PIR then it seems to stop after it cycles.


----------



## mikkojay

Hi Iowa chap, if you are running from code that is a year old, it would probably be a good idea to download the latest software package from the website. I would also suggest using an uno instead of the nano for the reasons described above.
-Mike


----------



## IMU

I can see now Mike why you are leaning towards the Unos. I still several of the nanos that I'll use for daisy-chaining them together but stick with the Unos for the main controller. Maybe one day I'll try your octobanger if/when you get it done.

Maybe if Batbuddy gets his talking skull circuit figured out using the nanos I'll switch everything out to Unos.


----------



## iowachap

mikkojay said:


> Hi Iowa chap, if you are running from code that is a year old, it would probably be a good idea to download the latest software package from the website. I would also suggest using an uno instead of the nano for the reasons described above.
> -Mike


ok I cant remember If i had uploaded the newer version of software, I can give that a shot, and also what if I hooked up the 12v 5amp power to the barrel plug vs powering it with the 5v usb jack. I did plug a 12v 700ma power supply into the barrel but it actually seemed to make it repeat and have more issue, I was thinking about this today and wondering maybe it was the fact the amps powering the nano was too low, the USB 5v probably has more amps than that 12vdc, but I do have a 12vdc 5amp power supply I can try to see if might be the low amps. If that dont work I will just build a new board with the UNO as I just got 4 in with all the parts to build 4 more controllers.


----------



## iowachap

Ok so here are a few pictures of my freshly constructed controller, this makes like my 5th or 6th one, this will replace the old one from last year that used a nano that seems to be having intermittent audio replay issues without being triggered on the hack in the box. The PIR I am going to rewire with a computer monitor power plug, just need to get a male end side so that way the PIR can be easily connected, disconnected, I used suggestion last year of these 3 wire connectors and I think they might have caused some intermittent issues themselves at times, even though everything on halloween worked without issue, the PIR for Reagan Exorcist was highly sensitive even after doing the adjustment we had to create all kinds of black plastic side covers to prevent any type of movement from other angles setting it off so only people in right spot would trigger it.

This brings up another question has anybody used or found a decent priced laser beam, or eye beam trigger where it only triggers when someone walks through breaking the beam? To be used with this controller of course.

Before it was all mounted










After mounted to foam board










Hot glued power cables to side of foam board


----------



## mikkojay

*PIR Blinders*

Hey Iowachap, here are a few pics of how I put "blinders" on a PIR. I will admit though, the longer I do this, the fewer PIR's I use. They just seem to be a little flaky. They are good for sporadic miscellaneous filler props, but for the big-gun props, I am starting to move towards manual triggering or remote-control triggering. That way you can skip people, like tiny tots, then scare older kids and parents when they don't expect it.








































This method gives the sensor "tunnel vision" and is tucked neatly under the dome.
Thanks, Mike


----------



## iowachap

Ok so would something like this work in place of the PIR

http://www.ebay.com/itm/Safety-Phot...446111?hash=item280c438f9f:g:xpkAAOSwPhdVEv8dhttp://www.ebay.com/itm/Safety-Photoelectric-Beam-Infrared-IR-Detector-Safety-Sensor-For-Automatic-Doors-/172004446111?hash=item280c438f9f:g:xpkAAOSwPhdVEv8d


----------



## iowachap

That looks great Mike, might have to try that way, I think i used tape around the dome, in that one case we needed it set off a bit earlier when they stepped through plasstic type door, but we were getting wind that would push the plastic a bit into the area setting it off, so we really had to finagle with that one, the rest seemed to do pretty much as they should. But the break beam might help in some areas to not have to worry about plastic as long as it didnt blow into the line of break beam.


----------



## mikkojay

That beam sensor looks like it has a relay out, so yes I bet it would work great. I might have to get one to test out myself. One thing to remember with these types of sensors though, they rely on precise alignment. You cannot just stick a stake in the yard and zip-strip these to it, and expect them to stay aligned. If you have a nice rigid wall etc.. for mounting these, they will work better.
-Mike


----------



## iowachap

Yes, that is what I want to use it for, our 20 x 20 maze/walk through has 4 ft wide path, so this would be great to mount on each side of the path wall so only when they walk through and break that beam it would trigger the prop  I think I will order it and see if I can figure out the wiring, if i figure no power needs to be added to the relay so if the relay closes the manual switch it would no longer be manual but would utilize the manual switch wire set up you have on the arduino board, i figure it could be wired up to the out signal wire but not sure how that would be done.


----------



## iowachap

Hey Mike, this looks like the same unit on Amazon prime... sounds like one would need to power both senors, so helps possibly with better trigger but requires 12vdc power to both units Amazon.com : Single Beam Photoelectric Detector Active IR Sensor : Infrared Motion Detectors : Camera & [email protected]@[email protected]@http://ecx.images-amazon.com/images/I/41Kh%2Bt%[email protected]@[email protected]@41Kh%2Bt%2BLiBL


----------



## David_AVD

I used a reflective IR sensor last year to trigger one prop:










I started a page on da-share that gives some details on how to hook them up.


----------



## iowachap

awesome, did you use these with the four banger prop? If not, suggestion on how to wire to it?


----------



## scubaspook

Okay people how do you add a picture. I put a couple in an album here on hauntforum so how do I post them here. I clicked on the picture of insert image pasted the link of the picture and I get this little x in a box Never mind figured it out.









Above is a pic using the original enclosure that mikkay had suggested. I have the UNO, 4 channel relay and the mp3 player inside. Installed the 5 button to and rj 45 to the top and currently have the key chain fob attached for a trigger. I desoldered the original relays and inserted these extension so they would extend outside the box so I can unhook the controller from the prop.


----------



## David_AVD

iowachap said:


> awesome, did you use these with the four banger prop? If not, suggestion on how to wire to it?


No, I customised one of my DMX 3 channel DC boards to be a prop controller.

The blue wire goes to ground (0V), the brown wire goes to +12V and the black wire is the output to the Arduino.


----------



## mikkojay

scubaspook said:


> I desoldered the original relays and inserted these extension so they would extend outside the box so I can unhook the controller from the prop.


I am digging the terminal replacement- nicely done! Those blue terminals leave much to be desired, and it looks like you nailed it.


----------



## David_AVD

When I went back on eBay to look for the IR reflective modules, I noticed that a lot of them are actually 5V only, not the 6V - 36V voltage range that I bought originally.

Keep this in mind so you don't end up hooking a 5V one up to the 12V supply. Either type would work the same as long as you hook it up to the correct voltage.


----------



## iowachap

Scuba I used photobucket, use direct link then click the photo icon and insert the copied link. Looks like your photos are showing up, a couple didnt i see.

David, yeah I noticed lots of the lower 5v ones which have a shorter distance limit, like only 2 feet, I need at least 4 feet distance to span the walkway width.


----------



## iowachap

Thanks David, I just bought 3 of those things 6.06 a piece just copied the part number you had listed on your page and they came right up.


----------



## David_AVD

The 2-piece units (separate transmitter and receiver) have a longer range, but also require you to align them. You also need to have the person break the beam (tx and rx on opposite sides).

The combined units (tx and rx in the same housing) are good for where you don't have access to the other side (of the path for example). They also don't need alignment. The only real down side is the limited detection distance.


----------



## iowachap

yeah that is what i want, a transmit on one side of path mounted on wall, and then another on opposite side of path on wall they walk through the path breaking the beam, the fun part is aligning, a laser level might be good for that.. thinking using super velcro


----------



## David_AVD

I haven't played around with those exact beam break sets, but some others I've played around with had a reasonably wide beam so super accurate aiming wasn't required.


----------



## iowachap

This is reflective, but i am not sure about the wiring, something like this could be an easier option with just a reflector. 
http://www.ebay.com/itm/Specular-Reflection-Photoelectric-DC-10-24V-3A-E3JK-R4M1-Sensor-Switch-w-Screws-/321911339442?hash=item4af36939b2:g:ZVgAAOSwQoFWOaNO


----------



## David_AVD

The aiming on those can be a little fiddly, but as long as the unit and the reflector are firmly fixed you'll have no problems.


----------



## IMU

So my 10mm 275V223K 22nF X2 Polyproplene Safety Capacitors are due to arrive tomorrow afternoon. I will let everyone know what happens when I add these to the fogger relay connection.


----------



## IMU

OK, my capacitors came in and I soldered 1 to the fogger remoter wires going into the relay.










I have to say the jury is still out of how effective these are at suppressing the pop/feedback when activated. I noticed it wasn't nearly as loud and sometimes not even audible on the second firing. I can't gt it any closer to the relay and the only other place to put it would be inside the manual remote switch. I don't think I'll bother to take it off. It can't hurt to leave it on.

Just thought I'd update on my "test".


----------



## David_AVD

I guess any reasonable reduction in the popping sounds is good. A larger value capacitor *may* improve it more, but I chose a low value to keep the off-state leakage to reasonable levels. Maybe try a second cap inside the remote switch and see if it helps?


----------



## scubaspook

scubaspook said:


> Would these solid state relays work so there would be no need for flyback diodes and such and plus there would be no clicking sounds of the relays. http://www.ebay.com/itm/1pcs-5v-4-C...5463153?hash=item5d5c989971:g:uOcAAOSw~gRVinY~


I just wanted to give an update on the ssr relay that I had posted earlier. This particular one only switches ac current and will not work switching dc current. The nano or uno works with this relay.


----------



## scubaspook

IMU you could try using a ssr relay to switch the fogger like this one and see if it helps. http://www.ebay.com/itm/1pcs-5v-1-Channel-OMRON-SSR-G3MB-202P-Solid-State-Relay-Module-For-Arduino/381374576453?_trksid=p2045573.c100034.m2102&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D20131003150253%26meid%3D3dcd8c122fd742ac80bc7c4533c5f5ea%26pid%3D100034%26rk%3D5%26rkt%3D8%26sd%3D361423306442


----------



## IMU

I did add another one inside the remote and gave it a try. No real improvement over just 1 so I think that's it for eliminating that "pop" with a capacitor.



David_AVD said:


> I guess any reasonable reduction in the popping sounds is good. A larger value capacitor *may* improve it more, but I chose a low value to keep the off-state leakage to reasonable levels. Maybe try a second cap inside the remote switch and see if it helps?


I think that nobody else will really notice it so I'll just leave it alone. With all the other sounds and sights ... it will go unnoticed. Its just me being picky.



scubaspook said:


> IMU you could try using a ssr relay to switch the fogger like this one and see if it helps. http://www.ebay.com/itm/1pcs-5v-1-Channel-OMRON-SSR-G3MB-202P-Solid-State-Relay-Module-For-Arduino/381374576453?_trksid=p2045573.c100034.m2102&_trkparms=aid%3D222007%26algo%3DSIC.MBE%26ao%3D1%26asc%3D20131003150253%26meid%3D3dcd8c122fd742ac80bc7c4533c5f5ea%26pid%3D100034%26rk%3D5%26rkt%3D8%26sd%3D361423306442


----------



## David_AVD

I have one more idea up my sleeve; putting a 150Vac Varistor (MOV) across the remote contacts (instead of the second capacitor) to limit the voltage spike when the circuit is broken (turned off).

The 14D151K MOV seems to be common on eBay and are only a couple of dollars for 10. That type is assuming that you are using 120V power. People using 230V power should use a S14K275 type MOV.


----------



## Montclair

Mike, is it possible to have the controller software control the relays in real time? I have a prop that's being particularly difficult and would like to hook up my laptop to the arduino and have the software record the sequence and trigger the relays in real time, as if I'd built the button banger portion of the project.

In other words, I know you can hit record and press 1,2,3,4 to record the sequence, but I'm wondering if it would be possible to have that connect with the Arduino at the same time and play out the keypresses over the relays.


----------



## mikkojay

Yes, go to the Serial tab and click the button that looks like this:








Then play your sequence, and it should run in real time.
This assumes you have an arduino with the firmware loaded & connected, of course.
-Mike


----------



## Montclair

Sweet! I'll give that a shot. Thank you, Mike!


----------



## Montclair

Okay guys, I'm having some pretty major issues with the prop controller which I cannot resolve on my own. I think it's related to insufficient power to control the relays when AC is run through them. How that makes any sense, I don't know. It must be related to the AC load (shiatsu motor).

I'm using 9v DC @ 1 amp to power the arduino, relays, and mp3 player per the standard wiring instructions. Frequently, yet sporadically, the scare sequence will stop and the controller completely reset. I tried a 9v @ 400ma and as soon as the two relays I have running the motor are triggered, the controller resets.

If I run the fourbanger software connected to the controller using the option to run the sequence in the software and control the arduino in real time, the software crashes as soon as the two relays controlling the shiatsu are triggered. The arduino itself does NOT reset, but gets stuck with the two relays on, and the motor keeps running and my prop keeps doing its thing, as if it were plugged into AC with no controller at all.

If I remove the shiatsu motor from the relays, this all stops happening.

Now, I tried wiring the relays with *their own* separate 9v DC 1A power supply, and... nothing. The relays never fire at all. I double checked my polarity and even tried removing the little yellow jumper on the relays. They refuse to work unless wired to the Arduino's power supply.

Also, without the weight of the prop on the motor, everything works fine. I've posted other videos of it working prior to attaching the prop.

I just don't understand what's going on here. Now if what I've described is confusing the hell out of you, I recorded all of it. The video is rough and unedited and has me swearing, so if that offends you, don't watch.

*Please help!* I want to finish this stupid prop!

//edit: Okay so now it's failing with no weight at all on it. I disconnected the entire prop and only have the motor running, and it craps out. My crappy meter won't read AC amperage, nor anything above 30 ma so I can't test the draw. The bottom of the shiatsu says it draws .35 amps. I'm truly at a loss now since I'm not overloading the relays amperage rating.

Does anyone have any ideas? And, why the hell won't the relays work with their own separate power supply? Argh, so frustrated!






Like · Reply · Just now


----------



## David_AVD

When you powered the relays from a separate power supply, did you remember to link the 0V (-ve) connection of the relay board to the Arduino board 0V ?

EDIT: Just watched all of the video. You do need to leave the ground connected the the Arduino. Without that, there is no current return for the trigger wires going from the Arduino to the relay board. So you'll need to splice the relay power supply -ve into that 0V line and just disconnect the +ve coming from the Arduino.


----------



## Montclair

I'm sorry, but I don't understand the instructions. Are you saying that I leave the negative connected from the Arduino and only connect the positive from the secondary power supply?

Or, are you saying I need to splice the negatives together and connect the positive from the secondary power supply?

Also, it's been suggested elsewhere that the relays can't handle the amperage draw. I can't measure that due to lack of equipment. A remedy suggested was to have the existing relay switch a secondary high amperage relay and connect the motor to that. If that is indeed the issue, would this work?

http://www.ebay.com/itm/JQX-12F-2Z-...al-Purpose-Power-Relay-8-Pin-TS-/172168696581

or since I'm running 9v, this?

http://www.ebay.com/itm/5PCS-SLA-09...832548?hash=item25bcf302e4:g:~zQAAOSwLpdW~Ly3


----------



## David_AVD

The -ve of the (new) relay power supply will splice into the existing 0V wire going from the Arduino to the relay board.

The +ve wire from the relay power supply will go to the relay board only.

The +ve wire that was going from the Arduino to the relay board will be disconnected.

As for the relay you have, the motor you're driving is bugger all current so well within the rating.


----------



## Montclair

I'm sorry man, but I'm really a novice at circuits. I don't know what "ve" means. LOL, sorry. I know it's frustrating talking to someone who's not up on this stuff.

But I think what I said above is what you're saying.

Connect the existing black to the new black and the relay's black, pull the red from the Arduino, and run the red from the new power supply to the relays. Red being positive and black being ground or negative or whatever you call it.

And, wait, the relay specs say it's 5v. Don't I need a 5v supply then instead of this 9v one if I power them separately like this? But the specs also say 110% max allowable voltage so that 9v is below the max tolerance, so would it work?

Is this picture correct?









And, have a look at this. This guy is talking about wiring to the one of the pins where the jumper is. Guess he was having similar issues with insufficient power from the Arduino to power the relays.






And this one too:


----------



## David_AVD

Your diagram is exactly what I was meaning.

Oh, +ve mean positive and -ve means negative. 

I'd have to check one of those relay boards to see exactly what the deal with the jumper is. I think I have one of them at work so will let you know tomorrow.


----------



## David_AVD

I just watched the second video. He shows how you can remove the jumper and use a separate power supply to power the relays. That way the Arduino only has to provide power for the opto-couplers. You could wire yours that way too.


----------



## Montclair

Unfortunately, there's no additional ground pin on these boards next to the jumper, like the one in the video. I assume I'd just go with ground the way we discussed above. *Do you agree? And, can these boards handle 9v since the specs say max tolerance is 110% on the DC input voltage? * Or, should I get some of these?

http://www.ebay.com/itm/L7805-LM780...679954?hash=item2ecf7ea852:g:6yoAAOSwYlJW3jAp

Thank you so much, Dave, for the help. I appreciate it!


----------



## PirateDex

One thing I am thinking is that you could try plugging the power cable that ends up providing power to the shiatsu motor into another power outlet. I am thinking that when the motors kick on the initial current draw on the a/c line is causing a dip in voltage on everything you have plugged into that extension cord. The voltage drop maybe causing a correspondent drop in voltage out of the arduino power supply and causing your reset. So just unplug the a/c line that feeds the shiatsu via the relay from that extension cord and try it on another outlet.﻿


----------



## Montclair

PirateDex said:


> One thing I am thinking is that you could try plugging the power cable that ends up providing power to the shiatsu motor into another power outlet. I am thinking that when the motors kick on the initial current draw on the a/c line is causing a dip in voltage on everything you have plugged into that extension cord. The voltage drop maybe causing a correspondent drop in voltage out of the arduino power supply and causing your reset. So just unplug the a/c line that feeds the shiatsu via the relay from that extension cord and try it on another outlet.﻿


If it's this, I'm going to kick my own ass. I'll give it a shot. Thanks for the suggestion!


----------



## David_AVD

It do seem that there are slight variations on those relay boards, which is making this a little confusing. I'll see what type I have at work this morning.

As for the voltage, you will need to use a 5V power supply for the 5V relay board. You can either use a regulator board to drop the 9V down to 5V, or maybe use a spare 5V phone charger ?


----------



## David_AVD

Just checked, but the one I have here at work is different to the ones you're using. It has no opto-couplers so doesn't have the voltage jumper either.


----------



## Montclair

I'm beginning to suspect the amp rating for NC on these is very minimal, with 10A applying only to NO. Everything I did today failed to resolve the problem. Wired 5v 1A directly to relays sharing ground. Works great with no load. Put the load on and fail. Measured amp draw. Came out to .4A, well within spec. Swapped out the shiatsu for a different one. Same results! There is a 4uf cap in this motors circuit which is causing continuity between common, NC, and NO with 293 Ohms resistence though. I'm wondering if that is the problem. And, finally, if I simply plug a shiatsu into one of the receptacles that's controlled by a relay, there's no problem! But that gives me no control over forward and rdverse. It's just on /off.

It seems to me that having wiring on NC, NO, and common, so that the relay acts like a rocker switch is the issue, maybe because of that cap.

What do I do now?!

//edit: 4uf cap, not 400


----------



## David_AVD

Does your programming only ever change the state of the reversing relay when the power relay is off ? I think I mentioned that some time back. 

Can you try temporarily programming it so you only use the forward direction and see if it still resets ?


----------



## Montclair

Yes, always. Power is always off before direction is changed. Off -> Forward -> On -> Off -> Reverse -> On -> Off -> Forward -> On ->Off, etc. Never switched forward / reverse while power applied.

Yes, I can redo the programming. I brought the arduino up to my office to reprogram it fully anyway, because I wasn't having this kind of behavior to start with, with no load.

Also, here's a picture of the wiring, minus the rocker switch, showing the cap, and how I wired it.


----------



## David_AVD

The 4uF capacitor is to induce a phase lag in the motor winding not directly energised by the switch (or relay in your case). It causes the rotation by delaying the current one motor winding compare to the other.

The wiring looks a little confusing without having access to it first hand. Are you using the plug on the shiatsu unit to power the K1 and K2 relay outputs ?

EDIT: Oh, just looked again and you are. I can't see any errors in the wiring.


----------



## Montclair

David_AVD said:


> The 4uF capacitor is to induce a phase lag in the motor winding not directly energised by the switch (or relay in your case). It causes the rotation by delaying the current one motor winding compare to the other.


LOL, wut? Okay, if you say so. :googly:



David_AVD said:


> The wiring looks a little confusing without having access to it first hand. Are you using the plug on the shiatsu unit to power the K1 and K2 relay outputs ?
> 
> EDIT: Oh, just looked again and you are. I can't see any errors in the wiring.


Yes, that's what I'm doing.

Forward only works fine, even toggling it on and off. I assume reverse would work the same, but I'll test it also and report.


----------



## David_AVD

Maybe you just need to increase the off time when changing directions. Not sure how that will impact the look you're trying to achieve.

I work on motorised window systems sometimes and always program them to pause (power off) for up to 1 second before changing direction.


----------



## Montclair

Reverse only works. I also tried forward / reverse with no off and that fails and resets the controller in random parts of the sequence, just like before.


----------



## Montclair

David_AVD said:


> Maybe you just need to increase the off time when changing directions. Not sure how that will impact the look you're trying to achieve.
> 
> I work on motorised window systems sometimes and always program them to pause (power off) for up to 1 second before changing direction.


I'd already done this to try and curtail momentum, but not 1 second in length. This was my next test. I'll report back.


----------



## David_AVD

OK, sounds like you need to leave larger off-times between reversing actions.

PWR ON
...
PWR OFF
500ms delay
REV ON
500ms delay
PWR ON
...
PWR OFF
500ms delay
REV OFF
500ms delay
PWR ON

EDIT:
You may be able to minimise the delay between the reverse relay changing state and the power relay switching on.

Leave the biggest time for between switching the power relay off and changing the reversing relay state.


----------



## Montclair

10 successes and 1 failure with 1 second off. The very first time, it failed immediately upon triggering the relays (power draining from cap maybe?) Every subsequent time for 10 tests, it worked without failing. I'm going to try 1/2 second off and report. Thoughts?


----------



## Montclair

David_AVD said:


> OK, sounds like you need to leave larger off-times between reversing actions.
> 
> PWR ON
> ...
> PWR OFF
> 500ms delay
> REV ON
> 500ms delay
> PWR ON
> ...
> PWR OFF
> 500ms delay
> REV OFF
> 500ms delay
> PWR ON
> 
> EDIT:
> You may be able to minimise the delay between the reverse relay changing state and the power relay switching on.
> 
> Leave the biggest time for between switching the power relay off and changing the reversing relay state.


Well forward and reverse are just one relay. It's either forward or reverse at all times. The only delay I can introduce is between power cycles.

In other words, forward=NC and reverse=NO. I'm not sure what you mean about minimizing the delay.

//edit: unless you mean something like this:


----------



## David_AVD

You seem to on the right track now at least. Maybe the reversing timing needs to be tweaked some more.

The underlying issue though is still there. The Arduino shouldn't be getting confused / reset / stuck by the actions of the relay loads.


----------



## David_AVD

In your diagram, K4 is your power relay and K3 is your reverse relay.

The timing I gave above was referring to that.


----------



## Montclair

Well K3 is forward and reverse. There's always a connection there. It's either forward or reverse. There's no delay between states that I have any control over. It's just whatever milliseconds it takes the relay to physically do its thing.


----------



## David_AVD

I think we're just getting mixed up in terminology. 

You should be ok as long as you don't change the state of K3 (fwd/rev) while K4 (pwr) is on.

That's what I originally said when we went through the wiring diagram.

So in your programming, you need to make sure K3 only changes state when K4 has been off for at least 500ms.

Additionally, a delay of at least 100ms should be there between K3 changing state and K4 going back on again.

It's a little hard to explain some of this, but I hope we're getting closer.


----------



## Montclair

We are pretty much done. Also, I've always had K4 off before toggling K3, other than the single test I ran earlier tonight which failed.

With 500ms between K4 being energized, the circuit appears to be functioning. I ran 10 tests without failure. I put my hands on the gear rods and put as much resistance as I physically could on them, and they continued to work and the circuit did not fail. This is the routine I have right now, which is very robotic and I'll tweak. Note the 500ms between power cycles:










Thank you very much for helping me troubleshoot this thing. I know we still haven't found the root cause of the Arduino resetting, but I'm convinced it has something to do with the connectivity between all of K4's poles at all times, due to the way the motor is wired with the capacitor. Perhaps the delay is giving the capacitor enough time to discharge. I don't know. You're the expert on that.

All I know about "phase" is what I learned from Star Trek's phasers. :googly:

I can't thank you enough, Dave. Hopefully, once I put this back on the other motor and put the prop back together, I'll be done with this.

*Thank you!*

//edit: okay I see what you're saying now about K3. You want it to stay in whatever state up until 100ms before K4 is energized, right? That would look like this:










I'll try it out and report back tomorrow. Thanks again!


----------



## David_AVD

That's great news! 

In the image above, you still have K3 changing state very near K4 switching on and off.

Don't forget you can still switch K4 on and off more erratically as long as you don't go switching K3 during those times as well.

As for the reset issue, it shouldn't occur no matter what the 120V side is doing. The switching back and forth must be inducing a voltage spike into the low voltage wiring.


----------



## David_AVD

I've doctored your image to show you what I mean about the timings.

As you can see, the important thing is the never switch K3 on or off while K4 is energised.


----------



## Montclair

David_AVD said:


> That's great news!
> 
> In the image above, you still have K3 changing state very near K4 switching on and off.


Confused. I thought you said keep K3 in it's state all the way until 100ms before K4 changes, as long as there's 500ms between K4 changing.

I haven't tested that yet. I do know the original image before the edit works. I'll test the other one tomorrow. I'll have a video up shortly of the thing working, though.

Thank you!


----------



## David_AVD

K3 (fwd/rev) should only change state after K4 (power) has been off for at least 500ms.

Conversely, K4 (power) should never go on within 100ms of K3 changing state.

You just need to keep the timing edges of the two relays away from each other and never switch K3 on/off while K4 is on.


----------



## Montclair

David_AVD said:


> K3 (fwd/rev) should only change state after K4 (power) has been off for at least 500ms.
> 
> Conversely, K4 (power) should never go on within 100ms of K3 changing state.
> 
> You just need to keep the timing edges of the two relays away from each other and never switch K3 on/off while K4 is on.


Yep. That's what I did in the original sequence in the first image, which is working. This one:


----------



## David_AVD

Yeah, with my image I was just pointing out that you can still have K4 going on and off even while K3 is kept energised.


----------



## Montclair

Here's the video:


----------



## David_AVD

Good to see you not give up on this.


----------



## Montclair

So close, man. I was nearly broken when the separate 5v wiring for the relays made zero difference, and again after the draw was measuring at ~.4 amps. I was just going to put the thing back together and put it on this old sound activated thing I have, which I was using last year. But, you made my day. Thanks for spending so much time with me online. I really appreciate it!


----------



## David_AVD

Happy to help. You and other people here have given me so many ideas for Halloween props.


----------



## Montclair

Mike, have you seen these? 8 channels with the arduino uno, with no shield needed. Just a separate power supply for the relays. Seems like there's enough pins still available on the Uno to do this with your design. 





Here's a guy doing 16 relays with one Uno.





What do you think?


----------



## mikkojay

Wow, I go drink beers for like 2 days, and look at all the fun I missed out on 
Here is a sketch I cobbled together when I first read of your Shiatzu motor issues:
















I have become a big fan of the buck converters. They would work great to power an 8 relay module for sure.


----------



## Montclair

I appreciate the reply, Mike. I already wired up additional power. Didn't make a difference. I also tested amperage and the motor was drawing ~.4A across the relay, so that's well within tolerance. I don't think I need any of the stuff you so graciously drew up, but thank you!

David_AVD and I worked out that there needs to be at least 500ms between power cycles of the motor going one direction and the other.

I don't think we ever really understood why, though. Some kind of feedback or something from the AC switching getting piped back to the Arduino causing a reset, if anything less than 500ms between toggling the power on and off. 

IDK. :googly: It works as of last night, and I haven't fooled with it today at all.


----------



## IMU

mikkojay said:


> I have become a big fan of the buck converters. They would work great to power an 8 relay module for sure.


I finally understood something you all were talking about ... I bought one of these for one of my projects a few weeks ago:










I know they make some smaller and without the readout but I just wanted to see what these things do. I will probably use something similar more often then searching for so many different power supplies.


----------



## David_AVD

I have a page on da-share that shows a few different DC-DC (buck) converters.


----------



## Montclair

Just a quick update for anybody interested. Working under load now! Sweet


----------



## David_AVD

Of course we're interested! How can we not be after the epic battle of late? lol


----------



## iowachap

Montclair said:


> Just a quick update for anybody interested. Working under load now! Sweet


WOOO HOOOO!!! HOORAY looks GREAT! It's working under load not da KA MODE... lol


----------



## IMU

Glad you got it working Montclair.

David_AVD, I actually have 2 of those buck converters that aren't adjustable (metal sealed up versions) ... I haven't had any issues with them yet. Do you think they would be ok to keep in a prop or go with the smaller, adjustable ones? I have it stepping down a 12v 4a to a 6v 4a for a couple of servos.


----------



## David_AVD

I'm wary of the adjustment pots on those really small converter PCBs. Their open frame construction makes them prone to damage or accidental adjustment. That's why I replace them with a couple of resistors to fix the voltage. The (typically) blue solid block adjustment pots on the larger boards seems to be quite reliable.

What type of converter to use depends on size constraints, current required, mounting options, etc.

I used a sealed one with mounting tabs for my rocking chair for durability reasons. Similar type for the haunted shovel as it needed to be weatherproof.

I have used the tiny converters inline with sets of lights (in a sealed heatshrink sleeve) and the slightly larger ones inside the boxes of some props.


----------



## Montclair

David_AVD said:


> Just to add to this, the diode should go across the load (as close as possible to it in fact), not across the actual relay contacts. That's why you don't see them on relay board itself. I'll do up a little diagram shortly. Not sure if this helps or confuses.


Okay, so I want to add these 12v door lock actuators to my electrocution prop - one for each leg.

http://www.ebay.com/itm/161286561441

Questions:

1) If I use a separate power supply than what I'm powering the Uno with do I need these diodes?

2) If yes to above, or if I use only one 12V 3A power supply to run the arduino and the actuators, the 1n4007 Mike lists in his flyback diode doc is rated only to 1A. David_AVD lists the 1n4008 above and it's rated to 3A. I assume I'll need that since these actuators seem to need at least 2A to work properly.

3) If I run both of the 2A actuators at the same time, do I need a 4A power supply, and if yes, can the Uno handle that?

Sorry for all the questions, I just want to get it right this time before I order more stuff.


----------



## David_AVD

You should allow at least 3 Amps per actuator. The really do draw that much current. If you use a much smaller power supply it will buckle under the load and cause issues.

On my monster crate, I used the same 12V supply for the controller board and the actuators. It was a 12V, 10A supply.

I used the 1N5408 diode across the actuator primarily to protect the MOSFET output on my controller boards. If you're switching the actuators with a relay contact, in theory you don't need them. A diode can reduce arcing in the contacts and *may* reduce interference though.


----------



## Montclair

David_AVD said:


> You should allow at least 3 Amps per actuator. The really do draw that much current. If you use a much smaller power supply it will buckle under the load and cause issues.
> 
> On my monster crate, I used the same 12V supply for the controller board and the actuators. It was a 12V, 10A supply.


Great info, as always. Thank you, Dave.



David_AVD said:


> I used the 1N5408 diode across the actuator primarily to protect the MOSFET output on my controller boards. If you're switching the actuators with a relay contact, in theory you don't need them. A diode can reduce arcing in the contacts and *may* reduce interference though.


Okay, now that confuses me, as Mike (and others I see) say something like this (from the Arduino forum):



> Don't leave out the "backwards" protection diode you'll see in the examples of using transistors to drive relays, motors, etc.: you really do need it to keep the residual energy in the coil from zapping your transistor when you switch the motor/solenoid off.


If I don't need the flyback diode, why did Mike have problems with his pneumatic solenoid until he put it on?

Sorry for being dumb on this stuff, and thanks so much for the help!


----------



## David_AVD

My controller doesn't use relays to control the solenoid so the setup and protection requirements are a little different for mine.

The diode across the coil of the relay is always required, but that's built into the relay PCB you're using already (shown as D1 in my diagram).

The diode on the contact side (shown as D2 in my diagram) may or may not be required depending on a bunch of conditions. Since your wiring is all in close proximity I'd put it in.

No problem with the questions. Better to ask then stager around in the dark.


----------



## IMU

At first I didn't use a flyback diode in my one setup and it worked fine with no reset issues but when I added on to the controller (more solenoids & motors) it became "flaky". Now, I add them to anything that isn't an LED. I haven't had any reset issues since on any of my 12v setups. I also keep the controller power separate from the appliances (if that's the correct term).


----------



## Montclair

Well, to be safe, I ordered the diodes. And, believe it or not, the US stores on eBay beat the overseas guys on all of it except the LEDs (but I didn't try too hard on that one as I find shopping a tiresome experience). I got 30 pre-wired LEDs, 10 DC connectors, one 12V 8A power supply (should be sufficient for the two actuators and Uno), 2 of the popular actuators, and the diodes, all for $28. Not bad. 

Check it out:
http://www.ebay.com/itm/161286561441
http://www.ebay.com/itm/401104731485
http://www.ebay.com/itm/121636003602
http://www.ebay.com/itm/371191728130
http://www.ebay.com/itm/201595226786


----------



## David_AVD

That should keep you busy (and us amused via your videos) for a while! I mean that in a nice way.


----------



## scubaspook

mikkojay- think your message box is full


----------



## scubaspook

Just a quick question to everyone. How many of you are using the 5 button control and not the pc to program the sequences?


----------



## IMU

scubaspook said:


> Just a quick question to everyone. How many of you are using the 5 button control and not the pc to program the sequences?


I never tried it and from what Mike had mentioned ... it was a lot of headaches. I use the PC and the software but will occasionally "manually" program it using the keyboard.

May I ask why you're wanting to use the button banger? I know with the PC you can program the sequence in real time if you are looking for that option.


----------



## IMU

David_AVD said:


> That should keep you busy (and us amused via your videos) for a while! I mean that in a nice way.


I laughed way too hard and long at this comment!


----------



## iowachap

I had a pneumatic prop last year and i did not use a diode for the solenoid, but I also powered it separately than from the arduino board as it showed if you have a dedicated power supply for the solenoid a diode was not necessary, and I did not run into problems with our exorcist prop, though it only had 1 pneumatic cylinder, I plan on making a hall with banging doors which will be at least 2 or 3 cylinders.


----------



## crazybob

*Can't trigger controller*

I'm only a couple days into using this controller and software, and already love it. What a great contribution to the haunted house hobby!

I'm having a problem triggering the controller once programmed. I can connect to the Arduino, upload the sequence, and even playback live from the software with no problems. However, I cannot get the scare to trigger after that.

My PIR checks out fine using the tester, and everything works when I use the live playback feature.

I've tried using a mat switch instead of the PIR as a trigger, with no luck. I also have no luck using the "trigger scare" option in the menu of the serial monitor screen.

I'm certain I'm overlooking something ridiculously silly, as I've read every post in this thread and it seems nobody else has this problem.

Any ideas on what I'm doing wrong?


----------



## PirateDex

Crazybob, I had the same problem and then used the Upload All button that is two above the PIR tester and that worked for me. It is in the manual, but hard to overlook. I am loving this thing as well, should have ordered more arduinos.


----------



## Montclair

So, if you want to see the project failing with a shiatsu motor, as well as the software failing (because the USB port is disappearing while trying to control the board in real-time) and see me jump through lots of hoops only to fail and NOT find out why the Uno / relays / ?? (we still don't know the cause) can't run a .4A 120v motor consistently, make sure you tune in to my latest vlog episode. I cover the problems I had with my particular prop and the controller in great detail.

And, I'm sure all of you electronics gurus will be shaking your heads and yucking it up.  Enjoy!

P.S. This is not meant to dump on the controller. I love this thing! It's one of the coolest things I've ever built, thanks to Mike's awesomeness!


----------



## David_AVD

Video says "private". 

EDIT: Video all fixed now it seems.


----------



## BillyVanpire

@Montclair, i noticed the power connector you're using for the prop has red/yellow/black wires. are you feeding 5v & 12v into the prop?


----------



## Montclair

> Video says "private".


Video is public now. Sorry about that.



> Montclair, i noticed the power connector you're using for the prop has red/yellow/black wires. are you feeding 5v & 12v into the prop?


 No, that's just a hacked up connector to facilitate disconnecting the prop controller easily. The prop is 120v AC.

David_AVD and I eventually figured a workaround. Essentially, a 500ms delay between changing directions is required. We're still not sure why. And, oddly enough, I noticed while editing this video and doing some work a couple days ago on it, that it (even now) fails on the first activation. On subsequent triggers, it seems to work fine since the 500ms delay was introduced. No clue what that's about.


----------



## BillyVanpire

as a guess, is the extra weight on the motor pulling more amps than available?

*edit: you said 120v power so probably not..

strange one indeed


----------



## IMU

I noticed that Montclair has mentioned 9v several times as his power supply. OK, so I'm going to ask a stupid question ... I thought you could run the Arduino at 12v 1a if you connect the power supply to the barrel jack on the board?


----------



## Montclair

12v is the maximum you should supply. From the Arduino website:

"The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board."

I used 9v because I'd read somewhere on the Arduino forums that it was considered ideal.


----------



## Montclair

BillyVanpire said:


> as a guess, is the extra weight on the motor pulling more amps than available?
> 
> *edit: you said 120v power so probably not..
> 
> strange one indeed


I didn't bother testing it under the weight load, since it was failing with no weight at all. I really think it has something to do with the capacitor and the way there's continuity on all three poles of that relay at all times.

Really doesn't make much sense, because all the relay is doing is replacing a 3 position rocker switch.


----------



## BillyVanpire

Montclair said:


> Really doesn't make much sense, because all the relay is doing is replacing a 3 position rocker switch.


so forward and reverse are going through the same relay, with a shared common?

can you try using 1 relay as forward & another relay for reverse?

i'm wondering if there is a micro-second of current still flowing forward in the relay when you reverse/engage the other side, causing a reset/short.


----------



## David_AVD

The "continuity issue" is just the way the motor is wired to the forward/reverse relay and the reading is to be expected.

What would be interesting is to plug an unmodified shiatsu unit into the same power 110V outlet as the Arduino power supply and flip its switch between forward and reverse a bunch of times. You'd lead the modified shiatsu unit disconnected for this test.

This may give a clue to whether the relays are involved in the resetting, or if it's simply mains (110V) bourne interference causing it.

I forget - was the input to the Arduino 12V or 9V? I was thinking the other thing to try was getting a 12V version of that 4-way relay board so you can power it from the same power source as the Arduino.


----------



## crazybob

PirateDex said:


> Crazybob, I had the same problem and then used the Upload All button that is two above the PIR tester and that worked for me. It is in the manual, but hard to overlook. I am loving this thing as well, should have ordered more arduinos.


Thank you so much- this made it work flawlessly! I knew I was missing something simple, but I'm not sure how I overlooked this multiple times.


----------



## iowachap

Just wanted to add a photo of how I am now mounting my components, i use a foamboard, then hot glue them on with that washer in the middle so if I need to screw it to a wood base on wall, I can mount and remove without jacking up the foam, and the screw wont go right through. I could always also put the foam board into a water tight container with the wires coming out a hole.

I might order some bluetooth transmitters to plug into the audio jack and use a bluetooth speaker.










http://i827.photobucket.com/albums/zz198/iowac1/Kustom%20Scares%20Halloween/F6E82A65-8944-4E08-A602-117C41CFA4BC_zpsqe7y4je6.jpg~original


----------



## Montclair

David_AVD said:


> The "continuity issue" is just the way the motor is wired to the forward/reverse relay and the reading is to be expected.


Someone over on YouTube is saying to toss out the capacitor completely. He says:



> take the capacitor out of the motor . it cant switch polarity that quick. and causing back feed in the switches. creating em spikes from the coil. taking it off line. that's why it works in any one direction but not both.﻿
> 
> the capacitor is discharging in roughly 350ms your 500ms gives it enough time. I had this happen a lot on ac motors with capacitors and relays. with enough amperage I have managed to make my tv ,pc and monitor either turn off or blue screen instantly..lcd items are affected more by this em spike created by the relay coil..﻿


What do you think of that, Dave? I thought the capacitor is necessary to get the motor to change direction.



> What would be interesting is to plug an unmodified shiatsu unit into the same power 110V outlet as the Arduino power supply and flip its switch between forward and reverse a bunch of times. You'd lead the modified shiatsu unit disconnected for this test.
> 
> This may give a clue to whether the relays are involved in the resetting, or if it's simply mains (110V) bourne interference causing it.


Can do. Will try it out and see what happens. Good idea!



> I forget - was the input to the Arduino 12V or 9V? I was thinking the other thing to try was getting a 12V version of that 4-way relay board so you can power it from the same power source as the Arduino.


It can handle up to 12v. I'm using 9v since folks on the Arduino forum say that's ideal. As for 12v relays, I'm not going to bother. I've already tried giving the relays their own power. It didn't make any difference.

So much fun trying to figure out. I'm actually enjoying this, now that a workaround exists.


----------



## David_AVD

Montclair said:


> Someone over on YouTube is saying to toss out the capacitor completely.


No ! The capacitor is what makes the motor turn in a specific direction. It's not optional !


----------



## Montclair

BillyVanpire said:


> so forward and reverse are going through the same relay, with a shared common?
> 
> can you try using 1 relay as forward & another relay for reverse?
> 
> i'm wondering if there is a micro-second of current still flowing forward in the relay when you reverse/engage the other side, causing a reset/short.


I could, but... ya know... they're already wired to an outlet. Plus, there's an on/off relay controlling power to the forward/reverse relay. The on/off gets toggled at least 100ms before the forward/reverse relay is changed.

I think it's the capacitor and residual charge there that's the problem. I dunno. :googly:


----------



## David_AVD

Montclair said:


> As for 12v relays, I'm not going to bother. I've already tried giving the relays their own power. It didn't make any difference.


The reason for the 12V relay suggestion was to reduce the current drawn by the relays, no matter the source of their voltage supply.


----------



## Montclair

David_AVD said:


> No ! The capacitor is what makes the motor turn in a specific direction. It's not optional !


That's what I told him in my reply, earlier! Pfft.. youtube comments. What good are they?


----------



## David_AVD

BillyVanpire said:


> can you try using 1 relay as forward & another relay for reverse?


You *could* do this, but would have to be *very* careful not to energise both relays at the same time. My method is safe in that regard.


----------



## Montclair

David_AVD said:


> The reason for the 12V relay suggestion was to reduce the current drawn by the relays, no matter the source of their voltage supply.


So, you're thinking the 5v relays are drawing more amps than 12v relays would? If you say phased motor windings, I'm outta here. LOL!


----------



## David_AVD

12V relays will pull less coil current (same power / wattage) than the same style of 5V relays. This means less voltage drop in the Arduino wiring, lessened spikes, etc. It may not solve the issue, but we're scraping the barrel here.


----------



## Montclair

Well, my friend, maybe on the next version, if there ever is one, or if this one gets uppety again. Otherwise, I'll take the 500ms delay and live with it. Once I add the actuators, nobody is going to notice that delay anyway.

Hell, nobody is going to notice that delay, regardless. "Oh cool! It moves! That was awesome!" will pretty much be the result, if they even stick around long enough to watch the entire routine. LOL! The **** we go through for these props.


----------



## David_AVD

I'm really looking forward to the video on the leg actuators. I might pinch that idea for a prop in my display.


----------



## Montclair

It's coming... just as soon as I record myself doing the work. LOL! 

It's all still sitting in the chair beside me. I'll get to it probably this weekend. I've got enough footage not aired yet, though, for at least one or two more vlog episodes. Trying to squeeze all of that into episode one to get caught up!


----------



## iowachap

Ok, so I put together 4 new boards with uno R3 knock offs, uploaded new version of software, seem to have 2 that work fine no problem using the usb connected to computer or a usb wall charger to the micro usb power connection, upon using the 12v 1a power adapter barrel plug the relays go funky, sometimes lighting up other relays that are not even in sequence to switch, and then it will completely turn all relays off, the audio portion will continue to play, and it will trigger again after the delay, but the relays will freak out. One time it would not even trigger at all until I re hooked up to computer and when trying to connect it would go through the check sequence and boot sequence over and over, i finally did a firmware upload and then it was fine to work off the usb power connection. I do not mind using that as power, i actually ordered micro usb power chargers to use as the power for the uno board so as not to need to worry about this oddity, seems like I have 2 so far that are doing that. 

I would find it odd if it was the actual program sequence itself, the test sequence did not cause issue, only after i uploaded my sequences, I can test that as I am not 100% but I could upload the test to verify if it has the problem or not. Oh and nothing is connected to the relays at this time, just to the plug outlet but nothing plugged in.


----------



## mikkojay

Sometimes you need to watch out for adapters that have too large of a diameter center conductor. If the size of the adapter causes the main DC power to barely touch, you can wind up with really sporadic behavior like you describe. That's my first guess.
-Mike


----------



## iowachap

Sounds very likely Mike, personally it sounds like it is better to just go with the usb micro power adapter, no worries about diamter etc. I just wanted to see if i there was something i was doing wrong..


----------



## Montclair

Mike, there's a bug in the 1.4 version of the software regarding copying and pasting. It's impossible to copy stuff from a vertically lower track to a higher one. I can copy stuff from higher tracks to lower tracks, but not vice versa.

In other words, you can only copy from the current track and paste to the current track or ones lower. Pasting higher does not function.

Thought you should know.


----------



## scubaspook

Montclair said:


> Thought you should know.


You have been a TRUE test person for this controller Monclair.


----------



## mikkojay

Montclair said:


> Mike, there's a bug in the 1.4 version of the software regarding copying and pasting. It's impossible to copy stuff from a vertically lower track to a higher one. I can copy stuff from higher tracks to lower tracks, but not vice versa.
> 
> In other words, you can only copy from the current track and paste to the current track or ones lower. Pasting higher does not function.
> 
> Thought you should know.


Hey thanks- I remember that one from a while back but I had forgotten about it. I put an update out there that should take care of it. I also placed an *exe-only* zip file out there if you just want the exe and don't want to mess with the whole directory.

Thanks, Mike


----------



## Montclair

Awesome, Mike. That was super quick! Happy Independence Day to you, and everyone!


----------



## Montclair

scubaspook said:


> You have been a TRUE test person for this controller Monclair.


Thanks, scubaspook. When you make as many goofs as I do, you end up finding all kinds of stuff. LOL! :googly:


----------



## Montclair

Also, just a note on a quirky behavior I found in a two controller scenario. If you have two controllers connected together via the "master's" 12 pin to the "slave's" 11 pin, and you don't have power applied to the master controller, and apply power to the slave, the slave continually runs its event.

The slave acts as though it's being triggered constantly. That makes updating the programming with the software impossible because the board is never ready. I had to remove the ground between the two boards to make the slave stop triggering so I could update the code.

If you're not sure what I'm talking about with all this master / slave / two controller stuff, you can refer to this:





I'm sure this will be a rather obscure issue that most will never encounter, but, I figured I'd post here in this 60+ page thread, because that will make it easy to find. LOL!


----------



## Lizzyborden

I've put my controller together except for the PIR (which finally arrived today) and it works great. So now it's time to start thinking about the power supply. I'm just planning on running lights and the scare tracks with this controller so should I go with a 9V power supply or opt for a 12V? I did buy enough parts to build a few more and wanted to go ahead and get the power supplies all at once.

So I guess I'm realy asking if anyone has a link to a decent power supply on ebay.


----------



## iowachap

Lizzyborden, are you talking power supply for your arduino board? If so I would go with a usb walwart, the kind that you would charge your phone with that plugs into the wall, the power for your lights, or devices the controller will control will have their own power based on what they need. So say you went with 12v led flood light, then you would need a 12v power supply that the relay would switch, if you were using a regular 110v style light bulb then you would need a regular plug so you could take an extension cord that the light bulb plugs into and then cut the positive side and have the relay switch it on and off.

here is a link to the usb power supplies i use for my arduino boards

http://www.ebay.com/itm/141653623877?_trksid=p2057872.m2749.l2649&var=440804257310&ssPageName=STRK%3AMEBIDX%3AIT


----------



## Lizzyborden

Thanks iowachap. I was just wondering about powering the board from the USB port vs. the barrel connector. 

Need to go back through the thread and watch Montclair's videos again to make sure I'm doing everything right. All works powered by USB now, but sure don't want to screw up and fry anything.


----------



## Montclair

Welp, guys, I'm back to my primary Uno resetting during the shiatsu motor animation on my electrocution prop. Everything was working fine, but I decided to add those door lock actuators to the legs and some flashing lights, so I needed to add a second Uno.

On the second Uno, I have 12v DC wired to two relays for the actuators, and 110V AC wired to an outlet to power some lights. All of that is crammed into this little box:










So, now, my shiatsu animation craps out randomly, like it was doing before we introduced the 500ms delay between direction changes. I still haven't wired in the diodes for the 12v to the actuators (and consequently burnt out another LED), but the Uno controlling that stuff isn't resetting.

I'm beginning to think that with all of this stuff so close to each other that there's some kind of interference being introduced. I've read stuff about Arduino's resetting with AC loads like this because of inductive spikes, but all this talk is just way above me, with someone even saying longer wires can cause this problem. Argh! So confused! :googly:

Any suggestions?


----------



## Montclair

David_AVD previously mentioned this:

"You could try adding a 100uF capacitor (10V or greater) close to the 5V terminal of the Arduino. The capacitor -ve should go to the nearest 0V terminal on the Arduino."

Can someone dumb that down a little? I have some caps and could try this, but I'm not sure where. I hate to be this uneducated on this stuff. I'm trying!


----------



## Montclair

And, regarding the flyback diode, which way is it supposed to be? In parallel or series?










or


----------



## David_AVD

Here's a quick image hack to give you an idea on the capacitor.


----------



## David_AVD

Montclair said:


> And, regarding the flyback diode, which way is it supposed to be? In parallel or series?


Parallel as in your first image.


----------



## Montclair

Thank you, Dave! Just to clarify, the capacitor is not in line with anything? I just hook it up to the closest 5v and ground from the barrel connector?


----------



## David_AVD

Correct, it's in parallel with the 5V and 0V connections. Soldering it right where I showed would be the best outcome. Maybe you can solder it to the bottom of the headers?


----------



## Montclair

I will test it out before soldering and if it works, attach it to the pins. Thanks, again! You're the man, dude!


----------



## Montclair

Well, I didn't have a 100uF. The closest I had was 220uF 25v. I tried it. It made no difference. I'm just going to pull the entire box apart and put the stuff out on a piece of wood with the relays as far away as possible from the Uno's. I might even add extra wire in there. I don't really know what else to do and don't want to give up on this thing, although I'm really tempted right now to say :finger: Halloween and go enjoy my summer.


----------



## David_AVD

The close proximity of the mains to lower voltage wiring and components is surely not helping. I see the same thing happen when people try to jam too much into Christmas light controller enclosures.


----------



## Matt Roberts

*AC Restarts*


----------



## Matt Roberts

continued from above post.
I have had similar issues whilst trying to trigger a smoke machine using an Arduino, i managed to solve the problem using an RC-snub across the relay terminals (the black component on relay 4).

for my solenoids which also caused the arduino to reset, i used a diode in reverse parallel as close to the solenoid as possible and a mov varistor across the relay terminals.

hope this helps
Matt


----------



## Montclair

Guys, thank you for the info! Matt, I've read about that snub thingy in some of the Arduino forums. Looks like it's a .1uF capacitor with 200 ohm resistor, if what I've read is accurate. I might order one of them to fully solve the issue if what I'm trying doesn't fully work.

However, I've managed to get the thing working right about 60-70% of the time just by taking everything out of the control box. I haven't even added in any real distance from the relays to the controllers yet, but just moving the stuff away from each other as much as the current wiring allows appears to have helped.

I'm still not quite finished yet, but here's a demo of it working correctly with the two Uno's.


----------



## Matt Roberts

*Looks Great!*

Hopefully the snub will sort your stability issues too, it has mine (touch wood).
The snub has .1uf and 200 Ohm written across it so would suspect that you are correct.

The prop looks great, iv actually been following your channel for a while on youtube before stumbling across this forum yesterday, so its great to be able to speak with you.

then by on a totally unrelated topic i have been using David_AVD Multi-Play software for stage productions and never knew he was a keen haunter until i was browsing the Multiplay website and came across his Halloween section (I even had a credit on his haunted shovel prop which is great  )

Matt


----------



## demongod

I have just recently discovered the FourBanger and it is my first doing anything with Arduino. Prior to this, I have been looking over code of a bunch of starter experiments to learn programming and decided to jump to actual hands on with this. Been reading through this long thread and see the code at one time was included with the application, but no longer. I am interested in taking a look at it to see what I can learn from it.


----------



## iowachap

@montclair what gauge wire are you using? Wondering if better plastic shielding or heavier gauage wire might help with interference...?


----------



## Montclair

iowachap said:


> @montclair what gauge wire are you using? Wondering if better plastic shielding or heavier gauage wire might help with interference...?


I'm not sure, honestly. It's some stuff I had left over from an arcade machine build. I suppose I could swap it all out for stuff that I should be using, but... read on...

So, a little update on my nightmare electrocution project. I added distance between the relays and Unos (about 20 inches) and... it works even less! Not only did it not solve the reset problems, it actually made it worse. I was careful to braid the wires together and avoid loops and all of that, and no cigar for me. Massively bummed out.

I did notice that the reset only occurs when the second Uno starts doing its thing and switches the second set of relays. Oddly enough, that second Uno never resets, but when it's switching that AC power on its relays, the master Uno resets.

So, I think the next step is to remove AC from the slave relays and just switch 12v there. I can live without AC on those relays and actually have an idea on something else I can add to the prop that will look cool and doesn't need AC. I'll report on my results after my frustration level dies down to tolerable.

//UPDATE: Removing AC from the second set of relays *did nothing* to resolve the reset issues. I'm going to Radio Shack to pick up some .1 uf caps and 120 Ohm resistors to make RC snubbers for all of the AC relays. If this works, it should be something that's included in the documentation for the project for people that will be switching AC loads.

As to why this the master Arduino resets near the end of its sequence, while the slave Arduino is running its relays, I have no idea. The two sets or relays aren't connected together in any fashion now. The only thing being shared is the DC voltage. I just don't get it. Hopefully, the RC snubber will fix this.


----------



## Matt Roberts

*Ossett Haunt*

I finished my prop controller a few days ago, it's the same hardware as 4banger, after adding the snub I haven't had a single reset.

Other thing to try, adding a 47uf cap to the 5v rail.
Ensuring all your negative wires join at one point, so the arduino, relays and lighting negative wires all join together at my power input and not daisy chained and not all conected at the arduino gnd pins.
My solenoids have reverse diodes across them and a movie across the relay contacts.

Matt


----------



## Matt Roberts




----------



## Montclair

Matt, I just got back from Radio Shack and am going to make the RC snubber. In my haste, I neglected to get any other caps but I think I have a 47uf kicking around. I've already tried various sizes on the 5v rail per David_AVD's instructions (he said use 100uf) but it made no difference. Hopefully, this snub will fix the problem. Thanks for the help!


----------



## David_AVD

I'd be sapping the relay board out for a 12V version and power it from the same 12V supply as the Arduinos.

Also, you're not powering the second Arduino from the 5V line of the first are you?


----------



## Montclair

I added the RC snubber and it did not correct the issue. I put it on the relay that does the power switching to the forward / reverse relay. I assume that's the right place. If it's supposed to go over the forward / reverse relay, do I need two of them?










I am not powering the second Arduino from the 5v line of the first.

I have one 8A 9V power supply, running power to each Arduino separately. Each Arduino is powering each set of relays.

When I disconnect the actuators from the slave Arduino, the reset issue disappears. If I connect even one actuator, the master Uno resets right near the end of the sequence. I can duplicate the reset consistently. It's always right near the end.

This if very frustrating. I wanted to finish this prop today.

I don't understand how I had this working most of the time, before I added wire length to separate the relays from the Unos. Argh!


----------



## Montclair

Here's a video of the entire setup and the problem.






I did just notice on the package label for the cap that it's ".1uF 250WVDC". Is that not going to work on AC power? The resistor is rated at 1/2 Watt, too. I dunno. This is way over my head at this point.

Really bummed out about this. Just don't get why it worked most of of the time before I separated the components.


----------



## David_AVD

There's possibly a whole host of things at play here. Relays running from the 5V Arduino power is one, but probably not the worst.

The resistance of the wiring and the exact wiring layout can also make a huge difference when switching large currents and/or voltages. If the reset issues disappears when you disconnect the loads from the relays, I'd say that the wiring is the issue.

The snubber (resistor + capacitor) would go on the motor power on/off relay as you said. It's much the same as the plain capacitor I suggested way back. The capacitor in the snubber should be a X2 type for safety.

It's a shame we're so far apart else I would gladly help you in person, for all our sanity! LMAO


----------



## Montclair

I thought about the relay power being an issue. I still have the separate 5v USB cable I made a while back. I'll give that a shot tomorrow. But with 8 amps plus the flyback diodes, I thought I was going to be okay without doing that. Isn't that what's been discussed here ad nauseam?

As for switching large currents / voltages -- I'm switching 12v and whatever amperage is left over after the two Unos take their bits. I don't think that really qualifies as large.

The cap isn't X2, however, I have a do have a .47uF X2 cap that I pulled off of a dead PC power supply. It's wired with a 910K Ohm resister in parallel, and that is wired in series between two more caps (at least I think they're caps) to a ground. Hard to explain. This is it:










I was thinking of trying it before I drove out to Radio Shack, but thought that was probably a bad idea.

Anyway, can you be more specific on the wiring layout? I mean, what else should I be doing here? I've separated this stuff as far as I can, reasonably. Maybe I need to move the relays away from each other too?

*Maybe I need to move the 12v DC wiring to the leg actuators out of the same braid that's carrying the 110v AC to / from the shiatsu motor?*


----------



## David_AVD

That capacitor is the right type (X2), but too high in value for a snubber.

Moving the 12V actuator wiring away from the other Arduino wiring would be a good idea.


----------



## Montclair

Thank you, Dave. I'll give that a shot tomorrow. Either way, I'm moving on from this project after tomorrow and will put it into the "tinker when I have time" category. I've spent enough of mine, and everyone else reading this forum's time on this thing for now.


----------



## Montclair

I'm moving my posts off of this thread to a new one, to stop polluting this area for new users. You can continue to follow my project here:

Montclair's Electrocution Prop Nightmare


----------



## Montclair

Moved to Montclair's Electrocution Prop Nightmare


----------



## iowachap

Hey question,

so if i am using these do i hook them up like i would the infrared one? does not seem to work when i hook it up to the same wires as the infrared one.. any suggestions?



David_AVD said:


> No, I customised one of my DMX 3 channel DC boards to be a prop controller.
> 
> The blue wire goes to ground (0V), the brown wire goes to +12V and the black wire is the output to the Arduino.


----------



## iowachap

these are what i am trying to get to work instead of PIR, it shows 6v power to 36v so the uno power 5v is not enough so i hooked up a 9v power supply to the positive and negative of the photoelectric switch, and then the third wire to the uno board and it will just continue to trigger..

One Set E18 5DNA E3F 5 6 36VDC NPN No 3 Wires 5M Sensor Photoelectric Switch | eBay


----------



## David_AVD

I would imagine that it should work in place of the standard PIR although it may need a "pull-up resistor" added if the banger doesn't normally provide one.

If you measure the voltage on the PIR input pin of the Arduino (meter black to power -ve and meter red to Arduino pin) do you get 5 Volts without the sensor connected?

Just saw your second post (while I was typing). Did you connect the sensor's 9V power supply -ve to the Arduino -ve (0V) ?


----------



## iowachap

i connected the 9v direct to the + / - of the sensor not from the arudino uno, i tried the 5v from uno and it did not do anything, would not even trigger, but when using 9v connected direct to the sensor it just continuously triggers.


----------



## David_AVD

But did you link the 9V power supply -ve to the Arduino -ve (0V) so they share a common 0V ?


----------



## iowachap

Another issue, after connectinng a normal PIR sensor and hooking it up to a 12v solenoid that is banging a door open and closed it will work flawless the first time, then the next time it opens the door, and only closes once the sequence is complete. The next sequence will fire off again no problem, its like one good one not.., i have a 12v power supply for the solenoid, the only thing I can think of at this time is that i used the small wire used for wiring up the arduino and think maybe the voltage is not always strong thus its not colapsing the relay once it opens it sticks and only colapses once the sequence is complete.. so i was thinking of using a thicker guage wire, but wondered if it might need a flyback diode, my exorcist prop last year using 12v solenoid did not need one, but then it was only on off sequnce, this is opening and closing the relay multiple times to make the air solenoid extend and retract to make the door open and close over and over..


----------



## akabear

*Ambient and triggered music mixing up.*

Just found this thread and this is really cool. Great work Mike! I downloaded the latest and is anyone have issues where it doesn't seem to trigger right. The ambient and trigger music are getting mixed up. I am using the tracks "Zombie_Horde" for ambient music and "Monster" for triggered music. I let it run and I get a mix of the "Zombie_Horde" as the triggered and then after that is done it will play again "Zombie_Horde" as the ambient and silence during sequence delay. Then the next time it is triggered it plays "Monster" and "Monster" as ambient. Then again silence during delay. Then again once triggered it will sometimes get it right and be "Monster" for triggered and the "Zombie_Horde" as ambient. I am confused why it is mixing it up. Plus isn't it suppose to play the ambient music continuously and once triggered play the triggered music and sequence and then back to continuous ambient? I don't have a problem with the sequence it works and fires all the relays ok.

I am using a (Chinese) Arduino Nano, 4 relay board, PIR from Seeed, but am using a different mp3 module. I have a TDB380 mp3 module. It should act the same. Has anyone used this mp3 module for this application?

On another note, I am trying to find the source code. The link earlier on the thread doesn't work. Does anyone have it? I eventually want to use this as a module for targets in a IR shooting gallery. I would like to add an IR receiver to the source code. Could someone send it to me or Mike could I get it from you?


----------



## Montclair

I have the source code from Mike, but, I don't know if he wants it distributed anymore. I wonder if using a different MP3 player is the problem. I can't imagine another reason, unless your Nano is getting reset occasionally, throwing things off. God knows I've had a hell of a time with that, but I've never had the audio get mixed. You could try flashing the firmware again and reuploading. I've done that a few times when things just seem to go all to hell, and it has helped.


----------



## Montclair

iowachap said:


> so i was thinking of using a thicker guage wire, but wondered if it might need a flyback diode, my exorcist prop last year using 12v solenoid did not need one, but then it was only on off sequnce, this is opening and closing the relay multiple times to make the air solenoid extend and retract to make the door open and close over and over..


You will need the diode. Mike wrote the extra documentation about that. It's more of a requirement than an option, I would think. He stresses it pretty heavily in that extra documentation.

Honestly, there should also be a section about RC snubbers for AC applications, as well as discussion of separate power supplies for the relays. In my nightmare experience, the lack of any one of these things causes stuff to go haywire.


----------



## iowachap

David_AVD said:


> But did you link the 9V power supply -ve to the Arduino -ve (0V) so they share a common 0V ?


no not sure how i would go about doing that, i typically dont want to experiment wiring power due to not wanting to cook the board.. thats why i brought it here, I am probably in the same boat as montclair in knowledge for the electrical aspect..


----------



## iowachap

Montclair said:


> You will need the diode. Mike wrote the extra documentation about that. It's more of a requirement than an option, I would think. He stresses it pretty heavily in that extra documentation.
> 
> Honestly, there should also be a section about RC snubbers for AC applications, as well as discussion of separate power supplies for the relays. In my nightmare experience, the lack of any one of these things causes stuff to go haywire.


really i thought it was only needed when sharing a 12vdc power with the arduino board, if using a separate 12vdc it was not needed.. now i just confused on how to wire the diode, as i have them but never had to use them.. i trying to get a good view of how i am wiring this, so from what i see in photo you run the diod red band side to the positive solenoid but the solenoid does not have a true positive so i guess that would be the positive of the power supply, and the negative side of the diode to the negative of power supply with the relay switching the negative side..


----------



## akabear

Thanks Montclair for your quick rely. 
I have tried flashing the firmware already a few times. I will continue to play around. I have quite a few more nanos I could test out with. Maybe that is the cause. It doesn't seem to be resetting the nano.
Could you please tell me if it should continuously play the ambient over and over until triggered. Then play the triggered music and then back to ambient continuously?


----------



## Montclair

I don't know, man. I had them and my board still reset. Once I moved the power off separately, the issues went away again (plus all the other crap I added). I missed the part where you said you were using separate power. I'd probably still put them on. They talk about this a lot in the Arduino forums, to help protect the relays. Diodes go like this:










(Green is negative / blue is positive, band goes toward positive)

I think David_AVD is saying that you need to have the Arduino ground connected to the 9v power supply ground (negative) for your sensors to work right, just like the PIR is connected to ground on the Arduino. The stuff won't work without the ground / negative / -ve / whatever you want to call it, all being connected.


----------



## Montclair

akabear said:


> Thanks Montclair for your quick rely.
> I have tried flashing the firmware already a few times. I will continue to play around. I have quite a few more nanos I could test out with. Maybe that is the cause. It doesn't seem to be resetting the nano.
> Could you please tell me if it should continuously play the ambient over and over until triggered. Then play the triggered music and then back to ambient continuously?


Yes, continuously, as long as you've told the software to do that. There's a setting in there on whether to play ambient or not. Mike would probably be the best one to answer on this MP3 issue as it's all just my uneducated 2 cents here.


----------



## iowachap

ahhh ok cool i will try that, so just the ground from the arduino connected to the ground of the sensors, the 9v positive connected to positive of sensor so the complete circuit goes through the arduino negative side/ground



Montclair said:


> I don't know, man. I had them and my board still reset. Once I moved the power off separately, the issues went away again (plus all the other crap I added). I missed the part where you said you were using separate power. I'd probably still put them on. They talk about this a lot in the Arduino forums, to help protect the relays. Diodes go like this:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> (Green is negative / blue is positive, band goes toward positive)
> 
> I think David_AVD is saying that you need to have the Arduino ground connected to the 9v power supply ground (negative) for your sensors to work right, just like the PIR is connected to ground on the Arduino. The stuff won't work without the ground / negative / -ve / whatever you want to call it, all being connected.


----------



## Montclair

That is my limited understanding, sir.


----------



## iowachap

Ok, that isnt working, positive power to positive sensor, ground from sensor to ground on arduino it wont trigger, as soon as i hook the negative from the arduino and sensor to negative of the 9v power supply it triggers over and over


----------



## Montclair

It looks like each of those things has three wires. If you wire it just like the PIR, it doesn't work? Try that, and if it doesn't work, maybe you could try the manual switch pins. I'm sure someone else here is going to know way more than me on why it won't work.


----------



## iowachap

one has 3 wires, blue ground, brown +6v-36v black is the input to arduino board, the other side of the switch/sensor is just brown +6v-36v blue ground


I can get it to see PIR when i turn the PIR from low to high in the software settings, but it wont trigger, i am sure that it is due to this is no PIR sensor its a switch, though it works on same 3 wire principle but there are no delays and or pots to adjust sensitivity i can see that the the eyes see each other it has LED lights and when the receiver side is blocked or not lined up with the sending side the led lights up, when you line it up it turns off and then when you put your hand between them to break the beam again the led lights up, so i know the sensors are functioning, just not sending signal or the arduino is not recognizing the sensor/switch

If i wanted to connect to the manual trigger that would close the loop, i am not sure how to do it with the 3 wire set up as the manual is just 2 wires and when you touch it triggers, unless i put the trigger / output to one side of the switch and the ground to the other side


----------



## iowachap

WOOT! OK i got it, I used the manual switch side, hooking up the ground to the ground of the power supply and the ground of both sides of the sensor/switch, hooked up the hot to the power supply 9v, then hooked up the out black wire from sensor to the trigger connection 11 on the arduino board and that works perfectly. So if anybody wants to do the beam break with those cheap beam break sensor/switch thats how to do it. 

I also tested the flyback diode with a heavier gauge wire to see if that will solve the problem with the relay seeming to stick open sometimes, i didnt have the air hooked up and just ran with the solenoid connected, it ran all but 1 sequence fine, one sequence the trigger audio continued to play over and over until i re triggered it again, but after that it was fine, was odd, will test more and then test hooked up to the air compressor with it actually connected to the cylinder/door


----------



## Montclair

Awesome, man. That's some good info! As for the controller flaking out occasionally, I think it's just something we may have to live with. In my two Arduino setup, the slave will sometimes miss the trigger from the master, and the legs don't get animated. But, it's not a consistent thing. I think it's just more of a polling issue. The trigger happens and the code is not yet at the polling point to catch it.

Congrats on getting it work!


----------



## Montclair

I've got a question for David_AVD or Mike (or anyone else). Dave had recommended going to 12v relays and powering them separately. If I went that route for future projects, would tying the Arduino 5v ground (or negative or whatever you call it) to the 12v ground cause a problem? I mean, I need to tie the grounds together now when powering the 5v relays separately, or they don't work properly. 

Would 12v relays powered by a 12v supply with grounds connected to the Arduino's 5v ground cause issues?


----------



## David_AVD

Yes, you would need to have the negative of the 5V and 12V power supplies tied together so the relay board inputs are referenced to the Arduino ground.


----------



## Montclair

Thank you, sir!


----------



## djgra79

Hi Everyone.
I'm a complete n00b when it comes to Arduino. I'm following the parts list on the buttonbanger site and it shows a chinese clone where the listing ends in UL. I notice when searching in eBay there are multiple versions that have different letters at the end, such as AU, YY, Y2 etc. Do I have to get the specific UL model or are these country codes? As I live in Australia, should I get the AU version?


----------



## Montclair

Talking out of my butt here, as long as it's an Arduino Uno and you purchase a power supply appropriate for your country, it shouldn't make any difference. I've got one genuine and three clones and they all work the same. The 2 letters at the end could just denote the electrical authority approval for whatever region. Take that FWIW, which is not much. I will say that I paid zero attention to that when I ordered mine, and just went for the best deals.


----------



## djgra79

Thanks Montclair.
Next question - can a 5v relay board control 12v actuators or motors, or does it all need to be same voltage?


----------



## David_AVD

The voltage that the relay board uses doesn't have any influence on what the relay contacts are connected to.

That said, use a 12V relay board and avoid the potential hassle of 5V relays interfering with the Arduino.


----------



## djgra79

Ok so best to stick to one voltage.
Here's my current ebay cart based on the parts list on buttonbanger site:








The relay board is 5v and yet the geared motors or actuators I've seen used are 12v, so do I just need to swap out the 5v relay board for 12v equivalent?


----------



## David_AVD

Personally I'd use the 12V version of the relay board.


----------



## Montclair

I think you're getting a little confused on what the relays do and the power that makes them do it.

The relays *switch* whatever current you run through them. Think of them as a light switch, or pull chain, or even something like a big hand lever switch you see in mad scientist labs in the movies. The relays can handle up to 230v AC (I think) running through them, turning that power on / off to other things which use that type of power. Want to switch on / off a 12v DC actuator, you run 12v DC *through* the relay. Want switch on / off a table lamp, you run whatever comes out of your country's wall socket *through* the relay. In the US, that's 110v AC.

But instead of being manual switches, relays are electronically activated ones. To make something electronic work, it needs power. The relays are no different. They have to be powered somehow, and that's got nothing to do with the current you're switching on / off.

Per this project's current documentation, you use 5v DC coming off the Arduino to power the relays so they can switch whatever current on / off. After a lot of testing and problematic issues I encountered, it's becoming clear that that's not the best way, though. Dave and I are in agreement that you should either use 12v relays, or use the 5v relays in the project's part list, and get a separate 5v power supply to power them.

To reduce clutter and simplify things, we're recommending the 12v version of the relays instead of the 5v. If you listen to us and go with 12v relays, you'll need to buy a 12v power supply with higher amperage than what's listed in the project's documentation. I use 8 amp, Dave used 10 amp. With something that size, you can power Arduinos, relays, a couple of door lock actuators / air solenoids, all with one power supply. Caveats exist by doing that, as you'll need to put diodes on to your solenoids and actuators, but you're going to want to do that anyway to help protect the relays. Have a look at the flybackdiode documentation included in the buttonbanger download file. You can see me using diodes in my last video, here: Wiring diodes on 12v actuators

Feel overloaded by all that? I know the feeling, but keep asking questions on the parts you don't understand and eventually, you'll get it. Have a look at this part of my last video, too, which may help (or confuse you more) :googly:

It shows an Arduino reset issue I encountered repeatedly, and how we solved it, and includes info on how to power the relays separately:

Arduino reset issues / powering things separately / other things you may want to buy


----------



## djgra79

Thanks for the detailed response Montclair. I'm not confused further, it all kinda made sense! So I'll swap out my 5v relay boards for 12v and place the order order today. 
You said you're using AC elements such as fairy lights which may have been causing the reset issues? I don't plan on running anything ac, all DC. I have a couple of these PSUs spare which hopefully can power the lot (arduino board, relays, actuators & motors) unless you see any issues with this? The less AC power or adapters used the better, as I want to reduce the amount of 240v AC power in the display outside for safety reasons.
http://www.aliexpress.com/store/pro...V-350W-output-constant/701799_1948832565.html


----------



## David_AVD

That will be the way to go. Extra low voltage for Halloween is the same principles we're used to for Christmas displays over here.


----------



## djgra79

Thanks for your help gents. Now the 3-4 weeks wait on all the parts... I guess that gives me time to actually build some props in the meantime!


----------



## iowachap

is this something that will work as 12v relay board? And figure you need to give the relay board it's own power supply, so if you power the positive to the relay board do you take the jumper off and connect to the vcc and then tie the ground from 12v power supply to the ground of the arduino uno??

http://www.ebay.com/itm/4-Channel-12V-Relay-Module-With-Optocoupler-For-PIC-ARM-AVR-DSP-SRD-12VDC-SL-C-/131510355935?hash=item1e9ea0c7df:g:U04AAOSwBahVUbW8


----------



## David_AVD

You can use the same 12V power supply to feed the Arduino's power input pin and the relay boards vcc pin.

If you do use a separate power supply for the relay board, you do need to connect the -ve (0V / ground) of each power supply.


----------



## Montclair

djgra79 said:


> Thanks for the detailed response Montclair. I'm not confused further, it all kinda made sense! So I'll swap out my 5v relay boards for 12v and place the order order today.
> You said you're using AC elements such as fairy lights which may have been causing the reset issues? I don't plan on running anything ac, all DC. I have a couple of these PSUs spare which hopefully can power the lot (arduino board, relays, actuators & motors) unless you see any issues with this? The less AC power or adapters used the better, as I want to reduce the amount of 240v AC power in the display outside for safety reasons.
> http://www.aliexpress.com/store/pro...V-350W-output-constant/701799_1948832565.html


I'm glad my explanation helped! As for AC in my project, I'm powering a shiatsu neck massager motor, some Christmas lights, a strobe light, and a police / warning beacon. The shiatsu motor caused reset issues until we spaced out the directional power switching, meaning, it needed 1/2 a second before switching forward and reverse. The RC snubbers I put on may have subsequently made that delay unnecessary, but more testing is needed to see if that's the case.

After I added a second Arduino to the project, more problems arose, specifically with the relays needing their own power supply. I can only guess as to why 1 Arduino + 1 set of relays worked, but 2 Arduinos + 2 sets of relays caused reset issues. And, honestly, I don't care why anymore. I just know that putting the relays on their own supply, or sharing a supply and using diodes at the actuators / solenoids, is the way to go.

That 12v power supply you're using will more than do the trick! Good luck!


----------



## iowachap

Ok So i get say a 12v 10amp power supply and then get what are those called those post connections that has multiple screw down terminals and then wire 12v to the arduino and then 12v to the relay board, would it use the same 12v pin that the 5v uses now? or do you take that jumper off, and then do you use the same ground from arduino to the relay gnd pin.

Just want to be clear on that, as i probably will go that route in future



David_AVD said:


> You can use the same 12V power supply to feed the Arduino's power input pin and the relay boards vcc pin.
> 
> If you do use a separate power supply for the relay board, you do need to connect the -ve (0V / ground) of each power supply.


----------



## David_AVD

I don't have one of those relay boards handy, but as far as I can tell you'd still connect the relay board's VCC pin to the Arduino's 5V pin.

You'd also remove the small jumper and connect the relay module's JD-VCC pin to your 12V power supply + wire.

The GND pin on the relay board should connect to the 12V power supply - wire which will also connect the the Arduino 0V pin.

I've done up a diagram. The relay contact and other Arduino terminals are not shown.

Notice that the relay GND doesn't go via the Arduino, instead it has its own wire back the the 12V power supply.


----------



## Montclair

Guys, help me out here. I just toasted 2 Uno's because I made a mistake in wiring, and thinking an Uno just crapped out, replaced it before double checking and fried the next one. D'oh!!!

Are these things Uno's? I can't tell by the description:

http://www.ebay.com/itm/Base-Plate-...hash=item25bfeea7dc:m:mTpF6G4Gvxrdh87ncVRvScA


----------



## David_AVD

Weird description, but the one listed as "base plate" seems to be for a Uno clone.


----------



## Montclair

Yeah, I'm just a tad hesitant. I'm going to buy like 10 of these damn things so when I screw up again, they're ready to go.

I accidentally ran 12v back into the 5v wiring and fried the knock off Unos (yeah 2 of them because I'm dumb and didn't check the wiring before hooking up another one) controlling the legs. Want to know the best part? I was done with the prop. Good times. Now I've got to redo my 5v power supply, redo one of the little lightning LED sticks I finished today, and test all the other sh*t to make sure it's still good.


----------



## Montclair

Found a good deal: two for $5.79 (~$2.90 each). You can buy up to 6 at a time:

http://www.ebay.com/itm/232034338344


----------



## iowachap

If you connect the barrel power does that not have the ground in it, thus are you having to cut into that negative ground to go to the relays, and why would it have the +5v from arduino to relay if it has the +12v attached.. trying to understand that..



David_AVD said:


> I don't have one of those relay boards handy, but as far as I can tell you'd still connect the relay board's VCC pin to the Arduino's 5V pin.
> 
> You'd also remove the small jumper and connect the relay module's JD-VCC pin to your 12V power supply + wire.
> 
> The GND pin on the relay board should connect to the 12V power supply - wire which will also connect the the Arduino 0V pin.
> 
> I've done up a diagram. The relay contact and other Arduino terminals are not shown.
> 
> Notice that the relay GND doesn't go via the Arduino, instead it has its own wire back the the 12V power supply.


----------



## iowachap

hmm I dont know about those Montclair, that low price would make me leary.. this is a link to the ones I get and they are US based ship so I get them fast, about 6 bucks each shipped http://www.ebay.com/itm/191841190608?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT



Montclair said:


> Yeah, I'm just a tad hesitant. I'm going to buy like 10 of these damn things so when I screw up again, they're ready to go.
> 
> I accidentally ran 12v back into the 5v wiring and fried the knock off Unos (yeah 2 of them because I'm dumb and didn't check the wiring before hooking up another one) controlling the legs. Want to know the best part? I was done with the prop. Good times. Now I've got to redo my 5v power supply, redo one of the little lightning LED sticks I finished today, and test all the other sh*t to make sure it's still good.


----------



## David_AVD

iowachap said:


> If you connect the barrel power does that not have the ground in it, thus are you having to cut into that negative ground to go to the relays, and why would it have the +5v from arduino to relay if it has the +12v attached.. trying to understand that..


The barrel jack has VIN and GND. The idea is to avoid having the relay current flowing through the Arduino wiring.

The 5V from the Arduino powers the optocouplers (not much current) in the relay board, while the 12V powers the actual relays (higher current).


----------



## Montclair

iowachap said:


> hmm I dont know about those Montclair, that low price would make me leary.. this is a link to the ones I get and they are US based ship so I get them fast, about 6 bucks each shipped http://www.ebay.com/itm/191841190608?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT


Awesome, man. Thanks! I ordered them so I can finish the project. I've got 6 more coming from China, but this way I can wrap it up this week. Thank you!


----------



## iowachap

So what I would want to do is have a wire coming off the barrel power supply for ground that would go to the relays, and the 12v power going to relays would power the say solenoids, so what if one wanted to run like in Montclairs case he is switching 110v ac, would he not need to run power separate anyway? Or does the 12v have nothing to do with power what is switched on the relays?

Grin sorry for the questions, as currently I have my controller using the 5v relays and i have 2 solenoids connected and a sprinkler valve that is for air blast cannon all 3 of those are 12v but i have their own 12v power supply for each. So if I powered it the way you say I would not need to have a power supply for each?

My set up is working knock on wood great, no issues, however to eliminate all the wall warts for each 12v device I ordered a 12v 10a power supply with a 1input 8 output terminal block bus so i can run all the power for each from that 8 output bus, more than enough outputs.. 



David_AVD said:


> The barrel jack has VIN and GND. The idea is to avoid having the relay current flowing through the Arduino wiring.
> 
> The 5V from the Arduino powers the optocouplers (not much current) in the relay board, while the 12V powers the actual relays (higher current).


----------



## iowachap

No problem! Yeah I know we can get them a few bucks cheaper from china but i gladly pay 3 bucks more to have them in a week.. 


Montclair said:


> Awesome, man. Thanks! I ordered them so I can finish the project. I've got 6 more coming from China, but this way I can wrap it up this week. Thank you!


----------



## Montclair

iowachap said:


> So what I would want to do is have a wire coming off the barrel power supply for ground that would go to the relays, and the 12v power going to relays would power the say solenoids, so what if one wanted to run like in Montclairs case he is switching 110v ac, would he not need to run power separate anyway? Or does the 12v have nothing to do with power what is switched on the relays?


It's two separate things. 12v to the relay makes the switching happen. You can then switch whatever current you run *through* the relay, up to 230v AC I think. And, yes, in the case of switching AC, you need to run separate AC power through the relay. In my project, I'm switching 110v AC, 12v DC, and 5v DC, all with 5v relays powered separately from the Arduino boards.



> Grin sorry for the questions, as currently I have my controller using the 5v relays and i have 2 solenoids connected and a sprinkler valve that is for air blast cannon all 3 of those are 12v but i have their own 12v power supply for each. So if I powered it the way you say I would not need to have a power supply for each?


Correct. You can do it all with a single 12v power supply with enough amperage. Make sure you put diodes over everything, as you're using solenoids.



> My set up is working knock on wood great, no issues, however to eliminate all the wall warts for each 12v device I ordered a 12v 10a power supply with a 1input 8 output terminal block bus so i can run all the power for each from that 8 output bus, more than enough outputs..


As long as it's enough amperage to power all of that, you should be okay. Your thinking is correct here, though. Take the 12v from the single supply, split it out to everything, and tie the grounds together.

David_AVD will know more than I, though, for sure on all of this stuff.

Not to further confuse the topic, but I have been able to convert 12v down to 5v without using a separate 5v wall wart. The reason being to power the 5v relays separately. I was researching this and came across a simple solution of using dollar store USB car chargers. They take in 12v and put out 5v 1 amp, which is perfect for this scenario. It took a little bit of hacking, but eliminated a wall wart. Here's a picture:


----------



## iowachap

Grin ok, well so far i have not ran into the need for the diodes, the time I thought i did it turned out the the arduino uno board was what was the culprit it was acting funky, i swapped to a another controller i had put together and ready to use and it worked perfectly and same with the video i posted using 2 solenoids for the drop panel and zombie head, knocking on wood no issues..



Montclair said:


> It's two separate things. 12v to the relay makes the switching happen. You can then switch whatever current you run *through* the relay, up to 230v AC I think. And, yes, in the case of switching AC, you need to run separate AC power through the relay. In my project, I'm switching 110v AC, 12v DC, and 5v DC, all with 5v relays powered separately from the Arduino boards.
> 
> Correct. You can do it all with a single 12v power supply with enough amperage. Make sure you put diodes over everything, as you're using solenoids.
> 
> As long as it's enough amperage to power all of that, you should be okay. Your thinking is correct here, though. Take the 12v from the single supply, split it out to everything, and tie the grounds together.
> 
> David_AVD will know more than I, though, for sure on all of this stuff.
> 
> Not to further confuse the topic, but I have been able to convert 12v down to 5v without using a separate 5v wall wart. The reason being to power the 5v relays separately. I was researching this and came across a simple solution of using dollar store USB car chargers. They take in 12v and put out 5v 1 amp, which is perfect for this scenario. It took a little bit of hacking, but eliminated a wall wart. Here's a picture:


----------



## Montclair

iowachap said:


> Grin ok, well so far i have not ran into the need for the diodes, the time I thought i did it turned out the the arduino uno board was what was the culprit it was acting funky, i swapped to a another controller i had put together and ready to use and it worked perfectly and same with the video i posted using 2 solenoids for the drop panel and zombie head, knocking on wood no issues..


Well, good luck with that, but with all the problems I've had, these are going to be requirements for any future controllers I build:

Diodes for DC solenoids
RC snubbers for AC relays
mov varistors for DC relays
separate DC power supply for the relays

It may jack the cost up to $30, but it's worth it to avoid the headaches. I think this stuff should be included in the official documentation, so people don't go nuts for 2 months like I did.


----------



## iowachap

You need to put a document together with your additional info, with wiring diagrams, parts etc.. that would be great! 



Montclair said:


> Well, good luck with that, but with all the problems I've had, these are going to be requirements for any future controllers I build:
> 
> Diodes for DC solenoids
> RC snubbers for AC relays
> mov varistors for DC relays
> separate DC power supply for the relays
> 
> It may jack the cost up to $30, but it's worth it to avoid the headaches. I think this stuff should be included in the official documentation, so people don't go nuts for 2 months like I did.


----------



## Montclair

I'll do it if Dave will offer to proofread and fix my terminology. I like to use the non-existent word "thingies" for stuff I don't know. I don't think that will go over so well with the more electrically educated folk. LOL!


----------



## mikkojay

Montclair said:


> I think this stuff should be included in the official documentation, so people don't go nuts for 2 months like I did.


I started to, with the flyback_diode.pdf, but I didn't go too much further since most people seemed to not read it anyway.

I did a Google search for "arduino switching heavy loads" and one of the first hits was really quite nice:
https://arduino-info.wikispaces.com/RelayIsolation
These were nice too:
http://www.opencircuits.com/Driving_Large_Loads_with_the_Arduino
https://arduino-info.wikispaces.com/ArduinoPower

The problem with providing paint-by-numbers instructions is that many people end up wanting a mere recipe to follow, and don't particularly care about *why* something works or does not work.

I have been pretty busy with work and other projects, but maybe I could distill a bunch of this info down to a few pages worth of the major topics. I just don't want to go beyond the scope of the project and reinvent the wheel since so many other great pages are out there that are dedicated to the subject. I definitely see your point though, as time goes on this is something that seems to keep popping up.
Man, almost 4AM on a Monday- I better go try to sleep a little!

Cheers, Mike


----------



## Montclair

That first link really hits the nail on the head, except for his wiring instructions. He says:



> For complete optical isolation, connect "Vcc" to Arduino +5 volts but do NOT connect Arduino Ground. Connect your Arduino Digital Output pins to "IN0", "IN1" etc. Connect a separate +5 supply to "JD-Vcc" and board Gnd. This will supply power to the transistor drivers and relay coils.


He also states the same thing in the third link you provided:



> The separate 5V supply would go from
> JD-VCC (Jumper removed)
> GND
> The ONLY connection to Arduino would be
> Relay board VCC to Arduino +5V
> (signal pins to In0, IN1 etc)


That just doesn't work. I tried it. The grounds have to be connected or the relays won't fire. Unless I'm doing something wrong. I tried that here... or *perhaps I actually didn't.* Upon reviewing, it looks like I never tried JD-VCC and ground connected only to the 5v power supply.






I don't see how it could work that way. How would the +5v from the Arduino get back from the VCC relay circuit to complete the connection if the ground isn't connected? Where's the return path? Oddly enough, he has a schematic (above my head) illustrating how that's supposed to work. Is there a return path for VCC through the digital pins?? VCC to IN0 completes the circuit?? The more I look at this diagram, the more it looks like that's how it works.










*I'm going to give this a try later today*, removing the ground connection between the relay and the Arduino and report back as to whether it actually works, since electrical isolation is what we're going for here.

Man, I'm going to be a little *pissed *if that works, and that isolation alone would have fixed my reset issues 2 months ago. 

*//edit: The article Mike referred to is correct and the grounds do not need to be tied together.*

But other than that, all of what he's said to do is roughly what we've all come up with here.

My understanding from another Haunter here was to use MOVs across DC relays and RC snubbers across AC loads. The article seems to imply the opposite. Also, the flyback diode doc you wrote and how I have my diodes connected isn't in reverse, like he suggests. (redacted)

Anyway, I didn't mean to imply that you were slacking or anything. I'm grateful this project even exists! While it's been frustrating in my scenario, it's also been rewarding and quite a learning experience.

But, it might me time to call it the $30 prop controller and add a few more parts to the list since we can eliminate these problems before they start, like you say.

Thanks for the great project and time you've put into it!


----------



## iowachap

Dave?? You game.. cuz I think it would be great to have it in instruction format with diagrams and a parts list etc That way we can refer folks to the instructions for most questions..



Montclair said:


> I'll do it if Dave will offer to proofread and fix my terminology. I like to use the non-existent word "thingies" for stuff I don't know. I don't think that will go over so well with the more electrically educated folk. LOL!


----------



## mikkojay

Montclair said:


> Also, the flyback diode doc you wrote and how I have my diodes connected isn't in reverse, like he suggests.


You sure about that? My doc has the cathode to positive, anode to negative. That sure sounds reversed to me. The diagram I borrowed from *this wiki*. The pic you pasted above has it the same way. I'm not sure I am following.

I am also curious about the whole "no grounds together" question. A lot of this stuff with MOV's and Caps is something I am a bit hesitant to document, mainly because I have not used them myself. I had personal experience with the flyback diode, so that made it easier to document. I use heavy duty SSR's for switching larger AC loads, so they may have some of that type of protection built in already- or I have just been lucky.

I need to scour the thrift stores for one of those shiatsu motors- it sounds like if that can be tamed, everything else will be a cupcake.

Thanks, Mike


----------



## Montclair

mikkojay said:


> You sure about that? My doc has the cathode to positive, anode to negative. That sure sounds reversed to me. The diagram I borrowed from *this wiki*. The pic you pasted above has it the same way. I'm not sure I am following.


You are correct, and I wired it correctly. I thought the band side was the anode (I'm electrically illiterate) 



mikkojay said:


> I am also curious about the whole "no grounds together" question. A lot of this stuff with MOV's and Caps is something I am a bit hesitant to document, mainly because I have not used them myself.


I'll test the ground thing today. As for the other stuff, since there seems to be consensus here, and in the articles you provided, it might be nice to include the stuff as an addendum like "recommended parts for AC switching". I do think, at the very least, separating the power from the relays and Arduino should be included as a requirement in the main documenation, and perhaps bumping up to 12v relays to make that easier. One power supply for everything, or is that just defeating the purpose of the optoisolaors? wish I knew more about this stuff.

I will say this, however: In a dual Arduino setup, I was still having issues with my slave Arduino not firing if the primary was triggered too quickly. Once I powered the relays for the slave separately (as I'd already done that for the master) that problem immediately disappeared. The Uno just doesn't seem to have the balls to power the relays under load. Balls, of course, being my term for amperage -- maybe?? :googly:



mikkojay said:


> I need to scour the thrift stores for one of those shiatsu motors- it sounds like if that can be tamed, everything else will be a cupcake.


Consider it tamed. My circuit doesn't fail any longer. RC snubbers on the AC relays, diodes on the solenoids, separate 5v power supply for the relays (which was absolutely required to resolve my issues). I don't have the MOVs, but if I knew which ones to get, I would add them without hesitation.

I _*may *_even push the circuit further, to try and induce failure by reducing the 500ms pause between motor direction changes. This should tell us if the RC snubber is actually doing anything, right? Might break the prop physically, but, I doubt it.

//edit: I dropped an email to the fellow who's site we're referring to, asking him how the +5v from the Arduino gets grounded, if the grounds aren't tied together. I'll post if he replies.


----------



## mikkojay

That sounds great- I should have some time later tonight so I can go append the main project page. I could also make it somewhat generic since I have other projects that could benefit from a doc like that. I'll let you know when I have something.
Thanks, Mike


----------



## TerryKing

*Optoisolated Relay Boards and Arduino etc..*

Hi Everyone, this is Terry King. I write http://ArduinoInfo.Info and the info about optically isolated relay boards.

See the schematic diagrams above or see:
http://www.hauntforum.com/showthread.php?p=857711#post857711
(Same for 2,4,8 channels)..

The isolation works when you

- Remove the Vcc-JDVcc jumper
- Connect a separate 5V supply to JDVcc and GND
- Connect Vcc to Arduino Vcc only
- Connect each relay input (In0 on the diagram) to an Arduino Digital Output

NOTE: These relay inputs are ACTIVE LOW which means (refer to the diagram) current flows from Arduino Vcc, down through the optoisolator's LED and R1 (1000 ohms) through the Arduino I/O pin and down to Arduino Ground (Not shown on diagram)

So there is no direct connection between the Arduino and the relay board's 5V power.

See:
http://arduino-info.wikispaces.com/ArduinoPower
and
http://arduino-info.wikispaces.com/ArduinoPower#OI

..and note the code example that shows how to correctly handle the active-low relay property.

Also maybe look at:
https://arduino-info.wikispaces.com/Cables
to help handle all those darned wires...

Let me know how it goes....

Regards, Terry King
...In The Woods in Vermont, USA
[email protected]


----------



## David_AVD

The ground or not requirement will depend on the circuitry on the relay board chosen. There seem to be at least 2 versions and they are subtly different in the way they drive the relays.

As for MOVs, I wouldn't bother with them on DC loads. The diode close to the solenoid should be enough.


----------



## JeffHaas

Hi Terry! Just wanted to say that I've found your pages very useful over the years. Especially when I got my first relay module that was set up to go on when driven low!

Jeff


----------



## mikkojay

TerryKing said:


> Hi Everyone, this is Terry King. I write http://ArduinoInfo.Info and the info about optically isolated relay boards.


Hi Terry, Thanks for all of the great info and welcome to this forum!
-Mike


----------



## Montclair

Terry, thank you so much for responding to my email and chiming in here. I'm sure we all really appreciate it.

Guys, I can confirm that the 5v relays recommended for this project *DO NOT* require the ground to be connected to the Arduino, when powered separately. I've just tested this on my setup, and the relays work without the grounds tied together.

As long as you use the JD-VCC pin on the relay, you can ground the relay to the separate 5v power supply, and that's it. 

In further reading Terry's site, now I'm concerned that I'm using a single 12v power supply, and reducing that to 5v with an automobile USB charger. It seems like I would be negating the opto-isolation by doing that. Look at this, and please excuse my unfinished messy wiring:










That "12v in" is coming from the same power supply that's running the Arduino. Thoughts?


----------



## David_AVD

It's not going to hurt anything either way. Personally I'd rather have one power supply. Ultimately the relays are providing the isolation.


----------



## Montclair

Just seems like the isolation would be negated if my 5v power supply is running off of my 12v supply. I dunno. I guess the old adage, "If it ain't broke, don't fix it," now applies to my setup. 

//edit:

Here's some video on the grounding we all discussed:


----------



## Canned Bread

*Hi, this is Canned Bread*

I'm having some issues. I applied 5v separately to the relay board and it didn't help. The LEDs just faintly come on. I also accidentally put the ground wire on the other vcc pin on the right side of the board. I then put back the original wiring to play the sequence but the relays aren't "clicking" anymore! What am I missing?


----------



## Montclair

Jumper must be on if powering from Arduino. But, don't do it. Connect the positive from the 5v to the JD-VCC pin where you removed the jumper. Pull the ground wire off, and connect the ground from the 5v there. It should work. If not, take a photo of your wiring and post it.


----------



## Canned Bread

*The Separate 5V Works!*

Thank you Montclair for all of your helpful advice. The external 5v really works! I'm not having the replay problem any more. I have one more question though. When I re-wire the arduino so that the 5v is being supplied from it, the LEDs still do their thing but the relays don't "click" anymore. However, when I ad the external 5v, the "clicking" is back! Why does this happen? Does anyone know?


----------



## Montclair

Yes. Per last post, jumper must be connected if you want to power relays from Arduino.

Here's another helpful video explaining how this all works.


----------



## djgra79

OK, so I got all my parts today, I'm ready to build! 
Is there a link to a site that explains how to build the Uno and then connect all the parts together?


----------



## IMU

Well, where did you get the parts list? This is the official website of Mike who created the controller: http://buttonbanger.com/?page_id=37



djgra79 said:


> OK, so I got all my parts today, I'm ready to build!
> Is there a link to a site that explains how to build the Uno and then connect all the parts together?


----------



## djgra79

Yes this is where I got the parts list from. There is a suggested wiring diagram but its for 5v relays. I'm using 12v so would that mean there is a difference as to how it's wired? I guess I just solder all pins that come with the board but only use the plugs I need? And what jumpers (if any) do I need to make it a 12v input powered board?
The rest of the documentation was more about the software and how to sequence, rather than the build of the componenets. 
As stated previously, complete n00b to this type of thing!


----------



## Montclair

Check out my videos on this stuff, here:

https://www.youtube.com/playlist?list=PL8Fn6IWwUvNTrZk1pnFs1CEf9YuEaUTsU

I cover all of this in great detail, including problems I encountered and the solutions. This very thread also has a ton of great info.

Essentially, you'll need a 12v power supply with sufficient amperage to power the arduino and the relays. I used an 8 amp supply.

Remove the jumper on the relays and wire up 12v positive to the JD-VCC pin. Connect the ground of the power supply to the GND pin on the relays. Connect the rest of the project as illustrated in the documentation.

If you're going to be switching DC solenoids or motors, read the flyback_diode.pdf documentation in the "Docs" directory where you installed the software. You'll definitely need them. Others have also suggested MOVs (metal oxide varistors) as added insurance.

If you're going to be switching AC motors, you'll likely need RC snubbers. They are diodes and capacitors wired in series. You can find them on ebay or make your own.
?
Why do you need these things, and need to wire the relays with power directly from the source? To prevent the Arduino from resetting during your sequence. Trust me, I've spent three months on a project and the bulk of it was dealing with the electronics failing.

Watch the videos. They're very helpful. Good luck!


----------



## djgra79

Thanks MC. I do follow you channel but only recently and seeing the issues you've been facing, I haven't understood how you got there from the begining, so I'll check out your earlier videos tonight after work. I'm only using DC actuators and motors so shoudln't need the extra snubbers.


----------



## PYROZMAN29

*New setup*








]I have tweaked my setup for my props a little. Just finished making 2 more of these this past weekend. Going to try out these aviation connectors for various connections. They were rated 15 Amps at 250 V. I have only used the four banger with DC load thus far from a separate power source. Plan on trying it out on some AC loads soon.


----------



## David_AVD

I've never been fond of those CB microphone type connectors. Always seemed to have trouble with them years ago.

Even if they are rated for 250V and I had a stack of them I wouldn't use them for mains connections - partly due to the metal shell which can become live if you're not super tidy with your soldering.

This is just my opinion however, YMMV and all that.


----------



## PYROZMAN29

Yeah I'm thinking once I solder them I'll squeeze in some caulking or something so they can't go anywhere. Any ideas on other style bulk head connectors that will handle AC 120v?

Sent from my SM-G930R4 using Tapatalk


----------



## Montclair

I went with standard US AC outlets.


----------



## Montclair

djgra79 said:


> Thanks MC. I do follow you channel but only recently and seeing the issues you've been facing, I haven't understood how you got there from the begining, so I'll check out your earlier videos tonight after work. I'm only using DC actuators and motors so shoudln't need the extra snubbers.


DC actuators = solenoids (David_AVD will correct me if I'm wrong). I'd recommend the diodes just to be safe, and to prolong the life of your relays. For a summary of everything I did, watch vlog episode 46. It covers pretty much everything, except the basic wiring covered in the project's documentation. And, thanks for watching my channel!


----------



## djgra79

Montclair said:


> DC actuators = solenoids (David_AVD will correct me if I'm wrong). I'd recommend the diodes just to be safe, and to prolong the life of your relays. For a summary of everything I did, watch vlog episode 46. It covers pretty much everything, except the basic wiring covered in the project's documentation. And, thanks for watching my channel!


By actuators I'm referring to car door locks. David also uses these, it's where I got the idea from. I'd also look to incorporate RGB style lights but unsure if that would work without a seperate controller for these?


----------



## Montclair

djgra79 said:


> By actuators I'm referring to car door locks. David also uses these, it's where I got the idea from. I'd also look to incorporate RGB style lights but unsure if that would work without a seperate controller for these?


Yep, I know what you're talking about. I used them in my electrocution prop (the legs) which was having all the Arduino reset issues. You'll want diodes across the connections for those.

I don't know enough about the LEDs you referring to, to advise on that. Historically speaking, there haven't been issues with switching LEDs on and off. I encountered no issues using LEDs, except for when I burned one out because I didn't put a diode on the actuator connections.


----------



## PYROZMAN29

Montclair said:


> I went with standard US AC outlets.


They're eventually going to be connected to standard AC outlets for AC current. Just trying to find out ways to make these kind of more universal so I can use them on different props with AC or DC.

Sent from my SM-G930R4 using Tapatalk


----------



## iowachap

the easiest way to make plugs universal for AC or DC is to use actual 110ac plugs, and then you plug in your wall wart that converts the 110ac to your 12vdc or whatever is needed. the relays of course would switch the 110ac.


----------



## PYROZMAN29

Had anyone actually programed this thing in real time from the computer? I hit record but it doesn't seem to do anything. Not sure what I'm doing wrong. 

Sent from my SM-G930R4 using Tapatalk


----------



## PYROZMAN29

PYROZMAN29 said:


> Had anyone actually programed this thing in real time from the computer? I hit record but it doesn't seem to do anything. Not sure what I'm doing wrong.
> 
> Sent from my SM-G930R4 using Tapatalk


Nevermind. Figured it out.

Sent from my SM-G930R4 using Tapatalk


----------



## PYROZMAN29

Is there much of a delay using that method. I usually run my 12v load from either a car battery or battery charger.


----------



## Montclair

PYROZMAN29 said:


> Is there much of a delay using that method. I usually run my 12v load from either a car battery or battery charger.


Depending on what wall wart and what you're powering, there can be a shut off delay. I tried doing that with some LEDs and they would just dim a little instead of shutting off completely. It was likely the power supply's fault and not the LEDs, but IDK for sure.


----------



## David_AVD

Switching mains (110V / 240V) power supplies on and off repeatedly at fairly rapid rates can be bad for switchmode (lightweight) types due to the circuitry within.

Much better to switch the DC side if possible.


----------



## PYROZMAN29

Here is the outlet I made up. It gives me 2-120V AC switched outlets and 2-12V DC switched outlets from the 4 relays. It also provides a 120V constant power for other items. I plan on just using wall plugs for the items to plug in to the 4 square box. This was just a generic picture and not my actual box as I have all the outlets labeled which voltage and what number on my aviation connectors that go to the controller box. I figured if I need to switch additional 12V with this it will be with a switched wall wart. Once I get all my props made and more arduinos to use for each I will go ahead and make the relay connections more permanent. Our haunt is outdoors and still changing as this is only the 3rd year for it.


----------



## David_AVD

God no! Using mains outlets for anything other than main voltages is a really bad idea.


----------



## mikkojay

David_AVD said:


> God no! Using mains outlets for anything other than main voltages is a really bad idea.


Hear hear!
Mixing plugs & mains voltage could lead to this -> :xbones:


----------



## Montclair

I was going to do exactly this, too, but decided against it.

Even with low voltages, I can attest to plugging wrong things into wrong things, even with labeling. It set my project back a few stressful hours. I wasn't using AC receptacles, nevertheless, even with labeling, mistakes can easily be made. So, I agree with Mike and Dave. Just make the 12V connections something different, just in case. You could still use the unused AC outlets as just straight unswitched power. I did this on my prop and it helped remove some extension cords for other things related to the prop, that were going to the wall.


----------



## PYROZMAN29

Montclair said:


> I was going to do exactly this, too, but decided against it.
> 
> Even with low voltages, I can attest to plugging wrong things into wrong things, even with labeling. It set my project back a few stressful hours. I wasn't using AC receptacles, nevertheless, even with labeling, mistakes can easily be made. So, I agree with Mike and Dave. Just make the 12V connections something different, just in case. You could still use the unused AC outlets as just straight unswitched power. I did this on my prop and it helped remove some extension cords for other things related to the prop, that were going to the wall.


Yeah I thought about doing the same. I'm going to get those plugs with the blades turned sideways for the 12 volt connections.

Sent from my SM-G930R4 using Tapatalk


----------



## [email protected]

I am learning Arduino and have ordered all the components to build your Button Banger project. 

I am going to be working on using your code to wire in a car door actuator to pop up the lid of the coffin we built for Halloween, add LED lights to glow inside and sound. I also am going to use a PIR motion detector for the trigger. Basically, it's your four banger and with the 12V relay controlling the actuator. 

The kicker is... I got to show my wife this will work so I can build more cool projects. 

I would greatly appreciate the source code for your project. I am running VS2013 with the Visual Micro extension already. What I am trying to wrap my head around is how everything was integrated and coded. I really want to understand the hows and whys of what is going on. 

Would it be possible to get a copy of your source code?

Thank you, 
Mike


----------



## mikkojay

Mike, I added a link to the latest Arduino source at the bottom of the main project page. If my significant other were to dictate my projects, she would most likely wind up in my prop collection  Have fun, Mike


----------



## [email protected]

Sweet! That's exactly what I wanted. Nice code layout and I appreciate the comments. Now to dive in and figure it out. Thanks Mike! 

Mike


----------



## theundeadofnight

Hi mikkojay ,

Thank you very much for the Four Banger software , fantastic program . Just wanted to say how much I appreciate all of your work . 

Tom


----------



## Montclair

Mike, don't you have the GUI and sketch coded to support 8 relays, somewhere? You were working on that 8 banger project with the shield. I just wonder why it couldn't be done with an Arduino and no shield, as long as we use separate power supplies? Apparently, I like looking in the mouth of the gift horse.


----------



## PYROZMAN29

Everytime I look into the Arduino code it makes my head hurt. So I'm thankful for Mikkojay's software that makes the programming easy for dummies like me. Hopefully after all my prop building and everything else to get ready for Halloween I will have more time to look into learning it. However with what he it created works great for what I do. Thanks Mikkojay

Sent from my SM-G930R4 using Tapatalk


----------



## BIGANT

Huge thanks for this!!!! I have made 3 of them already this summer and will be making more!!! I'm looking at vibration sensors right now as a means of trigger the board so we will see how that works out!


----------



## mikkojay

Montclair said:


> Mike, don't you have the GUI and sketch coded to support 8 relays, somewhere? You were working on that 8 banger project with the shield. I just wonder why it couldn't be done with an Arduino and no shield, as long as we use separate power supplies? Apparently, I like looking in the mouth of the gift horse.


Hey Montclair, I started a complete rewrite a few months back, but I got sidetracked with a few other projects. I went back and looked at the rewrite last night and decided I was not a fan of the approach I took. Rather than make a hacked spin-off of the fourbanger app that would support 8 channels, I pretty much gutted the code and started in another way that would allow for more controlled "mutations" of these types of controllers. The gutting process broke a lot of old code, but I expected that.

Hopefully the end result won't look like that scene from the movie "The Jerk" when Navin tore down the old family shack and built a new one. It is one of those things that past experience is telling me that it would be better in the long run to devote the time to making a sound & scalable base project to build on, as opposed to just making multiple little spin-off apps.

I'll look at it again tonight and see if it might be easier to just temporarily make a spin-off project in order to make it work for now. The rewrite project may turn into a loooonnnggg term project, so I don't want it to drag on forever. I'll mull it over and let you know what I come up with.

Thanks, Mike


----------



## David_AVD

Writing it in such a way that it could support different hardware and a variable number of channels would be good. I'm happy to be a sounding board if you need it.


----------



## PYROZMAN29

Me too. As long as you're willing to put in the hard work of coding. I will take mine apart in the off season to try out new stuff. 

Sent from my SM-G930R4 using Tapatalk


----------



## theamzngq

*power a 12V relay separately from UNO?*

Thanks for sharing all this great stuff! If I may, I have a question about something written in the "four banger" docs...

In the doc Mike wrote about relays: "Note, these come in 5v and 12v models. The initial prototypes I built used the 5v versions, but the 12v models are becoming more popular. The reason is this: The 12v version may be run directly from a 12vdc adapter..."

I wanted to try a 12V relay with an UNO. I bought a 12V 4ch relay (http://www.ebay.com/itm/231429969189), but I cannot get it to work with a separate 12v power supply and the UNO understandably won't run it on it's own. I've tried several things but can't figure it out. How should I be wiring it with the UNO?

I read one page that said I should tie the UNO and PSU grounds together, but I don't want to fry the UNO. Should I be doing something like this (in the example the jumper will be removed, just couldn't find a picture without it):










Will that work or will I fry something? Should I just go back to using a 5V relay board?

One more thing I'm unclear on is the vcc/jd-vcc jumper. I understand that the jumper ties the VCC pin to the JD-VCC pin, but for what? Does that pass power to simply engage the coils in the relays, or does it actually provide power to connected devices?

Sorry if this info is already in this thread, but I searched and couldn't seem to find it among the 80 or so pages...:googly:


----------



## mikkojay

David, before going to the trouble of setting up a separate power adapter for the relay board, are you sure you really need it?
Are you switching something like this?








These modules have a shared ground, so I think that when you want to run in "jumper off" mode, you would connect them similar to this (disregarding the wiring on the relays themselves, i.e. just looking at vcc, gnd, and inputs(not pin numbers)) that, and your external supply would be 12v vs 5v of course. I just borrowed this pic from the web as an example- too lazy to cobble my own at the moment.








I have not built any props requiring this setup, so I am not the resident expert on the whole separate power deal.
-Mike


----------



## djgra79

I'm a little confused also. I have 12v PSU, 12v 4x relays and the Uno. I can see 5v & 3.3v pins on the Uno but not 12v. Where would I power the Uno at 12v, or is this not possible?


----------



## MBrennan

For the control side:

Not an expert on the Uno, I used a nano, but I ran my power from the Power Supply (I used a 9vdc supply because the 12vdc supplies I have all measure more than 12 vdc, and I didn't want to fry the nano) to the Vin pin.

My understanding is that the Vin pin can accept 7-12+ vdc, and the onboard voltage regulator on the Arduino (after the Vin pin) will supply the correct voltage for the Arduino (and outputs the regulated voltage to the VCC pin). The VCC voltage on the nano is 5.5vdc, perfect tap for the 5v relay board and mp3 player power.

In your case, just make a pigtail off your 12vdc power supply with two positive leads. Connect one 12+ to the Vin pin on the Arduino, and one 12+ to whatever + voltage in on your relay board. (and or course the grnd to the grnd pins)

For the switching side:

You can use whatever you want on the side of the relays that is being switched. I used line voltage (120vac), but if you are using 12vdc lights (and if your 12vdc power supply is big enough wattage wise) you could use that.

Again, not an expert, just the way I did it with my nano and the 5.5v relay board switching 120vac, and it works great.

I hope this makes sense, and is helpful.

Again, HUGE thanks for Mike for putting this together!


----------



## MBrennan

Also, just to clarify, the 3.3v and 5v listed on the Arduino next to the Vin and GRND are OUTPUT voltages, not inputs.


----------



## mikkojay

MBrennan, Yes that sounds right- that is how I would try hooking it up first. I actually ordered a couple of the 12v relay modules recently, so I may hook them up tonight in a few various ways and snap a few pics. If I could just get this workday over....
Thanks, Mike


----------



## theamzngq

Great gif, Mike! 

Thanks you for the diagram. As far as what I'm switching, it's nothing big; it'll be 120v AC and some 12v solenoid valves. I still am not clear exactly what the jumper does. Seem to be there's two things that need powering on the relay board: the optocouplers and the relay coils. I'm guessing that the jumper allows the power to run the optos and the coils? Or does the jumper allow VCC to actually power the devices on the relays themselves?

I asked my wiring question a couple other places and got a couple very similar answers which I'll share here; let me know what you think!

*Question to eBay seller:*
How do I power the relays? The 5V on the arduino isn't sufficient, so I'd like to use a separate power supply, but how do I wire it?

*Response:*
This relay needs a 12V power to work properly. Connect 12V positive to pin VCC, 12V negative to pin GND. Connect signal voltage positive to pin IN's, and signal negative to pin GND too. Do not touch that jumper, you just connect your 12V positive to pin VCC and 12V negative to pin GND. The GND is for both 12V and signal input.

*Question on Amazon:*
How can i use this with arduino uno if it only supplies 5v? can i use a separate 12v power supply? if so, how do i wire both the uno and 12v psu?

*Response:*
You can separate the relays from the input control voltages with a jumper on the card and use a separate 12V supply. The control inputs are opto-isolated to protect the controlling board. There are separate input pins for the 12V and control voltage. Also add your Arduino +5V to the VCC pin to power the opto devices. And yes, both 12V and 5V grounds must be connected. Good luck. I use this board with a Raspberry Pi device which runs on 3V and it works fine (with separate 12V supply)

These answers differ slightly, but this is how I interpreted what they said:









Does this look valid to anyone?


----------



## theamzngq

MBrennan, is this what you mean:


----------



## theamzngq

And does this wiring actually allow the Arduino to supply power to 12V devices on the relays? I was assuming the UNO could on supply 5V...


----------



## mikkojay

The wiring to the VCC has nothing to do with powering devices. The relays are just acting as switches. There is a ton of info on this page:
http://arduino-info.wikispaces.com/ArduinoPower
The simplest way to wire it for your first try would look like this one:








Try that out and see how it goes.
-Mike


----------



## theamzngq

Alright, thanks, I'll give that a try and report back. I did order a 5V relay board as well in case this 12V adventure ends up being a bust...


----------



## MBrennan

theamzngq said:


> MBrennan, is this what you mean:


Sorry David, I don't seem to be able to upload my picture--

Here is what I was trying to say - instead of your red wire that is going to the "jack", that red wire should go to the Vin pin to the right of where you have the dotted black GRND wire.

(On the Uno)


----------



## theamzngq

Ah yes, I think I realized that that was what you meant after looking over your comments again. I was initially thinking the jack was referred to as the "vin", but I see my mistake now. I'll try that as well. Mike posted a diagram with a slightly different wiring scheme, which I think in effect is the same thing since the jack is likely wired in parallel with the VIN pin.


----------



## djgra79

So looks like the best way to power the Uno with 12v is to use that round plug? What are they called so I can try and find one at my local electronics store?


----------



## djgra79

So I just re-read the above posts. So the VIN in the POWER section of the Uno can be used as power for the Uno board? And can this be 12v, meaning I don't use the round plug?


----------



## theamzngq

I'm also working through understanding this, but based on the wiring diagram that Mike just posted as well as what MBrennan said, my guess is that you can power the UNO by wiring to VIN pin _or_ use the barrel connector.

Here's the summary of what I see in Mike's image (just for my own understanding as well):
12V PSU --> UNO barrel connector
UNO VIN pin --> relay JD-VCC pin (no jumper)
UNO GND --> relay GND (next to IN pins)
UNO VCC --> relay VCC (again, no jumper installed)

I'm going to try this tomorrow and I'll report back. It's crazy how much conflicting information there is about this topic...


----------



## MBrennan

theamzngq said:


> I'm also working through understanding this, but based on the wiring diagram that Mike just posted as well as what MBrennan said, my guess is that you can power the UNO by wiring to VIN pin _or_ use the barrel connector.


That's correct. The barrel connector and the VIN are basically the same thing.

I can't speak for the 12v relays as my projects used the original NANO and 5.5v relays.

Mike's wiring diagram has the 12v Power Supply supplying power to the UNO via the barrel plug, and the relays are powered from the VIN pin. That should work as long as you use a 12vdc supply.

The UNO (and NANO in my case) can run from a supply between 7vdc and 12vdc. So if you are using a smaller power supply (say 9vdc), the UNO will run fine, but the 12v relays might not like it.

I hope I'm not causing more confusion here.


----------



## djgra79

No that's fine. Just wanted to confirm. I have a 12v PSU that can power multiple items so was hoping I could use just 1 PSU for whole project/prop


----------



## djgra79

Actually I have another question: I have a MP3 board and PIR sensor both of which are 5v to operate. I guess I should follow the normal diagrams in the FourBanger documents for these? They get powered from the Uno at 5v and so do not need their grounds tied in with the 12v lines?


----------



## MBrennan

The grounds still need to be connected to complete the circuit - should be able to use the diagrams as you mentioned.


----------



## djgra79

Can someone confirm if my diagram looks OK before I actually plug it in!!


----------



## MBrennan

Looks like the only thing missing is the PIR signal wire, and I don't know where that goes on the UNO.

Otherwise - it looks good to me - plug it in!

But first - sign this waiver...


----------



## djgra79

Oh yes i forgot that in my rush to get the drawing done!


----------



## djgra79

SO I plugged it all in, and the 4 lights on the relays stay on - nothing happens when I trigger the sequence.

Any suggestions?!


----------



## David_AVD

Do you have a supplier link to that 4 channel relay board? It looks different to the ones that most people here have been using.

EDIT: Yours doesn't have the optocouplers that the other ones have. It may need the settings in the banger software changed?


----------



## djgra79

12V Four 4 Channel Relay Module FOR Arduino PIC AVR DSP ARM MSP430 S | eBay

These ones. They look a bit different as they are 12v. It's also the same seller as everything else I bought (Uno, PIR, MP3, wires)


----------



## mikkojay

Did you choose "upload all" and actually send the sequence data to the controller?


----------



## David_AVD

OK, that one looks like it needs an "active high" from what I've found on the 'net.

I believe there is a setting in the banger software to select that.

Even so, the worst that should happen is that the relays should be turning off (instead of on) during the parts of the sequence where you've programmed them.

Are you sure the sequence is running at all ?


----------



## djgra79

mikkojay said:


> Did you choose "upload all" and actually send the sequence data to the controller?


Do you mean "Upload Firmware to Arduino"? Then yes. First thing I did before plugging anything else in. 
I did just realise that on the Serial Communication port it was not connected, but once it was, the "L" light flashes but nothing else happens.


----------



## mikkojay

Nope, there is a drop down menu on the serial tab. You need to upload your sequence data


----------



## David_AVD

See the attached image. It shows where you can find "upload all" menu item.


----------



## David_AVD

One thing I did notice is that the software couldn't see the Arduino I just plugged in because it was assigned to COM30. I moved it down to COM3, restarted the software and it could be selected. Does it only scan for the first n ports ?

In my various software offerings, I call a Windows function that returns a list of active COM ports from the registry and that works no matter how high the assignments are.


----------



## djgra79

Hmm, it seems my board or connection keeps timing out. Its taken 4 goes to get the eeprom to upload, however when it waits for 30 seconds, it isn't always completing this and the L light stays static. Ping board doesn't work either when its locked like this.

EDIT: It seems the PIR is working as when I move the sequence (in the serial comms window) appears to be continually playing currently, so I guess that's good.
Still no action on my relays however. All lights stay on as soon as I power it on 12v.

EDIT AGAIN: I take that back. PIR test fails, so it must be just looping the sequence on its own.
I'm out, need to walk away for the afternoon.


----------



## David_AVD

Did you select the correct COM port ?


----------



## Montclair

The "Upload All" function is finicky in v1.4 of the software. You must wait for the display to read "Ready" before attempting to upload. If the Arduino is flashing, it's not ready. Many times it will look like the firmware is uploading, when it really isn't. Just wait for the flashing to stop, then upload. Also, if the sequence is triggered, you can't upload either until that's over and the Arduino stops flashing.

Also, there is a refresh button to ensure all of the correct COM ports are listed. If you're connecting and disconnecting the Arduino, make sure you disconnect in the software first, then reconnect physically, hit the refresh button, and select the correct COM port.

On the grounding, don't connect the Arduino ground to the 12v relay supply ground. By doing so, you're removing the protection from the opto-isolated relays (according to what I've been told and learned). There was a discussion about this previously in this thread. Honestly, I think the effect is negligible, but it's been advocated quite strongly by a few people who work with these things a lot.

The relays will ground to the Arduino through the digital pins. There's a schematic in this thread showing that. 

If you're not using opto-isolated relays, then that my not apply.

Otherwise, it's +12v to JD-VCC and the 12v supply ground to the relay GND and that's it as far as your separate supply is concerned.


----------



## Montclair

mikkojay said:


> Hey Montclair, I started a complete rewrite a few months back, but I got sidetracked with a few other projects...


I can relate. I have a website still in design from 2008 that I haven't finished. LOL! Thank you for letting me know where you're at with it. I appreciate it!


----------



## David_AVD

The relay board djgra79 has is not isolated, so the ground connection is required. It operated differently to the ones most people here have used.


----------



## theamzngq

*Success!*

I can finally report success! See here: https://www.dropbox.com/s/h0suzhasuq6icv5/Working%20Prop%20Controller.mov?dl=0

The diagram that Mike posted as well as the awesome comments of the rest was the ticket. Here's the summary in case you can't tell from the video:

12V psu --> barrel connector
Arduino VIN pin --> relay JD-VCC (no jumper installed!!)
Arduino GND --> relay GND
Arduino D4 --> IN1 (and the others)
Arduino VCC --> relay VCC

That worked for the 12V relays. If I had known it would've been a bit more complicated, I would've stuck with 5V relays.

Now the real question...can I power the 12V relay with a separate psu from the Arduino psu? A related question: can I use that same separate 12V psu to power the relay board _and_ devices connected to the relays?

I'm trying to remember the reason I wanted to try the 12V relay thing in the first place...


----------



## David_AVD

The reason I suggested a 12V relay board is so that the relays are not being powered by the Arduino's regulator.

Yes, you can power the relay board from the same 12V power supply as what is powering the switched loads.


----------



## theamzngq

With the relay board powered by the VIN pin, is the Arduino regulator still involved? I'm guessing not since the barrel connector appears to be wired in parallel with the VIN pin.


----------



## David_AVD

Powering the Arduino with 12V via the VIN pin or the barrel connector is exactly the same. It's hooking the relay board's power pin the the Arduino's 5V (regulator output) pin that's I'm recommending against.


----------



## djgra79

OK so it seems that if I just connect the Uno via USB cable, it can still opperate, but it seems to operate the relays LEDs whenthe sequence launches. However, as they are 12v no clicking can be heard.
Also, the PIR check works but only after initial startup. Once the sequence goes through once it all seems to get hung during the 30sec wait. The L LED stays solid which appears to indicate proper communication has been lost.
I'm getting a headache :/


----------



## theamzngq

Makes sense, David_AVD, I appreciate your clarifications!


----------



## MBrennan

I have a question regarding power supplies.

I've been powering my FourBanger projects from 9vdc wall warts - reason being that on my first attempt, I fried my first Arduino. When I measured the voltage from my power supply, (a 12vdc wall wart), it measured 16.5 vdc (no load). In fact ALL my 12vdc power supplies measured in that vicinity.

All of my 9vdc wall warts measure in at 12+/- vdc, no load.

My latest project is going to be consuming over the 500 ma rating of my 9vdc supply (a very small motor, and some LED strip lights as well as the Arduino and mp3 player - no relays), and I have a 12vdc / 1A that I could use - However, I'm concerned with the no load voltage of 16.5 vdc.

Anyone have any thoughts on the subject?

Is it "normal" for a power supply to read on the high side with no load?

ps - my first Arduino frying was due to mis-wiring and not necessarily because of the power supply.


----------



## David_AVD

A lot of old "linear" (heavy) power supplies are unregulated. The rated output voltage is only correct near their maximum rated load. This makes them a poor choice for a lot of modern electronic applications. The no load voltage is often more than the connected circuit can handle.

You can get linear power supplies that are regulated, but they are not as common. They will usually be marked as regulated though. Be aware that ones with switchable output voltages can come in regulated and non regulated types.

Most modern power supplies are (lightweight) "switch-mode" types that almost always offer quite good voltage regulation.


----------



## mikkojay

Yep, I put the word REGULATED in all caps on the main project web page.
Here is a nice page that someone put together that explains the concept in detail:
http://www.open-electronics.org/the-power-of-arduino-this-unknown/
It is a good concept to learn and be conscious of for this and any other project that uses a microcontroller of some sort.
-Mike


----------



## djgra79

So I'm using VIN and applying 12v and this seems to be working. When I switch off the PSU and just use the 5v form the USB port the board still appears to working as per my previous post, so unsure what exactly my issue is.


----------



## David_AVD

The USB will power the Arduino board via the 5V line. This is normal.

Did you try the "upload all" option and get it working ?


----------



## djgra79

yes I did upload all and it appears to have worked, but it certainly doesn't seem to be responding as I think it should. As per previous posts, it seems to be locking up and not triggering when it should after some time. At first startup I can run the PIR test and it works, but sometimes after the sequence runs it locks and becomes unresponsive. When it does work the relay lights work as they should, but this is only when the 12v power is turned off, so the relays them selves do not click. When I turn on the 12v power, the lights and relays stay on and do not change at all.


----------



## Montclair

Are you powering the 12v relays directly with the 12v power supply? The whole point is to isolate the relay power from the Arduino power to prevent Arduino resets, which sounds exactly like what you're running into. If you run +12v right out of the power supply to JD-VCC on the relays, then, if not using an opto-isolated relay, tie the grounds together from the power supply, relay GND pin, and an Arduino ground pin. If you're using an opto-isolated relay, don't tie the grounds together.

Otherwise, if you're trying to power the relays from the Arduino, leave the JD-VCC jumper on.

Also, Dave mentioned the "active high" for your relays. There's a setting for each of the relays in the software. Try toggling it.









(LOL @ those electrocution prop channel names!)

And, if what I just said is poop, David_AVD will let us know.


----------



## David_AVD

Graham's relay board is different and doesn't have the JD-VCC jumper or the optos.

That said, it should work with the HiOut boxes ticked as you've shown.

There also should be no problem with the 12V relay board sharing power with the Arduino VIN pin.


----------



## Montclair

Thanks, Dave. I shall remain silent now and let the experts handle it.


----------



## djgra79

Thanks gents. Only 8 more hours until I'm home and can test this theory out...!


----------



## djgra79

OK, still not responding when powered by 12v. And I've double checked the above HiOut is selected. made a quick video to show where I'm at, hope it helps diagnose my issue.


----------



## David_AVD

I'm starting to think that that 12V relay board uses active-low triggering but is referenced to the 12V supply. If this is true, it will not work with any Arduino board.

The reason is that the relay board needs to see 12V on each input for the relay to be off. The Arduino only switches between 0V and 5V, so that would explain it being jammed on all of the time.

We can test this theory;

Disconnect one of the relay input wires and leave the 12V connected. That relay should turn off. Now measure the voltage with the red meter probe on the relay board's input pin (not the wire going to the Arduino) and the black meter probe on the power supply's 0V (or V-) terminal.

I'm guess that the voltage will read somewhere close to 12V. Report back and we'll go from there.


----------



## djgra79

Hi David, you may be onto something.
I removed the first relay wire and indeed this LED does not light up when 12v applied. When I measure voltage of this pin it is 11.34v, despite it being 12.02v at the PSU terminals.
So does this mean I need a new relay board? I was hoping to keep everything 12v, hence why I chose this board.


----------



## David_AVD

Yeah, I reckon you must have chosen one of the only 12V relay boards that won't work for this application!

This one on eBay looks to be the right type.

There is a way to make the board you have work, but it's a little fiddly. You'd insert a 8.2V zener diode in series with each of the relay control input wires (cathode / banded end towards the relays side). This should allow it to work correctly.


----------



## djgra79

New relays ordered!


----------



## PYROZMAN29

Mikkojay, is there a way to change the fps in the software? I noticed everything else had to drop down menu but nothing there. By the way love the new software. Everything seems to go a lot smoother.

Sent from my SM-G930R4 using Tapatalk


----------



## mikkojay

Right-click the controller in the tree view in the upper left, then select from the menu list.


----------



## PYROZMAN29

mikkojay said:


> Right-click the controller in the tree view in the upper left, then select from the menu list.


Ok. I'll try it out when I get home. Most of mine 1:38 is long enough but I have something else I wanted to try. Thanks.

Sent from my SM-G930R4 using Tapatalk


----------



## iowachap

For folks needing a US shipper for the arduino UNO boards, here is the supplier I have been using, great customer service too, one board did not work I let them know and they shipped me a new one with my last order to replace it. and the price is very good too. 2 for 12 bucks, seller is - custom-sign

http://www.ebay.com/itm/191841190608?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT


----------



## theamzngq

I apologize if I'm thread highjacking, but I just wanted to share a couple of my projects from last year's haunt: http://www.hauntforum.com/showthread.php?t=43124

Thanks again for the help with the awesome Four Banger! Mike, do you have something like a Patreon account or something where I can throw a couple of bones your way for the great project and software?

Carry on!


----------



## PYROZMAN29

theamzngq said:


> I apologize if I'm thread highjacking, but I just wanted to share a couple of my projects from last year's haunt: http://www.hauntforum.com/showthread.php?t=43124
> 
> Thanks again for the help with the awesome Four Banger! Mike, do you have something like a Patreon account or something where I can throw a couple of bones your way for the great project and software?
> 
> Carry on!


Go to buttonbanger.com. There is a link at the bottom to do a donation through PayPal.

Sent from my SM-G930R4 using Tapatalk


----------



## theamzngq

Done and done!


----------



## theamzngq

Just finally started running tests with the fourbanger controller and I've run in to an issue. I've got the sample project loaded up. When it first boots up, it plays the ambient track and when triggered plays the scare sound as you would expect. However, when the sequence finishes, sometimes the scare sound continues to play instead of switching back to the ambient track. Any ideas why that is? I currently have the delay set to 3 seconds while testing.


----------



## hifidigital

*5V relay issues*

I have the UNO R3, the PIR and a sainsmart 5v relay board setup. I have been able to upload the test sequence to the UNO and trigger it via the PIR however the relays never operate. I see that the led's around the PIR come on (I assume this means that its been triggered) but nothing happens. I also unhooked the PIR and attempted to manually trigger but nothing happens with the relays.

I attempted to isolate the issue using the following sketch:

void setup(){ 
pinMode(A0,OUTPUT); 
}

void loop(){
digitalWrite(A0,LOW);
delay(10000);
digitalWrite(A0,HIGH);
delay(10000); 
}

This sketch turns on the relay that is hooked up to A0 just fine.

Does anyone have any idea what I might need to adjust?


----------



## BillyVanpire

theamzngq said:


> Just finally started running tests with the fourbanger controller and I've run in to an issue. I've got the sample project loaded up. When it first boots up, it plays the ambient track and when triggered plays the scare sound as you would expect. However, when the sequence finishes, sometimes the scare sound continues to play instead of switching back to the ambient track. Any ideas why that is? I currently have the delay set to 3 seconds while testing.


try deleting the audio from your sd card, or even a quick format...
then load your mp3s with the fourbanger app again and test.

seems the player is fussy with the card if you swap/load files manually or rename them, etc../shrug.


----------



## theamzngq

Thanks, BillyVanpire, I'll do that. What file system should I use when I format?


----------



## theamzngq

Another issue I'm seeing is that every once in a while the sequence will no longer trigger. the "L" led stays solid and the PIR doesn't seem to do anything any more. I've had to just power cycle the Uno for it to start triggering again.


----------



## hifidigital

hifidigital said:


> I have the UNO R3, the PIR and a sainsmart 5v relay board setup. I have been able to upload the test sequence to the UNO and trigger it via the PIR however the relays never operate. I see that the led's around the PIR come on (I assume this means that its been triggered) but nothing happens. I also unhooked the PIR and attempted to manually trigger but nothing happens with the relays.
> 
> I attempted to isolate the issue using the following sketch:
> 
> void setup(){
> pinMode(A0,OUTPUT);
> }
> 
> void loop(){
> digitalWrite(A0,LOW);
> delay(10000);
> digitalWrite(A0,HIGH);
> delay(10000);
> }
> 
> This sketch turns on the relay that is hooked up to A0 just fine.
> 
> Does anyone have any idea what I might need to adjust?


I think I figured it out. I was playing with the serial communication settings and was able to confirm that the sequence would play in real time. I then chose the Upload All and the sequence triggers the relays perfectly! Did I totally miss this option, or should Upload Firmware to Arduino do the same thing?


----------



## BillyVanpire

hifidigital said:


> I think I figured it out. I was playing with the serial communication settings and was able to confirm that the sequence would play in real time. I then chose the Upload All and the sequence triggers the relays perfectly! Did I totally miss this option, or should Upload Firmware to Arduino do the same thing?


mike suggests loading the firmware first, 
then upload all once you've made your sequence.

glad you got it sorted.


----------



## cyborgcod

Im attempting this..few issues though if anyone can help:
http://www.hauntforum.com/showthread.php?t=43168


----------



## cyborgcod

Basically:

Hey,
Just wondering if you could help me out.
Probably simple to you, but as im a complete noob to this.

Basically:
I want to wire up a linear actuator 12v, that will be motion triggered to extend and retract. Then pause for 30 seconds once retracted. Rinse and repeat when triggered.

I have a 12v relay. Im assuming im going to need a 12v 10amp power supply? Im not entirely sure on the amps for the actuator, I assume its between 3.5 and 6. . 

Anyways, regarding power to the 12v relay.

Do I simply strip the barrel connector, and plug the wires into Ground and VCC on the Relay. If so, could I also just get another two wires coming off those wires, and plug them into the arduino. 


P.S I dont get what the TTL Switch Means on the UNO Wiring. I mean..I have a motion detector, what are the two ttl wires for coming out of 11 and grnd..What do they go to? I dont get it.

Any illustration or help much appreciated.


----------



## David_AVD

To activate the linear actuator in both directions, I would use 2 SPDT relays.

The N/C terminal on each relay goes to 12V ground. The N/O terminal on each relay goes to 12V positive. The two relay COM terminals go to the linear actuator.

Activate one relay to extend the actuator or the other to retract it. The actuator will stop if both relays are off or on at the same time.


----------



## David_AVD

Now, there is another way if your actuator has limit switches. It uses one DPDT relay.

Bridge the N/C terminal of one relay pole to the N/O of the other pole. Connect this to 12V ground as well.

Do the same for the remaining N/C and N/O terminals but connect them to 12V positive instead.

The actuator wires to the two COM terminals.

With this method the actuator will run to one end when the relay is off, and run to the other end when the relay is on. You can't stop it mid travel though.


----------



## mroct31

AS far as your other questions:
I believe the TTL, pins 11 and GND are for an external trigger, such as a mat or push button as opposed to using the PIR sensor that you see in the connection image.

The GND and VCC pins on the Uno are for power to whatever relay module you're using, 1, 2 , 4 ect so I don't think you should connect any other power there. Those are just delivering the 5V the relay module needs to do it's thing.


----------



## cyborgcod

any chance you wanna draw some wires on the UNO and Relay and actuator so I can get the jist of this lol.


----------



## David_AVD

Not really. lol Just about to head off to work.

My first description can be applied to the 2 channel relay board you have.

I'll leave it for someone else to describe how to connect the relay board to the Uno.


----------



## mroct31

Have you checked out http://buttonbanger.com/?page_id=37
Lot's of info there just download the package and it comes with some wiring and other stuff PDF's.

The only thing I don't think is covered is connecting your device and it's power to the relays but it's pretty much the same way you connect to any relay device such as a picoboo so use their instructions for hooking up your actuator and it's power sorce to the relay module you have:
https://www.frightideas.com/downloads/docs/PicoBoo_Manual_v104s.pdf


----------



## cyborgcod

mroct31 said:


> Have you checked out http://buttonbanger.com/?page_id=37
> Lot's of info there just download the package and it comes with some wiring and other stuff PDF's.
> 
> The only thing I don't think is covered is connecting your device and it's power to the relays but it's pretty much the same way you connect to any relay device such as a picoboo so use their instructions for hooking up your actuator and it's power sorce to the relay module you have:
> https://www.frightideas.com/downloads/docs/PicoBoo_Manual_v104s.pdf


Have read all documentation. Im a noob as said. Really need someone to babysit me on this one, and draw the wires on the diagram lol. Once I can visually see it, Ill probably be fine.


----------



## mroct31

Some of the PDF's are drawings on how to connect the PIR, Audio board if you have one, and the the relay board to the UNO. I can't draw them any better!

As I said check out the fright ideas link for your actuator power connections only instead of the Picoboo you'll be using your 2 relay modular board.


----------



## cyborgcod

mroct31 said:


> Some of the PDF's are drawings on how to connect the PIR, Audio board if you have one, and the the relay board to the UNO. I can't draw them any better!
> 
> As I said check out the fright ideas link for your actuator power connections only instead of the Picoboo you'll be using your 2 relay modular board.


Not using Audio Board etc.

And the drawings refer to a 5V Relay, and Not a 12v that ive got. So this is where im confused. There is also no docs on wiring the 12v Actuator to the relay.


----------



## mroct31

Your 12v device gets connected to either 1 or both of the relays though I've never connected something to both some I'm not sure on that or if it is even possible.

What you are doing is splitting either the + or - wire on the wall wort? power supply that goes to your actuator and connecting the split wires to one of the relays, probably #1 into the COM and NO connections. 

When done this way, the relay when triggered by the UNO acts as an on and off switch and when activated powers the actuator which extends I assume? Is it motorized and runs a full throw as long as power is applied, extends and retracts?

The only 5v you should need to worry about is the power adapter to the UNO, the barrel connector one as it's supplying the power to the UNO and the relay board via the connections we talked about earlier and those are well diagrammed in the fourbanger images.


----------



## cyborgcod

mroct31 said:


> Your 12v device gets connected to either 1 or both of the relays though I've never connected something to both some I'm not sure on that or if it is even possible.
> 
> What you are doing is splitting either the + or - wire on the wall wort? power supply that goes to your actuator and connecting the split wires to one of the relays, probably #1 into the COM and NO connections.
> 
> When done this way, the relay when triggered by the UNO acts as an on and off switch and when activated powers the actuator which extends I assume? Is it motorized and runs a full throw as long as power is applied, extends and retracts?
> 
> The only 5v you should need to worry about is the power adapter to the UNO, the barrel connector one as it's supplying the power to the UNO and the relay board via the connections we talked about earlier and those are well diagrammed in the fourbanger images.


Okay.
So Ive got a 10amp 12v DC Power supply..
The UNO has 5v outputs...I wire a 5v to VCC on the relay, and a grnd from uno to relay. Will that actually power the actuator when plugged into the Common and NO Connectors. From what ive understood, I thought the relay had to have its own 12v power supply, as the UNO's output is only 5v...I dunno. Im so confused right about now.

Further more, Im then confused as to what wires go where on the relay..My actuator has two wires.


----------



## djgra79

Here's my diagram using 12v power supply for both Uno & relay board (12v relays)
I will add that the pictured relay board is the wrong type to use with a Uno and as such I have another on order to replace it but from what I understand, the wiring is still the same. I'm no expert but hope this helps visualize a little for you.
http://www.hauntforum.com/showpost.php?p=859500&postcount=812


----------



## cyborgcod

djgra79 said:


> Here's my diagram using 12v power supply for both Uno & relay board (12v relays)
> I will add that the pictured relay board is the wrong type to use with a Uno and as such I have another on order to replace it but from what I understand, the wiring is still the same. I'm no expert but hope this helps visualize a little for you.
> http://www.hauntforum.com/showpost.php?p=859500&postcount=812


So far, thats pretty much what ive done. But obviously dont need MP3 etc.

Im now wondering how to wire my actuator, So Output 0 Activates it/Extends, and Output 1, Retracts it.


----------



## mroct31

That might not be possible without external relays such as David was talking about I believe.

Here was my take on it in a very simplistic form!

https://photos.google.com/photo/AF1QipP0NAJHaECkB1IDDTuEK72nm1wvC4CwCnAbJyzW


----------



## cyborgcod

Right..Would this work?
https://gyazo.com/d11d6c30465b75d7c24264313177388c


----------



## mroct31

I don't think so. I think you'd fry your UNO board powering it with 12v it's made to work with 5V, doesn't matter that your device is 12v, that's getting it's power from the 12v power supply, has nothing to do with how much power the UNO is being powered with.


----------



## David_AVD

You have the relay wiring to the 12V 10A power supply and the actuator correct.

What's missing is the 0V connection from the relay board's input side to the Arduino 0V.

Assuming that the relay board is the 12V type, you'll also need to run a wire from the V+ (might be called Vcc ?) pin of the relay board's input side to the +12V connection of the same power supply as is running the Uno.

12V going into the barrel jack of the Uno is fine.


----------



## cyborgcod

David_AVD said:


> You have the relay wiring to the 12V 10A power supply and the actuator correct.
> 
> What's missing is the 0V connection from the relay board's input side to the Arduino 0V.
> 
> Assuming that the relay board is the 12V type, you'll also need to run a wire from the V+ (might be called Vcc ?) pin of the relay board's input side to the +12V connection of the same power supply as is running the Uno.
> 
> 12V going into the barrel jack of the Uno is fine.


Can you be kind enough to draw on my diagram..Easier for me to understand.


----------



## theamzngq

This diagram Mike made me helped me get it working: http://www.hauntforum.com/showthread.php?t=41196&page=81


----------



## BennyHorror

*first timer*

I tried to download your "shopping" list but had no luck. Could you send me either a link with your item list and instructions .

I have been looking for something like this for some time. If I can these to work my yard will be so great.

Thanks in advance

BennyHorror


----------



## cyborgcod

So I need to remove the jumper?


----------



## cyborgcod

Seriously There is so much conflicting advise..I dont know what to follow. Im lost completley. 
Can someone please draw me a wiring diagram of the whole thing..Ill happily pay $10 or something.


----------



## David_AVD

I still have a case of man-flu so honestly don't feel like drawing stuff, but what you had drawn was 95% done. Just the 0V and 12V connections to the relay board to add as I mentioned above.


----------



## PYROZMAN29

Another prop built with Mikkojay's four banger.





Sent from my SM-G930R4 using Tapatalk


----------



## PYROZMAN29

Running low on 1N4006 diodes. Cam other sizes be used for the flyback diode. 

Sent from my SM-G930R4 using Tapatalk


----------



## David_AVD

1N4007 is a good general purpose diode to keep on hand.


----------



## Montclair

cyborgcod said:


> Can you be kind enough to draw on my diagram..Easier for me to understand.


Try this


----------



## KingChaos

*Problem With trigger?*

This controller is s great! I really appreciate it. However, I have this set up to run a room in our haunt and I ran into a problem. I am running the version without a button board and using a nano. I am using a button trigger (not PIR) and have found that sometimes the button will not trigger the scare sequence. I am not positive, but it appears to be linked to the button being pushed while the scare sequence is running. If the button is not pressed during the scare sequence it works fine the next time. If it is pushed during the scare sequence it may or may not work the next time. A power reset and all is fine again.

Any ideas?

Thanks


----------



## PYROZMAN29

KingChaos said:


> This controller is s great! I really appreciate it. However, I have this set up to run a room in our haunt and I ran into a problem. I am running the version without a button board and using a nano. I am using a button trigger (not PIR) and have found that sometimes the button will not trigger the scare sequence. I am not positive, but it appears to be linked to the button being pushed while the scare sequence is running. If the button is not pressed during the scare sequence it works fine the next time. If it is pushed during the scare sequence it may or may not work the next time. A power reset and all is fine again.
> 
> Any ideas?
> 
> Thanks


I'm curious about this is well. I am using a step pad for mine and seem to have run into that issue once in awhile. Do you have your switch hooked to the ground and the D 11 pins on the board?

Sent from my SM-G930R4 using Tapatalk


----------



## djgra79

David_AVD said:


> Yeah, I reckon you must have chosen one of the only 12V relay boards that won't work for this application!
> 
> This one on eBay looks to be the right type.
> 
> There is a way to make the board you have work, but it's a little fiddly. You'd insert a 8.2V zener diode in series with each of the relay control input wires (cathode / banded end towards the relays side). This should allow it to work correctly.


OK so my new relays have come in and I have connected one up the same as before. There is a jumper for JD-VCC. When I leave this on it sounds like the relays switch on and again the lights stay on but this time they get slightly brighter as the sequence plays. I can see the the lights change as per the sequence, but the relays do not click and make any noise.
When I try again with the jumper removed, I do not hear the relays click on, the lights behave as per before (slightly brighter as sequence runs.)
What am I missing?!


----------



## David_AVD

OK, off the top of my head you should have:
Relay board JD-VCC jumper removed (very important)
PSU +12V going to the relay board JD-VCC pin and Arduino VIN pin
PSU 0V going to the relay board GND pin and Arduino 0V pin
VCC pin of relay board going to +5V on Arduino
IN pins of relay board going to Arduino A0...A3 pins


----------



## djgra79

YAAAAAAAAYYYYYYYYY!!!!.... Kind of...
Lights stay off and blink when the relays click. Finally! Thanks David.
However, seems to be locking up when waiting after only 1-2 triggers...
Uno stuck_zpsu7zrzj77.jpg Photo by djgrahamevans | Photobucket


----------



## David_AVD

OK, well that's my part of the job done.

As I've never used the software or hooked one up I'll leave the remaining issue to others.


----------



## djgra79

Haha, no problem. Thanks heaps David, really do appreciate it


----------



## Montclair

djgra79 said:


> YAAAAAAAAYYYYYYYYY!!!!.... Kind of...
> Lights stay off and blink when the relays click. Finally! Thanks David.
> However, seems to be locking up when waiting after only 1-2 triggers...
> Uno stuck_zpsu7zrzj77.jpg Photo by djgrahamevans | Photobucket


Can you post a photo of the actual wiring? Are you running only lights? If not, do you have diodes across the loads? I had similar issues when running the project with insufficient amperage.


----------



## Montclair

KingChaos said:


> This controller is s great! I really appreciate it. However, I have this set up to run a room in our haunt and I ran into a problem. I am running the version without a button board and using a nano. I am using a button trigger (not PIR) and have found that sometimes the button will not trigger the scare sequence. I am not positive, but it appears to be linked to the button being pushed while the scare sequence is running. If the button is not pressed during the scare sequence it works fine the next time. If it is pushed during the scare sequence it may or may not work the next time. A power reset and all is fine again.
> 
> Any ideas?
> 
> Thanks


I had similar problems with my dual Arduino setup. Sometimes the secondary Uno wouldn't fire every 2nd time. It was sporadic, though, and not always duplicable. Once I upped the amperage to the relays, however, the problem resolved. Or, perhaps, it was removing the load of the relays from PSU for the Arduino. I'm not entirely sure what the cause was. All I know is that once I added another 5v supply to my project, and ran the relays off of that, the problem went away.

In the end, I had two 5v supplies and one 12v supply. The 12v supply ran the two Unos, two solenoids, and two 12v to 5v converters. One 5v converter ran some LEDs and the remaining 5v converter ran both sets of relays.


----------



## djgra79

Montclair said:


> Can you post a photo of the actual wiring? Are you running only lights? If not, do you have diodes across the loads? I had similar issues when running the project with insufficient amperage.


Nothing connected to relays as yet. Wanted to see if they actually worked first! Plan to connect 12v car door lock actuators like these: https://www.amazon.com/gp/product/B00CZBQCR2/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

Here's a pic of my wiring, hope it's clear. White wires from left of photo are + from PSU. Black twisted to blue pins are -

2016-09-23 20.23.26_zpsib6kwcqy.jpg Photo by djgrahamevans | Photobucket


----------



## David_AVD

From what I can see, it looks like you have the power and relays hooked up correctly.


----------



## PYROZMAN29

Need some help fellas. I have this module that I am triggering with a step pad as it takes dry contacts to trigger. As you can see it is running off of 12 volts so it is a12v to high trigger or ground to low trigger. Is there a way too use the same step pad to trigger this as well as the arduino at the same time? If so what pins do I use to do this. Thanks.

Sent from my SM-G930R4 using Tapatalk


----------



## Montclair

djgra79 said:


> Nothing connected to relays as yet. Wanted to see if they actually worked first! Plan to connect 12v car door lock actuators like these: https://www.amazon.com/gp/product/B00CZBQCR2/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
> 
> Here's a pic of my wiring, hope it's clear. White wires from left of photo are + from PSU. Black twisted to blue pins are -


A quick fix may be just flashing the Arduino again with the firmware, then "Upload All" again. I'd take it off the PC, and hook up the trigger / PIR and speakers and do some testing to see if you're still having issues. I had trouble sometime with the Uno connected to the PC and the event just firing non-stop.

Otherwise, if you're still having issues, power just the relays with the 12v supply. Remove the VIN and GND on the Arduino from the 12v supply and hook it up to a second 9v - 12v supply.

There was a long discussion about power and grounding and opto-isolated relays. When supplying power to both the Arduino and the relays from the same supply, you may be negating the opto-isolation, which can cause strange behavior such as resets and hangs. You can read more about it here: http://www.hauntforum.com/showthread.php?t=41196&page=75

For your actuators, ensure you use the flyback diode. I used 1N5408 on my door lock actuators. Info on the parts here:

http://www.hauntforum.com/showpost.php?p=854292&postcount=614


----------



## David_AVD

Using one button / step pad, etc to trigger more than one device directly is not recommended. There can be all sorts of interactions varying from not working to permanent damage.

Use the pad to trigger a multi-pole relay. Then use separate poles (contacts) to trigger each prop.

You could also use a multi-channel relay module and common up the inputs so they all trigger together but you're still using separate contacts for each prop trigger.


----------



## djgra79

Montclair said:


> For your actuators, ensure you use the flyback diode. I used 1N5408 on my door lock actuators. Info on the parts here:
> 
> http://www.hauntforum.com/showpost.php?p=854292&postcount=614


Thanks I'll do some more testing today hopefully. Refresh my memory, what are the diodes for? Are the essential or just a safe-guard?


----------



## Montclair

djgra79 said:


> Thanks I'll do some more testing today hopefully. Refresh my memory, what are the diodes for? Are the essential or just a safe-guard?


Protects the Arduino from induced power spikes caused from switching inductive loads (the solenoids). May also reduce relay arcing which reduces the lifespan of the relays.

From flyback_diode.pdf



> When running a sequence with nothing connected, the relays clicked away no problems. When I connected a 12v air solenoid to the number 1 relay (shared 12v with the microcontroller) I noticed that when the solenoid engaged for the first time everything worked- but when it went through the first on-to-off cycle, the microcontroller would reset.
> 
> What was happening: Since the solenoid is an inductive load (essentially a big coil), the on-to-off power cycle causes the electrical field to collapse over the coil, which in turn creates an induced power spike.


----------



## KingChaos

Montclair said:


> I had similar problems with my dual Arduino setup. Sometimes the secondary Uno wouldn't fire every 2nd time. It was sporadic, though, and not always duplicable. Once I upped the amperage to the relays, however, the problem resolved. Or, perhaps, it was removing the load of the relays from PSU for the Arduino. I'm not entirely sure what the cause was. All I know is that once I added another 5v supply to my project, and ran the relays off of that, the problem went away.
> 
> In the end, I had two 5v supplies and one 12v supply. The 12v supply ran the two Unos, two solenoids, and two 12v to 5v converters. One 5v converter ran some LEDs and the remaining 5v converter ran both sets of relays.


I used a different power source for my relays and it appears to have worked! Thank you!


----------



## Montclair

KingChaos said:


> I used a different power source for my relays and it appears to have worked! Thank you!


NP! Glad you got it working. It's so cool when you get the problem solved and get your first controller working, isn't it? 

Anyway, I think I was the test case for the most problems with the controller, and everybody here helped me get it working (you know who you are), so I'm glad to convey what I learned!


----------



## PYROZMAN29

David_AVD said:


> Using one button / step pad, etc to trigger more than one device directly is not recommended. There can be all sorts of interactions varying from not working to permanent damage.
> 
> Use the pad to trigger a multi-pole relay. Then use separate poles (contacts) to trigger each prop.
> 
> You could also use a multi-channel relay module and common up the inputs so they all trigger together but you're still using separate contacts for each prop trigger.


Thanks DAVID_AVD. Ended up wiring both controllers to the step pad with an extra set relays I had and everything works great.

Sent from my SM-G930R4 using Tapatalk


----------



## mroct31

Now I have a question! When using this set up the uno/relay board with pneumatic solenoid valves is there anything I need to do other than run the power cable to the relay just as I would on any commercial prop controller?
Also, I'm guessing 12v and 24v valves are OK but what about 110v? They all have their own power so I'm just using the relay to turn them on and off.


----------



## Montclair

mroct31 said:


> Now I have a question! When using this set up the uno/relay board with pneumatic solenoid valves is there anything I need to do other than run the power cable to the relay just as I would on any commercial prop controller?


Yes, you'll need flyback diodes. We talked about it just a few messages back. See the flyback_diode.pdf file included in the documentation, too.



mroct31 said:


> Also, I'm guessing 12v and 24v valves are OK but what about 110v? They all have their own power so I'm just using the relay to turn them on and off.


I added RC snubbers to the relays switching my inductive AC loads, based upon recommendations here and in Arduino forums elsewhere.

However, it's entirely possible that neither flyback diodes for DC switching nor RC snubbers for AC switching are necessary when using a separate power supply to power the relays. A separate power supply is highly recommended to avoid Arduino reset issues. I found it necessary to use all of these to get my project working properly, although, I added them in the order of diodes, plus RC snubbers, plus separate power supply.

Bottom line, add the separate power supply first, then add the other things if you have problems.


----------



## djgra79

Got my diodes on order. Will of course report my I get them. Fingers crossed no issues


----------



## iowachap

I have several pneumatic props running with no flyback diodes and having no issues


----------



## iowachap

I am thinking issues folks run into with solenoids with their own power are due to the many different generic arduino boards out there.. some might not be as well made as others. Below is where I been getting mine and are US based so i get them in like 3 days, 6 bucks each 11 something for 2 free shipping.. I have 3 pneumatic props running no flybacks, 1 prop has 2 solenoids being switched from the relays, the other 2 have a solenoid each and those 2 also have air cannons being triggerd also again no flyback, the air cannons both have their own power supply.
http://www.ebay.com/itm/191841190608?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT


----------



## Batbuddy

I have the same set up a IowaChap and have successfully operated solenoids without any flyback diodes and without any reset issues. One of the design concepts that I subscribe to with electronic engineering is to use as few components as possible to achieve the desired results. I got my Arduino Nanos from China and they have been great. I do use a separate power supply for the solenoids and Arduino, but the Arduino powers the relay board, PIR and MP3 player all with no issues. In fact I have not had any issues with any of my boards used in this project, ever. I think that if you are real careful and check and double check your wiring and use a meter to make sure of Polarity and voltages you will not have issues unless you have a dud board or something like that. MikkoJay really did us all a great favor with this stuff and I am using it on several props this year. I plan to make a video of each thing and share it here in a couple of weeks when I have it all set up. Cheers


----------



## Montclair

Sorry guys, but if you've followed this thread for the past 6 months, you will see the many, many reset issues I've had with this project, with both a genuine Arduino and a knock off, and proper wiring and polarities. I've been very thorough in documenting the problems, the various attempts to fix, and the final resolution. I literally spent weeks trying to resolve the reset problems.

Therefore, when someone asks, I simply don't recommend building, nor would I build, these without the following:

1) Separate power supply for the relays
2) Diodes over DC solenoids
3) RC snubbers over relays for AC motors

The Arduino reset issue has been well documented on the Arduino forums and various other forums on the web, with even Mikkojay pointing to them.

With that all being said, if you can get away with getting your stuff to work without any of that and don't care about relay lifespan, more power to you. I'd rather not deal with reset issues and prolong my relays by adding these few additional components.


----------



## Batbuddy

No worries Montclair, I was not getting after anyone. I just was saying that I never had any of these issues. I would definitely use what is working for you and it is certainly worth the extra parts if it makes it work and extends the life of your boards.


----------



## Montclair

I didn't mean to sound snarky or anything. I just wanted to elaborate on why I recommend the extra stuff.


----------



## theamzngq

I also have run into the "frozen/no trigger" issue that others have recently posted about. It will trigger the first 1-5 times then sit and do nothing. A power cycle brings it back. Last night it froze on me, so I left it there powered on. when I walked in the room the next morning, it triggered once more, then froze again. Somehow it "timed out" and was ready to trigger again, but I have no idea if it was 5 mins later or 5 hours later.

This is with no loads connected, btw, just relays clicking away.

I'm using 12V relays and have things wired the way Mike showed me with this diagram (except I have all four relays connected): http://www.hauntforum.com/showpost.php?p=859466&postcount=801

I'm about to start troubleshooting. Here are the things I'm going to try:
1. reflash the arduino
2. add manual trigger to see if once it's frozen I can still trigger it manually vs PIR
3. put a 5V relay in place of the 12V
4. try a different Arduino

I'm also going to look at what Montclair said here


> A quick fix may be just flashing the Arduino again with the firmware, then "Upload All" again. I'd take it off the PC, and hook up the trigger / PIR and speakers and do some testing to see if you're still having issues. I had trouble sometime with the Uno connected to the PC and the event just firing non-stop.
> 
> Otherwise, if you're still having issues, power just the relays with the 12v supply. Remove the VIN and GND on the Arduino from the 12v supply and hook it up to a second 9v - 12v supply.


Can anyone suggest anything else I should try that isn't on my troubleshooting list?


----------



## djgra79

Mine is exactly the same issue as David. I'm waiting on flyback diodes to arrive in the post (any day now hopefully) but in the meantime I might try the separate power supplies. If it works then great, but it seems like such a waste of power for such a small prop to run. As mentioned previously, in Australia we try to stay away from running too much 240v AC power outside if we can due to the safety risks involved (kids tripping over cables, weather risks) and it means more work for me to run, house and protect 2x PSU's just to run a couple of actuators.


----------



## theamzngq

And you haven't found a fix yet, djgra? The flyback diodes don't even come into play yet I have nothing connected to my relays. I don't mind running separate power supplies if I can get it stable.


----------



## djgra79

Truth be told, I haven't spent much time troubleshooting it. Initially I had the wrong type of 12v relays so once I got the correct ones, it did work, but then had the freezing issue you described. Fingers crossed I get the diodes today so I can test over the weekend.


----------



## theamzngq

hWoo hoo!! I can report full stability success (without a load yet)!! So following the advice written here, I disconnected the Uno ground from the relay ground. I then grabbed a separate 12V power supply (meaning different from the one powering the Uno) connected relay gnd to 12V- and JDVCC to 12V+ (*no *VCC-JDVCC jumper installed) and wah lah, relays clicking and solid triggering over and over and over.

That means that for me at least this way of wiring things *causes freezes and hangs, * presumably because this defeats the opto-isolation of the relay board.

Thanks to Montclair and Terry King for the info here. That page made it clear that if you're wanting to run a separate power supply for the relay board (which should keep the Uno isolated) the only connections between the Uno and the relay board should be Uno 5V > relay VCC and Uno A0-A3 > relay IN1-IN4.

Now to add some solenoid valves as loads and see if things freak out. I'm hoping that because the Uno is now officially isolated that the loads on the relay won't cause any resets.

for reference, here is a diagram of how my 12V relay is wired up to the UNO now (the PIR and mp3 player are wired according to the fourbanger docs, I just left that off for clarity):









And finally, thanks for Mike for coming up with this crazy thing, I'm excited to see it running my 10ft leg span wiper spider!


----------



## Montclair

theamzngq said:


> Woo hoo!! I can report full stability success (without a load yet)!!
> 
> Thanks to Montclair and Terry King for the info here.


Excellent! Such a great feeling to get it working, isn't it? Glad I could convey the knowledge I got from all the smarter guys here. Great diagram, too. Might be nice to include that in the documentation, if Mike has a chance.


----------



## theamzngq

I have to clarify my triumphant post a bit...I realized once I got home that I was only testing my Uno via USB power, _not_ the barrel connector! When I got home and wired things back up, this time powering the Uno with 12v at the barrel connector, I got a couple of triggers and then a freeze. I grabbed a 5V phone charger, plugged in a USB cable to that and the Uno and wah lah, I was back to 100% triggering and sequence playback. This was without loads on the relays, by the way.

I'll have to edit my post and diagram to reflect that tomorrow. Anyone have any ideas why I can't get solid performance using the barrel connector on the Uno? USB connector gives me no issues, even with solenoids and DC motors running on the relays. Could it be that I need to use a 9V psu on the barrel connector instead of a 12V? Is there something the USB connector has that the barrell connector doesn't, like a 5V regulator that could go bad? Could it be that my Uno is "worn" out from having its ground connector to the relay ground during my testing?

It seems like I'll have no issues if I use USB cables and 5V PSUs for all my prop controllers this year, but I would love to know why this is happening and why I can't seem to use the Uno's barrel connector...


----------



## David_AVD

Maybe the 5V regulators on some of these Arduino clones are not up to spec. Powering it via 5V (instead of VIN or the barrel socket) would eliminate that issue.


----------



## Montclair

I have read that 9v to the barrel connector is the ideal voltage, and 12v is pushing it. But, I'm with David_AVD... use what works. I have also powered these with 5v to the barrel connector, but I do recall reading that it isn't ideal to do so.


----------



## theamzngq

I'm going to locate a 5V & 9V psu that I can plug into the barrel connector to see if that makes a difference in stability. I suppose if I were _really _curious I could get a legit Arduino instead of a clone and see how that runs.


----------



## David_AVD

Running 5V into the barrel connector (or VIN pin) is not recommended as far as I know. It's won't damage the Arduino, but the internal 5V regulator needs at least 6V to operate correctly.


----------



## djgra79

OK so I tried a generic powerpack with the barrel connector and the Uno didn't even power up. Possibly faulty powerpack.
I've now tried it via the USB port with a 5v 2A phone charger. It's clicking away nicley and so far 5 mins later, as not hung or reset. I think I've found my solution 

My next question is: I have 3 output terminals per relay. I have 2 wires (green & blue) on my car door lock actuators. What wires go where?!


----------



## theamzngq

I tried 2 psus on the barrel connector, one 5V and one 7.5V, both ran without issue, triggering normally and never froze. Maybe the 12V is just too much for the Uno's regulators? I have a 9V and a 10V I'll try as well just in the name of experimentation, though the 9V is only rated for 200 mA, seems a bit low.


----------



## David_AVD

djgra79 said:


> My next question is: I have 3 output terminals per relay. I have 2 wires (green & blue) on my car door lock actuators. What wires go where?!


One of the actuator's wires goes to PSU negative and the other to the N/O contact on relay. The COM contact of relay goes to PSU positive.

If the actuator pulls instead of pushes when the relay activates, swap the actuator wires around.


----------



## theamzngq

So after arriving at stabile controller performance with a separately-powered 12V relay, I've been able to complete the mechanical/electrical phase of my first prop run by Mike's controller: https://www.dropbox.com/s/lz01hdyff6x46m6/Wiper spider.mov?dl=0

Now on to making it actually look like a spider! I can't thank all of you enough on this thread for all your help and information. I'm glad I stumbled on to this community!


----------



## mikkojay

WOW! That's really cool David! Keep the vids coming when you get that rig done- Glad to see you have it humming along now. I scored a Craftsman air tank at the Goodwill today, I think I am obligated by fate to build another pneumatic.. 
-Mike


----------



## Montclair

Holy crap, that spider prop is AWESOME! I love it! I hope you'll share the plans somewhere on the site or YouTube for the build. Great prop!


----------



## Batbuddy

Sweet Spider! I might "steal" your idea there. After all "Replication is the sincerest form of flattery".


----------



## theamzngq

Steal away! Montclair, I hadn't actually thought of posting any kind of how to, but I'd be happy to post some pictures and a video walk through of how I put it together if folks are interested.


----------



## theamzngq

Oh, and I stole the "wiper spider" from someone else anyway, just did my own variation on it


----------



## Montclair

theamzngq said:


> Steal away! Montclair, I hadn't actually thought of posting any kind of how to, but I'd be happy to post some pictures and a video walk through of how I put it together if folks are interested.


Interested, interested!!


----------



## mroct31

Well since we're sharing thought I would to! I had one of the Gemmy Caged Skeletons from back in the day that took a crap 4 years in. However, all of the devices worked on it when powered separately so I figured it had to be a bad system board. After a few years of trying different things I came across this post and it all started coming together in my head on how to get this working again. So ordered all the parts, followed the easy instructions and now have a fully functioning prop again! 
Bit more wires than there used to be but whatever, loved this prop then and get to love it again now!

VID_20161010_101215252 on Vimeo


----------



## mikkojay

Nice job on the caged skeleton! I used an arduino to replace the controller in a store-bought prop this weekend myself. That is a cool prop so it would have been a shame to see it static only.
-Mike


----------



## theamzngq

btw, I can't seem to figure out how to embed video like you did above, mroct31. I've read that I can add custom BB codes to enable that, but I can't find that section either...


----------



## mroct31

Not sure either! I used Vimeo and just copied the address into my post and it showed up as you see it!


----------



## Tommyshud

*Beginner help*

When trying to upload all in test sequence I do not get the same screen as you suggest. Instead I get about 50 periods then says waiting for boot delay then says ready. When I press trigger sequence nothing happens.


----------



## mikkojay

Tommyshud said:


> When trying to upload all in test sequence I do not get the same screen as you suggest. Instead I get about 50 periods then says waiting for boot delay then says ready. When I press trigger sequence nothing happens.


You have to wait for the Arduino to initialize BEFORE selecting "Upload All" from the menu. Once you see "Ready", then it is Ready to receive an upload from the PC application. If you attempt to do anything while it is busy, it won't. Just play with it- you'll figure it out.


----------



## MBrennan

Greetings all!

Yesterday while running my Frankenstein's Lab, for some reason it started re-triggering after the delay.

Thought maybe the switch was shorted, so I dis-connected it - no help.

This morning thought maybe I would just reload the sequence from the laptop - which I did - and when it was powered from the USB, worked normal. As soon as I tried powering from the 9v regulated power supply, started re-triggering again.

And to make things even MORE challenging, I think my channel 2 relay fried, because now it doesn't turn off.

Going to do some more trouble shooting later.

Anybody have words of encouragement and a link to a new relay board that will get here in a week?


----------



## mroct31

http://www.ebay.com/sch/i.html?_fro...ino&rt=nc&LH_PrefLoc=1&_trksid=p2045573.m1684

Couple of US suppliers first items listed, showing receive by the 22nd.


----------



## MBrennan

mroct31 said:


> http://www.ebay.com/sch/i.html?_fro...ino&rt=nc&LH_PrefLoc=1&_trksid=p2045573.m1684
> 
> Couple of US suppliers first items listed, showing receive by the 22nd.


Ordered - Thanks!


----------



## MBrennan

Hypothetical Question:

Is it possible to split the output signal of one or more of the signals from the Arduino to TWO different relay boards i.e. channel 1 from Arduino controls channel 1 relay of board 1 AND channel 1 of relay board 2?

Assumptions:

Different (independent) power supplies for Arduino and relays.

My specific application is Channel 3 turns on a power strip with 2 Jacob's Ladders and I want to add a couple more. However, the 2 ladders draw 8 amps of power - so I wandered if I could split the control signal to run a different relay board controlling another separate circuit (so as not to blow breakers)

The other channels are already used for other things, so I can't use them.

Thanks for any thoughts!

Incidentally, the relay I fried was not the Ladder circuit, but a circuit turning on and off an OLD power supply with meters and lights and TRANSFORMERS. (only drawing 4 amps). But I think that turning it on and off quickly (not strobing) might have been its downfall. Might try the flyback diode trick on that one.


----------



## iowachap

which arduino are you using.. i am finding my last years nano's are just repeating audio trigger track after one or 2 triggers.. this occurred after uploading from the newer software to my older pigtailed wiring.. so i am thinking that might be part of why it and another nano started to do that .. but have seen every now and then my uno's will have audio re trigger over and over until the trigger is triggered then it will go for one set fine and start doing the auto repeat of audio again.. strange considering last year not one of the 4 or 5 controllers i used had problems the one today that is nano is audio only nothing hooked to it.. i am guessing you using uno since you said you hooked 9v to it.. figuring that would be the barrel jack.



MBrennan said:


> Greetings all!
> 
> Yesterday while running my Frankenstein's Lab, for some reason it started re-triggering after the delay.
> 
> Thought maybe the switch was shorted, so I dis-connected it - no help.
> 
> This morning thought maybe I would just reload the sequence from the laptop - which I did - and when it was powered from the USB, worked normal. As soon as I tried powering from the 9v regulated power supply, started re-triggering again.
> 
> And to make things even MORE challenging, I think my channel 2 relay fried, because now it doesn't turn off.
> 
> Going to do some more trouble shooting later.
> 
> Anybody have words of encouragement and a link to a new relay board that will get here in a week?


----------



## MBrennan

Actually I'm using a Nano from last year as well.

Mine started triggering from boot up, and just kept repeating after the delay.

Worked fine up to that point - then fried a relay...

Will test it more when the new relay shows up.


----------



## chooseyourtempo

*PIR Issue*

I've put my four banger together and I love it! But I am having a problem with the PIR sensor. I have everything connected correctly but it still isn't being read. occasionally it will pop up, trigger the sequence then disconnect again. I am using an uno.


----------



## Batbuddy

As for relays and the frying of them, We have been doing just that. We have a motor off of one of those electric scooters hooked up to run it forward and back with a spider on a track (I'll Post a video later) anyway it was drawing way too many amps for the relays and so I fried them. Instead of throwing out the board, I wired in an automotive relay that is rated for 30 amps to the board with jumper wires. Since the automotive relay coil is 12 Volts I tested it and it was working most of the time on 5V so I opened the plastic cap over the coil and gently stretched the return spring and it now works great on 5V So in a pinch if you need a relay that is capable of higher amps in the contacts you can "hack" an automotive relay to work. Here is a picture of the type I did this with.


----------



## Batbuddy

chooseyourtempo said:


> I've put my four banger together and I love it! But I am having a problem with the PIR sensor. I have everything connected correctly but it still isn't being read. occasionally it will pop up, trigger the sequence then disconnect again. I am using an uno.


Sounds like it is either not set right with the Trim Pots on the PIR or loose wiring. I would go into the Four banger App and use the PIR testing function. and see if you can get it to work.


----------



## Batbuddy

@MBrennan It should be possible to trigger two relay boards if you hook them up right. You would need to have enough power in the supply to the relay coils to support them. If you power the relay boards separately from the Arduino you need to make sure everything has a common ground or things won't work. The trigger pins on the arduino just switch from high, (or 5V) to low (or 0V)I would think that you could just make a pigtail that split into three pin connectors and it would work fine. I would try it, there is little risk of damaging anything by under driving the relay board it just won't operate. Let me know if you need help with a wiring diagram or anything...as for the relay failure i am sure that the fast switching was definitely what did it. The contacts in the relay probably arced out. That is essentially the same as what happened to mine I mentioned above.


----------



## iowachap

I would say if PIR is not working, i would swap it for another, if same problem, swap the arduino board.. if still occurring at that point switch the wires if you hadnt already.. I love using the beam break sensors, but then I have a little maze walk through that i can mount the beam break sensor one to each side of path so when they walk through it triggers. Much more reliable for triggering at that exact right time. It takes a little more wire, but well worth it.


----------



## MBrennan

Batbuddy said:


> As for relays and the frying of them, We have been doing just that. We have a motor off of one of those electric scooters hooked up to run it forward and back with a spider on a track (I'll Post a video later) anyway it was drawing way too many amps for the relays and so I fried them. Instead of throwing out the board, I wired in an automotive relay that is rated for 30 amps to the board with jumper wires. Since the automotive relay coil is 12 Volts I tested it and it was working most of the time on 5V so I opened the plastic cap over the coil and gently stretched the return spring and it now works great on 5V So in a pinch if you need a relay that is capable of higher amps in the contacts you can "hack" an automotive relay to work. Here is a picture of the type I did this with.


I like your out-of-the-box thinking! 
Unfortunately, I'm switching 120VAC (Line Voltage), so that particular relay won't work.

I may make a new box and use a couple of these:










They also have a 2 and 4 channel board. A bit overkill for this particular project, as I wouldn't exceed 15 amps, but I can think of a few cases where this could be useful.

As for splitting the relay signal - I'm with you, in that I think just making a pigtail should work. I'm not powering the second board off of the Arduino (thus not exceeding the Nanos 500ma load), just tapping the signal.

As soon as I the new relay board shows up, I'll give it a try and post the results.

Thanks for the reply!


----------



## MBrennan

Batbuddy said:


> @MBrennan It should be possible to trigger two relay boards if you hook them up right. You would need to have enough power in the supply to the relay coils to support them. If you power the relay boards separately from the Arduino you need to make sure everything has a common ground or things won't work. The trigger pins on the arduino just switch from high, (or 5V) to low (or 0V)I would think that you could just make a pigtail that split into three pin connectors and it would work fine. I would try it, there is little risk of damaging anything by under driving the relay board it just won't operate. Let me know if you need help with a wiring diagram or anything...as for the relay failure i am sure that the fast switching was definitely what did it. The contacts in the relay probably arced out. That is essentially the same as what happened to mine I mentioned above.


Also, noob question, would a flyback diode be appropriate in the case of switching a circuit of transformers? They are inductive loads...


----------



## djgra79

David_AVD said:


> One of the actuator's wires goes to PSU negative and the other to the N/O contact on relay. The COM contact of relay goes to PSU positive.
> 
> If the actuator pulls instead of pushes when the relay activates, swap the actuator wires around.


I'm not sure I know what each contact on the relay is? Here is what I bought, could you please confirm based on the overhead image?
4 Channel 12V Relay Module Board with Optocoupler Power Supply PIC AVR PLC | eBay


----------



## David_AVD

MBrennan said:


> Also, noob question, would a flyback diode be appropriate in the case of switching a circuit of transformers? They are inductive loads...


You can't use a flyback diode with AC.


----------



## David_AVD

djgra79 said:


> I'm not sure I know what each contact on the relay is?


----------



## djgra79

Thanks David. Well the actuator works, but now my hanging/reset issue is back, despite having Uno and relays on separate PSUs. 

Montclair, can you please link the video where you install/explain the IN5408 diodes? I received them this week but am not sure how or where they get installed?

If this doesn't fix it then I'm out, it's doing my head in.


----------



## David_AVD

The diode goes in parallel with the actuator wires, with the cathode (striped end) towards to +ve side.


----------



## Batbuddy

@MBrennan I actually bet that the automotive relay would be fine switching 120 VAC. The contacts in the relay are beefy and isolated. But who knows. Since the relays are cheap I will give it a try after Halloween so that I know if it will work. Worst case is that the relay welds shut and the load stays on. One thing is for sure the relay contacts are much heavier that what is in a household light switch. With your AC inductive load you should be fine just switching with out any added parts. I have used these boards for a 3/4 HP AC motor with no problems.


----------



## chooseyourtempo

Tried 4 different PIR sensors, adjusted trim pots on all of them, same problem. One of them worked for a bit, then I unplugged it and plugged it back in, no go. Switched out arduinos, again same problem. I reset, uploaded the firmware again, reassembled, again same problems. Occasionally I will get it to work, but then then it will just keep firing over and over. I opened the PIR tester in the program, wouldn't read it. I have no idea what else to do. I have checked wiring and connections and everything seems snug. Is anyone else having these problems or is it just me? Maybe I am not doing something correctly but I have troubleshot everything I can think of.


----------



## iowachap

Chooseyourtempo have you tried changing your USB cable from your PC to the arduino, also have you tried another PC, are you using a laptop, I put together a new uno last night and uploaded a sequence and it was doing the one good trigger an then the trigger audio continued to repeat, i knew the uno was good it was brand new, it was doing just like the nano was doing after i uploaded the new sequence, now i had before used my laptop to load the sequence onto the ardunio, but lately it seems i have been getting these random repeat issues, so i tried to upload the sequence from my desktop, the only other thing I did was increase the sequence from like 3 seconds to 4 seconds.. and after loading from my desktop boom it was working with no issues.. both computers have same virus software so i have no ideas on why the laptop would have issue but desktop not.. but this is the world of PCs not Mac whre so many components are different using different driver software .. just glad that worked.. and hopefully all my others stay stable..



chooseyourtempo said:


> Tried 4 different PIR sensors, adjusted trim pots on all of them, same problem. One of them worked for a bit, then I unplugged it and plugged it back in, no go. Switched out arduinos, again same problem. I reset, uploaded the firmware again, reassembled, again same problems. Occasionally I will get it to work, but then then it will just keep firing over and over. I opened the PIR tester in the program, wouldn't read it. I have no idea what else to do. I have checked wiring and connections and everything seems snug. Is anyone else having these problems or is it just me? Maybe I am not doing something correctly but I have troubleshot everything I can think of.


----------



## mikkojay

*Format the SD card*

Hey guys, believe it or not, I had a sporadic "play the scare in a loop" issue tonight 
What I did to get around mine was to reformat my SD card, then re-upload my audio files to it using the FourBanger app.

The symptom of the issue I had was that the scare audio would just play in a loop after the initial scare sequence was over. The controller itself would be idle (i.e. relays not clicking away) but the scare audio would continually play.

In my case, I knew it had to be something funny with the Catalex module or the SD card. This is because I use different commands to make the Catalex play file 1 and file 2. If you have ever peeked in the Arduino code:



Code:


void MiniAudio::PlayAmbient()
{
    sendCommand(CMD_PLAY_LOOP, 1); //CMD_PLAY_W_INDEX loops
}
void MiniAudio::PlayScare()
{
    sendCommand(CMD_PLAY_SINGLE, 2);
}

The code above, IHMO, would be really hard pressed to tell the audio module to play the scare track in a loop. Especially with the hard-coded 1 and 2. This is what leaned me to a good old-fashioned format, and pow! it worked.

Anyway, if this seems similar to anyone's audio glitch, it is a good thing to try first. It will take just a minute and may very well straighten things out.

One last note to the folks still using Nano's... if you upload new firmware/hex files, be sure to remember to select the "Nano" option button on the upload utility. If you don't, the upload may not work- and the message does not jump out and say so. So, if you don't, you could very well "THINK" you just refreshed your firmware, but did not. Just something to be wary of.

I hope everyone's projects are going good- I have a couple new ones I may try to make a quick video of one of these nights.

Thanks, Mike


----------



## djgra79

I may have missed it over almost 100 pages (!) but instead of using the PIR sensor to trigger the sequence, can you use a manual button? If so are there specific instructions for this or is it the same connections as the PIR? Does a certain type of button need to be used?


----------



## mroct31

This is in the docs so from this and the diagram showing a TTL trigger connected to GND and A11 I'd guess a manual trigger could be used. 

"The PIR sensor is optional, and may be used at the same time (or instead of) the trigger switch that connects to pin 11."

I did a quick test with a Try Me switch in those pins and it did work.


----------



## IMU

I'm still having issues with my damn cannon prop. Almost 2 years messing with it and it's still a flaky mess. I won't have time to rebuild the controller this time but I am going to scrap the whole electronic components and try again after Halloween. I've tried plugs, panel jacks & direct wiring with about the same results. The latest headache is no sound at all ... ambient or scare track. Going to replace the sound module tonight.

On a "better" note, I did manage to get the cannon controller and the cannonball controller to go off together. First successful pairing of 2 controllers for a project.


----------



## Montclair

Go back a few posts and see Mike's post about uploading the correct firmware and reformatting the SD card. Could fix your problems.


----------



## S L A M

Having an issue. The controller works fine and will run through an entire sequence but once I hook up the 3 solenoid valves it will run through maybe half the sequence then reset.

I swapped out the power supply to the controller to a 12v/3a supply and the valves run on their own 12v/6a supply.

It worked several times then it went back to resetting half way through.

Any thoughts? Thanks guys!


----------



## mikkojay

Hey slam, are you using flyback diodes?


----------



## Montclair

And, S L A M, you can put the relays on their own power supply to prevent this. Pages of discussion here on this, in previous posts.

You can get an understanding by starting to read here:
http://www.hauntforum.com/showthread.php?t=41196&page=75

Here's how to wire the relays with their own power:
http://www.hauntforum.com/showpost.php?p=862349&postcount=925

But, use a 5v power supply if using the 5v relays.

Oh, that's you Jason. LOL! I'm answering here and on FB at the same time.


----------



## IMU

Montclair said:


> Go back a few posts and see Mike's post about uploading the correct firmware and reformatting the SD card. Could fix your problems.


Was actually a really dumb "fix" ... the micro SD card popped out just enough not to read.  :googly:

I am going to be testing the cannon controller AGAIN over the next few days to see if I can track down the gremlin in time.


----------



## ChipStewart

*WTV020M01 Sound Module w/ FourBanger?*

Hi. I'm new to this forum, and fairly new to FourBanger, and fairly new to Arduinos. I'm hoping someone can give me some advice on using FourBanger with parts I already have. Specifically, I picked up a bunch of WTV020M01 Sound Modules a while ago, and am not sure how to interface them with FourBanger. After some effort, I finally have them working in standalone mode. There's not much info online, but this should be sufficient:http://tinyurl.com/kwyccgd. Unlike the Catalex sound module, I don't see a way to control the WTV020 with just one data line (and the - and + power connections). I do see a two line serial mode at 7.5 on page 11. Most of this stuff is a bit beyond my knowledge, though. So any idea (1) if this will work; and, (2) how to make it work?

Also, does FB only play MP3 files? The WTV020 is only able to play .WAV and .AD4 files. I guess if nothing else, I could just load each module with a single sound and use FB to trigger the play button on each as needed.

Thanks for any input.


----------



## mikkojay

Chip, I don't know anything about that module you linked to, so the odds of its serial protocol being compatible with the FourBanger are pretty slim. The Catalex module works great and is roughly 5 bucks, so that is what I use. The DF Player module is also compatible, and it costs about $3.50. With these 2 plentiful & cheap players available, I did not pursue adding support for other audio modules. The Arduino source code is available on the project page, so if you want to experiment with your own custom spin-off, feel free.
-Mike


----------



## Batbuddy

Mike I thought those DF players would be compatible, I have a bunch of them, but haven't taken the time to verify the pinouts and test the module. I think mine are a copycat one from China, but look identical. Are you saying that it is a direct swap and doesn't need code modification? Just hooking up to the correct pins? If so, this is good news...


----------



## mikkojay

Hey BatBuddy, Yes- they are pretty much a direct drop-in. There are 2 important things to note if using these though:
1) The Rx in pin is not 5v tolerant. I get around this by placing a 1k ohm resistor in series with the wire that goes from Arduino pin 10 to the Rx pin on the audio module.
2) If using the speaker-level outputs, the modules will suck a lot of 5v current out of your Arduino. I have smoked the regulator on an Uno before while running one of these along with other 5v things. I like to use the mini buck converters that can be had for between 50 cents and $1.

That's it- other than that, those modules are pretty cool. I have not experimented with them a ton (to the point that I can definitively put it in the documentation, etc..). I was also a bit hesitant because most folks don't have a shoebox of resistors- although they should 

-Mike


----------



## theamzngq

Just wanted to share the first dry run of my animated spider (complete with body now) using Mike's four banger! Here you go: https://www.dropbox.com/s/ipeboa1shgbhl2l/Spider%20dry%20run.MOV?dl=0

I haven't added the sound track yet, but it's been working like a charm. I will eventually upload a quick video walk-through of how I built it and how it works. Just gotta get everything else done before you-know-when. Our block is known around town and we usually have about 1500 people go through our backyard on Halloween night 

Speaking of which, here's video of the crowd from last year.


----------



## theamzngq

One other question about the four banger motion sensors: is there any adjustment on the sensitivity? I think I've seen people drill holes in a board or something and place the sensor behind to limit it's field of view as well, do I have that right? It's super sensitive right now.


----------



## David_AVD

That's a great (terrifying) looking spider !


----------



## IMU

There is a tester in the software that you can check the sensitivity as well. I think people would make a mini paper tube and slip it over the sensor under the dome.

BTW, awesome spider prop.


----------



## David_AVD

Not sure if I've mentioned it in this thread before, but I like the reflective IR sensors for applications where you want a narrow detection area and limited depth. I did a small write-up *here*.


----------



## FistJr

Sweet looking spider! I love it!


----------



## theamzngq

that is very cool, David_AVD, how would it be wired in the four banger case?


----------



## theamzngq

Thanks, FistJr, it was quite a project and I have several here as well as the person's project I emulated.


----------



## David_AVD

theamzngq said:


> that is very cool, David_AVD, how would it be wired in the four banger case?


Same way as the little PIR as far as I know. Just needs power (some types are 5V and others are 6V-24V), ground and signal out connected.


----------



## mikkojay

theamzngq said:


> One other question about the four banger motion sensors: is there any adjustment on the sensitivity? I think I've seen people drill holes in a board or something and place the sensor behind to limit it's field of view as well, do I have that right? It's super sensitive right now.


Here is a pic of how I put blinders on the sensor, inside of the dome:










It is just paper and black tape wrapped around a Bic pen.
-Mike


----------



## mikkojay

Broke the 100 page barrier- woot woot! 
Happy Halloween eve eve eve eve!
-Mike


----------



## theamzngq

That's a neat trick with the sensor, thanks


----------



## Montclair

Mike, thanks for this project. I ran my first night with three of them, and they worked flawlessly for the full 3 hours. The separate power supply for the relays really is the key to getting the controller to work perfectly, BTW. Regardless, I half expected my electrocution prop to blow up since I had all those problems building it, but it hung in there and worked perfectly all night!! I also put together two more of them and they ran my zombie containment and coffin popper without fail! I'm very pleased. I've got one more to build for my zombie wedding so I'll tackle that tomorrow, but I just wanted to say *THANK YOU!*


----------



## theamzngq

I can only report partial success, unfortunately. I had 3 major props: Spider, Voldemort, and Basilisk. Voldemort ran 100% all night long using one relay and sound, no problem, it always worked perfectly.

The Basilisk (one relay and sound) would always trigger, but eventually it would stop midway through the trigger sequence, only playing about half of it. Power cycle would make it work 100% again.

The spider (2 solenoids, 1 wiper motor, no sound) would also work very well for about 15-20 mins straight, then would just stop triggering. Rebooting it would make it work for another chunk of time.

The fact that Voldemort worked 100% of the time all night tells me that the 12V relay set up with separate relay power supply _can _work. I have a couple thoughts as to what might be going on:

I missed something in my wiring that ended up joining grounds with the Uno, defeating the opto-isolation
The parts from China are inferior and have sketchy components
the extension cable I made for the motion sensor is faulty/intermittent 

I tried re-formatting micro SD cards and reloading sound files, I tried flashing firmware and re-uploading programming, etc. I also tried powering everything via USB and then swapping out with using the barrel connector. Anyone else have any ideas? I'll try to post some diagrams of how I have things wired.


----------



## theamzngq

Montclair, is there any chance you'd have the time and inclination to draw up a clean diagram of what your final, 100% reliable wiring looked like? I'm guessing that you did it more cleanly for the next two controllers that you built, eh?


----------



## theamzngq

Something just occurred to me, I can upload the Spider program onto the voldemort controller since it has proven to be 100% reliable. If the spider still fails, then I can start looking at power or wiring issues instead of circuit boards.

Mike, does it matter if there's no sound, or if there's no mp3 module connected? Will that affect the stability of the controller? At first I didn't have any sound files specified, but then I ended up loading silent mp3s into the spider program. Could that have affected the stability?


----------



## mroct31

Yep my caged skeleton ran all night no problems! Replacing the dead stock electrical components with this set up had it out of the cobwebs of storage and back into service! It is of course only motors and not relays and I did power each with separate wall worts but it was all good! 

I have 2 more units for next year that I will be running solenoids off of and a couple more on order for some other props. I love the ease and cost of this set up! Just wish we could get them to do multiple routines and it'd be perfect!


----------



## IMU

I had 5 of these controllers running for about 2 hrs on 3 seperate nights. Sadly, my cannon prop failed again. It ran 1 night for 10 mins and quit. I think it's time to toss that controller and start from scratch. I will use that nano for something else.

Thanks again Mike for sharing your knowledge and help with us. It's greatly appreciated.


----------



## sreynolds

I had two controllers that work all night on Halloween. One ground breaker zombie. The other was controlling a store bought electrical panel box that also add a led light in an outlet box below it. That was connected to the relays flicker on and off. Thank you Mike


----------



## Montclair

theamzngq said:


> Montclair, is there any chance you'd have the time and inclination to draw up a clean diagram of what your final, 100% reliable wiring looked like? I'm guessing that you did it more cleanly for the next two controllers that you built, eh?


Follow the diagram included with the project. Remove the ground between Arduino and relays. Remove jumper from relays. Connect separate 5v power supply to 5v relays with positive going to JD-VCC and the negative to the GND pin. I went the extra step of putting diodes on any 12v solenoids, although it's possible they're not necessary.

One controller switched 120v AC on all four relays. Two were shiatsu neck massagers, and two were store bought LED floodlights. Check it out:






It worked all night and without any RC snubbers that I used in my shiatsu based electrocution prop. I only used a separate power supply (as above) on the relays -- so as others have said, that may really be all that's necessary to make this project work properly all the time.

The only issues I ran into were constant triggering when the PIR wires came loose, and that's nobody's fault by my own. Bottom line, 4 fourbangers running all night without any resets!


----------



## Montclair

theamzngq said:


> Mike, does it matter if there's no sound, or if there's no mp3 module connected? Will that affect the stability of the controller? At first I didn't have any sound files specified, but then I ended up loading silent mp3s into the spider program. Could that have affected the stability?


I ran my zombie fence shaker without an MP3 module connected at first (due to loose wires). It ran fine without it.


----------



## theamzngq

Thanks for that great summary of all the key points, Montclair. I believe I've got all those covered. After another showing of our haunt last night, I'm now thinking that my wire is actually faulty and that that might be the cause of the Spider issues. For example, I can hear when the relay fires (I can hear the click), but my wiper motor doesn't start going until a second later. To further cement this theory, initially the spider worked just fine, so as it banged and vibrated around through the night, some of the wire must have developed some breaks or cracks, which started the "stuttering" I began to observe. And all that intermittent contact could also be why it eventually stopped triggering.

I'm going to hit home depot and get some new cable. What gauge and type did you use? I used ethernet cable because that is what I had available at the time, but I'm thinking now that solid wire is not the right choice in a prop that moves and vibrates so much. What I thought was electronics freak outs might actually be intermittent connectivity. I'll let you know what I find.

Regarding my Basilisk prop, that always triggers just fine, but after a while it just cuts off in the middle of the scare sequence and goes back to ambient. I've already formatted the micro SD card, so maybe I have a bad one of those too. I'll try another and see how long it lasts.


----------



## Montclair

Guage wire -- whatever I had on hand for wiring from power supply to Arduino and to the switching part of the relays. I picked up CAT5e ethernet cable for the PIR wiring, then kept each pair together to double the guage, since the PIR only needs 3 wires. I did the same thing for 12v solenoid connections, but put 2 pairs together to make a single wire.


----------



## Mikester

*Monster in a Box - My first attempt*

Hello folks,
I created my Monster in a Box for this halloween thanks to the Four Banger instructions and information so generously shared. I added a digital picture frame to animate "eyes" looking out of the box which was a good effect. My problem was that my Arduino Uno controller would work for a while, then I'd have to reset it. This went on all night. Sometimes it would cycle only a couple of times, other times it could go for a couple of hours. I thought about the relay isolation, but even disconnecting the relay board from the Arduino it still will hang up. I put it on a different power supply and it still gives me problems. I'm using a 12V DC power supply. Any ideas?


----------



## iowachap

David yeah I used beam breaks for all of my major props this year except 3 that were good with using PIR, the others I needed to assure it triggered at the exact right time they walked through the beam. They can easily be added to work with spirit props too..



David_AVD said:


> Not sure if I've mentioned it in this thread before, but I like the reflective IR sensors for applications where you want a narrow detection area and limited depth. I did a small write-up *here*.


----------



## Batbuddy

We had a very successful three nights with 5 props running these controllers. They all ran great. We had one relay board that fried, but that was because the motor hooked to it was drawing 12 Amps @ 12 Volts DC so We hacked it to use automotive relays, but I already said this earlier, sorry. Our haunt incorporates a coffin ride where the guests actually get in a car shaped like a coffin and ride through the haunt. The car is controlled by one of these controllers and it is real sweet. we have it stop and start throughout the trip through the haunt which makes it cool, as if there is a ghost who is giving the guests the tour. By Halloween night we had all of the bugs worked out of everything and we had a smooth night. Lovin' this controller!


----------



## Montclair

Batbuddy said:


> Our haunt incorporates a coffin ride where the guests actually get in a car shaped like a coffin and ride through the haunt. The car is controlled by one of these controllers and it is real sweet.


Dude, that is *so awesome!* Have you posted any video anywhere of this. *I would love to see it!!*


----------



## Montclair

Mikester said:


> Sometimes it would cycle only a couple of times, other times it could go for a couple of hours. I thought about the relay isolation, but even disconnecting the relay board from the Arduino it still will hang up. I put it on a different power supply and it still gives me problems. I'm using a 12V DC power supply. Any ideas?


Try reformatting the SD card and copying the audio files to it again. Mike mentioned a few pages back this was a solution for some hang issues. Let us know if that works for you.


----------



## Batbuddy

Montclair said:


> Dude, that is *so awesome!* Have you posted any video anywhere of this. *I would love to see it!!*


Here is a link to this years haunt video. It is a compilation of two nights of video. The coffin ride is controlled by an arduino nano running the four banger code.


----------



## Montclair

Batbuddy said:


> Here is a link to this years haunt video. It is a compilation of two nights of video. The coffin ride is controlled by an arduino nano running the four banger code.


*AWESOME!!  * I love the coffin buggy! Love your haunt, too. Classic stuff and some neat effects. This is Halloween to me, not all the gory stuff. Well done!﻿


----------



## theamzngq

Batbuddy, so freakin awesome! That is a whole other level. The Coffin is run by the fourbanger? How is it powered?


----------



## theamzngq

Heres a walk through of the spider prop I built this year. I was having issues with the fourbanger stalling out as well, but I think I had some breaks in my wiring somewhere. I pulled all the wire out and re-did it and it seems to be back to normal.


----------



## weezllane

I discovered this thread too late for this Halloween, but I'm already preparing for 2017! I managed to get my Arduino and 4 channel relay to work, however, the audio from the MP3 module is doo-doo. One track plays nice and loud but the other sounds tinny and quiet. Is there a specific format that works best for audio? Is there a limit to file size, audio length?


----------



## Montclair

weezllane said:


> I discovered this thread too late for this Halloween, but I'm already preparing for 2017! I managed to get my Arduino and 4 channel relay to work, however, the audio from the MP3 module is doo-doo. One track plays nice and loud but the other sounds tinny and quiet. Is there a specific format that works best for audio? Is there a limit to file size, audio length?


Use Audacity (free audio software) to bring up the volume of whichever track is causing you an issue. I don't know about size limitations. I didn't run into any. WAV format would be the least compressed, safe format, but MP3 will be smaller and you're never going to hear the difference in this type of application.


----------



## Montclair

*New Wiring Diagram*

I thought I'd share this here, since I've been sharing it on Facebook. This type of wiring will ensure you have sufficient power for your relays and optionally (preferably) complete opto-isolation of the relays when using a third power supply for your solenoids (not pictured, but described). This will help prevent reset and hang issues with the project.


----------



## Montclair

theamzngq said:


> Heres a walk through of the spider prop I built this year. I was having issues with the fourbanger stalling out as well, but I think I had some breaks in my wiring somewhere. I pulled all the wire out and re-did it and it seems to be back to normal.


Thanks so much for sharing! Really great prop!

I did notice a few things that might cause you problems.


Consider putting diodes on both of your solenoid connections, since you are using a single 12v supply for the entire project. Since you have no opto-isolation with this wiring, you're ripe for reset / hang issues without the flyback diode. Mike talks about this in the flyback_diode.pdf included with the project.

Consider a beefier 12v supply. You may be pushing the limits at 5 amps, considering the strain on the wiper motor to move all of that around. I've been told that some wiper motors pull close to 20 amps on startup (not sure how accurate that is). Plus, you're running two solenoids and LEDs. If you don't have sufficient amperage, you'll get / develop reset / hang problems.

Not sure if you need a diode across the power lines for the motor. I burned out LEDs in my electrocution prop without them, when wired with solenoids. May not apply to wiper motors, but I don't think it will hurt. David_AVD will correct me if I'm wrong.

Great prop, though. I love it and think I'm going to give it a shot for next season!


----------



## Batbuddy

theamzngq said:


> Batbuddy, so freakin awesome! That is a whole other level. The Coffin is run by the fourbanger? How is it powered?


Thanks for the compliment! And thanks for sharing the spider build with us, It is really quite awesome as well. I need to add one to my haunt. Yes the fourbanger controls the coffin. It plays the audio track and the relays turn 1/2HP ac motor on and off. Which is what is running the drive train of the coffin. We have a power inverter and two big deep cycle batteries for power. Last year we had the drive train running on roller chain, but there was so much torque on the final drive that we kept snapping #35 chain so this year we converted it to belts...but I digress. The nice thing about the fourbanger and Arduino for that matter is the versatility of them.


----------



## Batbuddy

Montclair said:


> ...
> 
> 
> Consider putting diodes on both of your solenoid connections, since you are using a single 12v supply for the entire project. Since you have no opto-isolation with this wiring, you're ripe for reset / hang issues without the flyback diode. Mike talks about this in the flyback_diode.pdf included with the project. ...




I can attest to this point as I was having this issue with my Flying Witch. She has two solenoids and I just ended up adding the diode right into the wiring of the solenoids so that it is permanent. I heat shrinked it all together and left pigtails to hook them up to extension wires or the relay board. Even if I was not using the solenoids (i.e. repurposing them)with a relay board or Arduino, it wont hurt to have the diode in there...


----------



## theamzngq

Thanks for the tips, Montclair. I was thinking about getting a stronger power supply. However, I am actually using a separate power supply for the Uno, you may not have noticed the USB cable plugged into it in the video. Here's a freeze frame:










By powering the Uno via USB, I am actually maintaining the opto-isolation of the relay board, as far as I understand. Here's a diagram of how everything is wired on the spider: 









Any comments on that wiring diagram? I believe I followed all of the various tips and best practices to maintain isolation. I think I still did get some resets every once in a while (not sure how since the wiring seems correct), so I suppose it wouldn't hurt to put some diodes in there just in case...

Btw, I started with ethernet for all my wiring, which worked fine initially. As the night progressed, I was having weird stuttering issues like there were breaks in the cable somewhere. I pulled it all out and re-wired using 18awg stranded speaker wire (as you may be able to see in the video). I figured the stranded would not only handle the vibration and bumping better, but it would better handle any high current draw from the wiper motor as well.


----------



## David_AVD

It's easy to underestimate the DC current draw of motors and solenoids. Even those car door lock actuators can draw up to 5 Amps each.

Using cable that is too thin can really screw with things, as can using connectors that can't cope with the current. The resulting voltage drops can cause erratic operation.


----------



## theamzngq

I'll grab a 10amp PSU for the spider, do you think that'll do it, David_AVD? Also, is there any chance that the Uno and the relay module could be grounding out via the electrical outlet ground? The two PSUs are actually plugged in to the same electrical outlet. Is there any chance of that causing the grounds to be connected?


----------



## weezllane

Montclair said:


> Use Audacity (free audio software) to bring up the volume of whichever track is causing you an issue. I don't know about size limitations. I didn't run into any. WAV format would be the least compressed, safe format, but MP3 will be smaller and you're never going to hear the difference in this type of application.


I created the tracks in Adobe Audition and they're both the same level. I tried both wav and mp3....one wav file simply didn't play at all. As mp3, same bit rate, etc...they both played, however, one track was considerably quieter. I'm going to reformat the sd card and see if that does anything.

Thanks for the reply.

I tried a different set of speakers and the audio sounds just fine. I feel like a parent who punished the wrong sibling for breaking a dish.


----------



## David_AVD

A 10A 12V power supply should do it. The output of the power supplies should already be isolated from the mains ground, so I don't think that's an issue here.


----------



## Batbuddy

theamzngq said:


> Any comments on that wiring diagram?


 I would wire it a bit differently, Instead of putting power to the relay board through the jumper pin spot I would just power it from the Uno with 5V from the regulated supply on the Uno and ground from the Uno. The optocouplers and diodes built into the board provide plenty of protection on the coil side of the relay. Then just use your second power supply (in this case the new 10 amp 12 V unit) and supply the relays on the switch, or contact side of the relay with the power from the second supply. It just seems like the sending of power in through the jumper pin may be causing an issue.


----------



## theamzngq

Batbuddy, I'm using 12V relays so I wouldn't be able to power them using the Uno. The last 20-30 pages of this thread have been heavy with discussion about not connecting the Uno ground to the relay board ground because of reset and hang issues.



Montclair said:


> And, S L A M, you can put the relays on their own power supply to prevent this. Pages of discussion here on this, in previous posts.
> 
> You can get an understanding by starting to read here:
> http://www.hauntforum.com/showthread.php?t=41196&page=75
> 
> Here's how to wire the relays with their own power:
> http://www.hauntforum.com/showpost.php?p=862349&postcount=925
> 
> But, use a 5v power supply if using the 5v relays.


Be sure to read through the whole post, because there are some corrections on down through.

Anyway, all of the discussion on this topic is what led me to wire it that way, so that the Uno is being powered by its own power supply (via USB port), and everything else runs on it's own 12V supply, never a ground to be found between the Uno and the relay board...


----------



## Montclair

theamzngq said:


> Thanks for the tips, Montclair. I was thinking about getting a stronger power supply. However, I am actually using a separate power supply for the Uno, you may not have noticed the USB cable plugged into it in the video. Here's a freeze frame:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> By powering the Uno via USB, I am actually maintaining the opto-isolation of the relay board, as far as I understand. Here's a diagram of how everything is wired on the spider:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Any comments on that wiring diagram? I believe I followed all of the various tips and best practices to maintain isolation. I think I still did get some resets every once in a while (not sure how since the wiring seems correct), so I suppose it wouldn't hurt to put some diodes in there just in case...
> 
> Btw, I started with ethernet for all my wiring, which worked fine initially. As the night progressed, I was having weird stuttering issues like there were breaks in the cable somewhere. I pulled it all out and re-wired using 18awg stranded speaker wire (as you may be able to see in the video). I figured the stranded would not only handle the vibration and bumping better, but it would better handle any high current draw from the wiper motor as well.


I did miss that USB connection. Yes, you are maintaining the isolation of the Uno that way. The resets you encountered may, however, be because of that USB 5v power. It's not really the recommended method of powering the Uno, according to various forums. I could be wrong. May also have something to do with the 5A supply not being beefy enough. Seems to me, though, that relays just wouldn't actually click over and the solenoids and wiper motor would behave erratically in that case, but not reset the Arduino.

Beef up the supply and if you still have problems, put in the diodes, too just for good measure, although probably not necessary with this wiring.

Perhaps it was due to the smaller gauge wiring and suspected breaks from the movement.


----------



## Montclair

theamzngq said:


> I'll grab a 10amp PSU for the spider, do you think that'll do it, David_AVD? Also, is there any chance that the Uno and the relay module could be grounding out via the electrical outlet ground? The two PSUs are actually plugged in to the same electrical outlet. Is there any chance of that causing the grounds to be connected?


I wondered about this also. In the end, everything in a haunt, typically, is going back to the same mains supply. The DC power supplies should be handling that issue internally, one would think.

Nevertheless, for my zombie containment prop, I didn't have an extra 5v supply and had to resort to a 12v to 5v converter (which I also used in my electrocution prop) to run the relays. Does that converter equate to isolation? I don't know. It's essentially its own power supply, but it's drawing off the same 12v power that's running the Uno. Thus, the ground between the relay power and Uno then become connected, negating isolation. So, to be safe, I just add the diodes to the solenoids and have no problems.

The bottom line problem with the project is not enough power to run the relays under load, when wiring per the documentation. In all honesty, with diodes on the solenoids, I've not experienced any reset issues powering it all with one supply and the 12v to 5v converter to the relays. I actually prefer this method to save money, space, and mains outlets.


----------



## theamzngq

I think I've been avoiding messing with adding the diodes, but I should just go ahead and do it already! Regardless of what's going on power-wise, it seems like the diodes take care of any of those issues should they ever rear their heads. I'll finally give in 

And regarding the USB power, I did also try running the Uno via the barrel connector and had some issues with using 12V there. I brought it down to 7.5V at one point at the barrel connector which seemed to be more stable. I'll have to experiment some more on it. At this point, most of my halloween stuff is put away in the shed, so it might have to wait 9-10 months...


----------



## David_AVD

Montclair said:


> Does that converter equate to isolation? I don't know. It's essentially its own power supply, but it's drawing off the same 12v power that's running the Uno.


Most of the DC-DC converters on eBay will be the non-isolated type even if they have separate -ve wires. Converters with isolation are *much* more expensive, especially for ones rated for any appreciable current.


----------



## Batbuddy

theamzngq said:


> Batbuddy, I'm using 12V relays so I wouldn't be able to power them using the Uno. The last 20-30 pages of this thread have been heavy with discussion about not connecting the Uno ground to the relay board ground because of reset and hang issues.
> 
> Anyway, all of the discussion on this topic is what led me to wire it that way, so that the Uno is being powered by its own power supply (via USB port), and everything else runs on it's own 12V supply, never a ground to be found between the Uno and the relay board...


 No worries. It obviously works that way so stick with it. Yeah I know that every one has been worried about that whole ground connection thing, I have never had any issue with it though and I have always just wired the whole four banger up the way Mike shows it in the documentation for the project, with zero issues. I actually use the nanos and they have worked perfectly. I power the Nano with a wall wart from between 6 to 12 Volts (I have a pile of surplus ones of varying voltages) and use the built in regulator to run the MP3 player, relay board and PIR. I used 5 different setups like this on 5 different props and all of them worked flawlessly for this year and last year. My only point to all of this is that sometimes we can over complicate our designs and also increase the part costs unnecessarily. I guess over all, having a working prop is the goal, so if it is working for you then by all means don't try to redo it. Just offering my two cents. Also just FYI some where back a few weeks ago someone was talking about extending the cable to the PIR and just how long could one make it. I had two props running on cables that were over 25 ft long and they worked great. I used cat5 cable and soldered a pair of wires to each pin which leaves just 2 wires in the cable unused. I am not saying that other folks are wrong or that running controllers a certain way is a bad design, I am just trying to explain that keeping things simple as possible has worked well for me and having a basic understanding of Electronics has been a great help too. I am constantly impressed with what these little controllers can do. Next step is getting Mike's JawDuino project going with a three axis skull...


----------



## weezllane

How difficult would it be (if it's even possible) to replace the MP3 player module with a triggerable video player like a MedeaWiz Sprite? I'm guessing it would involve changing some of the original Arduino sketch? I'd like to sync a couple of solenoids to video.

Link to Sprite video player. http://www.medeawiz.com/Products.html


----------



## theamzngq

Batbuddy, you said that you used diodes on all your solenoids? That must be why you've had no issues. Don't know why I've been avoiding trying that, but I think I'll just break down and try it! It can't hurt, and I do like the idea of keeping it simple...


----------



## grimreaper

*Inquiring*

Does the software work with a MAC?


----------



## Batbuddy

weezllane said:


> How difficult would it be (if it's even possible) to replace the MP3 player module with a triggerable video player like a MedeaWiz Sprite? I'm guessing it would involve changing some of the original Arduino sketch? I'd like to sync a couple of solenoids to video.
> 
> Link to Sprite video player. http://www.medeawiz.com/Products.html


 Cool idea, I bought one of those players this year and love it. I was trying to get a similar sync with the video and Four banger working together. I tried having the PIR trigger both units and that didn't work so I ended up just mounting two PIRs next to each other and getting simultaneous triggering that way. I bet your right though that if you modified the actual sketch that you could get it to work. What exactly are you aiming to do?


----------



## weezllane

Batbuddy said:


> Cool idea, I bought one of those players this year and love it. I was trying to get a similar sync with the video and Four banger working together. I tried having the PIR trigger both units and that didn't work so I ended up just mounting two PIRs next to each other and getting simultaneous triggering that way. I bet your right though that if you modified the actual sketch that you could get it to work. What exactly are you aiming to do?


I want to add a video projection behind my skeleton band prop. The projection would consist of ghosts singing some of the harmonies. Also, I have pneumatic skull that pops up out of a column during certain parts of the song. The pop up has two cylinders that would need to be timed to the video.


----------



## grimreaper

Mike, Many thanks for sharing...


----------



## weezllane

weezllane said:


> How difficult would it be (if it's even possible) to replace the MP3 player module with a triggerable video player like a MedeaWiz Sprite? I'm guessing it would involve changing some of the original Arduino sketch? I'd like to sync a couple of solenoids to video.
> 
> Link to Sprite video player. http://www.medeawiz.com/Products.html


What just occurred to me is could a relay be used to trigger the media player? The Sprite comes with a input jack for push button operation...can a relay be wired to that input? Do I risk frying the player?


----------



## David_AVD

If it has a button connection, a relay contact will work just fine.


----------



## Batbuddy

Yes, hook it to one of the relays. That would work fine.


----------



## Montclair

David_AVD said:


> Most of the DC-DC converters on eBay will be the non-isolated type even if they have separate -ve wires. Converters with isolation are *much* more expensive, especially for ones rated for any appreciable current.


Good to know. Then it's the diodes protecting my stuff when I do that, since the grounds get tied together due to the converter wiring. Well, it works and that's all that really matters in the end.


----------



## Montclair

grimreaper said:


> Does the software work with a MAC?


No sir, it does not presently. You an use Wine or a Windows emulator (or load Windows on a removable drive if you're adventurous).


----------



## Montclair

Batbuddy said:


> No worries. It obviously works that way so stick with it. Yeah I know that every one has been worried about that whole ground connection thing, I have never had any issue with it though and I have always just wired the whole four banger up the way Mike shows it in the documentation for the project, with zero issues.


At this point, I'm really only pushing an additional power supply for the relays, and adding diodes if pulling that power off the same supply for the Arduino. I just had so much trouble with that electrocution prop and that really ended up being the fix, along with some timing for changing direction on the AC motors.

But, hey, if the thing works without that stuff, go for it! Who wants to add more crap to it if not necessary? But, if it doesn't work correctly, you'll have a very good idea what to do to get it working.


----------



## mroct31

Question? 

If I'm going to use this set up with 24v solenoids, should I use 24v relay boards as opposed to the 5v ones I have now? I have 2 set up for my 24v solenoid prop but was having an issue with the PIR on one and in my working on it I noticed that my relays were 5v and see in some of the posts others had 12v relay boards for their 12v solenoids which got me thinking maybe I should go with the 24v for mine? All components have their own power supply in case that matters.

I hooked these up the way they are and they do trigger the 24v solenoid, but only in short testing and I wonder if I shouldn't change it for protection/better reliability?


----------



## theamzngq

The voltage of the relays is not related to the power you're running through them or the devices you're trying to power with them. A 5V relay is nothing more than a switch, it just happens to be activated (flipped) using 5V. In other words, 5V is the power required to flip the relay off and on and is not related to the thing you're switching off and on.


----------



## mroct31

Thanks. Another question, is there a way to set up an Uno board to loop and continually run the program without the PIR?


----------



## theamzngq

yes, I believe if you jump pin 11 to uno ground, it should re-trigger after the delay programmed in the fourbanger sequence. Wiring a standard trigger to pin 11 is covered in the download in the uno_wiring.pdf file.

Back to your relays, there's been tons of talk in this forum about using a flyback diode on your relays (there's a flyback_diode.pdf file in the download). Many people have run their props issue-free without them, but they're so cheap and so easy to install that it may be worth it to install them to eliminate the possibly of future issues from electrically noisy devices (like solenoids) causing Uno resets and freezes. One poster said he just hardwired them to his solenoid valves, shrink tubing them right into the wiring so they're permanent.


----------



## Batbuddy

Yes I would just use the original design and add the diodes to your solenoids. If you want to run constantly the just jump pin 11 to ground. the red heat shrink has the diode under it. I just stripped off a little insulation from the wires and soldered the diode on and then wrapped it with heat shrink.


----------



## FrightRisk

*What IDE did you use to create FourBanger.exe?*

Hi,

Great work. I have been using the Arduino for years and the Raspberry Pi too. I have always just hand coded each prop in the C language for the microcontroller. You application that uses a timeline editor is really great. Can you tell me what you coded in? Visual Studio? RAD Studio? And what tools did you find to do the timeline control and the audio display control?

Fred


----------



## mroct31

Question?

Is there a way to clear out the program sequences on the Uno? I have 3 I'm working on and it seems that every time I upload an altered sequence it just gets added to the Uno instead of overwriting it as I would have thought. When I test them I have one that runs 5 sequences and another that runs 3 before they reset to ready to trigger mode which they do but not until they run those number of times.

What am I doing wrong?


----------



## Montclair

mroct31 said:


> Question?
> 
> Is there a way to clear out the program sequences on the Uno? I have 3 I'm working on and it seems that every time I upload an altered sequence it just gets added to the Uno instead of overwriting it as I would have thought. When I test them I have one that runs 5 sequences and another that runs 3 before they reset to ready to trigger mode which they do but not until they run those number of times.
> 
> What am I doing wrong?


The software isn't additive. It always overwrites the existing sequence when you upload. You were previously asking about constant triggering via pin 11. Are you doing that on these units?

I'd try re-doing the firmware on units that are acting strangely, then upload the sequence again. Formatting the SD card has also been shown to fix odd issues. Otherwise, I'd guess that if you're wired for constant triggering and it stops doing that 3, 5, or X many times, your Arduino may be getting reset due to Uno's lack of sufficient power to drive relays under load in certain situations.

Maybe provide some photos of your wiring so we can see what's going on.


----------



## mroct31

I did ask about triggering but not for any of the controllers I'm trying to set up now, so that's not the issue. I also haven't put any load on the relays as of yet.

It's very strange. I've uploaded the firmware again more than once and it doesn't seem to make a difference as the units don't change their program.

The other thing that seems to be happening is the PIR isn't found until I power the units on then off then back on again.

I've disconnected everything when uploading the firmware but as I said it doesn't seem to be "resettting" the board as I would have thought it would.

I'm including some pics of the wiring of the 3 units I'm working on and a video of what's going on.

Also, after I finished the video I created a new controller in Four Banger and uploaded the firmware with no relay settings and even like that it still runs the same routine 5 times?

I would say I have a bad Uno board but with it happening on 3 of them...unless i got a bad batch it must be something I'm doing or not doing I'd think?

https://postimg.org/image/syc15i7t7/
https://postimg.org/image/egetxigi3/
https://postimg.org/image/pu1d8pr0r/
https://postimg.org/image/o3ic789hn/
https://postimg.org/image/rd1crfmyz/
https://postimg.org/image/gu1d29kaz/


----------



## mroct31

I've been messing around with this all morning and what I think it might be is that it's running the sequence as many times as needed to complete the originally set 1:38 sequence time even if I move the red slider to a shorter amount of time before uploading all. 

I've tried it on all 3 and they all run however many number of times until the 1:38 has been reached then they reset.

Does that sound like a possibility and is there any way to change that if so?


----------



## Batbuddy

So I am not sure if this is the issue, but there are two versions of the firmware one that uses a5 for the PIR and the other that uses a6. I don't want to insult your intelligence, but want to verify all that you have done, so Do you have the latest version of the program from Mike's website? (http://buttonbanger.com/?page_id=37) if so have you uploaded the "...standalone_1.4.hex" firmware? if yes then i would suspect that there is something wrong with the PIR or its settings. Let us know if that helps.


----------



## mroct31

Yes I did get the 1.4 version from the site and started clean. I redid the sequences as I was running version 1.2 and I still have the same issue of the sequences repeating.
The Uno boards I have only go up to A5 which from what the docs say should be the one I connect the PIR to. 

At this point, at least when using the computer and powering the board via USB I still have the PIR not found until I power again, which always seems to work in finding the PIR and the sequence running that full amount of time before going into the re-trigger mode. From what the docs say the FPS setting has to do with the sequence time but in my software it's greyed out and I'm unable to change it other than move the red slider on the output bar? Which for me doesn't seem to change my repeat sequence as of yet.


----------



## Montclair

You have to right-click the controller to change the FPS. Don't right click the setting -- right click the name of the controller in the left panel.

However, I don't think that's your issue. What you describe about everything going to 1:38 and resetting sounds more likely. It sounds like the audio files you're using may have changed but not been updated. I do consistently encounter problems changing audio files with this software if I edit them and need to update.

I'd recommend manually updating the audio files for the project which it stores in C:\[wherever_you_installed_the_software]\Controllers\[project_name] and manually copying them over from your source folder, then opening the software up again and see if your audio is properly matching your event.

Also, make sure the red slider is at the end of the sequence.


----------



## Batbuddy

@_ mroct31, _Well that all sounds right then. As for the red timing marker. Lets say that you have a 30 second sequence on a 1:38 minute track with servo triggers going along the sequence for that amount of time and then you place the red marker at the end of those, at 30 seconds time, then when you perform the serial upload to the controller that should set it to a 30 second playback. The FPS setting just gives you less or more track length and doesn't necessarily control the end of the sequence. That is the job of the red marker. Hmm... Do you have several PIR's_?_ I have never had a PIR not be found in the first boot, and from watching your video it seemed to take too long to find it the second time as well even though it found it eventually. I am wondering if there is something wrong with the PIR it self or maybe with the trim pot settings on the PIR. Hence the question of having more to try in a effort to isolate the problem. Also if you would like I can try loading the design onto an UNO and see if I can replicate the issue you are having. If you can upload the saved controller file, audio and stuff I will give it a try on my hardware and that would help to see if it is a hardware or software issue. Private message me and I can send you my email if you would like to send me the files. Montclair's advice is also a good idea, but remember that the audio just plays. There is no Rx or communication back to the Arduino so it doesn't limit or drive the length of the arduino playback in the serial monitor.


----------



## Montclair

I watched the video. In it, you're running the 1.2 software, not the 1.4. Make sure you have the 1.4 software from buttonbanger.com and install that. I know you said you have it, but just make sure.

Next, without the software running, connect the Uno to the USB connection, then start the software. Without clicking anything else, immediately go Tools->Upload Firmware to Arduino. Make sure you select the correct port and the 1.4.hex file, and tick the Uno option, then click Upload.

After that's done, close that window and on the main window click the USB connector icon to connect to the unit. Even if it acts oddly, wait until it says ready then click the two opposing green arrows icon, and select Upload All.

Now see what happens.

Also, if you have to disconnect the USB again, make sure you click the USB cable icon to disconnect in the software -first- before you physically disconnect. Then reconnect the cable, refresh the list of ports by clicking the circular green arrows, then click the USB cable icon.

If you can, make a video of the entire procedure and make sure you include the timeline, and the data from the Selected Properties tab when you highlight the project name in the left screen, and the scare sequence beneath it, too.


----------



## mroct31

Yes I realized it was 1.2 in the video so I did move to 1.4. I even put it on a different computer just to see if that made a difference, but alas not yet,

I've tried all of you suggestions and I do seem to have the issue of the time of the repeating sequence less than the FPS time but I'm still having the sequence run more than once without being triggered on all 3 controllers but they still run a sequence 2 or 3 times as of last test. 
I did create a sequence that used the full 1:38 and it did only run once then reset for trigger like it should so not sure why when I have shorter sequences they don't work the same. 

I'll work on another video if you think that'll help but I'm going to keep messing around some and see if I can get anything else resolved.


----------



## Montclair

Try one with a shorter audio file. I know it sounds odd, but just try it. I had weird things happen when the audio file length changed after editing, with my sequence wanting to be longer than necessary.

You could also try "played states" option. It's the right most orange icon. Then run the sequence with the play button on the audio file and see if it functions correctly. It may be helpful in finding out what's going wrong.


----------



## mroct31

Oh I forgot to mention I'm nut using audio on 2 of these so not sure if that has anything to do with it? I'm just running a single relay board, PIR and Uno as that's all I need for what props these are going to operate.


----------



## mroct31

So I purchased a new Uno to test and make sure there was nothing wrong with the others I had and plugged it in, uploaded the firmware before anything else.

Then uploaded the test sequence and had the same issue with it playing twice before resetting for PIR triggering.
I then uploaded my own sequence and the same double sequence run before resetting.

Just to try something I set the FPS to 25 just to see what would happen and it ran perfect, one sequence then reset! Since the sequence time on that setting is 1:18 I figured that must have something to do with my issues.

So playing with the end of the sequence timer at different values, it appears 30 seconds is the minimum it can be set to in order for it not to trigger twice, in my case at least. 
My original time was set to 10 seconds total so I ran a few different triggering settings to see if it had to do with time after triggering a device or just time in general and it appears to be just time in general as I was triggering all over the 30 sec. window and it's still running just once.

So as it is now I have a minimum sequence of 30 secs, then a 15 sec. delay. So 45 secs. total between triggers I can live with!

Not sure if this is an issue for everyone but for now looks like it's working for me with these minimum time settings.


----------



## Batbuddy

Glad you got it figured out, it still seems to me that the potentiometers on the PIR may have some goofy settings perhaps, and that may be causing repeated triggering but it certainly sounds like a weird and unusual problem. I am glad you found a work around.


----------



## Montclair

I have two of these running events < 30 seconds and don't have these timing problems. I never had to mess with the FPS settings either. 

I really think your problem has to do with the event audio file. Even if you don't use the MP3 player, the software may be basing some of it's timing on the length of the audio file, if nothing more than initially. I'd redo them and try again.

Regardless, glad you found a workaround!


----------



## mroct31

OK tinkered around some more with these and it appears Batbuddy had the right diagnostic for this issue! 
I set the potentiometers on the PIR's all the way counter clock wise and when I did that, the repeating stopped. If I move them up at all, it starts again? Go figure.
Anyway, seems I have them all working as they should now with no minimum time needed nor repeating, so thanks for all the help!


----------



## Montclair

Man, that is really weird. I fooled with those pots and they did nothing for me. Glad you figured it out!


----------



## Batbuddy

Wow glad I was able to help. There are a lot of different PIRs out there, and I just had a hunch that they may be slightly different depending on the manufacturer.


----------



## wickedbeernut

Team Kingsley,

The thread to which you posted, "Four Channel Prop Controller Using Arduino (FourBanger)", is an Arduino thread. Let's start with Arduino.

Mike North has developed a wonderful $6 4-channel relay prop controller which is programmed using a PC-based graphical user interface,

http://buttonbanger.com/?page_id=37​
Mike has integrated his Four Banger prop controller with a $3 Catalex serial MP3 music player. I'd like to integrate the MedeaWiz Sprite with his prop controller using the same approach (i.e., serial communications). I'll need to hack Mike's Arduino firmware to accomplish this.

I'd like to use the Four Banger / MedeaWiz Sprite combination with a zombie containment unit. I don't imagine Mike's PC-based application recognizes MPEG files. I'll need to convert my MPEG file into a MP3 file in order to use Mike's graphical user interface to program the sequence.

Ideally, I'd like to integrate a Four Banger prop controller with two MedeaWiz Sprites and up to eight relays. However, for an extra $6, I can use two (synced) Four Banger prop controllers.

Of course, this all assumes the MedeaWiz Sprite represents the best-valued / best-suited HD media player. I'd like to hear from the broader HauntForum community in this regard. I know of at least one member who's developed custom firmware (with no blank screen or on-screen fonts / icons) for a $30 HD media player. Several members (including Mike) have leveraged a BrightSign media player. The BrightSign media players are economical if purchased used on eBay. I'd really like to base this effort on a commercially available HD media player. Is there anything out there than can compete with the MedeaWiz Sprite?

Wicked Beernut


----------



## mikkojay

*Why would TTL Not Suffice?*

Wicked Beernut,
After reading what you are looking to accomplish, why couldn't you just use pin 12 of the second Arduino to toggle the i-o pin of the video player?
If you were going to use pin 12 of the "slave" four banger to trigger multiple video players, you might use a single channel relay like those that may be found for $1 like this one.

Here is the info from the 


Code:


***Note about PIN 12*** This is an output that is normally high, but is pulled low momentarily when
the prop is triggered. You may run a wire from pin 12 to the TTL input (pin 11) of another FourBanger.
When your “main” controller is triggered (via PIR or TTL input), PIN 12 goes low for a few
milliseconds. This will trigger the “slave” controller at the same time.
This will effectively give you 8 channels for the price of an Arduino, or about $4.
You may even run a wire from pin 12 on the slave controller to yet another FourBanger, and on, and on,
… If doing this, it is advisable to have the grounds of the 2 Arduinos connected, so that they are at the
same potential.

Is there any reason this would not work?
If I get off my duff and finish testing the 8 channel version of this, you would be able to pull this off with one Arduino.

Thanks, Mike


----------



## wickedbeernut

Hi Mike,

I could use pin 12 to directly or indirectly trigger one or more media players. Each player would have a looping file (000.xxx) and a trigger file (001.xxx). All of the media players would be triggered at the same time. Not exactly what I'm looking for.

Alternatively, I could use a spare channel to trigger each media player. This way each media player could be triggered independent of one another and independent of the main Four Banger trigger (e.g., button, PIR, ...). Still not quite what I'm looking for.

I'm probably trying to use the Four Banger for something it wasn't intended. A zombie containment chamber isn't exactly a scare prop. There may or not be a trigger. You'd typically play two (non-looping) videos sequentially on the same media player (i.e., the "hold" and "action" readout videos on the small screen). The plan was to hack the Four Banger firmware to map a channel to a file (e.g., map channel 3 to file 003.xxx on D5, ...). 

Would you please consider making the pin associated with each channel configurable (D0 - D13, A0 - A5)?

I'll volunteer to beta test your "Eight Banger". We'll go from there.

Wicked Beernut


----------



## mikkojay

If someone wanted a custom pinout, I would just tell them to change it in the source and recompile/upload their own custom version. If I made it configurable, it would be just one more thing for people to overlook/mess up/be confused by . D0 and D1 for example are used for serial Rx and Tx. If someone tried to use those, it would break communication with the PC. If someone inadvertently set an output to pin 11, then triggered the controller (set to ground) you could potentially smoke the processor (see method 1 here).

If there was an alternate pinout for, say a relay shield, then I could absolutely see an alternate build just for that. Then this hex file could be aptly named and would be selectable in the dropdown selector of the firmware uploader utility.

Thanks, Mike


----------



## diamonddave_k

*Audio/Relay Delay*

Finished my first FourBanger finally and thank you Mike for all you have done! I'm having a little issue with my audio being delayed from what I actually see on screen in wave form causing my relays to trigger at the wrong points in the audio. My simple and fairly quick way to fix this temporarily was to move the trigger points up about 1.5-2 seconds from my original setting which doesn't make sense on screen but works in real time. Anyone have a real fix for this issue or experienced this before? Thanks!


----------



## mikkojay

Hi Dave, Did you download from the website in the last day or two? The reason I ask is because I put in another audio-related fix for the occasional "looping scare audio" issue.

If you have a delay when the audio track starts, you could always just compile the Arduino sketch yourself and make a couple small tweaks. You could in the Function play_sequence() at about line 572 add a delay:


Code:


void play_sequence()
{
    if (hi_sample == 0) return; //nothing recorded
    bool was_hot = IS_HOT;
    IS_HOT = false;
    digitalWrite(PLAY_LED, HIGH);
    digitalWrite(TRIGGER_OUT_PIN, LOW); //trigger output pin for daisy chain
    delay(100); // .1 sec should be sufficient
    digitalWrite(TRIGGER_OUT_PIN, HIGH); //put back
    _MA.PlayScare();
    Serial.println(F("Playing sequence..."));
    [COLOR=Yellow][B]delay(1000); //this is a one second delay to let the MP3 player catch up[/B][/COLOR]
    int play_sample = 0;
    for(int i = 0; i < SAMPLE_COUNT;i++)
    {
        play_sample++;

Or, as a plan B, you could wait a week or two for me to finish the next generation of this application that will include a media delay parameter (in hundredths of a second up to 255) as a configurable parameter. I am literally trying to bang out a bunch of docs and pics for it this evening.

Thanks, Mike


----------



## diamonddave_k

Hi Mike, No I downloaded it about 3-4 weeks ago now and your sample tracks worked fine so it must be something weird with my audio file I uploaded. Thank you for the info regarding the code and you're upcoming update I'll keep that in mind. I'll definitely use it on my second one which is still in pieces in my drawer. Thanks!


----------



## PirateDex

Dave, I ran into something similar when I was changing the FPS and not reloading the audio scare track. Not sure if this is something you may have done. My solution to that was to always start a new controller with the correct FPS before adding in the scare track. 
Mike thanks so much for the controller software and looking forward to the update.


----------



## diamonddave_k

That might actually be the problem PirateDex! I don't remember manually changing it but if it changed automatically due to my scare track being a lot longer than the sample scare track that may be the issue. I'll try the same audio on a new controller and see what happens. Thanks for the tip!


----------



## diamonddave_k

Tried reloading the audio in the FourBanger app and on the SD card on the current controller and tried on a new controller and no luck. I did notice however that my mp3 shows about 25 seconds but when imported to the FourBanger it goes to about 29 seconds for some reason. Maybe something to do with Audacity? But if it saves and reopens on my media player at 25 seconds not sure why it would extend to 29 in the FourBanger app.


----------



## David_AVD

Incorrectly reported run times can be a result of using VBR (variable bit rate) mp3 files. It would be best to use CBR (constant bit rate) type. There should be a setting in whatever audio editor was used to make the mp3 files.


----------



## diamonddave_k

Ok great! I'll check it out David. Thanks!


----------



## diamonddave_k

Problem solved! That was the problem David, it was automatically set to "preset" for the bit rate and when I changed it to "Constant" it worked perfectly. So much easier to work with the correct timeline. Thanks again!


----------



## mikkojay

*Timing*

Glad to hear you guys found the underlying issue & resolution! That will be a good one for the documentation.

Speaking of timing, I have been working all weekend on tweaking the timing of the new controller firmware. I generated a several minute metronome track in Audacity to help with testing- I wish I'd tried that a long time ago, it has really helped me to isolate some inaccuracies & fix them.

-Mike


----------



## diamonddave_k

Yes I'm glad David figured it out because I do plan on using Audacity for all of my audio and that would've caused me a lot of time and frustration having to guess and re-test the trigger point over and over and over again. Electric chair audio and relays are done....I think. I'm looking forward to your new firmware and adding another FourBanger to my Jack-In-The-Box....Clown-In-The-Box....whatever you want to call it. Thanks Mike!


----------



## David_AVD

Glad that solved the time reporting issue. I only knew about it because years ago I wrote a program for playing audio files (with cue list) for theatre plays, etc. The VBR vs CBR mp3 file was an issue for me at the time.


----------



## jdjuggler

I've got everything mostly working with the four banger set up. The odd thing is that the relays are activated in the ambient (resting) mode. They turn off when The Arduino is triggered. Basically, they are acting the opposite of what I would expect. Anybody have an idea on how to change this? 
Thanks,
JD


----------



## mroct31

Move the outside wire on whatever side of the relay you have it to to the other side?


----------



## David_AVD

As far as I know you want to untick (or tick if it's currently unticked) the HiOut boxes under the TTL tab of the program.


----------



## IMU

jdjuggler said:


> I've got everything mostly working with the four banger set up. The odd thing is that the relays are activated in the ambient (resting) mode. They turn off when The Arduino is triggered. Basically, they are acting the opposite of what I would expect. Anybody have an idea on how to change this?
> Thanks,
> JD


Sounds like you have NC/NO wires in the wrong slots but not sure without seeing your wiring or a quick video of your controller.


----------



## diamonddave_k

As David_AVD said tick or untick the HiOut tab(s) and that'll do the trick.


----------



## jdjuggler

The HiOut check box was the issue.
Thanks guys.
JD


----------



## samhayne

Hi guys, 

I did a quick search in the tread but i cant find the part list. (original link seem dead)

Anyone have it ?

Thanks


----------



## David_AVD

The parts list and instructions are in the software download from memory.


----------



## diamonddave_k

Sam Hayne you can go to button banger and go to the four banger section, scroll down to shopping list and at the end it has a link that says see "this doc" click on that and you should be good.


----------



## wickedbeernut

Make sure you check out Mike's OctoBanger. The OctoBanger has several key improvements over the Four Banger.

As the name implies, the OctoBanger supports up to eight outputs compared to four outputs with the Four Banger.

The OctoBanger is capable of triggering the MedeaWiz Sprite HD media player.

The OctoBanger fundamentally changes the way in which the sequence is stored, substantially increasing the maximum sequence length. Mike is currently restricting the maximum sequence length to five minutes. I believe the theoretical maximum is on the order of an hour. The frame rate is now variable.

The OctoBanger introduces the notion of a configurable "PinMapping". This allows the OctoBanger to work with different hardware configurations without having to modify the OctoBanger Arduino firmware. For example, the OctoBanger allows you configure a PinMapping of "Shield". This allows you to stack a $3.50 4-channel relay shield on top of an Arduino Uno eliminating the need for wires between the Uno and the shield.

The OctoBanger includes a "stereo" graphical representation of the left and right audio channels. The Four Banger graphical representation was monaural. The OctoBanger allows you to more accurately align the sequence with the left and right audio channels, independent of one another. In addition, you can use this feature to capture the sequence corresponding to DTMF tones encoded in the right audio channel (as with the Hi-Rez Designs Zombie Containment Unit video). This eliminates the need for a DTMF decoder.

I haven't captured all of the OctoBanger features, but this should give you a sense of the outstanding work Mike has done in improving on the already impressive Four Banger.

wbn


----------



## Scifideity

wickedbeernut said:


> Make sure you check out Mike's OctoBanger. The OctoBanger has several key improvements over the Four Banger.
> 
> As the name implies, the OctoBanger supports up to eight outputs compared to four outputs with the Four Banger.
> 
> The OctoBanger is capable of triggering the MedeaWiz Sprite HD media player.
> 
> The OctoBanger fundamentally changes the way in which the sequence is stored, substantially increasing the maximum sequence length. Mike is currently restricting the maximum sequence length to five minutes. I believe the theoretical maximum is on the order of an hour. The frame rate is now variable.
> 
> The OctoBanger introduces the notion of a configurable "PinMapping". This allows the OctoBanger to work with different hardware configurations without having to modify the OctoBanger Arduino firmware. For example, the OctoBanger allows you configure a PinMapping of "Shield". This allows you to stack a $3.50 4-channel relay shield on top of an Arduino Uno eliminating the need for wires between the Uno and the shield.
> 
> The OctoBanger includes a "stereo" graphical representation of the left and right audio channels. The Four Banger graphical representation was monaural. The OctoBanger allows you to more accurately align the sequence with the left and right audio channels, independent of one another. In addition, you can use this feature to capture the sequence corresponding to DTMF tones encoded in the right audio channel (as with the Hi-Rez Designs Zombie Containment Unit video). This eliminates the need for a DTMF decoder.
> 
> I haven't captured all of the OctoBanger features, but this should give you a sense of the outstanding work Mike has done in improving on the already impressive Four Banger.
> 
> wbn


 @wickedbeernut Did you ever find a cheaper commercially available HD Media Player that will trigger the bangers?

If not, can you confirm that the MedeaWiz Sprite HD does indeed trigger the bangers properly when used in conjunction with the Zombie Containment Unit prop videos?

I'm looking to build a Containment Unit and Monster in a Box 2.0 this year so a cheaper HD media player would be awesome if one has been found that will work.

Thx :jol:

S


----------



## wickedbeernut

Hi Scifideity,

Skim through my updated Wicked Stone Video Player Controller / Relay Decoder page,

http://wickedstone.com/Halloween/Html/relay_decoder.htm​
Please note the three different configurations.



> @wickedbeernut Did you ever find a cheaper commercially available HD Media Player that will trigger the bangers?


I want to be careful not to overload the term "trigger".

The Hi-Rez Designs Zombie Containment: ZIB Volume 3 - Breakout Edition includes the "zombie" video and optionally a pair of "analysis" videos. You need one video player for the "zombie" video and a second video player for the "analysis" videos. You need some means of coordinating the two video players. I'm referring to this as a video player controller. The video player controller may "trigger" the video players using a relay or control / monitor the video players through bi-directional serial communications. This requires triggerable (aka, triggering, triggered, ...) video players.

*Note*: A switch or motion sensor may be used to "trigger" the video player controller. The video player controller, in turn, triggers the video players.

I haven't found a cheaper commercially-available *triggerable* media player than the MedeaWiz Sprite.



> If not, can you confirm that the MedeaWiz Sprite HD does indeed trigger the bangers properly when used in conjunction with the Zombie Containment Unit prop videos?


I've demonstrated this using the Hi-Rez Designs Zombie Containment videos, a pair of MedeaWiz Sprite video players and my $10 Wicked Stone Video Player Controller / Relay Decoder,

http://wickedstone.com/Halloween/Html/ZCU.htm​
*Note*: The video player doesn't directly trigger anything. The audio channel of the video player containing the DTMF tones is connected to the relay decoder. It's the relay decoder which detects the DTMF tones and turns the relays on and off. The video player can't distinguish DTMF tones from music and sound effects.



> I'm looking to build a Containment Unit and Monster in a Box 2.0 this year so a cheaper HD media player would be awesome if one has been found that will work.


The question becomes ... do you need a *triggerable* video player?

Without the "analysis" videos, the Hi-Rez Designs Zombie Containment: ZIB Volume 3 - Breakout Edition requires one video player. There's no need for a video player controller. I believe the Hi-Rez Designs Monster In-A-Box 2.0 - Deluxe Edition requires one video player. The only reason you'd need a triggerable video player is if you wanted to trigger the video player using a switch or motion sensor. If you're willing to simply loop the "zombie" and "monster" video, you should be able to get by with an eBay $20 *looping* video player,

http://www.ebay.com/itm/172332000590​
I have one of these looping video players packed away, however, I haven't tested it with the Hi-Rez Designs Zombie Containment: ZIB Volume 3 - Breakout Edition "zombie" video and my Wicked Stone Relay Decoder.

Mike North's Four Banger and OctoBanger use different Arduino firmware than my Video Player Controller / Relay Decoder. This post probably doesn't belong in this "Four Channel Prop Controller Using Arduino (FourBanger)" thread, however, ...

The OctoBanger (Four Banger) can be used to synch up to eight (four) relays with a soundtrack containing DTMF tones in the left or right audio channel without the need for a relay decoder. I have described how to accomplish this near the bottom of my Wicked Stone Video Player Controller / Relay Decoder page (just prior to Appendix A).

wbn


----------



## Techster

I downloaded the software for the four buttonbanger arduino prop controller sometime ago, went to download it today and my browser gets, "service not available" is there another place to download the software - really loved this prop controller - hope the software is still available.

Thanks,
Mike


----------



## wickedbeernut

I E-mailed Mike North. I'll let you know what he says.

wbn


----------



## Techster

wickedbeernut said:


> I E-mailed Mike North. I'll let you know what he says.
> 
> wbn


back up thanks - and thanks to Mike


----------



## wickedbeernut

I'd like to respectfully ask everyone ... if you have a question regarding the Four Banger or the OctoBanger, please post your question here first. Leverage the collective knowledge of this forum.

wbn


----------



## jdjuggler

I have a need to program the sequence with the hanwood board. I have an old pic of how it should be connected. But, I could not find any notes on how to use the buttons to program the sequence. Does any one have notes on this? 
Thanks,
JD


----------



## wickedbeernut

What's the hanwood board?

wbn


----------



## David_AVD

The little PCB with channel and record buttons? Is that supported on this board?


----------



## wickedbeernut

The Four Banger firmware still contains references to the button module. However, I've never tested it. These references have been removed from the OctoBanger firmware. The OctoBanger is not a button banger. It must be programmed using the PC-based OctoBanger application.

wbn


----------



## mikkojay

jdjuggler said:


> I have a need to program the sequence with the hanwood board. I have an old pic of how it should be connected. But, I could not find any notes on how to use the buttons to program the sequence. Does any one have notes on this?
> Thanks,
> JD


Have you tried recording with your keyboard?
You can click the red record button (background turns green).








Then you can use the keyboard of your PC (number buttons, 1, 2, 3...) to record.
Start/stop the recording by pressing the space bar.

If you want to connect your prop and watch it react in real-time, you can do that too, just click the real-time button once the controller is connected.

Lastly, if you don't want to accidentally overlay a channel's data while recording, just double-click that column in the panel to the left of the timeline. The channel's background will become speckled- that means the channel is locked from editing.

The reason I got rid of the old button board was because hardly anyone used it. Many that did ended up with a bunch of spaghetti wiring that picked up interference, and likely caused reset issues and the like. After a while I just decided to punt and remove it.

Try it out, I don't see how someone couldn't program this way and do everything they did with the old button board. The approach is a little different, but the net result is very similar.

-Mike


----------



## Evil Olive Productions

I looked through the accompanied files in the octobanger downloaded files, but didn't see a detail list of parts or wiring diagram as with the four banger...my question being, with the new firmware for octobanger am i able to have 8 relay outputs from an arduino uno? or am i only able to achieve 8 outputs with a nano? asking as im only experienced (and have a stockpile) of Unos.

thanks!


----------



## wickedbeernut

Evil Olive Productions said:


> with the new firmware for octobanger am i able to have 8 relay outputs from an arduino uno?


Yes.

wbn


----------



## wickedbeernut

The OctoBanger supports two "pin mappings",

Default_TTL - Output Pins D2, D3, ..., D9​Shield - Output Pins D7, D6, D5, D4, D8, D9, D10 and D11​
The "Shield" pin mapping is meant to be used with a $2.75 4-channel 3 Amp relay shield,

http://www.ebay.com/itm/200963267434​
The relay shield uses output pins D7, D6, D5 and D4.

wbn


----------



## Lizzyborden

OK, I built a fourbanger last year but have yet to put it to use. I bought enough supplies to do at least three more. Now say I want to build an octobanger. Can I use two of the 4-channel relays I previously purchased or would purchasing an 8-channel relay make more sense? Also the download package for the octobanger shows a wiring diagram using a 4-channel relay shield. I can see where this would be more convenient by eliminating lots of wiring, but how would you wire an 8-channel relay? The same as you would the 4-channel? Also can anyone provide a link for a compatible 8-channel relay using the uno?

Sorry for all the questions but consider myself to be a novice when it comes to this sort of thing. I can install outlets, light switches, wire LEDs and solder but when it comes to this sort of thing, I'm a bit lost without a roadmap of sorts.:googly:


----------



## Lizzyborden

OK, found my answer to using the 4-channel relay on the octobanger.

Pulled the fourbanger out from last year and my computer wouldn't recognize the arduino. I upgraded to windows 10 since I first built the controller and suspect that might have created the problem. Finally found a driver that worked and it worked flawlessly via usb and 12v 1amp power supply. 

Went ahead and soldered header pins on the arduino for the PIR and pulled the male ends off two of the dupont wires and attached female ends to connect to the headers. Have other cables arriving but think the shorter cables will work nicely on this controller.

Now my question is about providing power to the relays. This controller will be primarily used for plastic and resin pumpkins lit by a single 7 watt nightlight bulb. I cannot find the amperage on the package, but thinking that I should be able to run at least three lights from each relay. Is it possible to also operate these from the same power supply as the controller? If using a separate power supply, can it be shared by all four relays?


----------



## nickolas43

Just built the four banger. Thank you so much. It's people like you that create great open source content that give me hope for humanity. I did have a quick comment/question. I tried using the Elegoo equivalent of the Arduino Uno, which should be exactly the same for all intents and purposes but could not get the firmware to upload to it. I bought a different brand (Inland) Uno at a local electronics store and it worked flawlessly. I'm still trying to figure out what I did wrong with the Elegoo but I may just return that one and stick with the Inland brand that worked for me. 

I'm a microcontroller novice but I do know that both were ATmega328 processors. Just throwing it out there in case other people experienced the same issue.


----------



## DarkOne

Could be a driver issue. The Uno should have a native USB chip on it but some of the clones use a CH340 or CH341 chip for serial communication. This has messed me up a few times in the past. If you look at the IC near the USB port on the uno, a longer rectangular chip is a CH340 and you will need to download the driver. A square chip with an atmel logo on it is the correct chip to work "out of the box". Both work, but the cheaper CH340 just takes another step.

Good luck!


----------



## sreynolds

Is there any way to trigger the control so it just keeps going off after it completes its cycle? With out a button or pir.


----------



## nickolas43

Thanks for the response DarkOne. It plugged it back in and tried again after my post and it worked. I think I just needed to download the Arduino program. 

sreynolds, you can turn the delay after trigger time down to zero but it would still need a trigger input.


----------



## DarkOne

I don't think Mikkojay put in an option to loop the sequence, I can't see it on the fourbanger or octobanger interface. A button or PIR sends out a 5v signal to trigger HIGH. 

Someone else please jump in if I am wrong, but could you run 5V into the trigger pin on the arduino (from the arduino) so it always reads HIGH and will just loop again after the set delay time?


----------



## Scifideity

I have the hardware for wickedbeernuts relay decoder w/ DTMF trigger http://wickedstone.com/Halloween/Html/relay_decoder.htm but he's gone MIA and I can't find the download for his Wicked Stone Configurator. I hope he's just busy or away for awhile and nothing bad has happened. Would the fourbanger or octobanger software/interface function just as well on that hardware? I"m going to use this for the Monster in a Box 2.0 so it's just going to be triggering a single piston and fog machine.

Thanks,


----------



## Redsand187

Forgive me for my ignorance.... I'm a complete idiot with this stuff. I thought I might give this a try as I happen to have a bunch of Arduino stuff that I bought at one time thinking I might use it someday after building a simple watering system.

I have some UNO R3's. I believe they are this one:








I've noticed some UNO R3's have the long microchip as shown here, whereas others have smaller square microchip in the center and 12 holes in the board between the ISCP and Analog pins.

I also have a 4 and 8 relay module:









Is this stuff going to work?

It seems all the reference info I've seen doesn't actually show this set up, but says an UNO is easier to use. Just using the same pinout should work?


----------



## KD6JIB

Those parts will definitely work. Arduino Uno's all use the same pinout.

There are some differences on the board itself, as Mikkojay mentions the extra holes are convenient.



Redsand187 said:


> Forgive me for my ignorance.... I'm a complete idiot with this stuff. I thought I might give this a try as I happen to have a bunch of Arduino stuff that I bought at one time thinking I might use it someday after building a simple watering system.
> 
> <snip>
> 
> Is this stuff going to work?
> 
> It seems all the reference info I've seen doesn't actually show this set up, but says an UNO is easier to use. Just using the same pinout should work?


----------



## Redsand187

So I got a 4 banger built. I want to use this for an electric chair that allows kids to throw the switch on their friends.

It seems there is just one input. Is there a way to stage it with multiple inputs? So I can have one switch activate an alarm and beacons, and then a second switch trigger the actual sander and strobes, possibly with a third switch in the middle to trigger the fogger and additional lights?

I've done switch plates before all using 120v with a spaghetti of wires. My goal with using a controller is to go to low voltage switches and clean up the mess of wires, with the possibility of taking advantage of programed timers.

I am now thinking a prop flow of something like:

Step 1 flip warning switch: Arduino activates beacon lights and plays alarm sound (sound: 



)
Step 2 press charging button: Arduino activates lightning tubes, plays charging/power up sound, triggers fog machine, turns on ready light. (sound: 



)
Step 3 flip giant knife switch: Arduino activates sander and strobes for 5 seconds (or until switch is pulled back up) turns off all functions when done.


----------



## Lizzyborden

Just wanted to share my experience with everyone in hopes that you do not have the same headache that I do. Back in August I ordered 5 sets of the DuPont cables from seller w-blue on eBay. I received the package in about two weeks which is pretty good since it came from China. Unfortunately when I opened the package, I discovered I only had two sets of the correct cables and 3 sets of female to female 1x2 cables. I snapped a picture and Contacted the seller, who advised me that correct cables would be sent immediately. I've been back and forth with the seller who now claims the replacement cables were sent on August 30 and provided me with a tracking number that shows no activity whatsoever. To make a long story short, I am still missing three sets of cables, my time to file a dispute with ebay has expired because I had good faith in the seller, but have filed a dispute with PayPal. According to the sellers feedback the same thing has happened to at least one other buyer. I am including a link below.

https://www.ebay.com/itm/1x-40Roots-20cm-Male-to-Female-Dupont-Cable-Jumper-Wire-for-Arduino-Breadboard/222416497814?_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D47227%26meid%3D507db94de2684f65bd4cf80cfbf1746c%26pid%3D100675%26rk%3D1%26rkt%3D15%26sd%3D222416497814&_trksid=p2481888.c100675.m4236&_trkparms=pageci%253A0e48f23c-b3df-11e7-8464-74dbd180c2f5%257Cparentrq%253A2e9df8ac15f0a9c4f259a12bfffe1422%257Ciid%253A1

I ordered from approximately 15 different sellers from China during the same time and have had absolutely no problems with any of the others.


----------



## diamonddave_k

Redsand it's not set up for two separate activations, or to stay on until switch is turned off. Sounds like for what you want you may need two prop controllers, one for the first activation and one for the second. 

I have the same basic set up you're talking about except my big knife switch activates one sequence which starts with a voice then red siren and alarm then electrocution. Although my prop doesn't have a live person sitting on it and I only have one manual activation.


----------



## DarkOne

This is probably better done just by programming the arduino to read the switches and then turn on the relays as needed. Use the "Button" library with the internal pullups and delay function. If you need the second and third switches to be recognized while the previous sequence is still playing, you can't use delay in the timing of your props. Take a looke at the "blink without delay" sketch in the examples of the Arduino IDE. 

You haven't wasted any time building this controller. You just need to add two more switches and program it without using Mikkojays interace.


----------



## David_AVD

You could always use 5V to switch some of the relays that control the items you don't want to have the banger control.


----------



## DarkOne

That would work for step 3, but you'd still need 2 controllers for the other steps that require audio and timing on the other props


----------



## Redsand187

All good workable solutions. Thanks guys, I'll see what I can put together. I have enough Arduino stuff around to make a couple more controllers if I need to.


----------



## Montclair

A comment was left on my YouTube channel that the relays recommended for this project have an engineering flaw that causes the Arduino resets which plagued me on my electrocution prop last year. Something to do with the grounding path. The comment poster said that he was having the same reset issues and corrected the issue by correcting the grounding path. Unfortunately, he hasn't responded to my request for more details.

So, instead of needing a separate power supply for the relays, it may be as simple as not purchasing these particular relays.


----------



## MBrennan

Montclair said:


> A comment was left on my YouTube channel that the relays recommended for this project have an engineering flaw that causes the Arduino resets which plagued me on my electrocution prop last year. Something to do with the grounding path. The comment poster said that he was having the same reset issues and corrected the issue by correcting the grounding path. Unfortunately, he hasn't responded to my request for more details.
> 
> So, instead of needing a separate power supply for the relays, it may be as simple as not purchasing these particular relays.


I posted this on the other thread, but it relates to this.

I was running the FourBanger on a Nano driving two separate 4 channel relays in parallel (one signal out of each channel from the Nano, split to run each relay board separately). Ran like a champ all year long.

Today I upgraded to the Octobanger, re-wrote the same program in the Octobanger software (basically started from scratch including loading the firmware and the audio tracks) to utilize the eight channels. After finally figuring out the outputs, got it to run, and about half way thru, the relays reset to the beginning and started over, but the scare track runs to the end and doesn't go back to the ambient track - just silence - meanwhile the relays are clicking away to about halfway thru, etc. Never ends.

I don't think it's an issue with the grounds as it was working prior to changing, and I didn't change any of the power wiring - just switched the outputs.

Anyone have any ideas?


----------



## DarkOne

Do you have a diagram of how you wired it up? Are you powering the relays from the Arduino or from a power supply? How many relays are on at the same time when it resets?

The Nano can only supply 200mA total through all pins, 40ma max from each pin, If powering the relays from the Arduino directly and not through the optocouplers, you may be drawing too much current.


----------



## MBrennan

DarkOne said:


> Do you have a diagram of how you wired it up? Are you powering the relays from the Arduino or from a power supply? How many relays are on at the same time when it resets?
> 
> The Nano can only supply 200mA total through all pins, 40ma max from each pin, If powering the relays from the Arduino directly and not through the optocouplers, you may be drawing too much current.


DarkOne, thanks for the reply. You have a good point about the power supply. Normally, the power is supplied from the wall wart to the relays and Arduino in parallel, i.e. the relay power is not coming off the Arduino. However last night while testing, I didn't have the wall wart hooked up, only the USB from the laptop was providing the power. Therefore the relays WERE getting powered off the Arduino. I will have to test it again later as I didn't bring the wall wart home from the haunt location.

I'll report back the result - but there IS hope. Thanks again!


----------



## MBrennan

Well, no progress.

I hooked up my 5v 1.5 amp wall wart and triggered the sequence. Got most of the way through and the sequence reset to beginning while the remainder of the scare track played. When scare track ended, it didn't go back to the ambient track, and the relays continued clicking away. So I don't think its an issue of power. 

And the fact that everything worked fine while running the Fourbanger with both relay boards off of the Arduino (each channel off the Arduino split to each board) confuses the issue.

I'll try to get a video of it in action later.


----------



## MBrennan

Here is the way the power is wired.

I actually ran it before off the USB jack when using the Fourbanger (it worked both ways) with no problem, but NOT with the Octo.

The only thing I changed wiring wise were the Control pins to the relays and the Serial connection to the MP3 player.

The only thing left to do is completely isolate the Nano (run it off the USB jack) and the relays (from the 5v power jack).

Anyone have any other suggestions?


----------



## diamonddave_k

Have you tried a higher voltage power supply like a 12v to the nano? Just curious if that would help the problem.


----------



## MBrennan

diamonddave_k said:


> Have you tried a higher voltage power supply like a 12v to the nano? Just curious if that would help the problem.


Not on this build. I did have some issue with that on a different build. The 12 volt supply was more like 18 volts, and the Nano didn't like it. I used a 9 volt and it was better.

On this one, if I power it thru the Nano USB, its getting USB voltage (5 v), which then goes to the relays.
If I power it from the external jack, I have a LM7805 regulator in line, so whatever I put in (5-35 volts), only 5 volts comes out, which is so I dont get more than 5v to the relays. Make sense?

I even tried powering the relays from the jack, and the Nano from the USB (i.e.separated) and got no relay action.

Then I put it back to the original configuration and made a test sequence which ran up the channels individually, then all ON, then back down individually, all On. Worked fine!?

I just got done making a NEW sequence (thinking maybe the first got corrupted) and it failed in essentially the same spot.

At a bit of a loss. The whole sequence is only 1:09 long, 230 frames.


----------



## diamonddave_k

Hmm interesting. I've only used the fourbanger so far and actually just finished another. I guess I just never had the need for 8 relays but it's good to hear how everyone is trying to work through the issues. Sorry, not much help on this one but good luck.


----------



## DarkOne

When everything worked fine in your test sequence, did you have all your props hooked up, or just firing the relays? Are the props being powered from their own power source or are you getting power from the arduino?

I think the reason you get nothing when powering the arduino from USB and your relay board from another source is that you need a common ground. The jumper on the relay is configurable to use external power, it's just confusing on how it is supossed to be and I don't have the same relay module you do for testing.


----------



## MBrennan

Thanks for the replies!

I was only firing the relays. The relays are switching LINE voltage, and each board is powered from a separate circuit. But I didn't have them plugged in while testing. So the Nano is only powering the relays - no props.

The only thing that I can think is that at some point the series of fast switching on and off (which only last a few seconds) is too much for the Arduino, although the same sequence works fine with the Fourbanger sequence. And my test sequence that has ALL the relays on at the same time works fine.

I was going to post more pics, but I found out my Photob--- account is locked, and I havent figured a workaround for that yet...

I put it back to the Fourbanger setup last night and it still works. Im going to try "Dumbing Down" the Octo sequence a bit and see if I still have the issue.

I did notice the difference between the Four and Octo in regards to the Media Serial Pin and Trigger Pins - so I'm not sure what is causing the reset issue - and since I'm not an expert on reading the code, it is a real head scratcher.

I'll keep moving forward with building the rest of the prop in hopes I can get the extra channels working, but knowing I have a fallback plan!

Again, thanks for the replies - all help is much appreciated! :jol:


----------



## MBrennan

As a possible work around, I know that the Fourbanger could be used to trigger another Fourbanger (via daisy-chaining) using pin 12 to pin 11 on the second, but I don't know the specifics.

I would assume (I know, bad idea) that the second 'banger would have to have its own sketch programmed like the first--Hmm. Thinking via keyboard.

Anyone tried this?


----------



## David_AVD

Try a proper regulated 5V power supply instead of using the 7805.

If you don't use bypass capacitors on the 7805 they can be unstable. That may be the source of your problem.


----------



## DarkOne

That's a good point. An unstable Powe supply could be the issue. I've used 7805 in the past but always used the caps. If you're not using the optocouplers on the relay boards there could be a possibility of a spike coming back to the arduino. I have had this happen with a 2 channel relay board. Blew out the serial communication chip on two nanos.


----------



## Redsand187

So I got what I wanted done for switching. 3 Switches, 3 Relay outs. Now, for sound, I'm not too sure. It seems like the codes I see for the YX5300 have all sorts of extra stuff that is likely not needed. The banger software, at least from what I see, doesn't let me see the actual code written. Obviously, I can't use the software to program my controller, since I am using 3 inputs.

I just want switch 1 to trigger track 1, switch 2 to trigger track 2. Any examples or tutorials that anyone could point me towards would be great!


----------



## DarkOne

You need all that extra stuff for making the Catalex board to work. Ok, maybe not all of it just to play a couple files, but it's best just to leave the rest in case you want to use pause, or controlling volume up and down with software.

Try this as a start. I setup 3 buttons to the analog pins. The loop code only reads the first button and plays the first audio file. I mashed this together using code from other projects I've done, but haven't tested it. Try it as it is with a button hooked up to A2 and if that works, add your other code. Don't forget to download the Software Serial, Pushbutton and Button libraries. I don't think I"m actually using the Button library, but my code had it in it.



Code:


/***********************************************************/
//Demo for the Serial MP3 Player by Catalex
//Hardware: Serial MP3 Player *1
//Board:  Arduino UNO R3
//IDE:    Arduino-1.0
//Function:  To play the first song in the micro sd card.
//Store: http://www.aliexpress.com/store/1199788
//          http://www.dx.com/
#include <SoftwareSerial.h>
#include <Pushbutton.h>

#define BUTTON_PIN A2//input for button1
#define BUTTON_PIN2 A3//input for button2
#define BUTTON_PIN3 A4//input for button3

Pushbutton button1(BUTTON_PIN);
Pushbutton button2(BUTTON_PIN2);
Pushbutton button3(BUTTON_PIN3);

#define ARDUINO_RX 5//should connect to TX of the Serial MP3 Player module
#define ARDUINO_TX 6//connect to RX of the module
SoftwareSerial mySerial(ARDUINO_RX, ARDUINO_TX);
static int8_t Send_buf[8] = {0} ;

#define CMD_SET_VOLUME 0X06
#define CMD_PLAY_W_INDEX 0X08
#define CMD_SEL_DEV 0X09
  #define DEV_TF 0X02
#define CMD_PLAY 0X0D
#define CMD_PAUSE 0X0E
#define CMD_SINGLE_CYCLE 0X19
  #define SINGLE_CYCLE_ON 0X00
  #define SINGLE_CYCLE_OFF 0X01
#define CMD_PLAY_W_VOL 0X22

int Volume0 = 0X00;
int Volume2 = 0X01;
int Volume4 = 0X03;
int Volume6 = 0X05;
int Volume8 = 0X07;
int Volume10 =0X09;
int Volume12 = 0X0B;
int Volume14 = 0X0C;
int Volume16 = 0X0E;
int Volume18 = 0X0F;
int Volume[] = { Volume18, Volume16, Volume14, Volume12, Volume10, Volume8, Volume6, Volume4, Volume2, Volume0};

void setup() 
{
  Serial.begin(9600);//for debugging, seeing results of ping sensor
  mySerial.begin(9600);
  delay(1000);//Wait chip initialization is complete
 Serial.println ("Initialization complete");
 
}
    
  
void loop() 
{
 if (button1.getSingleDebouncedPress())
    {
      Serial.println("button activated");
      sendCommand(CMD_PLAY_W_VOL, 0X0F01);//play the first song with volume 15 class (01 is track number, 0F is volume in hex)
      
    } 
}

void sendCommand(int8_t command, int16_t dat)
{
  delay(20);
  Send_buf[0] = 0x7e; //starting byte
  Send_buf[1] = 0xff; //version
  Send_buf[2] = 0x06; //the number of bytes of the command without starting byte and ending byte
  Send_buf[3] = command; //
  Send_buf[4] = 0x00;//0x00 = no feedback, 0x01 = feedback
  Send_buf[5] = (int8_t)(dat >> 8);//datah
  Send_buf[6] = (int8_t)(dat); //datal
  Send_buf[7] = 0xef; //ending byte
  for(uint8_t i=0; i<8; i++)//
  {
    mySerial.write(Send_buf[i]) ;
  }
}


----------



## IMU

MBrennan said:


> As a possible work around, I know that the Fourbanger could be used to trigger another Fourbanger (via daisy-chaining) using pin 12 to pin 11 on the second, but I don't know the specifics.
> 
> I would assume (I know, bad idea) that the second 'banger would have to have its own sketch programmed like the first--Hmm. Thinking via keyboard.
> 
> Anyone tried this?


I've done this and yes you'll need to upload a sketch to the second controller. It works well for my project.


----------



## Redsand187

DarkOne said:


> You need all that extra stuff for making the Catalex board to work. Ok, maybe not all of it just to play a couple files, but it's best just to leave the rest in case you want to use pause, or controlling volume up and down with software.
> 
> Try this as a start. I setup 3 buttons to the analog pins. The loop code only reads the first button and plays the first audio file. I mashed this together using code from other projects I've done, but haven't tested it. Try it as it is with a button hooked up to A2 and if that works, add your other code. Don't forget to download the Software Serial, Pushbutton and Button libraries. I don't think I"m actually using the Button library, but my code had it in it.
> 
> 
> 
> Code:
> 
> 
> /***********************************************************/
> //Demo for the Serial MP3 Player by Catalex
> //Hardware: Serial MP3 Player *1
> //Board:  Arduino UNO R3
> //IDE:    Arduino-1.0
> //Function:  To play the first song in the micro sd card.
> //Store: http://www.aliexpress.com/store/1199788
> //          http://www.dx.com/
> #include <SoftwareSerial.h>
> #include <Pushbutton.h>
> 
> #define BUTTON_PIN A2//input for button1
> #define BUTTON_PIN2 A3//input for button2
> #define BUTTON_PIN3 A4//input for button3
> 
> Pushbutton button1(BUTTON_PIN);
> Pushbutton button2(BUTTON_PIN2);
> Pushbutton button3(BUTTON_PIN3);
> 
> #define ARDUINO_RX 5//should connect to TX of the Serial MP3 Player module
> #define ARDUINO_TX 6//connect to RX of the module
> SoftwareSerial mySerial(ARDUINO_RX, ARDUINO_TX);
> static int8_t Send_buf[8] = {0} ;
> 
> #define CMD_SET_VOLUME 0X06
> #define CMD_PLAY_W_INDEX 0X08
> #define CMD_SEL_DEV 0X09
> #define DEV_TF 0X02
> #define CMD_PLAY 0X0D
> #define CMD_PAUSE 0X0E
> #define CMD_SINGLE_CYCLE 0X19
> #define SINGLE_CYCLE_ON 0X00
> #define SINGLE_CYCLE_OFF 0X01
> #define CMD_PLAY_W_VOL 0X22
> 
> int Volume0 = 0X00;
> int Volume2 = 0X01;
> int Volume4 = 0X03;
> int Volume6 = 0X05;
> int Volume8 = 0X07;
> int Volume10 =0X09;
> int Volume12 = 0X0B;
> int Volume14 = 0X0C;
> int Volume16 = 0X0E;
> int Volume18 = 0X0F;
> int Volume[] = { Volume18, Volume16, Volume14, Volume12, Volume10, Volume8, Volume6, Volume4, Volume2, Volume0};
> 
> void setup()
> {
> Serial.begin(9600);//for debugging, seeing results of ping sensor
> mySerial.begin(9600);
> delay(1000);//Wait chip initialization is complete
> Serial.println ("Initialization complete");
> 
> }
> 
> 
> void loop()
> {
> if (button1.getSingleDebouncedPress())
> {
> Serial.println("button activated");
> sendCommand(CMD_PLAY_W_VOL, 0X0F01);//play the first song with volume 15 class (01 is track number, 0F is volume in hex)
> 
> }
> }
> 
> void sendCommand(int8_t command, int16_t dat)
> {
> delay(20);
> Send_buf[0] = 0x7e; //starting byte
> Send_buf[1] = 0xff; //version
> Send_buf[2] = 0x06; //the number of bytes of the command without starting byte and ending byte
> Send_buf[3] = command; //
> Send_buf[4] = 0x00;//0x00 = no feedback, 0x01 = feedback
> Send_buf[5] = (int8_t)(dat >> 8);//datah
> Send_buf[6] = (int8_t)(dat); //datal
> Send_buf[7] = 0xef; //ending byte
> for(uint8_t i=0; i<8; i++)//
> {
> mySerial.write(Send_buf[i]) ;
> }
> }


Not getting any sound. The serial data shows the button is activated, but no sound. The TX light on the Arduino lights up for a second when I ground A2.


----------



## MBrennan

IMU said:


> I've done this and yes you'll need to upload a sketch to the second controller. It works well for my project.


Thanks!
I may have to try this later, but for now, I reverted back to the original Fourbanger configuration as a fallback and made some upgrades from last year so all is not lost!

As far as the Power Supply, I do use a regulated 5v 2.5 amp power supply, and the 7805 was an add on AFTER I started having this issue. I've since reverted back to the original working configuration, and will continue to work on this!

I'll post the results in the interest of hopefully contributing to this great project.

Thanks again everyone and Happy Haunting!


----------



## DarkOne

Just a few things to check:

Do you have the Tx on the arduino hooked to the Rx of the Mp3 player and vice versa? Do any LEDs on the Mp3 module light up when it should be playing? Are your audio files inside a folder on the SD card (they shouldn't be)?


----------



## diamonddave_k

Ugh, I'm having that reset issue on my last minute set up. The one montclair was talking about with a possible ground on the relay not being correctly made. Anyone figure out a fix on this yet? I actually only need one relay working. Don't have time to order a new one obviously so any work around would be great. Thanks!


----------



## Redsand187

DarkOne said:


> Just a few things to check:
> 
> Do you have the Tx on the arduino hooked to the Rx of the Mp3 player and vice versa? Do any LEDs on the Mp3 module light up when it should be playing? Are your audio files inside a folder on the SD card (they shouldn't be)?


Files aren't in a folder. TX and RX are connected to the corresponding terminals. Just 1 led on the Mp3 board is lit up at all times. (just indicating power I assume)

The Arduino's TX led turns on for ~1 second when the audio should be triggered.

One thing I noticed, but I am not sure about is the code defines RX as 5 and TX as 6 but on the UNO RX is pin 0 and TX is pin 1. I haven't tried switching the define to 0 and 1, but I did try putting 5 to RX on the Mp3 and 6 to TX, that didn't work, as I suspected. Would changing the code to:


> #define ARDUINO_RX 0
> #define ARDUINO_TX 1


vs what it is currently


> #define ARDUINO_RX 5//should connect to TX of the Serial MP3 Player module
> #define ARDUINO_TX 6//


Do the trick? I figure I'll try that later, since it's already 2am... I probably should go to bed.


----------



## DarkOne

Try adding this to the "void setup" portion of the code just for testing.

sendCommand(CMD_PLAY_W_VOL, 0X0F01);

That should play the audio file once without having to push a button. If that doesn't work, something may be wrong with the Mp3 player side of things.

Defining the TX and RX as pins other than 0 and 1 is for the Software Serial to work. The arduino's hardware serial is connected to pins 0 and 1 and cause problems when trying to upload code to the arduino if you have anything else hooked up to them.

0 and 1 does things you may not want it too because the information it's sending back to the Serial Monitor goes through these pins. It's best to avoid using them at all. If your code was just simply turning on LEDs or relays with no other Serial devices like the Mp3 player or sensors you wanted to check with the Serial Monitor, you'd be fine.


----------



## DarkOne

I was going to test this today at work, but I don't have a microsd card to put in the catalex module. I hope you get this figured out before tonight!


----------



## theamzngq

*Octobanger performs thousands of triggers flawlessly!*

Hey everyone, just want to report back that all my octobangers performed flawlessly last night!! So happy about that, and I cannot thank Mike enough for all his work in making these controllers so successful. I had 6 props run by octobangers (almost 8 but ran out of time) and each one triggered and ran without fail for two nights now.

I have to say that the key for me was soldering in the flyback diodes on all solenoids. I didn't do it last year, and even though I had ground opto-isolation for everything, I was still having issues. This time around, all old and newly built props got diodes! I also switched to using a single power supply for relays, Uno, and solenoids for the convenience of it and everything worked perfectly.

There was a local news piece aired about our block, which swelled our visitor count to nearly 10k, never saw the block that full). Just for our backyard haunt alone, we counted 2135 people passing through. That is many thousands of triggers in one night! If that isn't a testament to the octobanger's reliability, I don't know what is. I've posted a full live walkthrough from last night here:


----------



## theamzngq

In case anyone wants to build one, here's a closer look at one of the new props this year, the classic Monster in a Box:
Part 1: 




Part 2:


----------



## theamzngq

and finally, a look at the crazy crowd we had that night:


----------



## IMU

*Building Octobangers*

I'm not sure if I should post here or start a new thread so Mods, feel free to move this if it needs to be.



theamzngq said:


> Hey everyone, just want to report back that all my octobangers performed flawlessly last night!!


I know Mike posted a wiring diagram with the four channel controllers when they first came out. I have been looking at his website for the past several months but never did see anything like that for the octobangers. Did that ever come out and I missed it or is it wired the same way as the 4 channel but with an 8 channel relay board?

Mike was very kind with answering all my stupid questions and I don't want to bother him again. I'd like to move up to the 8 channel controllers now that I am fairly comfortable building the smaller ones.


----------



## DarkOne

Did you look at his Sample Project Document or watch the second video on the octobanger page? That should pretty much explain the wiring.


----------



## IMU

DarkOne said:


> Did you look at his Sample Project Document or watch the second video on the octobanger page? That should pretty much explain the wiring.


Actually I did when they first came out and I did again recently. I did download and look at the Sample Project PDF as well. Still didn't answer my questions or show a wiring diagram of how to wire an 8 channel relay module so I guess I'm going to have to wing it. Thanks.


----------



## Lizzyborden

IMU, I've wondered the same thing. Still tinkering with the fourbanger and not as technologically gifted as some of you, so the answer could be staring me in the face and I'm just missing it.


----------



## IMU

Lizzyborden said:


> IMU, I've wondered the same thing. Still tinkering with the fourbanger and not as technologically gifted as some of you, so the answer could be staring me in the face and I'm just missing it.


I have the parts ordered to make the octobanger so when I get it working I'll let you know. I think I have it sorted out and it wasn't as obvious to me anyway.


----------



## diamonddave_k

Having an issue with a relay. I assume I have was having the ground issue Montclair mentioned with a relay for a fourbanger that kept re-setting my Arduino. I just got around to replacing it so I just disconnected all the wires to the pins and put them directly on the new relay. Tested with the manual trigger 5 times, worked perfectly. Added the high voltage wiring to the relays and tested again, nothing. Can't trigger it manually and I disconnected the pir so I can't test that yet.

I think when I originally tested the new relay the "L" led would blink then turn off when ready, now it blinks then stays solid. Anyone have any ideas? Thanks!


----------



## diamonddave_k

Haven't been on in a few months and kind of surprised to see no new posts on this thread. Is anyone still building these?


----------



## MBrennan

diamonddave_k said:


> Haven't been on in a few months and kind of surprised to see no new posts on this thread. Is anyone still building these?


I haven't been on in a while either, and am going to start working on the Octo-banger hopefully next week. I'm waiting for some SSR's to make it here from China.

I was having issues back before Halloween when I tried converting to an Octo - didn't work and I went back to the original FourBanger.

I don't have any advice on you issue, but if I come across something similar, I'll let you know.


----------



## diamonddave_k

MBrennan said:


> I haven't been on in a while either, and am going to start working on the Octo-banger hopefully next week. I'm waiting for some SSR's to make it here from China.
> 
> I was having issues back before Halloween when I tried converting to an Octo - didn't work and I went back to the original FourBanger.
> 
> I don't have any advice on you issue, but if I come across something similar, I'll let you know.


I actually fixed the issue with a fly back diode as Montclair did so I'm all good there, just noticing the lack of activity on here since the takeover I guess. Good luck with the octo though!


----------



## MBrennan

diamonddave_k said:


> I actually fixed the issue with a fly back diode as Montclair did so I'm all good there, just noticing the lack of activity on here since the takeover I guess. Good luck with the octo though!


Thanks! I'll let you know how it goes.

I may have questions


----------



## Master Diablo

*Great Idea*

please forgive me if you covered this in a post already. I need something with a longer run time and more outputs do you have a idea for that with out going to a boobox?


----------



## Batbuddy

How many outputs and how long of a run time are you looking for?


----------



## Techster

Forgot who had troubleshot the 5vdc relay issue on youtube with the four bangar, but I was having reset issues with my Arduino, seemed like it would reset during the sequence. So I added a small buc converter to power the relay seperately this converter leached the 5VDC from the 12VDC. After I did this I no longer had any interruptions with the sequence. I am switching 120VAC to different props throughout the sequence.

https://www.amazon.com/Qunqi-MP1584...ocphy=9007777&hvtargid=pla-446629190047&psc=1


----------



## greenjeep79

absolutely love this write up and explanation. didnt want to spend $200+ on simple prop controller. this is just what I need Thank you for your great post.


----------



## theamzngq

What "takeover" are you referring to?


----------



## David_AVD

theamzngq said:


> What "takeover" are you referring to?


I'm guessing the sale of this forum a while back?


----------



## Halloweenholland

My name is Martijn from Holland I've been since me youth 
Interested in halloween love 
The party is also about fanned to Netherlands at least it starts to come I have a few movies seen on YouTube and also the schedule of the four banger I can unfortunately not find him on this forum now I'm still trying to figure out how I a solenoid valve can make it work on an ARDUINO I hope you can help me feather 
Regards Martijn ps Sorry for my bad English.


----------



## Batbuddy

Halloweenholland said:


> My name is Martijn from Holland I've been since me youth
> Interested in halloween love
> The party is also about fanned to Netherlands at least it starts to come I have a few movies seen on YouTube and also the schedule of the four banger I can unfortunately not find him on this forum now I'm still trying to figure out how I a solenoid valve can make it work on an ARDUINO I hope you can help me feather
> Regards Martijn ps Sorry for my bad English.


Martijn,
Buttonbanger.com is the website where the files for this project are hosted. If you follow the instructions you should be able to have the solenoid work perfectly. If you have confusion about instructions, then come back here and we will do our best to answer your questions. In order to be able to help you, do your best to explain the specific issue you are having. That way we can know what you need better. Good luck.


----------



## ChrisScott126

It may have already been said somewhere in the 117 pages of this post, but I wanted to relay an experience I had with the Octobanger running on Arduino Unos.

I have a couple of different kinds of Unos and there was one that would repeatedly trigger whether I had a PIR hooked up or not. After some research, I tried running a 100k Ohm resistor between the trigger pin and ground creating a pulldown resistor and viola, no more erroneous triggers. It seems some Unos are more prone to picking up electrical interference than others and this pulldown resistor will fix that issue.


----------



## diamonddave_k

Yes sir, maybe it was just the time of year.


----------



## sreynolds

ChrisScott126 said:


> It may have already been said somewhere in the 117 pages of this post, but I wanted to relay an experience I had with the Octobanger running on Arduino Unos.
> 
> I have a couple of different kinds of Unos and there was one that would repeatedly trigger whether I had a PIR hooked up or not. After some research, I tried running a 100k Ohm resistor between the trigger pin and ground creating a pulldown resistor and viola, no more erroneous triggers. It seems some Unos are more prone to picking up electrical interference than others and this pulldown resistor will fix that issue.


do you have a picture of this


----------



## Halloweenholland

thank you I ordered the parts but you can also download the software from buttonbanger ,??


----------



## diamonddave_k

Halloweenholland said:


> thank you I ordered the parts but you can also download the software from buttonbanger ,??


 Yes and the required firmware is in the software as well.


----------



## sreynolds

How do you connect a push button to the octobanger? Does any one have a diagram of this?


----------



## ChrisScott126

sreynolds said:


> do you have a picture of this


I do not, but it literally is nothing more than your trigger wire (PIN 11 in Default_TTL or PIN A0 in Shield) and GND having a resistor wired in between them.

To accomplish this in Shield configuration solder one end of a 100k Ohm resistor to the wire plugging into PIN A0 and the other end into one of the GND locations on that side of the board. Or if in Default_TTL configuration, solder one end to the wire plugging into PIN 11 and the other end into the GND location on that side of the board.

The resistor needs to be near the board rather than at the PIR.


----------



## sreynolds

ChrisScott126 said:


> sreynolds said:
> 
> 
> 
> do you have a picture of this
> 
> 
> 
> I do not, but it literally is nothing more than your trigger wire (PIN 11 in Default_TTL or PIN A0 in Shield) and GND having a resistor wired in between them.
> 
> To accomplish this in Shield configuration solder one end of a 100k Ohm resistor to the wire plugging into PIN A0 and the other end into one of the GND locations on that side of the board. Or if in Default_TTL configuration, solder one end to the wire plugging into PIN 11 and the other end into the GND location on that side of the board.
> 
> The resistor needs to be near the board rather than at the PIR.
Click to expand...

Thank you for the info and the time to answer my stupid question&#128123;


----------



## Bugman1400

The biggest issue I have with the Octo-banger is that the Ambient mp3 stops, then the Scare mp3 plays, and then the Ambient mp3 starts from the beginning. I could mix the two with Audacity but, I don’t you can a long Scare mp3. Anybody got an idea of how I could have a long Ambient mp3 (ie 20mins) and trigger a Scare at certain places without the Ambient starting all over again?


----------



## Bugman1400

Are there no other software programs that can handle the longer ambient mp3s and dual mp3 modules?


----------



## Batbuddy

Its more of a combination of soft and hard ware. The sprite media player can handle long tracks, but doesn't include an output trigger. You can program an arduino/mp3player(hardware) to play a track that is as long as you want, but I don't know of an existing program (software) for this purpose.


----------



## Scifideity

Hi guys,

I need some help wrapping my head around the Octobanger config and setup. I built a Monster in a Box 2.0 last year but had some monitor issues last minute as I was starting to get to the Octobanger setup so shoved it to the back burner til this year. I was originally going to use wickedbeernut's solution but his configurator program download link went AWOL, as did he (hope he's ok), so I shifted to Octobanger.

In the Octobanger config it lets me start a new controller and select Video when I create the Controller. Then I set the Ambient MP3 and Scare MP3. It looks like the only purpose of telling Octobanger the Controller is a Video is to send the trigger out the Media pin.

I've repurposed the Living Portrait Instructable and have the MIB2.0 Scare video working using PIR trigger. I'd love to just use the Relay Decoder version of the Scare video and the triggers contained in the Right channel (thus the original plan to use wickedbeernut's setup) but it looks like Octobanger doesn't do things in that manner.

To get the lid/green glow/fog to trigger to do their thing it looks like I need to manually define when each should trigger, right?

Does Octobanger require the Scare MP3 once everything is programmed or is it just the base to build the timing on?

I'm guessing it'll definitely need the Ambient/Attract MP3 which it will cut off once the PIR (or remote relay, still deciding) triggers. Then the Scare Video kicks in.

The Scare Video will be handling the Video/Audio during the Scare. Octobanger will then just be handling the triggering based on that timing right?

When the Scare Video completes/resets, I'm guessing the Ambient/Attract MP3 kicks back in until next trigger? The Pi puts the video back to the beginning paused until next trigger.

Is trigger via the Media pin just a Low/High? (The program mentions a Serial 1 via Media Pin). Trying to figure out how to have the Octobanger trigger the Scare Video like the PIR directly connected to the Pi does now.

Any experience or thoughts you would like to share are greatly appreciated.

Thanks,


----------



## Batbuddy

I'm 99% sure it can't be done. The arduino is only able to receive a program not output one. You will likely have to recreate it.


----------



## David_AVD

I'm pretty sure I've read that you can read the program memory via the USB connection.

Here's one page I found within 60 seconds. [LINK]


----------



## theamzngq

Thanks, I'll check into it. On another note, I'm setting up a new octobanger controller, but I'm not getting audio. Rather than searching through this massive thread, I thought I'd ask to see if anyone can shortcut my troubleshooting process...The MP3 player light blinks when triggered as if it's playing back, but I'm not getting anything out of the headphone jack. I'm using the default pinout (no relay shield) and I've got mp3 RX connected to pin 12 (and gnd and 5v, of course). Are there any restrictions on the mp3 file itself? It seems like the other files I've used.


----------



## theamzngq

The micro SD card I'm using is 32GB, could that be the issue?


----------



## David_AVD

Could be. Some mp3 modules don't like large SD cards.


----------



## jabberwocky

Can the programming be done with an ipad?
From the little I know, I don't think so.
If not, does anyone offer programming services?
I've built a few of these, but can't use them since I don't have a computer.
Robert


----------



## Batbuddy

If they are the four banger model then you can get a keypad and program it with it as a real "button banger" but I guess that is only after the firmware is loaded to the Arduino. some public libraries have computers you could perhaps use. I live in Idaho but would be happy to program these for you, but you will still need to set your timings for off and on with the button pad method unless your prop is ultra basic or you send the whole kabootal. I would think you could find a closer to home solution though. May even be worth buying an old PC from a second hand shop to run the software on.


----------



## Bugman1400

Would be nice for the four- and octo-bangers to have the ability to play up to 10 different Scare mp3s and control several Catalex modules at the same time. Also, wish the ambient mp3 could be up to 30 mins long. Or, let a long ambient play on one mp3 and have another mp3 play the different scare mp3s either synchronized with the ambient or at random intervals. 
Since the banger software is free, do you think Mike North would let it go open-sourced via github? I think the community could really take this great software to levels that Mike may just not have time for.


----------



## mroct31

Is there a way to have an Uno run in a loop with relays connected without a PIR and have the sequence run over and over? Something like on a Picoboo when you jump the ground and in on the trigger and it plays over and over without needing to be triggered externally? Basically when power is applied to the UNO it's starts playing the programmed sequence and doesn't stop until power is removed. In my case I want to have it turn on one light then turn on another light and repeat this indefinitely.


----------



## DarkOne

You can just program the arduino to run a loop without using the fourbanger or octobanger software. Download the Arduino IDE and open a new file.

I've modified the blink example to support 4 relays wired to pins 9-12. This will turn on one light, wait a second, turn on the next, wait, etc. then turn them all off, wait another second and repeat. Is this kind of what you were looking for?

If you could be more specific on timing of the lights, we can help out a bit more.

/*
Modified Blink
Turns on an LED on for one second, then another, and another,and another and then turns them off.

Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://www.arduino.cc

This example code is in the public domain.

modified 8 May 2014
by Scott Fitzgerald
*/

// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pins 9-12 as outputs.
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(12, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(11, HIGH); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
digitalWrite(10, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(9, HIGH); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second

for (int thisPin = 9; thisPin < 13; thisPin++) {
digitalWrite(thisPin, LOW);// turn the pin off
}
delay(1000);
}


----------



## mroct31

Thanks, I figured it out. Just needed to jump ground to the #11 pin and it runs automatically and continuously as I need.


----------



## RattyVulcan

Hi, I don't think Mike frequents the forum much if at all nowadays, so I'm hoping someone else can answer my query..

Using Octobanger, the software doesn't appear to have a built in ability to upload the MP3s to the SD Card (as per four banger software)? Not a big deal as I believe it requires them saved as 001.mp3, 002.mp3 etc

Also, am I correct in assuming that the relay trigger pins are different between octo and four banger? 2-9 for Octo and A0 - A4 for four banger?

Thanks in advance!

RV


----------



## IMU

RattyVulcan said:


> Using Octobanger, the software doesn't appear to have a built in ability to upload the MP3s to the SD Card (as per four banger software)? Not a big deal as I believe it requires them saved as 001.mp3, 002.mp3 etc


I believe it does. If you click the Media button it should have what looks like an SD icon with a green arrow. That should upload the sounds to your SD card.



RattyVulcan said:


> Also, am I correct in assuming that the relay trigger pins are different between octo and four banger? 2-9 for Octo and A0 - A4 for four banger?


The Octobanger TTL pins are are 2 thru 9 if you don't change it to Shield. If you change it to Shield, it's 4 thru 11


----------



## RattyVulcan

Thanks for the reply and confirmation.

RV


----------



## RattyVulcan

I'm back with more questions 

I've wired up my project as per Octobanger instructions but neither my PIR sensor nor MP3 player are working.

Looking at the serial info windows in the Octobanger application it reports:

OctoBanger TTL v8.2.0
Config OK
Frame Count: 0
Seq Len Secs: 0.00
Reset Delay Secs: 15
Pin Map: Default_TTL
Trigger Pin in: 11
Trigger Ambient Type: Low (PIR or + trigger)
Trigger Pin Out: 10
Media Serial Pin: 12
Media Type: Catalex Mp3 Ambient + Scare
Volume: 30
Timing Offset ms: -0.405
TTL PINS: 2,3,4,5,6,7,8,9
TTL TYPES: 0,1,1,1,0,0,0,0

The two lines which intrigue me are:
Trigger Pin In: 11
Media Serial Pin: 12

If I'm reading those lines correctly they appear to contradict the written instructions and pictures for connections in the Octobanger example build doc page 11 here: http://buttonbanger.com/downloads/octobanger/octobanger_example_build.pdf

It shows the media serial PIN out to be A2 and the Trigger PIN Out to be A0?

Am I reading this wrong?

Incidentally I've tried shorting PIN 10 to see if I can manually trigger the scare sequence and nothing happens either, so I'm totally confused at the moment


----------



## MattStyling

I'm having the same issue as RattyVulcan, I'm sure I'm doing something wrong as Ive done a few things to get my PIR working. But any direction on the Serial player would be great as the code from Octobanger and the instructions are quite different from each other. Thanks for any help!...


----------



## MattStyling

*Ok, I figured it out...*

Ok, so I had my SD card formatted in NTFS, which I found out had to be in FAT32, so I did that, put my mp3s back on it, plugged it in and it worked like a champ. RattyVulcan, give that a shot, works on pin 12 just as Mike intended. 
I hope that's your problem, all those hours I spent trying to get my sorted out.. maybe this will help.. lol


----------



## theamzngq

What you're seeing in the instructions is the configuration for using a relay shield. The trigger pin 11 (low state with PIR, high with simple short to ground) is for a non-shield relay board.


----------



## theamzngq

Btw, had another fully successful night last night with octobanger. I had 6 running and they all triggered all night perfectly. So valuable, that little system! I encourage anyone who's using it to donate...

Anyway, this year, we decided to turn the last section of the line (we had about 2000 people go through last night) into a whole Hogwarts Express experience (our haunt is Harry Potter themed). I used the octobanger to run the whole sequence. Each side of our train had multiple 24" monitors installed which were dressed up to look like windows. When the sequence starts (hidden button mounted on one of the train car walls), the octobanger would trigger two Raspberry Pi video players (one for each side of the train car) to start playing footage of country side going by. A few moments in, the overhead lights would flicker and the "windows" would show Dementors attacking the train. A Hogwarts prefect would come in and perform the Patronus charm (blinding work light would pop on) to banish them. Then off to the Haunt they went!

It took a while to coordinate and get it all working, but it was a big hit.


----------



## Batbuddy

theamzngq said:


> ... I used the octobanger to run the whole sequence. Each side of our train had multiple 24" monitors installed which were dressed up to look like windows. When the sequence starts (hidden button mounted on one of the train car walls), the octobanger would trigger two Raspberry Pi video players (one for each side of the train car) to start playing footage of country side going by. A few moments in, the overhead lights would flicker and the "windows" would show Dementors attacking the train. A Hogwarts prefect would come in and perform the Patronus charm (blinding work light would pop on) to banish them. Then off to the Haunt they went!
> ...


So, I would love to see a video or Pics of your setup...


----------



## theamzngq

Here is a link to shots of the whole haunt. I'll be posting video a bit later, which I'll link to once it's up.

https://www.dropbox.com/sh/hx1l2ackmduh72j/AABCshEmej06MMzMeyx4uKSZa?dl=0

Specifically the Hogwarts train controller set up:









I've got two Raspberry Pis configured as triggerable video players and are therefore wired in to two of the relays. When the sequence starts, the players each play their videos, which go into HDMI splitters to each of the computer monitors.


----------



## theamzngq

The overhead lights that flicker are in another relay, and a bright LED worklight (the patronus being cast) is in the 4th relay. Worked perfectly all night long (and we had 2000 people).


----------



## scary rick

awesome, cant wait to see the vid!
Rick


----------



## MBrennan

> So, I would love to see a video or Pics of your setup...





> awesome, cant wait to see the vid!


Me too!

Did you have any trouble with the timing of the separate video and audio players?
I did an Octo triggered display this year with a BrightSign and Octo. Trying to get the MP3 audio to sync with the BrightSign video was no small task.

Wondering if using the Pi may be a better solution for the next project (I'm not Pi savy).

Your display is over the top cool!!!


----------



## pyroandy

> Btw, had another fully successful night last night with octobanger. I had 6 running and they all triggered all night perfectly. So valuable, that little system! I encourage anyone who's using it to donate...


Donate to who? The web site is gone. I hope someone else will pick this project up!


----------



## Montclair

I have folks asking me so I'm asking in case anyone knows. Mike's content seems to be gone from buttonbanger.com. Anyone know what the new site is that replaces http://buttonbanger.com/ ? The server doesn't reply to http, but does to the httpS version of the URL https://buttonbanger.com/... however it replies that everything is missing.

I looked over the last few pages of this thread and didn't see any mention of this.


----------



## IMU

His website went down once before and came back. I'm not sure if Mike's hosting is having issues, if he deleted it or something else happened. I was able to get to his website about 2 weeks ago. I've not tried in the past few days. Sad if its gone. I believe I downloaded both the button banger programs if you're looking for something?


----------



## Montclair

A YouTube viewer was asking me. I've got the stuff but it kinda sucks if the site is really gone. I would've offered to host the content so new users would have access.


----------



## corey872

If it's any help, link to thread specifically discussing the website:

https://www.hauntforum.com/showthread.php?t=46288


----------



## Batbuddy

I just checked and the site is working for me.


----------



## Hauntactor

Hello,

Ive read through a lot of the forum, and watched some videos, but i'm still confused about how to connect a solenoid valve to the controller. Does anyone have a wiring diagram? It would help so much.

Thanks in advance!


----------



## Hippie Crane

Hauntactor said:


> Hello,
> 
> Ive read through a lot of the forum, and watched some videos, but i'm still confused about how to connect a solenoid valve to the controller. Does anyone have a wiring diagram? It would help so much.
> 
> Thanks in advance!


This is a solid state circuit that can switch up to 4 amps per channel and protects your arduino if one of the transistors fail. There is no electrical connection between the driver circuits and the arduino because of the use of the optocoupler. The circuit is designed for 24v solenoid valves.


----------



## David_AVD

I thought there were diagrams included in the prop controller download.


----------



## Batbuddy

Go to buttonbanger.com and download the original four banger package. It includes several PDFs that contain the information you need. I just went there and looked to make sure it is still there. The PDF you need to look at is the flyback diode one, it has photos and a good explanation. All of the PDFs apply to the octobanger and four banger. If you can't figure it out from the PDFs then let us know and we will explain further. FYI Hippie Crane's schematic is essentially the schematic for a 4 channel relay board which is readily available for a few bucks on Amazon or other sites. Depending on your connections you may want to add the flyback diode per the previously mentioned instructions as an additional precaution.


----------



## Hippie Crane

Batbuddy said:


> Go to buttonbanger.com and download the original four banger package. It includes several PDFs that contain the information you need. I just went there and looked to make sure it is still there. The PDF you need to look at is the flyback diode one, it has photos and a good explanation. All of the PDFs apply to the octobanger and four banger. If you can't figure it out from the PDFs then let us know and we will explain further. FYI Hippie Crane's schematic is essentially the schematic for a 4 channel relay board which is readily available for a few bucks on Amazon or other sites. Depending on your connections you may want to add the flyback diode per the previously mentioned instructions as an additional precaution.


It's for a 4 channel solid state switching circuit that protects the arduino.. I cant stand relays so I always use solid state technology.


----------



## Montclair




----------



## nov2366

*controller question*

I am fairly new to this stuff so this may be a silly question but here we go. Can this prop controller be used to trigger a prop constructed using a wiper motor for movement and pair it with sound. Also can it trigger a smoke machine? Thanks in advance.


----------



## IMU

nov2366 - the answer to both questions is Yes. The fog machine would require you to hack a push button remote to have the controller turn it on and off. I did that exact setup for my cannon prop.


----------



## nov2366

Thank you


----------



## JamminJimE

Does anyone know if the source code for the windows app was posted anywhere by Mike? I'm a professional dev and would LOVE to extend the app for servo controls (make my skeletons talk with the audio track).

Thanks!


----------



## Batbuddy

No it was never released.


----------



## pintoshine

I am working on a python version that is similar. I built a near clone of the OctoBanger using a Teensy 4.1. It plays the ambient and scare without a MP3 player board. It can do PWM and servos too. Just got the display of the scare audio working today.


----------



## Stan Williams

Hi all, I'm new to the prop automation game and have a few questions. I love the idea of the 8 relay controller and have most of the supplies in my card on Amazon. I am hoping someone can show me some pics or a diagram for the 8 channel hooked up and working.

I am trying to set something up for a non-profit organization that has a fright night every year as their major fundraiser and I would like to do something different this year.

Any help would be greatly appreciated. 

P.S. I love that everyone is so helpful to everyone else, you don't see that very often in forums. Great job everyone.


----------



## MBrennan

Here's a pic of my Octo's guts. The Uno switches 8 SSRs, which power the 8 outlets.
Channels 1-4 are powered from one line input, and 5-8 from another. I needed two separate circuits as I have four Jacob's Ladders plus motors and lights which draw too much current to run on just one circuit.
Cheers!


----------



## MBrennan

pintoshine said:


> I am working on a python version that is similar. I built a near clone of the OctoBanger using a Teensy 4.1. It plays the ambient and scare without a MP3 player board. It can do PWM and servos too. Just got the display of the scare audio working today.


I would like to see and learn more about this! 😁


----------



## antdeek

Does anyone have the original schematics? I do not see them anywhere here. I think they were removed by post 1? I want to surprise my friend with one of these before halloween.


----------



## Batbuddy

antdeek said:


> Does anyone have the original schematics? I do not see them anywhere here. I think they were removed by post 1? I want to surprise my friend with one of these before halloween.





Four Banger |


----------



## Blancaster

@mikkojay 
Hello, I am super new to using the arduino (like never used it), I just ordered all my parts and I’m waiting on all of them to arrive. I just discovered that within the past few days the buttonbanger site is no longer available. Will this be permanent? Guess I jumped on the bandwagon a little too late :-(


----------



## mikkojay

Blancaster said:


> @mikkojay
> Hello, I am super new to using the arduino (like never used it), I just ordered all my parts and I’m waiting on all of them to arrive. I just discovered that within the past few days the buttonbanger site is no longer available. Will this be permanent? Guess I jumped on the bandwagon a little too late :-(


Thanks for the heads up- I spent some time on the phone with Godaddy and got the site issue sorted out (they changed something with hosting permissions). FYI, Godaddy's on-hold music will drive you mad!

Thanks, Mike


----------



## Toxic_Biohaz

Has anyone ben able to tie in servo control for a talking skeleton with the four / octo banger


----------



## corey872

Welcome to the forum! I don't know too much about the 'bangers and it would depend a bit on what you mean 'control'. Some rudimentary movements through motors, etc - that might be possible. It's my impression the 'bangers have sensors and trigger relay outputs - I don't think they are set up for servo control. So you might get an 'arm up' / 'arm down' motion, but you really couldn't control a range of motion.

There is 'jawduino' which is set up servos and running a talking skull specifically. So if that is more along the lines of what you consider 'control', it may be worth looking into.



JawDuino |


----------



## Allen_Haunts

Toxic_Biohaz said:


> Has anyone ben able to tie in servo control for a talking skeleton with the four / octo banger


Yes, the jawduino can be used with the Fourbanger or Octobanger controllers. The jawduino only needs an audio source which the controllers will provide. Use either the left or right track. My cannon build uses this exact setup, left channel for pirate (jawduino) and right channel for cannons and background audio.

the site is Buttonbanger.com









Cannon Prop Build


My Captain Barbossa Cannon prop build. I used both Jawduino and Octobanger controllers to run my prop. The scene uses 3 props synced together. The first is C...




youtube.com


----------



## Toxic_Biohaz

Allan thanks you nailed it on the head... I wasn't thinking of using split audio tracks... Great work around 

I still would love to see an update to the fourbangger interface to add a servo control track I could see a lot of use for this our even maybe a four relay & four servo banger ... 

Commercial made controllers don't give the flexibility that this does without getting into dmx and my yard is way too big for that kind of wiring


----------



## Batbuddy

You can also try my flavor of Jawduino if you want more than just one movement(the jaw). I worked on making a whole random head movement plus jaw arduino sketch, which can be found here.


----------



## Allen_Haunts

Toxic_Biohaz said:


> Allan thanks you nailed it on the head... I wasn't thinking of using split audio tracks... Great work around
> 
> I still would love to see an update to the fourbangger interface to add a servo control track I could see a lot of use for this our even maybe a four relay & four servo banger ...
> 
> Commercial made controllers don't give the flexibility that this does without getting into dmx and my yard is way too big for that kind of wiring


He is actually working on a servo adaptation. The issue is the file size. Servo positions use a lot of data. There is a guy that has written a plug-in for Blender, a program, that reduces the size of the servo movement file. I’m not sure yet how he does it but it can reduce the file size for servo control through Arduino. His YouTube video is here. This guys animatronics is off the hook however, way beyond my current level of ability.


----------



## Allen_Haunts

Batbuddy said:


> You can also try my flavor of Jawduino if you want more than just one movement(the jaw). I worked on making a whole random head movement plus jaw arduino sketch, which can be found here.


Do you have a video of it in action? I have been interested in your project, but haven’t built it yet. Also, can the audio come from an Octobanger controller as well? Your schematic seems it indicate that the audio signal can come from the Octobanger audio source if you added an audio jack or hard wire from the media player??


----------



## Batbuddy

So the Octobanger is an Arduino micro controller that is running code that Mike North developed. The Skull controller is different code and can not be run simultaneously on the same controller. The hardware parts are basically the same with the exception of the hack that Mike came up with to use the KA2284 module for jaw control. I guess what I am saying is that it will take two micro controllers to run an "Octobanger" and talking skull. I suppose you could hybridize the MP3 player to work with both micro controllers simultaneously but it might be buggy. you can use the MP3 player I used or the one that Mike used interchangeably for the most part. I think I have a video of the talking skull, I will see if I can find it.


----------



## Allen_Haunts

Batbuddy said:


> So the Octobanger is an Arduino micro controller that is running code that Mike North developed. The Skull controller is different code and can not be run simultaneously on the same controller. The hardware parts are basically the same with the exception of the hack that Mike came up with to use the KA2284 module for jaw control. I guess what I am saying is that it will take two micro controllers to run an "Octobanger" and talking skull. I suppose you could hybridize the MP3 player to work with both micro controllers simultaneously but it might be buggy. you can use the MP3 player I used or the one that Mike used interchangeably for the most part. I think I have a video of the talking skull, I will see if I can find it.


That’s what I meant, two controllers, I was just curious if the audio signal is all your controller setup needed for input.
I routinely mix and match controllers to make shows. My Jack Sparrow prop uses 3 different controllers together.


----------



## Batbuddy

Aah, I see what your saying. Yes you could split the audio signal and send it to the KA2284 that is attached to the skull Arduino and get jaw movement that way. FYI I made to renditions of the code. One for just jaw movement and the other has random head movements for three other servos for three axis skull builds. The caveat to my design is it requires loading a preliminary sketch that is used to set servo limits so that you don't damage servos by over driving them beyond the mechanical boundaries of you prop. It stores those limits in the EEPROM and then once you load the Skull sketch it accesses those limits to keep things aligned. The reason it is not all lumped together in one code was to make it all fit on a nano, and because I am not super good at coding.


----------



## Toxic_Biohaz

well i leared an important leason this year. dont try to be cheap on amazon and watch what pin outs the generic arduino unos have. ran into two problems 1) only one 5.5v out and it took 3 days to find and install the drivers to get the IDE to communicate. let the time crunch comence


----------



## Allen_Haunts

Ouch… good luck!


----------



## corey872

Thanks for the note / reminder! Do you have a link to the offending board? 

So far I haven't run into any which weren't pin compatible (at least for what I needed) or had issues communicating. (lol - well, issues communicating that were the board's fault. I think I zapped half a dozen nano's building plasmaduino and they no longer communicate at all) The main issue I have is forgetting to change the 'bootloader' setting when switching back and forth between uno's and nano's!


But these sketchy boards would definitely something to keep an eye on. - Thanks for the warning!


----------



## Toxic_Biohaz

corey872 said:


> Thanks for the note / reminder! Do you have a link to the offending board?
> 
> So far I haven't run into any which weren't pin compatible (at least for what I needed) or had issues communicating. (lol - well, issues communicating that were the board's fault. I think I zapped half a dozen nano's building plasmaduino and they no longer communicate at all) The main issue I have is forgetting to change the 'bootloader' setting when switching back and forth between uno's and nano's!
> 
> 
> But these sketchy boards would definitely something to keep an eye on. - Thanks for the warning!


i got mine off amazon it was the keystone arduino uno v4.0 i finaly found the drivers if any one needs


----------



## Scary Smurf

Ehm, can anyone tell me what happened to my post? EDIT: Ah okay, I see it was moved to its own thread by the mods. Please carry on.


----------



## Batbuddy

Allen_Haunts said:


> Do you have a video of it in action?


Here is the video you requested... Batbuddy's Arduino 3 axis skull controller


----------



## bikerdaddy02

Batbuddy said:


> You can also try my flavor of Jawduino if you want more than just one movement(the jaw). I worked on making a whole random head movement plus jaw arduino sketch, which can be found here.


Hi Kenny,
I tried to message you on this forum but they think I am a spammer. . .

I have read many of your posts here on the Haunt Forum, and have studied your improved version of the Jawduino. I need to add a talking animatronic movement to the props that I am designing. My initial inkling was to go with the chatterpi since I have some experience with Raspberry Pi's; that was until I saw that the cost of these has become ridiculous. It was really overkill for what I need to do anyway. At this point someone can buy a fully functional talker controller from fright ideas for less than the cost of a Pi.

As I continue to research options, I keep coming back to the outstanding work that you have done. I intend to use this to provide the jaw movement for the animatronic head that I am designing. Frankly I will be cramming a lot of stuff into a skull cavity as in addition to the jaw mechanism I will be using a polou maestro to control eye and head movement, not to mention 9 total servos. With space being of such concern I have decided to use a Seeed XIAO SAMD21 instead of an Arduino. This processor is tiny and is more powerful that an Uno! It should work as a direct replacement for the Nano that you used, except that there are a few caveats in the code.

Although, I am very well versed in electronic and have used Arduino's a few times, I really have never been a coder. I figure that if I try and fail a few dozen times I can make this work, but since you have clearly gained much more experience than I, I figured I would put it to you: Do you have any thoughts as to porting this over to the XIAO? Perhaps you could suggest a modified version of the sketch that would work. 

Thanks in advance for any help that you can offer! And thanks for keeping Mike's Jawduino alive!

Bill


----------

