- October 29th, 2018, 4:40 pm#4910321
So, with the exception of adding a few labels around the trap, the trap is complete. I printed out the pedal by countspatula and it turned out great! It went really quick and I ordered the standard hardware kit from his etsy shop and putting it together was easy and it looks really good.
I ended up replacing the circuit board that came with the SH trap. It's actually a pretty great little setup for the trap and gives you some neat sound and lights that can be pretty impressive, especially for the $50 base trap. But with how much work I had put into the trap itself, I figured I should go for a bit more screen accuracy and add some LEDs and use an arduino to properly program the existing ones.
This easily turned into the most difficult part of the whole project. So... that's why it has taken me so long to finally post, I've been working to finally get stuff to be functional.
First off, batteries were an unforeseen but almost constant complication. As I've mentioned, I'm mostly new to electronics and really was learning as I went along, but I wasn't prepared for how difficult it was to find a decent battery configuration for a project like this. I started with the 9v battery, but VERY quickly started drawing more current than it could provide. So then I upped things to 4 AAA batteries, which proved much better, but still fell short. I would basically get to when the doors opened and a bunch of LEDs and sounds would be turning on all at once together with the servos opening the doors and the thing would just stop mid-routine and reboot. It was a pain in the butt. I upped things to 4 AA batteries and it worked! But for only a while. Since all of my power was running through a Buck Converter, the ~6 volts was being dropped to 5 volts and in the process I was gaining some current. The problem? The batteries were outputting around 6.25 volts when fresh, but once they dropped below 6.1 volts after running for a while the current would get low enough that, when everything came on with the lights and sounds and doors opening it would draw too much current too fast and, just like before, reboot.
I went into a hobby store and talked to a guy who does RC cars, and he recommended a LiPo battery that would be able to output more than enough current, and handle fluctuating currents very well. I'm sure the battery was WAY overkill for what I need, but wow did that make a difference. All the problems that I was having due to insufficient battery capability went away and I was able to just concentrate on adjusting my arduino code.
So, I now have a completed version of my arduino code. At least for the time being. The code can be found on my github here on its own branch. Notice that this code is for a latching switch, which is a switch that, when triggered, stays ON instead of being momentarily on like you would get with most switches used in pedals. I kind of did it out of a desire to save some money on the air switch I bought on amazon. It was a simple switch for a garbage disposal that cost around $10 or so. It came with a switch, hose, and button. I got rid of the button, but used the hose and switch.
Also, to drive the audio I went a cheap (too cheap) approach and picked up a dollar store speaker and used the amplifier it came with to drive a speaker I got for about $4. I probably should have picked up a cheap mono amplifier to drive the speaker, but I was needing to get past the audio side of things and was curious how cheap I could go. I think spending a few more bucks on an amplifier is probably warranted
For playing the actual audio files, I'm using a YX5300 module by Catalex. Even though it only supports mp3, it comes with an sd card slot, it can be controlled serially (so perfect for the arduino), you can use it to play specific audio files and even loop audio files (it has a pretty decent feature set) and it is really reasonably priced at about $9 on amazon, or even cheaper from other sources online, often for less than $3 (but shipping would have taken forever!). The major downside to this thing beyond being mp3 only is that it is hard to find good documentation on it, though not impossible, and even then you have to drive the thing using serial commands. So I wrote up a library that anyone can use if they want to try it out, you can find it on my github.
If you have any questions about details around the way I implemented the electronics or how I did the air-pedal approach, let me know. Sorry this update is brief, I've got more work to finish on my Proton Pack before Halloween!
So, to end, here is a little demo of my trap as it is now. No labels are on it yet, but it's the version I'm going to be showing off at Halloween:
https://www.youtube.com/watch?v=9vblftAzxEI
I ended up replacing the circuit board that came with the SH trap. It's actually a pretty great little setup for the trap and gives you some neat sound and lights that can be pretty impressive, especially for the $50 base trap. But with how much work I had put into the trap itself, I figured I should go for a bit more screen accuracy and add some LEDs and use an arduino to properly program the existing ones.
This easily turned into the most difficult part of the whole project. So... that's why it has taken me so long to finally post, I've been working to finally get stuff to be functional.
First off, batteries were an unforeseen but almost constant complication. As I've mentioned, I'm mostly new to electronics and really was learning as I went along, but I wasn't prepared for how difficult it was to find a decent battery configuration for a project like this. I started with the 9v battery, but VERY quickly started drawing more current than it could provide. So then I upped things to 4 AAA batteries, which proved much better, but still fell short. I would basically get to when the doors opened and a bunch of LEDs and sounds would be turning on all at once together with the servos opening the doors and the thing would just stop mid-routine and reboot. It was a pain in the butt. I upped things to 4 AA batteries and it worked! But for only a while. Since all of my power was running through a Buck Converter, the ~6 volts was being dropped to 5 volts and in the process I was gaining some current. The problem? The batteries were outputting around 6.25 volts when fresh, but once they dropped below 6.1 volts after running for a while the current would get low enough that, when everything came on with the lights and sounds and doors opening it would draw too much current too fast and, just like before, reboot.
I went into a hobby store and talked to a guy who does RC cars, and he recommended a LiPo battery that would be able to output more than enough current, and handle fluctuating currents very well. I'm sure the battery was WAY overkill for what I need, but wow did that make a difference. All the problems that I was having due to insufficient battery capability went away and I was able to just concentrate on adjusting my arduino code.
So, I now have a completed version of my arduino code. At least for the time being. The code can be found on my github here on its own branch. Notice that this code is for a latching switch, which is a switch that, when triggered, stays ON instead of being momentarily on like you would get with most switches used in pedals. I kind of did it out of a desire to save some money on the air switch I bought on amazon. It was a simple switch for a garbage disposal that cost around $10 or so. It came with a switch, hose, and button. I got rid of the button, but used the hose and switch.
Also, to drive the audio I went a cheap (too cheap) approach and picked up a dollar store speaker and used the amplifier it came with to drive a speaker I got for about $4. I probably should have picked up a cheap mono amplifier to drive the speaker, but I was needing to get past the audio side of things and was curious how cheap I could go. I think spending a few more bucks on an amplifier is probably warranted

For playing the actual audio files, I'm using a YX5300 module by Catalex. Even though it only supports mp3, it comes with an sd card slot, it can be controlled serially (so perfect for the arduino), you can use it to play specific audio files and even loop audio files (it has a pretty decent feature set) and it is really reasonably priced at about $9 on amazon, or even cheaper from other sources online, often for less than $3 (but shipping would have taken forever!). The major downside to this thing beyond being mp3 only is that it is hard to find good documentation on it, though not impossible, and even then you have to drive the thing using serial commands. So I wrote up a library that anyone can use if they want to try it out, you can find it on my github.
If you have any questions about details around the way I implemented the electronics or how I did the air-pedal approach, let me know. Sorry this update is brief, I've got more work to finish on my Proton Pack before Halloween!
So, to end, here is a little demo of my trap as it is now. No labels are on it yet, but it's the version I'm going to be showing off at Halloween:
https://www.youtube.com/watch?v=9vblftAzxEI
doctorevil30564 liked this