Diorama Project
Introduction
This is a project to design and build the electronics needed to control various lighting and mechanical features of a diorama that I am building.
The original plan was to turn each feature on and off using simple mechanical switches, but I decided it would be more fun to use an infra-red handset to control everything. See the Plan A page for a brief description of this original plan.
For details of the motivation for this project see my blog post “Total Overkill - Controlling Diorama Lighting With A Microcontroller”
Details of the construction of the diorama itself are off topic for this website and will only be discussed in as much as they are relevant to the electronics.
Project Brief
There will be several buildings that are to be lit. Some buildings will also contain fireplaces etc where flames should be simulated. Some mechanical gimmicks are also planned that will be powered by electric motors - either low voltage DC motors or servo motors. The diorama itself should also be lit by means of concealed LEDs to simulate day and night conditions.
The brief is therefore to control the lights and motorised items by electronic means, using one or more microcontrollers. Support should be added to enable operation via a an infra-red remote control. In addition, a program to control a fixed sequence of events should also be provided.
Sub-projects
The project falls neatly into 6 sub-projects, some of which are detailed on separate pages:
Infra-red control
The diorama is to be controlled using an infra-red handset that communicates with an infra-red receiver on the front of the layout.
In progress Click for more information.
Model lighting
All lighting on the model is contained within buildings and uses LEDs.
In progress Click for more information.
Mechanical features
Mechanical features must be able to be switched on or off individually. In addition there should be a master “all off” (panic) command. Each feature must be allowed to run to completion before being started again. Features being considered are:
- A dog with a wagging tail (TBC).
- A rabbit popping in and out of a burrow (TBC).
- A dog chasing a squirrel up a tree (TBC).
Some features have on and off states while others don‘t have such a state. For example the dog is either wagging or not wagging its tail and the rabbits are either in or out of their burrows. But the dog chasing a squirrel is a feature that must be started and left to run to completion: there is no point in turning it off part way.
Not started No further information.
Ambient lighting
Ambient lighting is to be used to emulate different times of day.The lights should be hidden out of view above the diorama. Lighting should be dimmable in discrete steps from full (bright daylight) to off (night).
Not started No further information.
Central control
This sub-project is the “brain” of the diorama's control system. It controls the other electronic sub-projects, i.e. model lighting, mechanical features and ambient lighting, in response to commands received from the infra-red control sub-system. Finally it manages any automation of events by means of pre-programmed sequences.
In progress Click for more information.
Power supply
Power is provided by a 9V DC supply, with 7.8V and 9V taps available to drive other sub-systems. The power supply module requires an external 9V transformer delivering power via a 2.1mm × 5.5mm socket. Both centre +ve and centre -ve plugs are supported.
Completed Click for more information.
Experiments
The following experiments have been carried out:
#1: Infra-red remote controller
Tests code and circuit needed to interpret the encoded infra-red signals sent by the remote control being used to operate the diorama.
#2: Power supply
Breadboard test circuit to prove the power supply design.
#3: Optimum Microcontroller LED control
Various breadboard tests to determine the most optimum way to drive the numerous LEDs used to light the diorama whilst using the minimum number of microcontroller pins.
#4: Inter-Microcontroller Serial Communication
Investigates the suitability of using serial communication to send data from one microcontroller to another.
#5: Inter-Microcontroller I²C Communication
Investigates the suitability of using I²C to send data from one microcontroller to another.
#6: Infra-red receiver feedback RGB LED colour balance
Determines the values of resistors required to balance the red, green and blue elements of the RGB LED used to provide user feedback in the infra-red receiver unit.