Showing posts with label The Pink Panther Strikes Again. Show all posts
Showing posts with label The Pink Panther Strikes Again. Show all posts

Tuesday, October 1, 2019

Building the Doomsday Machine from "The Pink Panther Strikes Again" - Part III: Electronics, Arduino, Raspberry Pi

Now it's less than two weeks that our local Community Theater will be performing "The Pink Panther Strikes Again", in which Dreyfus threatens to destroy the world with a Doomsday Machine - which I volunteered to build. My version is made of three parts: A base, a center piece (holding a computer screen, joystick, buttons, and lights), and a "laser gun" at the top. In Parts I and II of this post, I finished the enclosures. Now I address the electronics, and the programming of the Arduino and Raspberry Pi computers.

My other blog posts for this build:
    Doomsday Machine Part I: Wooden Structures
    Doomsday Machine Part II: Finishing the Enclosure

Lights for the Laser Gun

[Mon, Sept. 30]  To achieve a great effect in the play, the Laser Gun has to be very bright. For this purpose, I am using  a 2835 LED Strip. I am using the cold white version (which is brighter than warm white) and the non-waterproof type (easier to solder).


This strip has 120 LEDs per meter, or 60 LEDs per 20" (=50cm), which is the length of the pieces that I will glue to the barrel of the laser gun (six pieces) and to the front rod (one piece).


The wires go through a small hole in the barrel of the gun.

I am really happy that the glue of the LED strip holds really well to the painted cardboard.

The LED strip, glued to the rod at the front is supported by a few cable ties. 

Since I did not have much experience with LED strips, so far, I was a little worried that they might not be bright enough. But, as it turns out, I don't need to worry about this. They are extremely bright.

Lights in the Center Piece

[Tue, Oct 1]  The center piece has ten openings for LEDs. I am using 8mm, 0.5W Straw hat LEDs. The LEDs are glued to two pieces of plywood.


20 Ohm, 1W resistors are directly soldered to the Anodes and connected to each other.

Circuit Board 

[Thu, Oct 3] Now, it's time to approach the circuit board. The circuit is based on an Arduino Pro Mini (ATmega 168, 16kHz, 5V), two shift registers 74HC595, ten transistors 2N2222 (for the 0.5W 8mm LEDs) 7 MOSFET transistors IRLB8721 (for the LED strips), and it is powered by a 12V/48W power supply (those that you buy for LED strips) and a voltage regulator LM7805 (reducing the 12V to 5V for the Arduino and the 8mm LEDs. (I may post more details on the circuit later - either here, or in a separate blog post). 
This is the least rewarding piece of the work. For the enclosure, you can see your progress in every step - the same applies to the programming. But for the assembly of the circuit board, you can only hope that you did not forget any connections, potentially resulting in an extended bug-search. In any case, you should start with a detailed plan for the layout of the circuit on your PCB. 


Then, after 3-4 hours of soldering, it looks like this.



A first quick test of the power and ground lines shows that I forgot a connection of the +5V line to one of the shift registers. This is quickly fixed (and I really hope this was the only bug).  After uploading a little test program to the Arduino, I'm connecting the 12V power supply to test if I can address all the LEDs and LED strips.

[Sat, Oct 5] I connected all the pieces. I soldered wires to the LED Cathodes and to the common Anode,

screwed the LED holder panels into the Center Piece, and connected all the cables to the circuit board (from the LEDs, the push buttons and the joystick). As a little extra-feature and Easter Egg, I also added a piece, that I built earlier as part of my set of Back-to-the-Future props: the Analog Gauges that sit in the glove compartment of the DeLorean.

At this point, I took everything to the theater. Here, I screwed the Laser gun on top of the center piece and connected the cables from the LED strips to the circuit board. 

In the Arduino code, I am using the ShiftPWM library to control the brightness of the individual LEDs and LED strips through the shift registers. I am using this in "high resolution" mode (with 255 levels of brightness) and it works very well. The LED strips have a range from dim to unbelievably bright.

When everything is mounted on top of the base and moved to the stage, it's a really impressive view (but the very bright lights make this very hard to capture).

