Introduction: Boo Catcher

About: Maker Dad.

I started this project to teach my daughter to learn python and how to do some woodworking. We all know 2020 COVID19 has really put a strain on normal life. Now that Halloween is upon us and the pandemic situation is not abated enough for us to have a normal Halloween we came up with this. "Booing" is a thing in our area where friends leave treats and ring the doorbell. Kind of like a reverse trick or treating. We came up with having a Halloween prop that would act as a prop and provide proof as to who "Boo'ed" us. (Also we attempt to scare the boo'ers!) We caught quite a few kids "booing us" however I do not have permission to upload their photos to the internet. The videos above volume were set to about 30% for testing however on the week before Halloween we cranked it up to 100% and the kids freaked out! I hope you enjoy our project as much as we did making it. Now onto the Boo Catcher!

Features:

  • Camera to take pictures of the kids booing us.
  • Motion-activated.
  • Scheduler code to only activate between settable hours.
  • Linear actuator that opens and closes the coffin lid.
  • Weather checking API to make sure its not raining so coffin does not run the open/close code.
  • LEDs strip for custom light scenes.
  • Fully written in Python3.
  • Outdoor marine grade speakers that can play custom mp3's.
  • Fully modular object-oriented code.
  • Webserver that displays motion-activated captured images via any browser.

Supplies

Links are not working for me in this section so I have and up to date document with links to supplies needed.

https://docs.google.com/document/d/1-NF_l4xbm9ALQFXmyTEKfUu9ZaDDdL8WGo09SA1Isyg/edit?usp=sharing

  • 25x 1x4 pine lumber
  • Wood glue Biscuits (if using a jointer)
  • Raspberry Pi 4 (any model really, I used a 4) -
  • 2-3 LED WS2811 Strips Raspberry Pi-EZ Connect Cape (Optional but makes life much easier)
  • Linear Actuator - This is the one I used but it was expensive and very loud. Might look for a different one?
  • Raspberrypi Relay Cape - This is to control the coffin opening and closing Misc wire, I used Cat-4 because it was on hand.
  • Terminal Blocks - Acts as junctions for ground, 12v and 5v rails. Cleans up wiring and are really great.
  • Raspberry Pi Camera Extension Cable
  • Panel mounting male AC plug - If you are going to build the AC in the bottom of the coffin as I did this is the input to use.
  • Speaker Amp Outdoor
  • Speakers Analog Audio Input Cable
  • Misc Speaker Cable
  • Generic USB sound card

Step 1: Build the Coffin

I found some plans in an online forum that provided a PDF on some simple plans (angles cuts etc) on how to make a coffin. We used these plans as a starting point for our project. I did not create these but they were really good. (They were created by Jason Becker in 2016 and you can download his work here) These plans were for a coffin that is a bit different than what we had planned (you know moving, lighting, and cameras, etc).

If you have a miter saw it really helps with this process as you need to cut the ends of the boards to specific angles so they all line up to make a coffin shape.

I started out by getting 1x4's of pine from a big box lumber store. All of the supplies are listed in the PDF's above but I would get a few extras (21 is needed but get 25 for a little bit of room for mistakes). I have some photos of the process but it's pretty self-explanatory. Just look at the plans and cut the angles.

I did change a few things. I have a biscuit joiner and though I would use it to make the coffin a bit stronger. However, it was more likely over-engineering. I also put some braces in (see picture above) that would help stiffen up the coffin since I knew I was going to be having it stand upright in the yard. For the top and bottom, I just glued together the boards, put in the biscuits, and clamped them together to dry. After I had a top and bottom made up. I started assembling the frame on top of the coffin bottom (as seen in pictures). This gave me a workbench and an idea of placement.

When assembling the mitered edges of the frame I used glue and a brad nailer to help with the process. However, I suspect it was not really needed. Finally, once the frame was built to my liking I then positioned the frame in the center of the "table" and traced the outline of the coffin to be cut out. Don't go right up against the edge give yourself a little room. If it's too small that is bad news. However, if it's too big this is pine and easily sandable. Then I took a straight edge and a circular saw and use it to cut out the top (and bottom same process). It's finally looking like a coffin! Also, get your kids to do the bulk of the sanding!

If you have any questions let me know in the comments.

Step 2: Coffin Lid Design

For this part, I used a large format CNC and some runes design I found online to do a cut out on the top. This is totally optional and was quite a mess, to be honest. I am going to tell you how I made the top and then tell you how you should avoid all of my mistakes! With making comes mistakes.

We painted the whole coffin black, including the top. I then mounted the coffin top to the CNC and CNC'ed out our design. However, just using a jigsaw and cutting your own design would have worked as well.

I then had the idea of using resin to "fill in the design and still able to have light shine through". I glued a piece of plexiglass I had as scrap to the back of the top then poured the epoxy resin. This was pretty terrible. It leaked and only kept about 1/4 of what I put into it. It got the job done but in hindsight, I would have just left the plexiglass I used as a stopper as the "water barrier" I wanted. I also should have painted the pine that was exposed from the CNC before doing the pour.

I also had the idea to create little "seems" around the top of the coffin to let the light shine through. While this worked the way I did it was pretty terrible :) I traced a line using a straight edge around the top then drilled a hole and cut out the shape with a jigsaw. I then put it back in place and filled it with clear silicone. How I would recommend you do this is do not to cut it completely out. Leave at least 4 spots of a few inches connected. I would recommend the corners of the intersecting lines you trace on there. Then you can do the same as I did and fill the rest with silicone if you want to. I would also get a small file and file the lines you cut out with the jigsaw to make the LEDs more prominent at night.

