By gpstar
#4967947
I just finished building a ghost trap based on Sean Charlesworth's 3D printed design and EctoLabs idea of using NeoPixel jewels. I thought I would share my code for anybody to benefit from. Several changes were made such as:

-The rear LED will fade/pulse/dim from low/high/low like in the movie instead of the turning on/off/on after there capture sequence. (You will need to move the rear led to digital i/o #3 pin on the music maker board)
-Modified door closure timings (had issue with original code where on a rare occasion they would close in on each other), there were other small misc timing issues that I changed.
-Modified the smoke pump to synchronise with the door closure better, and only run during the capture sequence sound effects.
-Modified the startup sequence to play the startup sound when the bargraph LED starts it's flash sequence.
-During the opening sequence of the trap, a huge volume of white light is emitted out before settling down to the purple/strobe effect.
-During the capture sequence, I added some slight subtle colour changes (going from light yellow to purple to white)
-Added some purple sparks to the blue spark sequence.

Also, if you are suffering from a static noise sound when the trap is turned on for a few seconds before it goes away, I solved the issue by enabling +12db and +6db on the music maker board.

Also to note, if you are doing a build using NeoPixel Jewels, as mentioned by EctoLabs, connect them to digital i/o #5 pin and move the door motors to digital i/o pin #9 (right motor) and digital i/o pin #10 (left motor), and move the rear led from analog i/o pin #1 to digital i/o pin #3

code:
https://drive.google.com/drive/folders/ ... sp=sharing




Image
Image
Last edited by gpstar on April 13th, 2022, 2:36 am, edited 1 time in total.
CitizenBuster, Lngdstncdrmmr, ccv66 and 4 others liked this
By gpstar
#4968061
A little update, I have been having trouble with the hose and it shorting the trap causing it to operate due to the spring/plunger inside the female ends of the hose. The original guide says to use electrical tape or heat shrink wrap to isolate the spring from touching the metal connector.

I ended up designing a insert to be 3D printed which fits into the hose connectors to isolate the spring/plunger.

I will link my stl file for those who wish to use it on there builds. I printed mine at 0.1mm and slowed my printing speed by half, as the walls are very thin. You may have to slightly sand/trim the bottom edges to make it fit.

https://drive.google.com/file/d/1MEvOdN ... sp=sharing

Image
Image
Image

Next I am going to redo most of the code and remove the delays and use the millisecond library instead to make the trap more responsive like I did for the end captured sequence for the red led. I am going to think about implementing the rotary encoder switch to control perhaps the volume, and maybe think about adding another rotary encoder switch to the black knob on the other side of the trap to perhaps adjust the modes (84 mode, 2016 mode, etc).
RedSpecial liked this
By Ginty TM
#4968169
Nice work on the code. maybe you could add a function for the second rotary encoder " other side " to activate smoke when pressed, so to have a smoke effect once capture is complete?
By gpstar
#4968199
Ginty TM wrote: March 20th, 2022, 8:07 am Nice work on the code. maybe you could add a function for the second rotary encoder " other side " to activate smoke when pressed, so to have a smoke effect once capture is complete?
The problem with the pumps like these is they made a lot of noise, so a good idea in theory but you would be hearing the pump working. During the capture sequence it is not a problem as the sound effects drown out the pump noise.

I wired up a 8 position rotary switch onto the left side black knob, which is going to switch between:
1984 (w/smoke)
1984 (without smoke)
1989 (w/smoke)
1989 (without smoke)
2019 (w/smoke)
2019 (without smoke)

The right side rotary encoder is controlling the volume and the click will still activate the trap sequences. I rewrote the code and removed all the delays() and using the millisecond library only.

I also swapped out the Arduino uno based board for a Arduino Mega. Now there are extra pins to work with for the rotary encoders and switches.

The only thing left to finish up is coding the 2019 mode and find Afterlife trap sounds for the 2019 modes.
Image
Ginty TM liked this
By gpstar
#4968237
Ginty TM wrote: March 20th, 2022, 8:07 am Nice work on the code. maybe you could add a function for the second rotary encoder " other side " to activate smoke when pressed, so to have a smoke effect once capture is complete?
So I have been thinking about this more, I decided to changes thing up.

The black 8 position rotary switch on the left of the trap does the following now:

Pos 1: 1984 mode (w/smoke)
Pos 2: 1984 mode (no smoke)
Pos 3: 1989 mode (w/smoke) (Like the courtroom scene, activate trap goes to instant capture mode and does 2 quick beeps when the door shuts) I altered the trap sounds from 1984 to be a bit deeper to sound like the 89 movie.
Pos 4: 1989 mode (no smoke)
Pos 5: Misc mode (w/smoke) Basically a mixture of 2016 trap sounds, more green lights etc.
Pos 6: Misc mode (no smoke)
Pos 7: Captured mode with infinite beep loop (red led flashing) and random sparks at times. If you press the rotary encoder switch on the right side in this mode, it will activate smoke for 5 seconds to give you a smoking trap. Press the button again to add more smoke.
Pos 8: Captured mode but solid red light. If you press the rotary encoder switch on the right side in this mode, it will activate smoke for 5 seconds to give you a smoking trap. Press the button again to add more smoke.

I am just waiting for some connector parts to arrive tomorrow to finish up my wiring and I will post all my code and changes and a video of how things function. I am still debating on whether to move the servos onto a PCA9685 controller. The problem with the NeoPixels is whenever they activate, the neopixel library disables the interrupts on all the pins to do its thing then reactivates them. This is what causes the millisecond timing issues as time goes slower each time a pixel is changed. So if you add more lighting code, it will throw off the timing of things, most notably the capture sequences where it matters most. I moved the door closing code on the capture sequences over to Timer1, so door closing is not affected by the millisecond timing issues. There is a good explanation of it here:

https://forum.arduino.cc/t/millis-gives ... lts/323221

Also the NeoPixels interrupts the servo motors which causes twitching which was talked about by others before. EctoLabs hacked around it by attaching and detaching the motors each time they needed to move, but this adds a delay for detaching as you will want to wait for the doors to finish moving before detaching them. Sometimes if a NeoPixel was activated at the same time the doors are moving, it can bug out and crash. You can hack around it if you turn the NeoPixels off before attaching, moving the doors and detaching and turn the pixels back on, but I like having the lights on when the doors move.

So the other way around it is using the Adafruit TiCoServo library instead of the regular Servo library and this stops the interrupt twitching of the servos so you can keep them attached at all times and get quicker responses, which is what I did. Also know that when using the TiCoServo library. the servos must be connected to any of the following pins (2, 3, 5, 6, 7, 8, 11, 12, 13 or 44-46) on Arduino mega boards or pins (9 and 10) on a Uno based board.
By gpstar
#4968311
I ended up moving the NeoPixels to a separate controller, it will be powered by a mini metro from adafruit, it is a mini version of a Arduino Uno board. I did all my testing and coding on a regular Metro board, so I just have to swap the board out for the mini version when it arrives this weekend.

I moved the servos to a PCA9685 board, so they do not take any interference from the music maker on the Arduino Mega and NeoPixels.

So basically it works like this:

Arudino Mega (with a protoshield stacked on top) + a Adafruit Musicmaker Shield stacked on top of the mega protoshield. This is the main brains of the system.

Adafruit Metro Mini (mini version of a Arduino Uno, you see a full size one in the photo while I wait for the mini to arrive). This powers the NeoPixels. The Arduino Mega controller communicates to this over the TX/RX pins. The Mega will tell the Mini when to activate the NeoPixels etc and at times may wait for data communicate back over the TX/RX pins to do other operations.

PCA9685 Controller: Picked this up from Adafruit, this is controlling the servos. It connects to the SDA and SCL pins on the Mega.

Now you may be asking, why am I separating the sound/servos/neopixels lighting from each other? Because each of those 3 work on interrupts on the pin connections. This is why you would get random crashing and or twitchy servos etc. The servos require constant connection over the interrupts, when they are deactivate for just a microsecond from the music maker shield and or neopixels, it causes the servos to twitch when the interrupts go off and back on. The Neopixels and Music Maker can also conflict with each other as well in similar fashion. So by separating the 3 of them, you no longer have conflicts, and a smooth running non-buggy trap.

For the volume control on the rotary encoder, it will adjust at anytime during the trap sequences. When the trap is in a resting state, when you turn the encoder knob for the volume, the bargraph LED will light up to indicate the volume levels. This indicated lighting auto dims off after a few seconds.

For the 8 position rotary switch on the left side, turning it changes the modes like I described above. I programmed the bargraph LED to light up in different colours to indicate different modes while you switch between them. It will auto dim off after a few seconds when you make the change. Also the rotary switch when you change it during a trap sequence, nothing will happen until after the sequence has finished and it will change to the new mode you switched to.

Also when in modes 7/8 which are captured state modes, if you press the rotary encoder switch in or press the trap pedal, it will run the smoke pump for 5 seconds to give you a smoking trap which will linger around for awhile. Press it again to generate some more smoke when needed.

Here is a video sequence showing the different modes in action and volume control.


1984 Mode (with smoke)
Image

1984 Mode (no smoke)
Image

1989 Mode (with smoke)
Image

1989 Mode (no smoke)
Image

Misc mode (A mix of 2016/1984/1989 sounds) (with smoke)
Image

Misc mode (A mix of 2016/1984/1989 sounds) (no smoke)
Image

Position 7 and 8 are captured states and do not show a mode change on the bargraph. Instead they do the bargraph light up routing and either stay in a solid rear red light or blinking red light + random sparks here and there.

I hope to have this assembled into the trap over the next few days after my mini metro arrives, and I will post up all my code and wiring schematics if anybody wants to use them.

Image
Image
By gpstar
#4968423
Alright, here is the end product:



This has been created with the following micro controller setup:
Arudino Mega (I stack a Mega protoshield (adafruit part# 192) on top of the mega (do not forget to solder the pins) and then a music maker on top of the protoshield.) I included in my link a STL file to 3D print to hold the Mega and give it a bit of ground clearance over the wheels and v-hook bolts. I cut the ends flush with the nuts on my v-hook to additional clearance.)
Adafruit Metro Mini (just a mini version of a Arduino Uno) (for the Adafruit NeoPixels)
PCA9685 Controller (for the servos)

******* WIRING CHANGES FROM CHARLESWORTH DYNAMICS ORIGINAL GHOST TRAP GUIDE *******
Yellow LED: Move to pin 8 on the music maker shield.
Bargraph pins: yellow and blue wires on analog 5 and 4 get moved to: (yellow) -> SCL on music maker. (blue) -> SDA music maker.
Rotary encoder (if you need one: adafruit part #377): Make a new 3 pin plug: middle pin goes to ground. The 2 outside pins: When viewing the 3 pins from the top (button side) of the encoder with the 3 pins facing north (top), the outside left pin goes to pin #39 and right side pin goes to pin #38. on the mega. The 2 pin side stays the same as CHARLESWORTH DYNAMICS updated guide.
8 way rotary switch from Adafruit (part #2925): connect to pins: 22 to 29 on the Mega. #1 pin on the switch goes to #22 pin work your way up to #8 pin on switch going to pin 29. Then centre pin goes to ground on the breadboard power/ground rail.
Image

NeoPixels:
The Neopixel's are control by a Metro Mini from Adafruit. The NeoPixels can conflict with anything that requires interrupts (random crashing and resets), such as the Servo motors and the music maker. This is due to how the NeoPixel library operates and turns off interrupts on pins.
The Mega will send commands over the tx channels to tell it what to do. Sometimes the mega will wait for a response back before it continues.
You can connect any Arduino board, it can be a Uno, Mini, Mega or whatever. It just needs to have a TX and RX pins and attach the NeoPixels to a digital pin.
For my example I did the following: NeoPixels connect to pin #5 on a Adafruit Metro Mini, and TX (mini: pin #1) to RX1 (mega pin# 19) and RX (mini pin #0) to TX (mega pin #18). Then run 5v and ground from the metro mini into the breadboard power/ground rails.
Image

NeoPixel wiring: Follow Ectolabs guide of chaining them together. In a sense it goes like this: (I use a 3 pin plug) with the ground/5v power wires going to the breadboard power/ground rails and the other going to the Adafruit Metro Min pin #5:
Pin #5 on a Adafruit Metro Mini -> 470ohm resistor -> (NeoPixel #1) IN. (NeoPixel #1) OUT -> (NeoPixel #2) IN. (NeoPixel #2) OUT -> (NeoPixel #3) IN.
(NeoPixel #3) GND -> (NeoPixel #2) OUT -> (NeoPixel #2) GND -> (NeoPixel #1) OUT -> (NeoPixel #1) GND -> GROUND (on the proto shield ground rail)
(NeoPixel #3) PWR -> (NeoPixel #2) PWR -> (NeoPixel #1) PWR -> 5V (on the breadboard power/ground rails)

Servos:
The servos are controlled separately by a I2C PCA9685 controller, so they do not interfere with the NeoPixels and or the Music Maker. (no more servo twitching or crashing).
This needs to be connected to SDA and SCL on the Mega and the Left servo on PWM 0 and Right servo on PWM 1. If you switch it up, just change the pin settings in the code.
Connect 5V and ground on the I2C to the breadboard power/ground rails (This only powers the board and not the servos).
Then I run a separate 5v and ground on the middle/top of the PCA9685 with 2pin terminal block to the breadboard power/ground rails. This only powers the servos and not the PCA9685 controller. Then wire the servos power and ground to the appropriate V+ and GND pins under the PWM pins.
Image

Music Maker:
Before attaching to the Mega, you need to connect the MISO, SCK and MOSI on the ICSP side. Optionally you can cut the #11, #12, #13 connectors next to them to free up those pins on the Music Maker, but it is not required since we do not use them.
Image

Rear red LED is moved from analog #1 pin to digital i/o #3. This could also be moved to pin #6 as well as #3 is a interrupt pin which by default is used by the DREQ on the Music Maker. However the original guide had us move the DREQ to pin #2 on the Music Maker so I just left my rear red led connected to pin #3 as it was unused. If you do not follow the original guide, I would leave DREQ on the music maker shield at the default #3. Then just change the DREQ pin number to 3 in the code.
NOTE: Connect the db+12 and db+6 on the music maker to prevent the hissing sound during the bootup sequence. This will make the trap louder but you can always adjust volume. I prefer it loud to help hide the smoke pump motor while in smoke capturing modes.
NOTE: When using the music maker with +12 and +6db, at max volume, basically anything less than 40 volume level can crash the arduino if you are powering it by USB only.
if you plug in your battery to the power booster and flip the power switch on, it will solve the problem (even with usb still plugged in).

When installing into the trap, I keep the PCA9685 servo controller and Metro Mini attached on to the right wing. It looks like it is a tight fit but there is still some space.

Image

Image

Link to files:
https://drive.google.com/drive/folders/ ... sp=sharing
Nighty80, Ginty TM liked this
User avatar
By ImperialWalker
#4968610
Sigh...

This thread is like winning the lottery, then walking out into the street with a huge smile, getting punched in the nether regions and robbed. Here is why...

These alterations are nearly 100% how I envisioned my trap working. From the moment I started building it I was always frustrated by the lack of accuracy and options of the original CD design. I spent many hours attempting to learn and add a fraction of these features (volume, sounds, smoke on/off).

For weeks I poured over the updated code by EctoLabs in an attempt to sort out some of the glaring issues with the hacked together code and while I was able to implement one of my goals, the code was just too much of a mess. I cleaned it up the best I could, but was never able to fully understand or implement my vision.

This does everything I've wanted my trap to do and it excited me to give it a try. At the same time the amount of work, additional parts, and wasted time is super disheartening.

This of course has nothing to do with GPStar. It is just frustrating to know it is possible now, but to do so has extended the time and cost of this trap even more.

So, perhaps I'll ask a few questions and hopefully there is a way to get the motivation.

1. Do you think it would be possible to integrate my idea ( viewtopic.php?p=4953312#p4953312 ). This was something I wanted to add and expand on as I had time.

The idea is that when the capture sound triggers it plays a random capture sound that contains a different "ghost." My original goal was to do as you've done where this could be an option so if I wanted a straight capture sound I could set it, but also have the option of the random captures.

2. Is there any way you can think of to make all this work with the UNO, but use smaller cards instead of the MEGA and MEGA Proto? Like a bunch of NANO's or FEATHERWING's or something?

The reason I ask is because A) I modified my internals and I don't have that much room left in the trap. Also, the cost involved to purchase all those components and set aside the UNO will be a tad hard on the budget. A quick pricing looks to be almost another $100+ CAD for all these additional boards and it would be nice to figure out a way to do them with a smaller footprint

3. That pedal light.

I have not been able to solve this one. The only solution I had was to add an additional switch to the pedal and when they're both pressed one triggers the trap and the other triggers a mini controller in the pedal that simulates the pulsing light.

Not an ideal solution because timings were an issue, turning it on, etc. etc.

I wish there was an elegant solution to add some life to the pedal.

...

This is honestly my dream trap and I am super impressed with what you've done. I would love to find a way to make this work because it will forever drive me nuts knowing it is possible.

Well done!
By gpstar
#4968641
ImperialWalker wrote: April 5th, 2022, 1:54 pm Sigh...

This thread is like winning the lottery, then walking out into the street with a huge smile, getting punched in the nether regions and robbed. Here is why...

These alterations are nearly 100% how I envisioned my trap working. From the moment I started building it I was always frustrated by the lack of accuracy and options of the original CD design. I spent many hours attempting to learn and add a fraction of these features (volume, sounds, smoke on/off).

For weeks I poured over the updated code by EctoLabs in an attempt to sort out some of the glaring issues with the hacked together code and while I was able to implement one of my goals, the code was just too much of a mess. I cleaned it up the best I could, but was never able to fully understand or implement my vision.

This does everything I've wanted my trap to do and it excited me to give it a try. At the same time the amount of work, additional parts, and wasted time is super disheartening.

This of course has nothing to do with GPStar. It is just frustrating to know it is possible now, but to do so has extended the time and cost of this trap even more.

So, perhaps I'll ask a few questions and hopefully there is a way to get the motivation.

1. Do you think it would be possible to integrate my idea ( viewtopic.php?p=4953312#p4953312 ). This was something I wanted to add and expand on as I had time.

The idea is that when the capture sound triggers it plays a random capture sound that contains a different "ghost." My original goal was to do as you've done where this could be an option so if I wanted a straight capture sound I could set it, but also have the option of the random captures.

2. Is there any way you can think of to make all this work with the UNO, but use smaller cards instead of the MEGA and MEGA Proto? Like a bunch of NANO's or FEATHERWING's or something?

The reason I ask is because A) I modified my internals and I don't have that much room left in the trap. Also, the cost involved to purchase all those components and set aside the UNO will be a tad hard on the budget. A quick pricing looks to be almost another $100+ CAD for all these additional boards and it would be nice to figure out a way to do them with a smaller footprint

3. That pedal light.

I have not been able to solve this one. The only solution I had was to add an additional switch to the pedal and when they're both pressed one triggers the trap and the other triggers a mini controller in the pedal that simulates the pulsing light.

Not an ideal solution because timings were an issue, turning it on, etc. etc.

I wish there was an elegant solution to add some life to the pedal.

...

This is honestly my dream trap and I am super impressed with what you've done. I would love to find a way to make this work because it will forever drive me nuts knowing it is possible.

Well done!
#1: yes super easy to do, not a problem.

#2: it should possible with just a uno + a mini metro + the separate servo controller. I need to check to see how many free pins are left on a uno after moving the servo out. You need a lot of pins for the 8 position switch though it is possible to use 1 analog pin and chain each switch position with resistors and read the current, more complicated that way though. Or you could just use all the extra pins on the metro mini for the 8 position switch and have it communicate to the metro uno over the tx/rx pins to let it know it has changed position etc. It would just require some more code, nothing too complicated.

#3: I have been thinking of a solution for this for awhile, not a easy one to solve with using the existing foster connections. I am back from vacation on friday, I will post up soon when I figure this out.
By gpstar
#4968759
I may have come up with a solution for the pedal led. I am just waiting for a new pedal switch to arrive.

My idea is to remove the existing switch for the pedal that comes with Charlesworth kit, it is a off (on) switch, to one that is a on (off) switch, but then have the wires from the led connected to the switch and then into a pwm pin in the arduino, completely removing the wire setup that branches into the side trigger knob. Then I will write some code which detects when the led is detected and not detected (pedal press which severs the led connector to the arduino) to trigger the trap.

I will test it out in the coming week.
By gpstar
#4968824
Here is a video of the trap pedal with working led to add some life to the pedal. I will post up my code and instructions tomorrow while I clean up a few things with it.

In short, the only thing required will be a 5mm red led, a 180ohm resistor and a new switch to replace the existing one in the pedal, and some minor wiring changes. It adds up just a few dollars $ in parts.

Nighty80, oidoglr liked this
By gpstar
#4968846
So here are the instructions of what I did:

Pedal side:
Replace the existing off - (on) switch provided by Charlesworth for a new one that is on - (off). You can get this from mouser for just under $3, the part number is: 642-MBZ101A01A02X01

Image

The new switch may or may not come with the roller lever on it. Mine did not so I removed the one off my old switch from Charlesworth and put it on the new one.

Old switch on left, new one on right.
Image

Moved the roller lever over to the new switch.
Image

Here you can see my foster connection setup. We are still using 2 wires as per the original instructions from Charlesworth. In my case, the wire that runs through the middle of the foster connection (the black wire in the box) is going to be my LED wire, and the wire soldered to the outside of the foster connection which is hidden by the hose will be the LED ground wire (you see it as the blue wire inside the box in the photo).

Image

I run the LED wire to the switch and solder it on to any pin, it does not matter which one. Then make a new wire and solder it on the remaining pin on the switch and run it through the pedal to the other side. In the photo, the black wire is the main wire running through my foster connection, the new red wire on the switch is going to run to the other side of the pedal to the LED. You will need to run the ground wire through to the other side of the pedal as well (my blue wire)

Image

On the other side of the pedal, you will need a 5mm RED led with specs between 1.8v-2.2V (most are like this), I use a diffused red led but it can be a regular red led. I prefer the diffused one. You can find these on amazon, mouser, adafruit in packs of 25+ for a few dollars, or go to a electronics store and buy one for a few cents. Now the red wire from the switch will run to the LED long pin (i cut my pins short to the same size), solder a 180ohm resistor between the wire and the LED. The blue wire solder onto the shorter pin on the LED, this will be the ground. The LED can press fit into the LED cover for the hole on the box.

Image

Trap side:
Charlesworth original instructions has the right side encoder with the push button split to the foster connector in the rear battery box (via a muti wire plug shared with other things). I leave the wires unchanged in the battery box, and follow them up to where they split/join to the right side trigger button and cut them (Make sure not to cut the main trigger switch wires running to one of the GPIO pins and 3V on the Music Maker). We are going to reuse these cut wires. The black wire on my foster connector in the battery box will now lead into Pin #5 on the Music Maker shield. The other blue wire from the foster connector will run to the ground rail on the breadboard power/ground rail.

Image

Upload the new code (v3.1) to your mega and thats it. One thing to note, you can still use the trap without the pedal. however if you want to use / remove the pedal, turn the power off the trap before connecting or disconnecting the pedal. How it works is the trap is always powering the LED (keeping it turn off until needed during the captured states), and when it detects the LED connection has been severed, it triggers the trap. During the boot-up process of the trap, it will scan for the pedal led and if it does not detect it, then the trap will ignore all the pedal code. Turn the trap off, plug the pedal in and turn the trap back on and it will detect the pedal and utilise it.

Image

Link to all my files:
https://drive.google.com/drive/folders/ ... sp=sharing



By gpstar
#4968851
ImperialWalker wrote: April 5th, 2022, 1:54 pm 2. Is there any way you can think of to make all this work with the UNO, but use smaller cards instead of the MEGA and MEGA Proto? Like a bunch of NANO's or FEATHERWING's or something?

The reason I ask is because A) I modified my internals and I don't have that much room left in the trap. Also, the cost involved to purchase all those components and set aside the UNO will be a tad hard on the budget. A quick pricing looks to be almost another $100+ CAD for all these additional boards and it would be nice to figure out a way to do them with a smaller footprint
I have been thinking it over and yes it can be done with just a uno + a metro mini + a i2C PCA 9685 controller for the servos. For now I wont spend my time redoing the code as nobody has requested it yet for a uno, but if you are serious about tackling it by adding a metro mini + the servo controller to your uno setup (+ the led pedal switch mod I did), I will rewrite the code to make it work for your uno.

Message me or post up here if you want to do it.
User avatar
By ImperialWalker
#4968877
gpstar wrote: April 13th, 2022, 7:04 am
I have been thinking it over and yes it can be done with just a uno + a metro mini + a i2C PCA 9685 controller for the servos. For now I wont spend my time redoing the code as nobody has requested it yet for a uno, but if you are serious about tackling it by adding a metro mini + the servo controller to your uno setup (+ the led pedal switch mod I did), I will rewrite the code to make it work for your uno.

Message me or post up here if you want to do it.
You *points* are a legend!

First, and not to blow sunshine up your butt, but it it is really cool to see someone who knows what they're doing solving issues. Competency and experience are always really cool to witness and even if I wasn't building this trap I would be impressed with how elegantly you've tackled and solved these challenges.

The fact that you solved the pedal light with such an easy solution shows just how far off track I was with my idea. I am going to work on that one straight away as soon. I just got some NO/NC microswitches from Aliexpress for another project so if I am understanding correctly this should give me the option to wire it up in "on - (off)."

If not, I'll order one from Mouser.

In regards to the Uno + Metro Mini + i2c PCA 9685. I don't want to assume you're available for my specific needs and desires. :D

The only real reason I asked if it can be done is that based on the amount of people that I see directed to Charlesworth's trap, it is likely that they (like myself) will purchase that hardware then find your post.

A bit of a side tangent. The Charlesworth trap is awesome, but I feel it has seen its day. His trap has been the staple for 3D printed traps since 2016 and because of his connection with Tested/Adam Savage it has become very popular. However, in my opinion he hasn't kept up with the popularity and aside from the odd update here and there, he really hasn't done much to improve overall accuracy or update the electronics.

Your solution here should in my opinion be the current standard. Your code is clean, your instructions are clear, and your functionality is way beyond what CD is offering. That said, I am going to PM you about something I hope you might be interested in.

Anyway, until better solutions are adopted, it would be nice to have the option to use the existing hardware. I am not opposed to purchasing and remodelling my current trap, but I would rather use what I have and spend the money on another project.

Also, I am interested in learning so I don't have to rely on the generosity of others. I'm happy to try and work out the code myself. I got a lot of satisfaction of getting my random ghost capture sounds to work and it is a skill that is on my list to learn. That said, if you are bored one rainy day and feel like tackling the code, I would be super grateful.

I really appreciate you taking the time to share this. I am going to direct everyone starting their CD trap here so they hopefully can implement these ideas. Thank you!
By Ginty TM
#4968955
Great work on the trap. I do like all the features you have incorporated, I am still using the same hardware as in the CD specs but think I might give this a go when I've finished my other projects. currently doing the PKE at the min and that's taking all my spare time. Just like to say thanks for the work you have put into this to make it even more better and thanks for sharing as im definitely not a coder in the slightest but I can follow instructions.
gpstar liked this
By gpstar
#4968989
Ginty TM wrote: April 19th, 2022, 7:59 am Great work on the trap. I do like all the features you have incorporated, I am still using the same hardware as in the CD specs but think I might give this a go when I've finished my other projects. currently doing the PKE at the min and that's taking all my spare time. Just like to say thanks for the work you have put into this to make it even more better and thanks for sharing as im definitely not a coder in the slightest but I can follow instructions.
Feel free to post here or message me if you run into any trouble and or need some help.
By djsparky
#4973647
beautiful work. I'm finishing up a throwing chicken trap with the removable cartridge. I bought the servos to open the doors, and thought they were analogue controlled, I didn't know about needing a board. I can wire a house, but I don't get code and boards, so your trap is just magical.
By seattlebuster
#4974967
First time poster, long time lurker. Using the v2.2 code and the sound files, the trap catching sequence and audio are not timed up, also the buzzing after closing sound as well.

Any ideas if I am doing something wrong? Your mods to the code look amazing in your video.

Great work !

Thank you for any supplied help .
By gpstar
#4975006
Yes the problem is the way the neopixels and the adafruit musicmaker work. They both temporary disable the TIMER0 interrupts to function. Which then throws off the internal timer in the arduino board, which is why sounds do not sync up. The original electronics choices for the CD trap are not very ideal for this very reason.

That is why I ended up offloading the neopixels to a separate arduino board and the servos to a servo controller to get things to work properly consistently.

If I was to build another one, I would switch to a teensy microcontroller and ditch the adafruit music maker for a slightly more expensive Robertsonics mp3 trigger.

You could try to alter the timings in the 2.2 code but it would never be correct all the time, or do the updates I did by offloading the neopixels to a separate arduino board and the servos as well.

If you need any help, just shoot me a message.
By Lyfie
#4975835
This trap kit is amazing.

I have a BOK trap kit on the way and I’m looking to put an electronics kit in mine. I was going to go with the ghostmech as it’s plug and play, but after seeing this, I need this kit in mine.

The only problem is, I’m not good with electronics at all. Would you consider selling a plug and play kit?
By seattlebuster
#4975990
I finished the trap using the new 3.1 code. Works great! Sick features.

One thing, I cannot get the trap to operate by shorting the foster connector now. I moved the foster center wire to number 5 on music maker. I moved the blue outer foster wire to ground.

I verified I have .7 volts coming from the center pin on boot.

What have I done wrong ? Lol.

I verified uploaded code is 3.1. I also made sure to snip the blue and black wire from the side button before it joined with the others right after the connector . Could that be what I did wrong?
Image
By gpstar
#4976207
seattlebuster wrote: December 31st, 2022, 4:49 pm I finished the trap using the new 3.1 code. Works great! Sick features.

One thing, I cannot get the trap to operate by shorting the foster connector now. I moved the foster center wire to number 5 on music maker. I moved the blue outer foster wire to ground.

I verified I have .7 volts coming from the center pin on boot.

What have I done wrong ? Lol.

I verified uploaded code is 3.1. I also made sure to snip the blue and black wire from the side button before it joined with the others right after the connector . Could that be what I did wrong?
Image
Did you boot the trap up with the pedal connected or not connected? It will operate differently depending how you boot it up with the pedal or not.
By seattlebuster
#4976208
No pedal boot.

Maybe that’s why? Apologize for my stupidity in advance if that is literally what I did wrong.

I haven’t finished my pedal yet, it was just trying to test it off the foster connector on the back. I need to get motivated to finish the pedal lol
By gpstar
#4976225
seattlebuster wrote: January 4th, 2023, 3:14 pm No pedal boot.

Maybe that’s why? Apologize for my stupidity in advance if that is literally what I did wrong.

I haven’t finished my pedal yet, it was just trying to test it off the foster connector on the back. I need to get motivated to finish the pedal lol
Correct. Shorting the foster connection won’t trigger the trap with the updates I made. The trap detects if there is a pedal connected on boot up and if there is no pedal, it ignores the foster connection. You can trigger it manually from pressing the silver volume knob.

If the pedal is connected to the trap, then the trap feeds power to the pedal led, then when the connection to the led is severed by the pedal press, the trap does it’s thing.
By freakmanultra
#4979785
Is there a version of this code that uses the standard LED from the CD kit instead of the neopixles? I can't afford to spend any more money on this project. My wife would kill me.

Thanks!

Finally got my copy today - It's not the worst I'v[…]

I don't remember exactly, But I think I've had pr[…]

Someone ID'd them on Facebook first, there w[…]

Two specific ideas I have are basically holiday sp[…]