Model building
DioramaOS: Some of the Nitty and a lot of Gritty
Sometimes the spark comes very early
Like many of my projects, Droids in the Desert started in my head (and was captured in my notebook) long before it started on the workbench.
In fact, C-3PO was assembled last winter while the snow fell outside and I sat all warm and cozy on the couch. There is a certain irony in building a droid destined for the deserts of Tatooine in the middle of a New England snowstorm.
The intervening months have given me plenty of time to think about how to bring these two characters to life. Lights, sound, movement, and, perhaps most importantly, a little personality.
Of course, thinking about how to do something and actually doing it are two entirely different things.
And that's where the nitty and the gritty come in.
Mistakes Were Made
I will admit, right here and right now, that I can get fixated on shiny new objects. In my defence, I do a fair amount of research though, and when I think shiny new object needs to meet my workshop, the order is placed.
Advanced Solderable Breadboards from Custom Circuit Solutions were the most recent clever shiny objects that caught my attention, so I ordered a couple of sizes to try in the Droids in the Desert diorama.
First, for many electronic hobbyists, these are fantastic once you learn the layout and possibilities. I will certainly find uses for them in other projects, and I'll use the one I've already soldered stuff onto to complete the DitD diorama.
Unfortunately....
The important distinction: these aren't bad boards. They simply didn't provide the advantages I expected for this particular project. I was hoping the 0805 pads would make it easier to accomplish some paths without soldering jumper wires.
A. Soldering 0805 SMD components by hand isn't a piece of the proverbial cake. They're small. Really stinkin' small.
- Maybe SMDs are overkill in this hobby environment. It needs to be easier to accomplish.
I realize that a traditional solderable breadboard is probably all we should ever need.
What Would Make a Breadboard Truly Advanced...for Dioramas?
I have some thoughts:
- A better way to supply power to the board, perhaps with an onboard voltage regulator.
- One or two specially arrayed power feeds (think rotating a power rail 90 degrees for supplying certain components without having to jumper from the existing power rail.)
- An easy way to jumper the power rails, so that every power rail is fed from one source but make power easily available to components scattered about the breadboard.
We're crossing a line, so to speak....
Those adept at building dioramas are experts in setting the scene and telling the story in a single vignette that often has so many details that you can look at it for hours saying, "Well, look at that right there."
Adding electronics to the story gives us another way to provide those details.
Walt Disney knew that to tell the story, you needed to do the work. His Imagineers follow suit, going to great lengths in film and the theme parks to bring storytelling to life. The basics?
We're doing much the same thing in our workshops, albeit on a considerably smaller scale and with considerably smaller budgets.
Lights, sound, action.
Yup.
I've seen some extraordinary science fiction models over the years, beautifully assembled, painted, and weathered, but without a single illuminated cockpit, blinking navigation light, or moving component.
And I understand why.
Electronics can be intimidating. There are resistors, circuit boards, wires, soldering, microcontrollers, and programming languages. For someone who just wants to make the engines on their X-wing glow, that's a lot of unfamiliar territory.
That's part of what I'm trying to accomplish with DioramaOS.
I want to make adding lights, sound, and movement to our models as approachable as possible. There will always be some basics to learn, and some wiring to do, but you shouldn't have to be an electrical engineer or software developer to bring a scene to life.
The electronics should support the story, not become an obstacle to telling it.
A Moderate Baseline
I'm assuming you have some basic modeling skills, can solder a few wires, and are willing to learn a little about simple electrical circuits. If you've never touched an Arduino before, that's okay. You don't need to understand everything happening behind the scenes to use DioramaOS. And you need to be OK when the occasional magic smoke threatens to escape. 🤣
I will not assume familiarity with C++, state machines, PWM programming, serial communications, or coordinating multiple devices.
DioramaOS isn't intended to eliminate learning. It's intended to eliminate unnecessary complexity.
Someone who can assemble a model, follow instructions, solder a few wires, and upload a sketch should be able to create something cool.
I will go into more detail on some of these things, like connecting the Arduino to your computer, downloading the code, and running the code.
Three More Ways to Bring a Diorama to Life
Lights: Setting the Scene
For Droids in the Desert, the lighting scheme is very basic. We just want to light up some of R2's dome ports and 3PO's eyes.
I used some 0805 miniature LEDs:


- C-3PO's wiring started in his head, both lights were tied together and magnet wire (thin, flexible, tough) was run down through his neck, torso, and leg as assembly progressed.
- R2-D2's wiring brought three 0805 LEDs together in parallel, with one resistor for the group. I attached the lights with UV set acrylic resin and did as much light blocking as I could. A through hole in the base of the dome was drilled, close to where the shaft will turn the dome. Since we're animating the dome, we want to leave enough slack in R2's body so the wires don't bind. I attached the wires inside the body with a little drop of the UV cured resin. (Generally, I would recommend using an individual current-limiting resistor for each LED, particularly when mixing LEDs of different colors or forward voltages.)
I also made the decision to limit the dome turn to about 60 degrees left or right, max. No spinning dome on this R2 (Could you imageine a split ring small enough to allow this?). The wires escape his body near the center leg and will be hidden from view in his positioning in the diorama and a little paint.
With the wires run and tested (I keep a 3vdc button battery nearby), it was time to test for the proper resistor to dim the very bright LEDS. I positioned several resistors on my breadboard and used a jumper to test R2 then 3PO for what I thought looked good. I fed 5 VDC to the breadboard (because that is what is going to be used) and placed a 540 Ohm, a 750 Ohm, and a 1K Ohm into the breadboard. Touching my lead to each resistor (with the LED grounded properly) led me to the 1K Ohm resistors....because I wasn't trying to light a runway!

And don't forget that you can include external lighting as well. For some stories, you should.
In several dioramas I have built, well-placed LEDs in the terrain, walls, or ceiling have helped me achieve better lighting for the story I am telling. Keep this in mind while you're designing and building.
Making Lighting Simple
My aim is to make the functionality as simple as possible so that you don't need to be a software engineer or an Arduino expert. We'll start by giving each of our LEDs a name and identifying the Arduino pin to which it is connected.
// Give each LED a name and identify its Arduino pin.
const int marker1 = 2;
const int marker2 = 3;
const int cockpit = 5;
const int beacon = 6;
const int engine = 9;The following examples of lighting and sound functionality illustrate where we're headed. The DioramaOS library does not implement these functions yet.
Having done that, you can assign each LED a function and, where needed, timing. All timing values are expressed in seconds:
on(cockpit); // turn on the cockpit LED and leave it on
blink(marker1, 0.5, 1.0); // off for 1/2 a second, on for 1 second
blink(marker2, 1.0, 0.5); // off for 1 second, on for 1/2 a second
strobe(beacon, 0.1, 2.0); // flash for 0.1 seconds every 2 seconds
breathe(engine, 3.0); // complete fade-in/fade-out cycle over 3 secondsThe intention is for all of these lighting effects to run simultaneously. Your navigation lights can blink while your cockpit remains illuminated and your engines gently pulse. There will be other basic functions, of course.
And for lighting effects that vary brightness, such as breathe(), those require a PWM-capable pin on the Arduino.
Sound: Giving the Characters a Voice
For DitD, here are the parts:
- DFPlayer Mini
- PAM8403 amplifier
- speaker
- collection of sound clips (10 R2, 10 3PO)