[Tue, Oct 8] It still took me a while to finish the coding. The Raspberry Pi is set up such that it starts automatically, plays a short start-up video on the screen (featuring a Pink Panther), and then continues to loop another video showing animation of a "SciFi" computer screen (all in green, like those 1970's-80's computer screens). 
The Arduino is reading the push buttons and the joystick and controlling the LEDs, and has five modes of operation: (1) when powered on, there is some low-level activity of all LEDs. (2) a little more activity, when Dr. Fassbender fiddles with the controls, (3) the LED strips are moving slowly from the back to the front, when Dr., Fassbender starts the countdown to destroy the UN building, (4) the same pattern, but faster when Dreyfuss accelerates the countdown, and (5) increasing erratic activity when Dr. Fassbender starts the self-destruct mode.
Here is the final Doomsday Machine on stage.


The following pictures show a quick run-through (the actors not yet wearing costumes), how they start the countdown,


the machine fires,

and the laser reaches the UN building.




Other posts on the Doomsday Machine:

Friday, September 20, 2019

Building the Doomsday Machine from "The Pink Panther Strikes Again" - Part II: Finishing the Enclosure


Next month, our local Community Theater will be performing "The Pink Panther Strikes Again", in which Dreyfus threatens to destroy the world with a Doomsday Machine - which I volunteered to build. My version is made of three parts: A base, a center piece (holding a computer screen, joystick, buttons, and lights), and a "laser gun" at the top. In Part I of this post, I finished the wooden structures for all three. The next step is to finish the skins of the three.

My other blog posts for this build:
    Doomsday Machine Part I: Wooden Structures

Finishing the Center Piece

[Thu, Sept. 19]  The front side with the openings for the monitor, the LEDs, joystick and switches was already cut with a laser cutter.

On the back side, four wooden bars are glued and nailed, which will keep the computer monitor in place.


The front side is then painted with light grey acrylic paint.


I cut a clear 2 1/2" x 4 1/2" acrylic plate with a laser cutter, which is painted black on the back side. 


This is holding the power switch and two momentary push button switches.


And here is the Arcade joystick, that I had still lying around (for some project on my ever-increasing want-to-do list).


And this is the front side with the joystick and switch plate assembled (the monitor is just loosely placed inside the opening - it will be mounted later).


[Sat, Sept. 21] For some time I collected these pieces from milk gallons.
I always thought that these would make nice LED covers. Now, finally, I have an opportunity to use them.


The centerpiece is finalized by adding plywood to the top and the left and right sides, with holes in the sides for carrying.


Then it comes to painting. Personally, I come from the "Sci-Fi side". The director, however, told me that the set is supposed to look cartoon-ish. And one can't argue with the director. So, here we go...


The computer screen is mounted to the back of the front side,

and this is the final center piece.

Finishing the Laser Gun

[Sun, Sept. 22] For mounting on the Center Piece, the Laser Gun needs a foot. 

The foot is made of a 2"x4" piece (cut at an angle of 15 degrees) and a piece of 1/2" plywood. The 2"x"4 is cut to fit between the two inner wheels of the Laser Gun.  

They are screwed to each other and then screwed to the extensions of the two inner wheels.

The skin of the Laser Gun is made from cardboard, the one they use e.g. at Sam's Club to separate layers of kitchen towels or toilet paper.



In the play, the Laser Gun is always pointing to the right side. Therefore, I can leave a little opening on the backside that will be helpful later, for running cables.
To indicate the direction in which the Laser Gun fires, I am adding two details. One is a 3/8" wooden dowel with a few round pieces glued to the front. 

The other is a little cone-shaped area at the front. Both roughly resemble what is used in the movie.


That makes it look  like this.


To stick to the cartoon-ish theme of the play, I am painting the gun dark blue and pink.


Something is still missing... The version from the movie has some additional details on the front. I found two of these balls from a super-size Ferrero Rocher in my big "stuff-that-may-be-useful-some-day" box. 

And I attached these to the top side.

Except for some additional minor painting: This is the final Laser Gun enclosure.

Finishing the Base

I thought that the whole Doomsday Machine looks better if it was a little taller. Also, the base would look more interesting, if it was raised a little from the ground. So, I added a few 2"x4" pieces to the bottom side.


This adds a little more weight (well, actually quite a bit...) which may make the whole machine a little more stable. 
[Sun, Sept. 29] Then I cut six trapezoids from corrugated cardboard (two elements on the back side will be left open).

These are glued to the sides.

And here is the first appearance of the base on the stage.

The finished base will be painted by somebody else. That means that I am now done with the enclosure, and can start to focus on the electronics and the programming of the Arduino and Raspberry Pi.

Other posts on the Doomsday Machine: