[woody1189] put together some automatic lighting for his closet. Nine LEDs are grouped into three lamps and controlled by a hall effect sensor. He prototyped this on an Arduino and then migrated over to an ATtiny85. Although the current implementation could be accomplished without a microcontroller, we’d love to see some firmware improvements such as an auto shutoff for when you forget to close the closet door. The hall effect sensor seems to pop up in a lot of projects so make sure you get a few of them with your next parts order. Video of this in action after the break.
[youtube=http://www.youtube.com/watch?v=bqfRXRa9yWc]
Why wouldn’t he just use a switch instead of a hall-effect sensor? That way no power would be wasted monitoring the hall sensor and powering the Arduino. Seems kinda silly to me. Especially in this case where the closet is likely to be shut more than it is open. If you can can use a solution to save energy and make the project easier to build at the same time, why wouldn’t you use that solution?
Just my 2 cents.
Yepp – a micro switch, activated by the door, would be way smarter!
The same 2 bits
Wouldn’t a normally-closed reed switch be just as good?
This is just mad. Arduino? really?
Totally excessive, a reed switch would do the same job simpler & cheaper.
nowhere in the post does it say:
“efficient” or
“practical” or
“simple”
he said he wanted something cool, jerks…
Alright _matt. I wasn’t being mean, rude or whatever. I was simply saying that it could be done in a better way for a closet lighting solution. If cool was his objective in this project, and he got that, then the more power to him. I am simply pointing out simple ways to make it better. The other posters were also pointing out the same thing as me I believe, but not in a critical way (or I should hope not).
As quoted “Just my 2 cents.”
@shadow — no arduino, rtfa. proto with the arduino and got off it, as it should be
and just a reed switch wont get you a timeout
another proof that arduino users are totally morons
Well, I think it’s at least interesting. A reed switch wouldn’t handle a high rate of on/off switching where a hall effect sensor could. Say like an rpm sensor or something like that the hall effect sensor might be a better solution. Hey, hook it up to your bike to make the lights flash everytime your pedal goes around or maybe every revolution of the wheel.
Sure, for a closet it’s high tech and way over the top, unless he puts in loggers that log how often the closet is opened and for how long. You know, meaningless data that nevertheless can be interesting sometimes.
that’s a very nifty idea, except for the control. I’m going to make one, minus the excessive control.
I agree that an avr is overkill for this. A reed switch would be better. There’s no point in powering a uc 100% of the time just to turn on a light. Unless you’re using it for more than just a simple switch. (Auto-shutoff, etc) This concept has been in refrigerators since forever and they don’t need hall effect sensors.
Dano: Yes, hall effect sensors can sense in higher frequencies. How fast do you plan on opening and closing the closet?
Perhaps the best solution would be to use the AVR, implement an auto-shutoff, and diconnect power via switch when the door is closed. He would get the power saving benefits and wouldn’t have to change his circuit at all except for adding the switch (ignore the hall effect sensor) and a couple lines of code.
Hey everyone, this is the author of the project. I just want to explain why I used and AVR to everyone hating on the project because they could have done it simpler. First of all, I intended the Instructable to be a mini intro to microcontroller programming, arduino, and the sensor in general. As I was learning about microcontrollers, the only projects I could find were just lighting up led’s in nightrider fashion. I wanted to make something small and simple with a sensor nobody really created a tutorial about, along with included links to basic in/out port usage, so anyone who is starting out can have a little more to choose from. I also wanted to leave room open later for different light modes and possibly an infrared receiver for remote control; auto-shut off sounds good too. Also, it’s clearly stated that I wasn’t going for efficiency, otherwise I would have used an interrupt with the sensor.