Last time I had determined that the long ribbon cable was too long to fit into the box. So, I ordered a GPIO header with longer pins for the sense hat and a smaller ribbon cable with a 40 pin connector on one end and a 26 pin header on the other to plug into the PermaProto board.
In order to make more room for the board and the connector stack, I removed the three screw terminal connector where I had planned to connect the wires from the Fog machine remote.
Using double sided tape, I secured the PermaProto to the bottom of the enclosure. Then I secured the AC relay to the side wall near where the Fog machine cable will enter the box.
Next, I installed the fog machine cable and wired up the relay board to it. I secured the relay board to the opposite side wall of the enclosure from the AC relay with more double sided tape.
I installed the neopixel ring on the outside of the box and used hot glue to secure the ring in place.
Then I wired the neopixel wires to the three screw terminal connector.
Next, I drilled holes in the enclosure top and secured the Raspberry Pi to it using 4-40 machine screws and nuts.
You'll notice that one screw hole was a little off, so I was only able to install three of the screws.
I installed the new GPIO header on the sense-hat and plugged it into the Raspberry Pi, then plugged the new ribbon cable onto the pins which extended through the sense-hat board.
I closed everything up and tried to connect to the Pi from my laptop. Then I realized the WiPi was not installed. So, I had to cut a hole in the side wall of the enclosure for the WiPi to stick through.
I made the hole where the fog machine cable enters the box slightly larger so that I could run the Pi power cable and the speaker cable through the same hole.
Now, the Foginator 2000 is assembled and ready to test. At this point I know all of the parts work because I've tested them individually. Since the audio amplifier board that I built is dead (the main IC is dead), I decided to use an old amplified speaker from a PC. All in all, it looks pretty good.
However when I tested it, I found that when the PWM is running there is a bunch of noise on the audio line. I thought this might be due to the neo-pixel supply voltage being fed from the Raspberry Pi. So, I disconnected it and ran the neo-pixel ring and the voltage translator chip off of a separate power supply. Unfortunately, that had no effect. Looking at the PWM signal on a oscilloscope, I noticed that there's lots of ringing on the edges. Even with the Raspberry Pi disconnected from the rest of the box, the noise still rides on the audio when the PWM is active. I did a little research and it looks like there's a strength setting on the GPIO outputs on the Raspberry Pi. So, maybe if I lower the strength, that will reduce the ringing. I will write more once I figure out how to do that.
Other than, that everything appears to work. The fog machine switches on when the relay closes and puts out three seconds worth of fog. When the PWM is not running the audio is crisp and clear and plenty loud. The PIR sensor senses motion through the hole in the side wall just fine and when the speaker is turned off, the neo-pixel displays a rotating rainbow when the PWM is turned on. So, I am really close to having a working system. All I need to do is merge all of the code together and I'll be set for next Halloween ;-).