C-3PO is prone to complaints, and R2-D2 has a full vocabulary of comebacks. In this case, on the push of a button, I want 3PO to speak one of the list of complaints randomly, then R2 to respond - again with a random raspberry or comeback. R2 must wait to respond until C-3PO has finished his gripe, so we use the 'busy' signal from the DFPlayer Mini to trigger R2's response. We could use the following and abstract away the user needing to know about the 'busy' signal.
conversation(threepioComplaints, r2Responses); // could be triggered randomly, or via pushbuttonIn some cases, we may want background noise, or a soundtrack that plays continuously. For that, we should configure a separate DFPlayer with a second amp and speaker. Many projects will call for this feature, (One example: the B9 Robot from LIS has his own continuous background noise, over which you may want to tirgger random phrases.) so I will include that ability in the code at some point and make it as easy to use as possible.
loopSound(robotHum); // goes to one player
playRandom(b9clips); // goes to the other playerTo be sure, there are a lot of multichannel soundboards available, but for our dioramas they could be considered overkill. But, if you're planning to recreate Figrin D’an and the Modal Nodes with each musician on a separate channel...
Clever it would be.
Animation: Making Something Move
For DitD, I wanted R2's dome to turn to a degree during his response. It's the one thing that I can do to make this diorama a little more fascinating. Here is that parts list:
- 28BYJ-48 stepper motor
- ULN2003 driver
- dome shaft
- coupler
- adjustable motor mount.

At first, I thought I'd mount a really small (8mm) stepper motor just under R2's dome, route the wiring through the base and be done mechanically. With the middle leg of the droid extended, there is just enough room to get a small motor in there, but boy oh boy, is it ever impractical. (Read: I might try this later, LOL.) The driver boards for motors that small can be quite finicky and I'd have to deal with heat from the driver underneath the diorama's base.
And running a number of wires.
I opted to run a tube through R2's torso and middle foot then connect to a stepper motor under the base. This removes the space issue and gives me considerably more room for mounting the motor and its driver.
I assembled the leg and the foot, set up a jig and drilled (very carefully and slowly) the path to accommodate plastic tubing. The shaft is smaller than the inside diameter of the tube for ease of movement and allows for a little play. It took a little finessing to hold it all together and get good alignmnet. I also carefully sanded the groove in base of the dome, allowing it to turn more freely.
The positive leads were soldered together in the dome, and the negative leads were joined separately. These are tiny wires and I didn't have any liquid electrical tape, so I did put heat shrink at the joint of the magnet wires with the LED wiring. A short here would be a dealbreaker.
A small hole was drilled next to the dome shaft to accommodate the 2 magnet wires, At that point, I was able to seal up the dome, epoxy the drive shaft, and run the wires, leaving a little slack for the movement.
It was all quite fiddly. I thought I'd never get the alignment smooth enough.
The tube, driveshaft and lighting wiring will be run through the diorama base. The drive shaft will be trimmed and connected to stepper motor via a coupler. I am building an adjustable motor mount to make sure alignmnet is easier.
Bringing It All Together
Smack dab in the middle of all of this needs to be a conductor. Something that stores and instructs our lighting, sound, and animation.
We don't need something big, we just need something that can do the job reliably and consistently. Let me introduce you to my little friend, the Arduino Nano.

