Close

Lights! Camera! Action?

A project log for Not Just Another Coffee Table

Custom coffee table with a DCC train track, automation, LEDs and a web interface

Jack FlynnJack Flynn 09/23/2019 at 07:020 Comments

Power Test 2 - Success!


Oh boy, it's been a while! There has been so much work put into the table, I simply don't know where to begin, but this weekend we tried our second ever power test and although there were some wiring teething issues it was awesome! The video below shows how far we've come and at night time the table looks fantastic. Each LED is individually controllable which can be seen in the second video as we're cycling through them with an on/off test code. 

Programming improvements

So many things to cover but essentially we've followed the plan as intended. The wiring is working, the LEDs are lighting and the Pi and Teensy are talking so we have control via the web interface. I completed a pretty big overhaul of the code once I realised just how difficult it is to manage individual states of components like this. Originally the Teensy had defined addresses for each LED and was going to manage those locally but the power of the Pi running Django with a SQL database made it much clearer that the better way to do it was to use the Teensy as a physical interface and manage the states via the database. This means I can offload the LED automation from hard coded Teensy control, to a more flexible database system. So in the future I'll be able to make changes like adding groupings of LEDs (say Houses! for example) and with each LED added to the "Houses" group I can easily control the state of multiple LEDs with a group that can be reconfigured at any time without having to upload code!

Further work was also done to get the Pi automatically launching the Django server as well as my custom scripts for interfacing to the Teensy and the Dcc Controller. 

Work, work, work

More of my weekend was taking up improving the code than actually working on the electronics. So we've got a fair bit more low level board work to do;

We'll get there, big demo time will be Christmas!

Pics!

Discussions