To summarize, you should really make this your own, choose a design make it unique, and have fun.

Step 3: Install the Speakers

To make the scary sounds we need to install our speakers now. The speakers are marine grade outdoor speakers that sound surprisingly good for $20.

Use the template that came with the speakers. I placed them on each side of the coffin about 2 feet from the bottom in the middle of the coffin (width-wise). Use a drill to start a pilot hole then use a jigsaw to create the hole for the speakers. It really is not critical to get this perfect, as you can see from my lack of precision. The speaker itself will hide the hole so no big deal.

Step 4: Install the Linear Actuator Mount

The linear Actuator is going to be used to open and close the coffin. All you have to do it is get a few strips of scrap wood and use the actuator as a guide as to how far to place them together. You can glue the 2 strips to the top of the coffin (or screw up to you) as seen in the photos. You don't have to install it fully right now. If you want to you need to wire tie / solder the wire extension to your actuator in order to get the wires to the Raspberry Pi relay cape.

Step 5: Electrical Wiring

This is a DANGEROUS step.

This is the recommended way of doing this.

A/C can kill you. If you are unsure about this. The easiest thing to do is just drill a hole for an extension cord to come into the coffin and create a box with a mini power strip and put all AC DC adapters (stereo amp, 12v supply, and pi power) in the box then seal it.

If you want to do what I did here is a brief explanation.

I chose to use a surface mount male plug and an extension cord to plug into the coffin. I made a small box out of some scrap wood had cut for the coffin to make a housing for the AC input into the coffin. I also drilled a hole (using the panel mount AC plug as a template) into the back of the coffin so that it was housed in the small box I made. You can pick up AC outlets at big box hardware stores as well as electrical housing. I have purposely not shown the AC wiring as I do not feel comfortable instructing people on the use of AC wiring in this instructable. That being said if you are familiar with AC wiring this should be more than enough to get you started.

The plug is connected to 2 outlets. (They SHOULD be GFIC outlets however my outdoor outlet is a GCIF and I did not need one. You may) These outlets provide power for the AC adapters needed in the rest of the project.

Step 6: Mounting the Camera and Motion Sensor

First, we will mount the motion sensor. The placement of this was about 3 inches below the bottom-most part of my design. I used a Forstner bit I had that was fairly close to the size of the motion sensor. I then had to chisel out some more material to get the rectangle PCB of the motion sensor to fit snuggly in the coffin lid. from here we have to wire it up before we glue/tape it up. I have attached the pinout diagram. You can get 3 female jumpers and snip 1 end off of each, place them on the male jumper, and then solder/wire tie these cables to a much longer cable. This cable has to reach the Pi. I also stapled the cable from the sensor, down the lid then back up and into the electronics housing box (we will make that soon). So make this cable a bit longer than you think you need to be sure. Note what color or wire goes to each pin (Gound, Signal, 5v) so that we can hook them up to the right spot when the Pi is ready.

