My son loves trains, and one of his favorite shows is called Dinosaur Train. In it a family of dinosaurs travel around on a train which goes through these tunnels allowing them to travel in time. The tunnels light up as the train moves through them so being a good father with a tech background I decided to build him a "time tunnel" for his wooden train set.
Step 1: Figure Out How to Make the Lights Work
For this project I first had to figure out how to make the lights work. So I decided on getting a WS2812B 5050 RGB LED strip. I ordered it off of ebay, but you can find these pretty much anywhere. The great thing about them if people are unfamiliar is that each LED can be individually controlled by intensity and color. To figure out how to get it to initially work I had it connected to my Arduino Uno. I found some code online at (http://fastled.io/) to get started, from there I started tinkering. I eventually used some of the code on the site as a base for future development.
Step 2: Building the Tunnel
Using my Dremel and some 4" PVC pipe I had lying around I cut off part of it wide enough so my son's train tracks could fit inside. I also cut the pipe down so that it wasn't so long that it wouldn't fit over two lengths of straight track. After I made it so that the tunnel wouldn't annoyingly wobble I then drilled holes so that the cables for the lights would easily fit through. I also drilled two wholes so that I could fit mini PIR sensors, one on each end fo the tube. I realized later in the project that this was a bit pointless because i really only needed one wensor near the center of the tube. The LED strips were cut about 31 LEDs long and are sticky so I stuck them to the pipe. Using a glue gun I held the PIR sensors and LED strips into place so they did not move.
Step 3: Housing the Electronics
I bought a very simple but sturdy cardboard box and using the hot glue gun I mounted it to the top of the PVC tunnel. I also drilled a hole on each side for the cabling that go between the LED strips and PIR sensors. The system is controlled by an arduino nano (https://www.banggood.com/ATmega328P-Arduino-Compatible-Nano-V3-Improved-Version-No-Cable-p-959231.html?rmmds=search). Banggood can be pretty awesome, lots of knockoffs that are good an inexpensive. The battery was an old cheap battery for my WLToys V262, not optimum but worked.
Step 4: First Test Try
So if you're going to do a test, might as well put it in front of your client. I brought the device out and put it in front of my son while he was playing trains. He was intrigued as he understood it was a tunnel, but then got all excited once he discovered the lights. Problem was it took a while to get him to give it up. It works, but the PIR code needs some tweaks.
Step 5: Making a Shell (to Look More Like a Mountain)
So I have a tunnel, but the boy can easily see there's a box with fun electronics in it. On top of this, tunnels run through mountains, so it should look like a mountain. To help with this I grabbed a can of spray foam insulation from home depot (http://www.homedepot.com/p/GREAT-STUFF-16-oz-Gaps-and-Cracks-Insulating-Foam-Sealant-with-Quick-Stop-Straw-99053937/206977048) and at $4.25 it's nice and cheap. Attempting to make it look natural i did two layers and made sure that the box for the electronics had a "dollop" on it. Since I was doing this in the garage on the concrete I made sure to put down a layer of seran wrap to make sure it didn't stick to the floor. Once the shell was hardened i flipped it over and removed the seran wrap and let it dry for about a day to make sure all of the innards were solid.
Step 6: Test Two With the "customer"
Now with the "protective" box and foam around the electronics the child was less attracted towards the tangle of wires controlling everything. Eventually he did discover the top could be lifted off, but fortunately I stopped him before any cabled were "tampered" with. This is a good state, but it needs at a minimum some color.
This is the starting point where I began having some issues. The electronics and logic of how it works is easy for me, the aesthetics and overall look is a challenge, so I will be showing the mistakes I made along the way to the final product.
Step 7: Lets Try Painting
So to protect the floor of the garage, just a little bit, I placed the tunnel on a piece of cardboard and then began spray painting. Unfortunately I didn't read all of the label (or didn't think about it when I read the label), but I bought glossy brown paint and well...............the result ended up looking like a pile of poop. The second problem was that I shaved off a few sections to try to not have "super" bulges resulting in a porous area which didn't look great. Lastly with the way the foam expanded it looked very bulbous and odd.
The determination by myself and my wife (and my mother in law who paints) was that this was not an acceptable end state. First two thoughts was that it needed texture and some other colors.
Step 8: Painting Round 2
So I added some green and yellow and tried to make it look different/more interesting. With this I also purchased some "stone" spray paint, which did add some texture. But after all was said and done and I got some third party input it was determine that it was not great still. I guess I will have to do some more rework.
Step 9: Some Shaving and Painting Round 3
So to make it look less bulbous and just try something new I used a knife to shave off parts of the foam. Once i was done I started spray painting it again and used a sponge for some "dabbing" of paint. At this point I made a big mistake, because I had shaved some foam off it was easier for small pieces come off when you moved your hand over the foam. And because a young child was going to play with this that was not acceptable so I grabbed a can of lacquer spray paint, COMPLETELY forgetting that it tends to melt most foams. Fortunately the paint protected the foam a bit making it just squishy. In the end I had an almost sponge like feeling to the foam shell. Not what I desired, so BACK TO THE DRAWING BOARD.
Step 10: If It's Soft Give It a Hard Shell!
PLASTER! I grabbed some plaster at the hardware store and channeled my inner child covering the entire tunnel with it. I will admit this was highly fun for me. Now most plasters will work with this approach, but I bought a cheaper option. I let the first coat dry and administered a second coat to fill in some holes and make it more sturdy. After a few hours of letting it dry I was a bit worried because it was not forming super hard, but after 24-36 hours it was very rigid. I next sanded it down with 180 grit sand paper to make it less wavy, but not enough to completely remove all of the texture of the plaster.
Step 11: Painting ROUND 4
So now that I have a solid plaster shell on a foam shell on a PVC pipe tunnel. Lets try painting again. I used a satin brown paint and didn't do a heavy heavy coating this time around. I then sprayed some brown on a sponge and dabbed it randomly, I followed this with some green paint and then the same with black paint on the bottom perimeter. I then took the stone spray and did a light coat.
I repeated the following steps 3-4 times to get the final result. It's not perfect but is acceptable for what my son will like. The paint and plaster do not seem to be chipping or falling off so that works. If need be because plaster is more resistant to lacquer I may do a final coat at a later date.
Step 12: Final Result
So here's the final result. Please let me know what you think and if you have any suggestions. The lights run for a few seconds after the sensors stop sending a signal that movement is being detected, which you can see in one of the videos. This was a fun side project for me and my son lovingly calls it his "time tunnel light".
Attached is the arduino code.