Motion Sensor Lights

This is a short post to follow up on a video we made showing how to add a motion sensor to a strip of LEDs so they will automatically turn on for you. Since the video, I have mounted the components under the shelf and found that the system works quite well.

The stairs into the lab are an approvement 14 feet away from the sensor. I have the sensor set to the maximum sensitivity setting and the LED strip turns on as soon as I walk down the stairs. These lights also turn on prior to the motion lights I have on the ceiling which were purchased.

The hardest part of the installation was laying on my back so I could work under the shelf. If I was going to install these again I would turn the shelf over so I could have looked down on the shelf and done a better job. Since I had already installed the shelf I did not feel the need to pull them out to install the lights, but hindsight is always 20/20. Another factor is that I installed this sensor in my lab and I was not overly concerned about making the wiring look nice. You can not see the wires when you stand in front of the shelf, and that was really all I cared about.

As I said, the install is not much of a “looker”, but it gets the job done.

The circuit is not complex and consists of the following parts:

Voltage regulator – LM2596
Relay – Keyes_Relay
Motion sensor – HC-SR501
Arduino – Nano
Power supply – 12v

The Arduino code is simple, but we posted on GitHub if you would like to look at it.

I hope this helps someone out there.

– Michael

Etched Glass Light Up Plaque

I have now made three of these etched glass light-up plaques, and I decided to make a post showing the process. The first one was for my old boss, one for Rhett & Link from GMM (pictured), and now one for a Christmas gift. I do not remember exactly what gave me the original idea to build this, but everyone loves to get a homemade gift, and this is fairly easy (with the correct equipment).

I have included links to sites that sell the various components that were used for this project. I am not affiliated with these sites nor am I compensated if you purchase any of these components. You should source the items at a store you are comfortable shopping at.

What you will need
I have broken the materials into sections that will line up with the steps below.

The Electronics (Steps 1 & 2)
– Fritzing designs for the electronic boards can be found on GitHub
– Arduino code can also be found on GitHub
– A strip of six WS2812 RGB LEDs at 60 per meter (external link)
– An ATtiny85 (external link)
– A 1206 capacitor
– A female micro USB plug for power (external link)
– Two buttons (external link)
– Some bits of stranded wire
– USBASP programmer (external link)
– Solder and soldering iron (external link)

The Base (Step 3)
– Block of wood or other material for the base ( 3/4″ thick, 7 1/2″ long, 2 1/2″ deep)
– Wood carving tools (Dremel)
– Stain or polyurethane (external link)

Etching (Step 4)
– A piece of glass that is 4″ x 6″ x 0.4″ (external link)
– Armour Etching solution (external link)
– Painters tape (external link)

Assembly (Step 5)
– Hot glue (external link)

The Building
Now let’s start building the various components and see how well this will go together.

Step 1The Electronics
I prefer to start assembling the electronics first to make sure everything is working properly. If you are unable to order the custom boards, you can use the following schematics to create your own. One is referred to as the “mainboard” and the other is the “button board.”

The mainboard holds the micro USB plug, ATtiny85, and the capacitor. The board also has a programming interface and solder pads to connect the lights and buttons.

The button board is rather straightforward. It holds the two buttons and has solder points for the wires.

Place the components on the boards in their indicated position, or use some proto-board to create your own version of the board. After you get everything soldered, the mainboard should look something like this.

Step 2 – Coding
After the electronics are wired, you can upload the code onto the ATtiny85 using a USBASP programmer and the six-pin programming interface on the mainboard.

To save time for future builds, I created a connector for the programming interface so I can recycle this design for other projects. The special interface is not required to program the ATtiny85. You can solder the wires directly to the mainboard if you would like, or use headers.

There are two steps (we can call them…sub-steps) to program the board. First, you will want to burn a boot loader, and second, upload the code.

Unless you already have the ATtiny boards installed in your Arduino IDE, you will want to get them installed. This can be accomplished simply by going to Tools | Board | Board Manager, then search for ATtiny.

Use the tools menu to make sure you have the correct settings; which are as follows:

Board: ATiny25/45/85
Chip: ATtiny85
Clock: 8MHz (internal)

To burn a boot loader, connect to the programming interface and use the Arduino IDE to select Burn Bootloader from the bottom of the Tools menu.

After the bootloader is successfully loaded, upload the source code from GitHub.

If you get lost programming the Arduino, I would suggest using Google to look up some examples. There are a number of posts that go into detail on Arduino coding, so I am not going to go over it here.

Step 3 – The Base
I have used oak to make all of my bases. I personally like the way the wood looks alongside the glass. Of course, you can make the base out of any material you would like. Below is the diagram to create the base.

I also have the luxury of using a milling machine to cut out the base. It would be possible to use a Dremel or another hand-held tool to make the pockets needed. Of course, you are free to change the design of the board if you need to fit your electronics differently. This is just the way I have it set up. When you are finished making the base, I would recommend putting a stain or polyurethane coat on it for protection.

Step 4 – Etching The Glass
Before you can etch, you need a design. For this demo, I used the Mythical Society logo as my design. I used a Silhouette cutting machine to cut out the design onto thin vinyl. I highly recommend a Silhouette cutter if you have the means. Either way, make sure to invert your design (mirror image). The image will be etched on the backside of the glass so you will see the design through the glass.

After you select your image, cut it out on a thin sheet of vinyl and apply it to one side of the glass. Make sure you tape up EVERYTHING (every surface) that you do not want to etch. After etching one of my designs, I noticed that I touched a corner of the glass with the etching solution and it left an etching mark. I now take the precaution to tape up everything that I do not want to etch.

Once the masking is done, place the Armour etching solution on the open areas of the glass and let it sit for about 15 minutes.

I have found that if you can carefully wipe off the first layer of etching solution, you can apply another round. You will need to be really careful not to disturb your mask, but I have found that by “double etching” the image comes out much crisper.

Step 5 – Assembly
Finally, you are ready to assemble your project. Line up the electronics on the underside of the base and secure them using hot glue. I prefer hot glue because it is possible to remove if you need to make an adjustment. After the boards are secure, wire up the lights and button board to the mainboard.

Finally, flip the base over, slide the glass into the base, and plug it in.

Looking back at this post I realize how many steps and different types of equipment it took to produce one of these light-up plaques. I guess it is not as easy as I first mentioned. Never the less, I hope you have enjoyed reading about this project and it has inspired you to try making your own light-up plaque.

– Michael