-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- Overview
- A Brief History
- System Overview
- Hardware Overview
- Software Used
- Installation and Setup
- Software Functionality Overview
- Custom Shows
- Wifi Management
- Future Goals
The purpose of this project (if it can be said to have any legitimate purpose) is to retrofit a 1981 Cyberamic animatronic from Pizza Time Theatre, better known as part of Chuck E. Cheese’s band. The featured character for this project is Pasqually, the Italian chef renowned for making pizza, singing opera, playing the concertina, and embodying some questionable cultural stereotypes
To modernize the animatronic, its original 1980s-era circuits and solenoids were replaced with contemporary technology. A Raspberry Pi, paired with a custom circuit board, now controls a modern solenoid bank. This bank delivers pneumatic air pressure to actuate Pasqually’s cylinders, enabling a range of movements that many would call “creepy.”
Programming was done in Python, and implements the following features:
- Wifi management, including support to create a hotspot
- A web frontend interface to play songs, control movements, view the current air pressure (PSI), and various other options
- Gamepad support for additional movement control
- Voice support to execute predefined commands in offline mode
- Speech-to-text in online mode
- ChatGPT or DeepSeek integration in online mode
- Text-to-speech using a cloned voice from original recordings
- MIDI support for recording and editing animations for shows
One day while browsing eBay, I came across a posting for a 40 year old Pasqually animatronic. He had definitely seen better days, and all of his cosmetics were beyond repair. His metal frame and most of his air cylinders, however, were still in decent shape after decades of abuse. Having a somewhat unhealthy obsession with animatronics and a bit of disposable income, my interest peaked. The seller had stated that Pasqually was only available for local pickup. Luckily, the mech was in a warehouse in a small Texas town, which happened to be a mere two hour drive from where my father lived. I called my dad and said, “I don’t know how I’m going to get this thing from you, but would you please go pick it up for me?”
After some challenging packing and shipping issues, Pasqually arrived on my doorstep. Obviously all of his cosmetics had to be recreated, but I was faced with a decision: Faithfully restore him to working order as he was in 1981, or do a complete retrofit to bring him up to modern day standards. The historian in me leaned towards preservation, but the engineer in me couldn’t resist making improvements. The decision was made easier by the fact that I didn’t have the original reel-to-reel computer system used back in the early 1980’s to play the original show tapes with the animation data. Clearly, Pasqually deserved a makeover.
I went to work replacing all of the solenoids and swapping out any air cylinders that were leaking. Against my better judgement, I also couldn’t help but add some new movements. The original Pasqually could not tilt his head up and down, nor could he bend his elbows. He also wasn’t able to control his arms independently of each other, so I decided to change that as well. I also added a torso lean for some more extreme movement of his entire body, although that might have been one step too far.
Gradually the scope of the project began to spiral out of control. Before too long, I was creating a custom circuit board for a Raspberry Pi, adding wireless control, a web server, gamepad support, and more. Then the tech\ industry’s AI bubble began to emerge, and I realized it would be possible to have voice recognition, AI, and have him respond in a cloned voice from original recordings.
That brings us to where we are today. I don’t imagine many people have access to these 40+ year old animatronics anymore, but people are beginning to 3D print their own recreations of the original Cyberamic frame. So if you’re working on your own Pizza Time Theatre project, or if you’re curious about how this was done and want proof that I didn’t fake the whole thing, I hope you’ll find this repository informative.
- Air compressor, 1–2 CFM at 90 PSI with at least an 8 gallon air tank
- An air dryer to remove moisture from the compressor.
- VV5Q11 solenoid manifold to toggle air pressure to each cylinder, connected to the Raspberry Pi with a 26 pin ribbon cable
- Tailonz air flow regulators to control the pressure (speed) for each movement
- 24V 31W DC power supply
- D24V50F5 5v regulator to power the Raspberry Pi
- A Raspberry Pi (I used a 4, although a 3 would probably work too)
- A custom hat for the Pi. You can find the Eagle files in the repro
- TPL7407LDR relays (3x) to provide 24v to each solenoid
- MCP23008-E/P IO expanders (3x) to drive the TPL7407LDR relays
- ABPDANV150PGSA3 air pressure sensor using an SPI interface (optional)
- SPH0645LM4H mic array or a USB microphone (optional)
- Gamepad connected over USB
- Speakers of your choice connected to the Pi either with Bluetooth or a physical audio connection.
- Raspberry Pi OS
- Flask web server
- HTML, CSS, and Javascript for the web frontend and Flask socket communication
- pygame for playing audio
- Porcupine for wakeword detection (optional)
- Rhino speech-to-intent for pre-defined offline commands (optional)
- Google speech-to-text API (optional)
- ChatGPT or DeepSeek (optional)
- Eleventlabs text-to-speech for online voice cloning (optional)
- Pico text-to-speech for offline voice (optional)
- A MIDI sequencer on a client machine to record and edit shows (optional)
The HTML interface for controlling Pasqually from any web browser.
To install all dependencies, simply run:
sudo python setup.py
Note: This setup script does not use a virtual Python environment to install its packages. If you want virtual environment support, you will need to modify the setup script yourself.
Once installed, you can optionally set up additional services in the config.cfg file. This is where you can set up Porcupine, Rhino, Google text-to-speech, ChatGPT or DeepSeek API keys, and Elevenlabs for text-to-speech. If you leave any of these sections unconfigured, they simply won’t be used by Pasqually.
Then to start the application, simply run:
sudo python start.py
The system operates as follows:
-
Initialization:
- The Raspberry Pi automatically starts the Python application and initializes the Flask web server.
-
Web Frontend Features:
- Users can connect to the HTML frontend to:
- Control the animatronic using keypresses.
- Manage Wi-Fi settings.
- Play shows.
- View system information.
- Enter text for Pasqually to say aloud.
- Users can connect to the HTML frontend to:
-
Gamepad Support:
- If a USB gamepad is connected to the Raspberry Pi, the application will respond to gamepad events to execute various movements.
-
Voice Command Processing:
-
Wakeword Detection:
- If Porcupine is configured and a microphone is connected, Pasqually will listen for a custom wakeword of your choice.
-
Intent Recognition:
- If Rhino is configured, it will attempt to recognize predefined voice commands after the wakeword (e.g., "What is your IP address?" or "Sing a song.") and issue appropriate events.
-
Speech-to-Text:
- If Rhino is not in use or no predefined voice command matches, and Google’s speech-to-text service is configured, the system will record microphone audio until silence is detected and transcribe the audio using Google’s service.
-
AI Response Generation:
- If ChatGPT or DeepSeek is configured, the transcribed text will be sent to its API, along with context about Pasqually’s personality.
-
Text-to-Speech Response:
- The system generates an audio response based on the AI result using:
- ElevenLabs, if configured.
- Pico-TTS as a fallback for offline use.
- The system generates an audio response based on the AI result using:
-
Wakeword Detection:
-
Custom Animated Shows:
- The system supports custom animated shows combining digital audio files with corresponding MIDI files. Learn more about this here.
-
MIDI Output and Show Creation:
- The Raspberry Pi supports MIDI inputs and outputs in order to record and program custom shows, with support for MIDI file playback.
MIDI can also be used to create and record new shows, as the code can receive and output MIDI events that are tied to specific movements. For example, I use a CME WIDI Uhost device to exchange MIDI data between my laptop and the Raspberry Pi over Bluetooth. The code also supports playback of MIDI files with a corresponding digital audio file to play shows.
Example Workflow:
-
Prepare Your Setup:
- Install a MIDI sequencer, such as Cakewalk, on your computer.
- Import your MP3 track into the MIDI sequencer.
- Connect your machine running the MIDI sequencer to your Raspberry Pi, either through MIDI host hardware or a device like the CME WIDI Uhost.
-
Perform and Record:
- Trigger movements using a keypad or gamepad while playing the digital audio.
- Record the browser's MIDI output into the MIDI sequencer.
-
Export and Save:
- Export the recorded MIDI file from the sequencer.
- Ensure the MIDI file has the same filename as the corresponding audio file.
- Place both files in the "shows" directory.
Once added to the "shows" directory, the new show will automatically appear in the web frontend and can be played.
The user has the ability to use the web frontend to select different wifi networks and have Pasqually connect to them.
There is also support to have Pasqually run in access point mode, in which he will create his own wifi hotspot. This can be set from the web frontend as well, or through the voice command, “start hotspot.” The hotspot can then be deactivated by saying, “stop hotspot.”
Using ChatGPT, DeepSeek, or Elevenlabs still requires an internet connection, and introduces several seconds of latency. It would be interesting to have everything running locally. Perhaps Whisper could be used to do real-time transcribing on the Pi, and a Pasqually voice could be created for Pico-TTS.