The Aliens Legacy http://forum.alienslegacy.com/ |
|
[HOW-TO] Affordable DIY prop effects: Meet the "Crybaby" http://forum.alienslegacy.com/viewtopic.php?f=3&t=16931 |
Page 1 of 1 |
Author: | Outcry27 [ Tue Jun 20, 2017 7:24 pm ] |
Post subject: | [HOW-TO] Affordable DIY prop effects: Meet the "Crybaby" |
"Cry baby, cry..." "...Make your mother sigh!" Long time no talk, Legacy! Sorry for being scarce these days. I've been meaning to put together a full, detailed, step-by-step tutorial on how I rigged up the effects in my smartgun for, well... sheesh, nearly a year now, and I'm sorry to say I just haven't found the time. SO... rather than delay any further, I'm going to go ahead and release my Arduino code out into the wild where it might at least do some good. Hopefully one of these days I'll have time to put together a proper tutorial, but I will do my best to summarize in the meantime! WHAT YOU WILL NEED: - 1 Adafruit "Trinket Pro" microprocessor with the LiPo battery "backpack" ($10+$5) - 1 Adafruit 16MB Audio FX MP3/OGG board ($25, obviously only necessary if you want sound effects) - 1 Adafruit LED Quad-Alphanumeric display with I2C "backpack". ($10) - 1 Lithium Polymer battery. I used a 1200MAh battery ($10) and have yet to run it dry even once. - 1 N-Channel power MOSFET - High-power LEDs for the muzzle flash - The Arduino IDE (aka the free program used for writing and uploading your code) Total cost: roughly $70, plus whatever speaker you choose for sound output. The setup is simple: The Trinket Pro is the "master" board which contains the program logic and runs the muzzle flash LEDs and the ammo counter. It also sends UART Serial commands to the audio board to trigger it to play sounds. The high discharge rate of a LiPo battery provides more than enough power for both the Arduino boards and the LED ammo counter, and also provides the power for the muzzle LEDs via a MOSFET. Running the muzzle LED power through a 'FET instead of through the Trinket board itself allows you to use high-intensity LEDs, which require more current than the Trinket could otherwise handle without burning up. The Trinket just triggers the MOSFET "open" or "closed" to control the muzzle LEDs. This is how I was able to get that ridiculously bright muzzle flash on my SG... there's no less than 7 high-power amber LEDs in Juliet's muzzle. ![]() THE CODE: https://github.com/outcry27/crybabyFX This is the current "vanilla" version of the program I am using, ready to be customized. A "pin-out" list is included in the header comments in the code. It may look complicated if you're not familiar with programming, but what it does is very straightforward: - Set up the software packages whose features it needs while running (called "libraries"; these need to be installed in your Arduino IDE program's "libraries" folder in order for the program to include them when it uploads the code to your Trinket.) - Set up the variables it will be using, including some shortcuts to pins on the Trinket board - Start the serial communication on the Trinket board (this is how it controls both the ammo counter and the audio board.) - Set up the default states for the muzzle LEDs, the "safety" switch, etc. From there it runs through a logic loop where it checks whether or not buttons have been pressed and/or certain conditions have been met (is the safety on? is there ammo left in the ammo count variable?), does certain things if they have, and then rinses and repeats. The ammo counter loop is currently set up for 4-digit display, but can be easily simplified to two digits for a Pulse. The code is on a honor system, free-to-use basis. You are welcome to customize it for your own use; all I ask is that you please just give attribution, and don't use it in anything you plan to sell without clearing it with me first. ______________________________________________________________________________ I will still try to put together a wiring tutorial, with pictures and the like, sometime in the future. In the meantime, this code gives you a known-working place to start from, and Adafruit.com has *TONS* of tutorials and lessons to help you fill in the gaps if you get lost. There you have it, Marines... now go make some noise! ![]() |
Author: | Moosh89 [ Tue Jun 20, 2017 8:13 pm ] |
Post subject: | |
Although 99% of this kind of stuff goes over my head, I just wanted to give you huge props for this gesture! Someday I hope to have both electronic pulse rifle and smartgun. And knowing that this is available gives me immeasurable comfort! ![]() |
Author: | Outcry27 [ Tue Jun 20, 2017 8:27 pm ] |
Post subject: | Re: |
Moosh89 wrote: Although 99% of this kind of stuff goes over my head, I just wanted to give you huge props for this gesture! Someday I hope to have both electronic pulse rifle and smartgun. And knowing that this is available gives me immeasurable comfort! ![]() Thanks ![]() And don't sell yourself short. I realize electronics looks complicated, because we can't "see" how it works, but anyone can learn. Computer chips are just Rube Goldberg machines that make electrons go this way under X circumstances, and that way under Y... controlling how an Arduino board works is just a matter of learning its vocabulary. One of the reasons why I recommend Adafruit products so strongly is because they are designed with beginners in mind. Each of their product pages - like the ones linked above - links to tutorials that will teach you how to use the product, and some examples of fun things you can do with them. To anyone who is looking at this and wondering, "can I figure this out?": the answer is YES, YOU CAN. I'm just here to give you a little boost. ![]() |
Author: | knoxvilles_joker [ Wed Jun 21, 2017 1:36 am ] |
Post subject: | Re: [HOW-TO] Affordable DIY prop effects: Meet the "Crybaby" |
I worked with Outcry on this on my build using his code I documented my attempt at building his setup here: https://forums.adafruit.com/viewtopic.php?f=22&t=114099 I will advise that this setup is great for any gun where you need a safety and firing sounds. His counter logic is good all the way to 9999 ammo counts and I have verified with adafruit support this stuff part wise will not ever disappear any time soon. The parts used are some of their best sellers. Copyright being the fickle thing it is, you will be well advise to source your sounds carefully. If We can figure out how to manually create the source sounds from scratch we can document the process and then offer the created sounds. Also this is an alternate process if you want to recreate your favorite raygun from call of duty zombies: https://learn.adafruit.com/ray-gun-blas ... g?view=all I am working on some alternative alterations to my smart gun build, but this piece will be part of the electronics. |
Author: | Harry Harris [ Wed Jun 21, 2017 7:24 am ] |
Post subject: | |
Very cool, but I don't get where the Firefly reference fits in to this. Harry |
Author: | 577_ops [ Wed Jun 21, 2017 7:04 pm ] |
Post subject: | Re: [HOW-TO] Affordable DIY prop effects: Meet the "Crybaby" |
Thanks for sharing. I still struggle with my old boards, just to much not working as it should. ![]() |
Author: | Outcry27 [ Thu Jul 06, 2017 1:55 am ] |
Post subject: | Re: |
Harry Harris wrote: Very cool, but I don't get where the Firefly reference fits in to this. Harry Forum name "Outcry", + compact size FX kit = "Crybaby FX". The Firefly reference followed after that. ![]() |
Author: | Epsilon [ Tue Sep 25, 2018 8:33 pm ] |
Post subject: | |
Bump for a great thread ![]() ![]() |
Author: | knoxvilles_joker [ Tue Sep 25, 2018 8:57 pm ] |
Post subject: | Re: |
Epsilon wrote: Bump for a great thread ![]() ![]() We are both available if you need help. And on facebook. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |