Family Christmas Display

HOME WHY WE DO IT HOW IT ALL BEGAN 2016 TO PRESENT HOW IT'S DONE CREDITS

A project of this scope requires tapping numerous diverse technologies including electrical, mechanical and software design. In addition, there are opportunities to explore numerous techniques for infrastructure build.

Here is a short summary of the technologies I ended up using to integrate the display into an automated operation that I could simply turn on and let it run without further intervention.

WEB/INTERNET

Internet Domain Name
Porkbun.com provided us the Brinkman.Christmas internet domain name.
Internet Web Site
You're viewing information about the display on our internet web site, also hosted on Porkbun.com web servers.
Dynamic Domain Name
Live information for the Display is not provided by the Internet web site; it is provided by the Master unit at our house that actually runs the Display. In order to seamlessly provide this capability a Dynamic Domain Name Service (DDNS) was purchssed to direct users to the address Live.Brinkman.Christmas. DuckDNS provided the free DDNS service.
Local Web Site
Live information about the Display is provided by the local web site, an ESP826 microprocessor. Information provided includes the FM 89.3 MHz radio frequency, the song list (showing the song playing at the time), and weather information.

CONTROL

Distributed Control
Outdoor displays are large - some are several blocks long. It quickly becomes impractical to run long wires to each light or string of lights. As a result, control of the display is divided into smaller, locally controlled segments.
Master Unit
The Master unit controls everything in the Display. It decides what to play, when to play it, then wirelessly commands all of the Slave units to do their part of the show. The Master unit has the Light Command script for all units, a wireless transceiver, the Music Player, the FM Radio Transmitter, a Clock, and even a Weather Station.
Slave Units
Each local Slave unit operates at the direction of the Master unit. Its instructions are received wirelessly from the Master unit. It has an assigned subset of lights to control and turns them on/off as directed. When asked, Slave units give a Health report to the Master unit. The Slave units are identical to the Master unit except that only the wireless transceiver is needed to receive its instructions.
State Machine
The computers operate as "state" machines. The computers stay in their current state until specific conditions are met before moving on to another state. The technique helps keep the logic simple because there is a single focus for each state. The Christmas display state machine is as follows:
Light Sequence Commands
I considered using commercially available products like Vixen and xLights to compose the light sequence commands. Complexity and usability issues caused me to develop a custom spreadsheet-based light sequence command tool that gives flexible control of up to 464 strings of lights plus six servos. The process is a bit arduous, but allows complete freedom to control each of the individual circuits. When the scriptss are created or updated a Visual Basic macro generates the light sequence ommands in less than a second.

COMPONENTS

Software
Computer programs, or software, give the ability to take a generic computer and customize it to function exactly as required to meet the needs of the application designer. Following are the software tools that make this happen.
Arduino C++ Language Reference
Computer programs are written in a human-readable structured langage that can be interpreted by machines to do what the programmer intended them to do. Programs for the Christmas display are written in the C++ language.
Arduino Integrated Development Environment (IDE)
Before the program can actually be used by the computer it must be "compiled" into a language/format that the computer can understand. The Arduino IDE compiles and loads the program into the Christmas display computers.
Christmas Display Program
The Christmas display program that is loaded into the Master and Slave units is identical. Each unit is assigned a Unit Number, which tells that unit which role(s) it plays in the Display.
Playlist
The Master unit opens a Playlist and an Announcement List that tell the Display which songs and announcements to play. When the lists are completed they start over at the beginning.
Audio Files
The music player contains "MP3" format audio files that are played when called for on the Playlist/Announcement list.
Light Files
A microSD disk drive contains Light Command files that tell the computer what lights to turn on, and when. In addition to lights, commands that cause servos to move up/down/left/right are contained in the file. The light and servo commands are timed to match the music being played. Up to 464 lights/light strings and 12 servos can be controlled by the Display. Each time a light(s) needs to be turned on/off or a servo position changed the command for all 464 lights and 12 servos is transmitted, even if only one light changed.
Network Time Protocol (NTP)
The Display needs to turn on at 5:30 and turn off at 11:00 each day. The internet provides a service (NTP) that anybody can contact to get an accurate report of the current time. When the processor turns on one of the first things it does is contact the NTP server to get the current time. It then updates the local Real Time Clock (RTC - see below) to keep track of time from that point on. NTP is consulted for a time update once per day to update the RTC just in case the RTC has drifted slightly.
Printed Circuit Board (PCB)
Electrical circuits can consist of thousands of connections. PCBs provide an easy way to manage all those connections, especially when dealing with many very small components. The PCB design is started by composing a Schematic Diagram. Then each component is carefully laid out where you want it, and an automated tool figures out all the needed wiring interconnections. The tool generates files that automated machines use to manufacture the PCBs.

Electrical Hardware
Software loaded into the computers tells the computers what to do; in turn, the computers are attached to other hardware to receive information or to cause an action to be taken.
Microprocessor
All the Slave units, and the Master unit through 2018 were powered by Arduino Mega 2560 microprocessor computers. The Mega is an 8 bit computer that has a 16 MHz processor and many digital and analog interfaces that make it easy to connect to other hardware. In addition, standard interfaces minimize the effort required to get the hardware devices to talk to each other.
Microcontroller + WiFi
In 2019 the Master unit was upgraded to pair the Arduino Mega 2560 with an ESP8266 processor that has WiFi capability. For the first time this permitted the status of the Display to be viewed and controlled via a web page.

