User avatar
By TragicManner
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 :P

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:
doctorevil30564 liked this
User avatar
By TragicManner
I can't really speak to stuff like that. I've used online conversion stuff before, but I have no idea if I've used that one, and I'm not really super great at picking up on problems with audio post-conversion.

Personally, what I would do (and what I did for my project) is get audacity and install the mp3 stuff to go with it to convert it to mp3. Here's a tutorial on how to do it.
By adolamin
Hi. This is awesome. Couple of questions. In your descriptions you say you use an UNO or Nano, but in the arduino code from the last full demo video it's using up to pin 19. Am I missing something or did you switch to something like the Mega? Could you produce a new wiring diagram for this code?

User avatar
By TragicManner
So I'm definitely using a nano in my trap. You can check out my code on my github, the highest pin I hit on there is pin 11 I believe, so that is fine for uno and nano boards.

I can't remember where I talked about it, but I do believe I talked about increasing the number of LEDs after I had purchased a better lipo battery, and I had talked about using more pins to do that. This is possible because the analog pins can also be used as digital pins, effectively giving you another 6 digital pins to work with. That's why in diagrams for the nano it shows the analog pins as A0 - A5, but it also shows them as pins 14 - 19. So maybe that's why I was referring to pin 19? I'm not entirely sure. Let me know if that answers your question.

As for the wiring diagram, I still haven't pulled apart my trap to upgrade it. I'd love to print out a proper circuit board that the nano hooks into that allows me to clean up some of the wiring mess I have in my trap right now, I'd love to add smoke, and I'd love to add more LEDs. If and when I finally get around to it, I'll update this thread with what I end up doing. I'd also love to get more images of the final electronics I used for the trap's current iteration. I was in such a hurry to finish by Halloween that I did a pretty bad job documenting everything towards the end. Right now I'm working on my proton pack, and that's taking most of my time, but once that's more or less wrapped up I'm going to want to revisit.

There's been rumors of an Indiana Jones vibe to […]

Roof rack parts measurements

Hey all. I remember seeing that had[…]

Ill have to take a look at that new code, Count. T[…]

What's the appeal of Anovos pack kits? I've been […]