I'm building an HO model train layout and thought "what good is a train without a monster lurking nearby that wants to eat it"?
So...I modified a scale model plastic Godzilla  figurine by putting in lights for eyes, fire in mouth, and two servo motors to wave his arms.  He also roars,  provided by a sound chip circuit and  recorded sound of a lion.
The sequence begins with a train activating the occupancy detection block in front of Godzilla's lair.  This triggers the MCU circuit (see below) that completes the remainder of functions: building flies off it's supports, Godzilla rises, roars, flashes eyes and waves arms.  When the train leaves the occupied block, Godzilla drops back into his hole and the building returns to its foundations.  Currently I can activate Godzilla manually with a switch.
What worked, what didn't, trials and tribulations
I had a gear motor sitting on the tail, running two offset cams, one for each arm.  It worked but I had no control: it was either on or off and speed control was fixed.  I was using a PWM speed controller.
I substituted two servo motors instead that fixes the above problem.  It then became a trivial programming issue.
The lift motor (that pops Godzilla out of the ground) was too weak but I was able to replace it with a bigger one from my "stock".  The motor mechanism and gears is from an old CD player.
The lift motor takes a whole lot of current, about 5 amps instantaneous at 5 volts.  I could have used a computer power supply to provide these values but that was considered overkill, so I made a small 5 volt regulator circuit with current bypass transistor.
Godzilla was a little wobbly sitting on the edge of the lift, so I added a stabilization slide on one side.  I had tried two slides, one on each side, but this made the spacing critical and hard to achieve, so opted for only one side.  That is actually all I need.  This slide puts a little more friction in the rise but it works.
As I added parts to make it more stable, then the servos, the weight changed so I moved Godzilla more to the center and removed his tail.  This will not show in the action.
The program has been tested, the mechanics have all been tested. The entire mechanism just has to be installed and attached electrically to my Digitrax DCC system.  I have to port the program over to a smaller MCU than the one I developed the program with.
I recorded the Godzilla roar off the internet but found Godzilla was weak, so used a lion's roar instead.  I recorded the sound onto a circuit board I bought from China for $3.00.
Tried relay logic with ladder diagram, but it is too difficult a sequence to program this way.  It's not impossible, just tedious and time-consuming and requires lots of finagling!
13May2015:  Instead of using a solenoid or motor to flip the building off the ground as Godzilla rises, I mounted a stiff wire inside that pushes the building off as Godzilla is coming up out of the ground.  Simpler.
20Jun: Godzilla installed and working: added manual switch, used a computer speaker with a small IC amplifier to get his roar to sound correct.  Needed another 5 volt circuit for the amplifier and sound recorder since these are Arduino-made parts and operate between 3.3 and 5 volts.  I have a separate 12 volt power supply to feed the 5 volt systems because too much current was being drawn from my 12 volt system supply.
25Jun: Added two superbright white LEDs below figure to simulate floodlights.
1July : Using an 8-pin PIC 12F675 MCU for the servos with separate 5 volt supply for the latter.  The MCU was mounted into a FE Proto Board.  (FE: Found Engineering).  This is the only program in the MCU, no other logic as per the program listing above.  I may not need all the programming, just a trigger signal.
2July: Added 12 volt relay to switch the system on which powers the separate 12 volt power supply.  The relay is triggered by the "Accesories" switch on the main control panel.

Relay Logic (Ladder Diagram)

Relay Logic (Ladder Diagram)
Entire project.  Godzilla rises about 8" out of box
Closeup of activation relay
Back view, servo controller on tail
Blue things are the servos that move the arms
Speaker with sound chip and amplifier inside
Construction Notes
Construction Notes
Raider Home  Show Car  Race Car  Engineering  Science  Videos  Art and Stories   Art  Stories