What better project to resurrect from the incomplete project pile then “The Coffin Tester”? This project was inspired by the chance encounter of a small wooden coffin at a hobby store. With a coffin comes the standard project ideas: Someone is trying to get out or someone is inviting you in. Making both projects at once was my decision.
Overview from 6ft Under
The embedded coffin display in the lid shows classic monster portraits, letting you know who is inside. However, the camera in the lid also takes images of the viewer. When it detects a face, it displays the image on the display, letting you know that you are inside now. A Halloween SFX module within the box fires up and horror ensues. The WiFi capable board within makes future upgrades to functionality possible. The horror never ends.
Part Selection
Parts
Name
Image
Details
Considerations
Small Wooden Coffin
Small Body Storage
Cheap and Wooden
Just another item to put me on a watch list
ArduCam ESP32S Uno w/ PSRAM
OV2640 Camera
ESP32S
WiFi
BLE
SD MMC
Based on AI-Thinker ESP32 Camera Configuration and hardware setup
Discontinued hardware, so time to use.
RIP
SFX Halloween Module
Sound and LED Sequences
Strobe Function
Sound/Vibration Activation
Demo Button
Prebuilt Unit
Already themed for coffin themed project
Round Display
1.28 inch LCD Module
240 x 204 Pixels
GCA901A Controller
Realistic Corpse Viewing Port
SD Card Adapter
Micro SD Storage Board
SPI Interface
In order to free up GPIO Pins for interfacing to the display, the onboard SD_MMC is disabled and this adapter provides SD access.
Buzzer
Vibrating Motor
Add a little buzz.
Battery Holders
1 AAA Cell
2 AAA Cells
Volume Issues lead to use of two holders instead of a single 3 AAA cell holder
2 AA Holder used was not messed up like the one in this photo.
ICR18650 Battery
2200mAh
3.7V
Had one lying around
PC817 Optocoupler
Low Voltage Trigger
5kVolts of Isolation
Provides an electrically isolated trigger signal for the Halloween SFX Module
Micro USB Cable
Plutonium Implosion Device
18.6 kilotons
Relatively Small
Had one lying around
Micro USB Port Adapter Board
Micro USB
Allows access for power, programming and charger for internal battery
Additional Stuff
Materials
Jumper Wires Female/Female
Plastic Fork
Strip Board
Painter's Tape
Header Pins Male
Hot Glue
Header Pins Female
Borated Paraffin
Electrical Tape
Heat Shrink Tubing
Element Preparation
Elements
Halloween SFX Module
ArduCam ESP32S Uno w/ PSRAM
Coffin Top
Coffin Bottom
Front Shell – (Not Used)
Reflector – (Not Used)
High Brightness LED 2x4 Matrix
Circuit Board Assembly
PCB
Function Switch – (Removed)
Strobe Speed Potentiometer – (Removed)
Speaker
Piezo Disk – (Not Used)
Demo Button – (Not Used)
Back Shell with integrated Battery Holder – (Not Used)
Battery Cover – (Not Used)
Right Angle Inward Facing Male Header Pins on Underside
Spacers Mounted on USB End of Board
1.25" Upper End Hole for Round Display View
3/8" Lower Mid Section Hole for Camera View Port
Inside Inner Edge Carve Outs for ArduCam Board Mounting
Inside Bottom Edge Carve Out for Custom Bus Board Mounting
Micro USB Access Slot in Bottom End
Two Small Holes for Micro USB Socket Adapter Mounting
Assemblies
Block Diagram of Project Elements
Not in image: A Buzzer was added later to Coffin top.
Coffin Top Assembly
Coffin Top
Construction
The main constraint on the build is volume of the Coffin. If only the functions of the ArduCam, Display, SD Card and Buzzer were implemented then space is not an issue. But, addition of additional functions lead to the decision to ensure that all the Coffin Top functions would be implemented within the volume of the Coffin Top.
The access for power and programming in-place resulted in a USB cable extension capability. This would represent one of the connections between Top and Bottom of Coffin. The inclusion of a Battery charger on the ArduCam meant that a battery could be used to conveniently power the project. This is the second Top/Bottom connection. The SFX Module trigger is the third.
PIN Consideration
GPIO 33 - This pin is available on the ArduCam but not on the ESP32Cam which is why the ESP32Cam can be substituted for the ArduCam with the sacrifice of a GPIO Pin and therefore a function. My suggestion would be to sacrifice the Buzzer and reassign Pins.
GPIO 15, 14, 13 and 12 - This is the standard HSPI Pin assignment on an ESP32. For the ArduCam and ESP32Cam, the onboard SD MMC uses these pins for accessing the SD Card in MMC mode, as well as GPIO 02 and 04. The need for a TFT Display SPI connection is why it is disabled. A SD Card in SPI mode can then be reintegrated into the design.
GPIO 04 and 02 - These Pins are freed up by disabling SD MMC and are available for project use. See Project Surprises Section for GPIO 02 surprise.
GPIO 03 and 01 - These are the RX and TX pins. Use of these Pins later in the project can not Pull-Down the Pins as it would interfere with Boot-Up. During software debugging, the RX can be used if serial input is not needed and serial.print can be used to debug and monitor activity. When all the debugging is done, do not use any serial interaction with the monitor and the TX pin is available. However, upon startup/boot the device automatically sends out messages via the TX. So be prepared for the signals on the TX/GPIO 01 Pin. For my implementation, I assigned the buzzer function therefore the project buzzes upon start up.
Coffin Bottom Assembly
Construction
Well, my decision to document was before my decision to pack it in and glue it down. The primary issues here are space and interface with the Coffin Top circuitry.
The arrangement of contents needs to accommodate the inclusion of a ICR18650 battery. The battery is a late idea for the project and has not been vetted for safety. So, don't do it. Think of the horror of the device bursting in an explosion of fire and chemicals. Don't!!!
Interconnection Assemblies
Interconnectors
Part
Design
Construction
The Coffin Wired Interface can be abandon for permanent wire soldering and save space. But this was a build and experiment. The jumper wires allows for testing and Pin re-assignment.
The Optocoupler is routine for isolating devices with different voltages, current issues, power supplies and signal interference.
Assembled
The most time consuming element of the project was packing the coffin. The parts easily fit but all the wiring gets in the way.
Not in photo: A Buzzer was added later to Coffin top.
Project Surprises:
GPIO02 boot-up tests for the PSRAM voltage requirement and interfered with startup. Required eFuse setting to permanent PSRAM voltage level for normal operation
ESP32 Cam with AI-Thinker hardware setup can be used for the project with a simple pin assignment change and the creators choice of one function loss.
An overly elaborate method for using a vibrating motor to trigger SFX module, isolating the module electrically from Microcontroller abandon due to unnecessary complexity and stray triggering from handling project.
SFX module uses High Brightness LEDs that cause short bursts of high current that have to be handled by separate battery pack in order to not require additional power supply circuitry for a common power supply.
I had a ICR18650 lying around, so battery operation of project utilizing built in charging of the ArduCam. Then again, it could be a self-destruct method.
Had to pin down ArduCam board in coffin, so I used a piece of a plastic fork.