Upraded Microcontroller + WiFi
In 2020 the Master unit Arduino Mega 2560 + ESP8266 was going to have been replaced by an ESP32 microprocessor computer. The ESP32 has two 32 bit processors that run at 240 MHz; the resulting performnce is about 200 times faster than the Mega. In addition to digital and analog interfaces, the ESP32 has built-in WiFi, Bluetooth, and a Real Time Clock (RTC). Probably the nicest feature is that the ESP32 can be reprogrammed over WiFi, permitting me to update the unit out in the yard while sitting at my desktop computer. Unfortunately the ESP32 turned out to be a bit more tempermental than the Mega so I didn't succeed in finishing the update. Maybe next year.

Shift Registers
The microprocessors are powerful, but they have a limited number of pins to output data. Since we need to connect up to 464 light strings, we need a way to get the data out to 464 different places. The microprocessor sends one bit at a time out to a series of 74HC5595 shift registers. Each shift register holds 8 bits of data but can be strung together to hold as many bits as required. Each bit is used to control a light string on or off depending on the value of its assigned bit.
Solid State Relays (SSRs)
Microcontrollers operate at voltages between 3.3 - 5 VDC. Many light strings operate at 110 VAC. The job of the SSR is to accept a low voltage command from a shift register and activate a high voltage light string.

Power Transistors
Microcontrollers and shift registers can provide 20-40 mA current to LED light strings. A typical LED light string requires about 340 mA. The transistors connect to a shift register pin and provide the boost needed. The ransistors can drive a range of voltages from 5 to as high as 60 VDC if required.

Transceivers
Each unit has a HC-12 transmitter/receiver (transceiver) that permits communication between the Master and Slave units. The transceivers operate at a frequency of 433 MHz and have a range of a 1 Km. Each set of light commands are broadcast by the Master unit to the Slave units in about 17 ms. With plenty of room reserved for cushion, a new light command can be issued every 50 ms, or 20 times per second.

Slave units also use the transceivers to report their health back to the Master unit, permitting corrective action to be taken if there is a problem.


File Storage
Light Commands and Playlists are stored in files stored on a MicroSD card. In our case the microSD card reader and the Real time Clock (see next item) are combined on a single Data Logger module.

Real Time Clock (RTC)
The Display needs to turn on at 5:30 and turn off at 11:00 each day. The RTC keeps track of time to make this possible.

The RTC must initially be set to the correct time. Prior to the ESP8266 and ESP32 this is accomplished by manually looking at the clock and entering the corrcet time into the RTC. Once set, the RTC kept accurate time for up to two years using a small battery attached to the RTC.

When the Display was upgraded to an ESP8266 {with internet access), the manual update process was replaced by an automated NTP process (see description above).

When the Display is switched to the ESP32 processor the RTC will be built-in to the processor, eliminating the need for an external RTC.

Music Player
When the Playlist selects a song the DFPlayer mini music player is responsible to play the song. The music player has a built-in microSD card reader that contains the MP3 music files that are played. The output of the music player goes to the FM transmitter.

FM Transmitter
The stereo output from the music player goes to the low power (100 mW) FM transmitter. The Display broadcasts music on FM 89.3 MHz; the range is about 1 block.

Weather Station
The Display includes a BME280 temperature, humidity and barometric pressure sensor. The information from the sensors is included on the Live web page available to users.

CUSTOM DISPLAYS

Megatrees
There are four Megatrees; each is 10 feet tall and 4 feet diameter at the base. Eight strings are arranged in a circle around each tree, permitting a solidly lit tree shape or adding animation by lighting light strings in various sequence. Instructions for how the Megatrees were built are here.
Red/White/Green Trees
A row of 12 LED trees are mounted on a wooden frame in front of the Megatrees. Each tree is x inches wide and x inches high; the three colors of each tree may be independently lit, permitting animation in sync with the music being played.
Fallen Arches
A row of 12 upside down arches are mounted on a wooden fram in front of the R/W/G trees. Each arch is x inches wide and x inches tall. Only red and green incadescent lights are contained in the Fallen Arches, and each color of each arch can be indidually lit.
Warm White Trees
A row of 8 LED trees are mounted on a welded wire fence frame on the left side of the display. Each tree is x inches wide and x inches tall. Each tree can be lit individually. Instructions for how the trees were built are here
VU Meter
The Display contains a custom-built Volume Unit Meter (VUmeter) that activates up to 16 vertical LED bars based on music volume. The display is large, 16 inches wide and 6 feet tall.
Lighted Packages
While not a custom display, the lighted Christmas packages on the garage door were made possible by carefully selecting the position of the display so that it did not interfere with the opening/closing of the garage door. Likewise, the power cord to the display was positioned so that it will not get tangled in the packages or the garage door panels.
Sequencing Lights
Doors and windows are framed by lights that can be sequenced to provide animation to the display. Three strings of lights are zip-tied together with individual bulbs in sequence from string 1-2-3-1-2-3-1-2-3-etc. When the light strings are turned-on in sequince they give the appearance of motion around the frames.
Servo Controlled Lights
On the right side of the display above the USA flag, red and white lights are mounted on Servos that pan the lights up/down and left/right. While the servos function as intended and this seemed like a good idea at the time, the lights don't show off very well because some sort of mist or "fog" needs to be present to achieve the desired effect. Oh, well ... it was an interesting challenge to get the servos to operate correctly!
Tune To FM 89.3
These signs were made by coodinating digitized text characters with the number of bulbs available in the incandescent llght strings that were on hand. Holes are simply drilled in a thin masonite board, and the bulbs inserted to provide a colorful image.
x
x
x
x
x
x