The name brand Nano is great, but I have chosen to use a self-branded version from LAFVIN https://www.amazon.com/dp/B07G99NNXL. These, and boards from Elegoo https://www.amazon.com/ELEGOO-Presoldered-Compatible-Arduino-Microcontroller/dp/B0F6Y7GS4Q?th=1 are quite good and suitable for what we want to do.
And, should the magic smoke appear, it didn't cost as much.
The Nano coordinates everything and the buck converter takes the 12 VDC from our power adapter and supplies regulated 5 VDC to the electronics. Always adjust and verify the output voltage before connecting your components.
Code Repo
Finally, I store all of the code in GitHub. I can track changes, keep earlier versions available, and avoid losing everything if I fat-finger the deletion of code from my laptop.
https://github.com/jayblanchard/DioramaOS
Here are the primary electronic components used in this build.
None of these are affiliate links. I don't make a dime if you buy any of this stuff. I'm simply providing references to help you find the right components for your own adventures.
| Component | Purpose | Product link |
|---|---|---|
| Arduino Nano (ATmega328P) | Main controller | LAFVIN Nano V3.0 |
| Arduino Nano (alternative) | Main controller | ELEGOO Nano |
| DFPlayer Mini | Sound playback | DFRobot DFPlayer Mini |
| PAM8403 | Audio amplification | PAM8403 Stereo Amplifier |
| 28BYJ-48 stepper (5V) | R2 dome rotation | ELEGOO Stepper Motor and Driver Kit |
| ULN2003 driver | Stepper control | Included in the stepper motor kit above |
| LM2596 buck converter | 5V regulation | Addicore LM2596 Module |
| 0805 miniature LEDs | Droid illumination | Pre-wired 0805 LEDs |
| 1kΩ resistors | LED current limiting | SparkFun 1kΩ ¼W Resistors |
| 8Ω, 3W speaker | Audio output | Amazon speaker search |
The stepper motor and driver are conveniently available as a package. Make sure you purchase the 5V version, not the 12V version.
Power, Connections, and Supporting Components
| Component | Purpose | Product link |
|---|---|---|
| 12V DC, 1A, center-positive power adapter | Primary power supply | Amazon |
| Panel-mount DC barrel jack | Power connection to diorama | Adafruit |
| MicroSD card (8GB or 16GB) | Storage for sound clips | Amazon |
| Momentary pushbutton (normally open) | Trigger droid conversation | Adafruit |
| Solderless breadboard | Prototyping and testing | Amazon |
| Solderable breadboard | Permanent circuit assembly | Adafruit Perma-Proto |
| Advanced solderable breadboard | Alternative circuit assembly | Custom Circuit Solutions |
| JST-PH 2.0mm connectors (2–6 pin) | Detachable component connections | Amazon |
| 22 AWG stranded hookup wire | Power distribution | Amazon |
| 28 AWG stranded hookup wire | Signal connections | Amazon |
| 28 AWG magnet wire | Wiring through model interiors | Amazon |
| Heat-shrink tubing | Insulating soldered connections | Amazon |
| Male and female pin headers | Module mounting and connections | Amazon |
| USB data cable | Programming the Arduino Nano | Amazon |
| In-line power switch (optional) | Turning the diorama on and off | Adafruit |
| Nylon standoffs and screws | Mounting electronics beneath the diorama | Amazon |
Mechanical Components for Animation
| Component | Purpose | Product link |
|---|---|---|
| Plastruct tubing | Driveshaft guide | Plastruct |
| 1/8" metal rod | Driveshaft | Amazon |
| Brass tubing | Driveshaft sleeve | Amazon |
| 5mm × 3mm shaft coupler | Connecting driveshaft to motor | Amazon |
| Acrylic sheet | Fabricating mounting surfaces | Amazon |
| UV-curing resin | Securing miniature LEDs and wiring | Amazon |
| Two-part epoxy | Securing the driveshaft | Amazon |
And, of course, the Bandai C-3PO and R2-D2 kits. You will likely get a 2 droid set with your R2 purchase, so you can build yet another story!
NOTE: I have probably missed something in these lists. If I discover I have missed something, I'll add it to the hardware list on GitHub and call out those bits in future posts about this process. you'll also find this list here.
What Comes Next?
So far, I have completed the following:
- the droids are built
- the electronics are being transferred to solderable breadboards (I am looking for something better for DioramaOS)
I am also preparing the base of the diorama and will be building an adjustable motor mount for the stepper motor. I will cover the entire animation chain in the next DioramaOS blog post.
Clearly, I am insane, but I think telling the story the way I want - even if it includes hundreds of extra steps and parts - is worth every burned finger, sliced skin area, and super-glued digit endured. When we finish, and push the button the first time only to hear 3PO complain and R2 turn and answer, all of the effort helps to tell the story.
I'll probably push the button hundreds of times, just on day one!



















