The light of the future!

Hey guys! Sorry about the lack of posts recently. It’s not because I haven’t been working on stuff, it’s just that I haven’t had the attention span to sit down, organize everything, and write. But finally I do! So here we go!

A very long while ago (Not really, it was like January,) I purchased a few sensors to get me started on the very basics of electronics. Among these was a handy sensor that never seems to stop having uses. I got one of  these bad boys for a bit cheaper than the price in that listing, and it’s been a ton of fun. Basically, it uses sonar to detect the distance to whatever you’re pointing at it. It’s great for anytime you need to see where something is. Which is like, all the time.

So, I was playing around with this thing, and it struck me how easy it would be to wire this up to an Arduino and an LED or two (or nine, as it turned out) and make a cool light that could be activated by a wave, instead of a button!

Version 1 was kind of cool, but pretty crappy looking. I used the enclosure to an old router (thank you, D-link, for sacrificing your life in the name of science) to house arduino, a breadboard, the sensor, and the light. It worked pretty well, but it wasn’t great. Firstly, everything was kind of just sitting inside the enclosure, with tape securing it in place. Secondly, and the main reason why I had to redo it, is that, for a project which needed 3 I/O pins (2 for the sensor and one for the light,) I was using a 35-dollar arduino that has 20-ish pins and enough computing power to run 15 of these lights at the same time. The verdict was clear, it had to be redone.

Since I definitely needed some kind of microcontroller, but I certainly didn’t need Arduino, I decided to go with something in the middle. A couple of weeks ago I bought several ATTiny micros for exactly this type of thing: when I need pins, but not many. I used MIT’s High Low Tech tutorial found  here to program them, which took about 15 minutes. Go MIT!

After I was sure I was happy with the programming, and had tested it on a breadboard, I took the leap and perf-boarded everything. It really isn’t super complicated or impressive looking, since it’s just the ATTiny, a voltage regulator, the sensor, and the LEDs, but here’s a pic of the board for science:

Image

Not included in the picture are the light (That’s where the two black wires go, you can see it in the final product) and the barrel jack for power input. But you get the idea.

Now all there was to do is drill holes and put it into a snazzy enclosure!

Image

I’m really happy with the way it all turned out. Here’s a video of it in action:

See you guys later! If you have any questions, email me at: nfarrington1 <at> gmail <dot> com