New project: Timed lights

Every year for Christmas, we have a few strings of lights going on in our house. Aside from the tree, we’ve got a string of lights going down the railing of our stairs. We usually just plug it in whenever it gets dark and then the last person who comes upstairs for the night unplugs it. This year, we got a mechanical timer for it. We’ve got it turning on when it gets dark in the evening, but we’ve also got it going on for whoever’s getting up early in the morning for work. They’ve gotten so used to it that my parents bought a string of lights that looks a little more generic to use throughout the rest of the year. Their plan was just to use it as it’s designed with the on/off switch. Of course, I can’t allow that.
1These are the lights that they got. The packaging was seriously impressive. The battery holder was in a box and, on the outside of the box, there was a Try Me button that let you momentarily toggle it on and off.
3 This is the circuitry for the Try Me button. They were powered with three 1.5v button cell batteries that were in their own enclosure (that white cylindrical piece). I love the big tactile button which I hope to find use for in this project. The third white bit is a connector that you’re asked to remove to dispose of this circuit when you’re ready to use it properly (but why would anyone do that?!).2This is the other side of the connection. It bypasses the switch and is connected directly to the lights so that the button is the only thing that’s in between the battery cells and the lights.

5I decided to try hooking them up with the power I’ll be using from the Arduino. There is a resistor already soldered onto the switch but I was having trouble figuring out the color code (it’s been a while, don’t judge me). I checked with a multimeter and it’s just 8.2 ohms. I tried with the 3.3v and 5v supplies. There is a noticeable difference but 3.3v could still be fine for this project. I can always see what works better when it’s finally installed.

I was thrown off by the wiring that they used. It appears as if it’s uninsulated, but I found out it’s probably insulated by a clear coat varnish. I could probably just scratch it off or solder (which would burn up the insulation) but I feel safer just using the connection at the battery pack.

4I’ve never powered an Arduino directly from a proper barrel jack adapter. I’ve always used batteries, USB power, and USB adapters. I’ve had this adapter for years and I never used it because it’s kind of old and I find it hard to trust. The switch is not accurate because that’s the final position for 9v… between 6 and 7.5. I had to use a multimeter to confirm. I also don’t like the idea of having all of the other jacks floating around so I taped them up with electrical tape to avoid any of them touching. It’s a very low risk situation but it’s all about doing this safely, especially if I’m going to leave it plugged in overnight.

So what am I doing anyway? I’m using an Arduino to switch on some lights at certain times of the day. I’ve already put in an order to my favorite supplier, Dipmicro. I’ll need to get a real time clock, along with parts for the circuitry including the capacitor and oscillator (I already have the resistor). I also picked up a potentiometer for the LCD because the pots I already have are all beaten up.

I think now is the time to put down a list of objectives:

  • Turn on and off the string of lights automatically during specific times during the day.
  • Have an LCD display the current date and time, as well as when the lights are going to change state next.
  • Allow for manual control of lights.
  • Allow change of time periods through use of menu buttons and LCD.
  • Allow enable/disable for weekend automation.

This’ll be a fun challenge. Stay tuned for the first RTC tests when the parts come!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s