Next, we do the very same thing but we don't cut all the way through the coffin we want to stop with about 1/8-1/4 inch of the coffin lid remaining. Then we drill a 1/4" hole directly in the middle of the previous hole. This hole is for the Pi camera to sit in. Again, chiseling will be needed to fit the PCB snugly. This takes a little finesse. Before we mount the camera we have to put the camera extension cable in the camera (as seen in the pictures as a black ribbon cable) Once you can tell its in the right spot glue it and tape it down. Don't go crazy with this as if the camera looks like it's in the wrong position you might have to come and redo it.

Step 7: Install the Door on the Coffin

I had a few brass door hinges that I had lying around. The easiest thing to do is get the door on the top in the position you want. Place the hinges like they are in the above picture then screw them down. if you have someone sit/hold the top while doing this it should make it so it does not move on you when mounting. I also installed a spring from the hardware store on the top of the coffin. This did 2 things for me, it kept the coffin closed and it also pulled the coffin door to the side which made it closed more aligned than it was. Lastly, I put some weather stripping on the edges to keep the weather out. I also wrote the code to keep the coffin from opening if there was rain detected.

Step 8: Wire the LEDS

This part is pretty tedious. The WS8212 LED strip that I used worked directly connected to the Raspberrypi. Sometimes some strips will not see the 3v3 logic levels that the Pi produces and you will need a level shifter. Fortunately for me, this was not needed for these strips.

From here on hot glue is your friend and enemy, oh, and duct tape too.

If you did the cuts on the top of the coffin you want to place the LEDs so they are facing the "cut" in the coffin lid. This allows the LEDs to shine through the silicone and light up nicely at night. Follow the cut with the LEDs, hot gluing them down as you go. Once you get to an angle you can snip them then solder them back together. This was a lot of work so I decided to just "wing it" and bend, glue, tape them down and it seemed to work fine. Just remember the RPi can only support 1 strand of lights so we have to connect this strip to the Pi and the other end to the start of the next strand. You can solder to the ends now or wait until connecting everything to the pi. The other strand I had I put about 2 inches below the coffin opening and ran them all the way around.

Just be mindful of where you place the start of this strip. Ideally, it should be close to the end of the previous strip. I did not do this :) I would suggest that you place the end of the first strip installed at the very bottom then the start of this strip at the very bottom as well so they are easy to wire together.

Lastly in the G18 pin on the proto cape attach that wire to the data input of the LED chain start.

Step 9: Mount the Electronics

We need to make another little box for the electronics. This is to keep it all neat and out of the weather should it rain. I made a box out of the 1x4 that was around 12" x 12" square. This was nothing special just glued/nailed pieces together to make a box.

Then I placed it where I thought it looked good and put a level on top to make sure it was level. Why? I am not quite sure, years of doing things a certain way I guess. 100% not needed to be level. Slap it in there and screw down from the backside of the coffin into the newly created box. I also created a little plexiglass cover for the box and etched the project name and the Instructables logo.

Important:
Notice that all holes are at the bottom of the box for cables etc. This is so rain/water etc gets in from the top it will not drip on the electronics from the top of the box. So only place holes in the bottom of the box.

Once you get the box in position start to play around with placement. I started with the pi and then mounted the speaker amp and next, the terminal blocks.

Don't worry about the wiring yet we will get to that in the next step. This is just to help you get an idea of the mount points.

Step 10: Power the Terminal Blocks and

Now we need to power the terminal blocks. You can see they came with these little "forks" this is to connect each multiple terminals together. Cut your forks to look like the image above and screw them down. Now you have a place to hookup 12v and 5v and GND signals. Also, note that it's not pictured above but it's a good idea to connect the 12v and 5v GROUNDS (not the 12v and 5v) together.

5v Power:

Now we need to bring in the 5V cable. I had an A/C Adapter that was 5v and around 3 amps (important to have high enough amperage for the LEDs) I cut off the end of this A/C adapter and brought the wires into the electronic box by drilling a hole in the bottom of the enclosure. I also used a voltmeter to determine which cable was + and which was - Typically the V+ will have a white stripe or something on the cable. But use a voltmeter to be sure. Once you know which cable is what you should put them into the terminal blocks like the image above.

12v Power:

For the 12v I used the power supply that came with the speaker amp as the source of the 12v. This powers the speakers and the linear actuator. I cut off the end of the 12v AC adapter but left about 3 inches so I could reuse the connector and hook it directly into the 12v terminal. See the picture above to see what I am talking about. I also then took the + for the actuator and put it into the 12v terminal and the - for the actuator when into the GND for the 12v terminal (It could in reality go to any ground but this keeps things neat).

Pi Power:

I am using an RPI AC adapter that I plugged into the AC box below and ran a cable all the way up to the pi. Simple enough.

Step 11: Raspberry Pi Camera Wiring

This is as simple as it gets. The extra-long cable we already installed in the camera now just gets installed into the camera (2x its the camera port) on the pi itself.

Step 12: Motion Sensor Wiring

First, we put the proto-key cape on the RPI. You will see a pin labeled G15 (white wire) that goes to the signal wire of the motion sensor. Remember we said you should wire this up and make this cable extra long. Well now is the time to trim the cable and bring all 3 wires (GND SIGNAL and 5V) into the electronics box. The other 2 wires, GND and 5V should be screwed down to the terminal blocks we previously installed.

The photos are annotated to help you through this. Just remember the sensor is a 5v device!

Step 13: Relay Cape Wiring

Relax, this is not as hard as it looks. Look at the photo for the actuator wiring.

Here is a simple diagram.

RELAY 1:

N01 : GND

C1 : - Actuator

NC1 : 12v

RELAY 2:

NC2 : GND

C2 : C3

NO2 : 12V

Relay 3:

NC3 : Not Connected

C3 : C2

NC3 : + Actuator

Not much more needed to do, just remember this is a 12v device and 5v is not going to cut it.

Step 14: Audio Wiring

USB Audio:

What I did not realize is the code to drive the LED light strips uses the PWM that is required for the analog audio on the Raspberry Pi. This means I had to get a USB sound card. Luckily for me, I had one laying around. Plug in the RCA cables to the Speaker Amp and then plug in the headphone jack (audio cable) into the USB sound card SPEAKER input. I plugged it into the MIC slot and four hours could not get it to work.

Step 15: Code and Testing

All of the code is available here.

https://github.com/ril3y/BooCatcher

checkout the code with

git checkout https://github.com/ril3y/BooCatcher.git

then install the requirements with pip3 install -r requirements.txt

It's all written in Python3 and can be extended very easily. Each module has a class to drive it. All of these classes also have a way to test out that module alone (vs running the whole system). Case in point if you are wiring up the motion controller and want to test it before you have the LEDs setup you can totally do that by just running"sudo python3 CoffinMotion.py" from the BooCatcher directory. This will kick off the motion controller module and just print out if motion is detected to the console. (Why sudo, you actually only need sudo when doing anything with the LEDs so technically with motion you do not need sudo)

Each module has something similar to assist with testing and to troubleshoot.

The main entry point for the Coffin is "sudo python3 CoffinController.py --run" This starts all subsystems and activates the coffin to wait for motion, then take pictures when triggered, play a sound, open the coffin and change the LEDs. This is all HIGHLY configurable. Quite honestly I ran out of time to do all of the rest of the code. I did however code up a browser that you can view the photos as they are captured over the web. I am no HTML/CSS/JS guy so this is pretty basic and could use quite a bit of improvement. But at least it lets you see the photos.

There is a sound folder that you can add additional mp3's to for more sounds as well.

This section is a bit light on details however, if you need help I please comment here and I will assist. I will accept pull requests!

Step 16: Closing

So there you have it. Woodworking + Computer Science into a Halloween instructable. We had a lot of fun making this and there are clearly more features that can be added! We caught a few kids 'Booing' us and knew who we Boo'ed the following night!

The Coffin was in the house while I was writing and testing the code. I set the volume to 100% then asked my daughter to go downstairs to get me something. She had to walk by the coffin and I got a picture of her jumping off the ground it scared her so bad! I would have loved to have got the video recording working in time for Halloween to capture more than just 5 frames per motion activation. Next year!

Halloween Contest

Runner Up in the
Halloween Contest