Small lighting controller project
Forbidden
Posts: 4
Hello,
I am new to this and wanted to learn about how these controllers work. I will try my best to explain what I want to create. I wanted to build a small lighting controller box which would simply switch a relay on/off at a certain time of day but it needs to be able to control multiple lights at different times for example a light would turn on at 7am and turn off at 7pm another one would turn on at 7pm and turn off at 1am. I also will need a relay to turn on/off on a interval time to control a 12v mister pump. I was looking at the education kits and was considering purchasing one if anyone has any suggestions of what to purchase. Or if anyone knows of any similar projects or any ideas on a better way to accomplish my goal I would appreciate reading about it.
Thanks for reading,
Isaac
I am new to this and wanted to learn about how these controllers work. I will try my best to explain what I want to create. I wanted to build a small lighting controller box which would simply switch a relay on/off at a certain time of day but it needs to be able to control multiple lights at different times for example a light would turn on at 7am and turn off at 7pm another one would turn on at 7pm and turn off at 1am. I also will need a relay to turn on/off on a interval time to control a 12v mister pump. I was looking at the education kits and was considering purchasing one if anyone has any suggestions of what to purchase. Or if anyone knows of any similar projects or any ideas on a better way to accomplish my goal I would appreciate reading about it.
Thanks for reading,
Isaac
Comments
As to what to get, that's easy. Purchase a QuickStart board (or maybe two). The Propeller Project Board is also a good choice.
I know there are lots of forum members who like the PEK but I think one of the two boards above would be a better choice to start with. There are just so many wrong ways of programming and wiring a microcontroller that it's a good idea to try to reduce the number of wrong ways of doing things when possible. If you start out with a premade board, you eliminate a whole bunch of possible wiring mistakes.
Do the lights you want to control run on 120VAC (household current)? Do you know how many amps the lights require?
Parallax sells a dual relay board that should work with your pump. Depending on the power requirements of your lights, you may be able to use the same relay board for your lights.
If you need a relay to switch higher current loads, you could use this relay board from SparkFun. You could also check ebay for relay boards.
If the clicking of a relay bothers you or a significant other, you could use solid state relays. SSR's are more expensive than the electromechanical ones but they last longer and can often be controlled directly from a Propeller's I/O pin. You have to make sure you pick the correct SSR for the job. You need a specific type of SSR to switch AC loads vs DC loads.
Here's a Nuts & Volts article about controlling a relay (and transistors) with a microcontroller. I have a list of other tutorials in post #3 of my index (mostly Propeller related tutorials).
You ask about easier ways to accomplish your goals. Truthfully, purchasing a timer for each light might be easier than using a microcontroller and relays to turn on and off lights. There are relatively inexpensive timers that let you set several on and off times each day. Multiple timers may be easier, but it wouldn't be as much fun as learning to program a microcontroller.
I really appreciate all the links you have given me I will sort through them here in just a bit but I wanted to go ahead and answer your question. The lighting fixtures I am looking to control are something like 50 watt MR16 lamps. As to your advice with an easier method you are totally correct that the timers would be easier but truth is I am interested in learning how to design these sort of controls to use in a more professional environment in the future. I will look through all the information you have provided me and get back to everyone here with more questions.
Thanks again
From what I am reading it looks like all this may work, which in that case would something like the quick start board be a good place to start learning the programmer?
While the Propeller can keep reasonably good time on its own, it would do better with a real time clock (RTC). There's a lot of different RTCs with varying levels of accuracy.
An alternative to a RTC is to have the Propeller get automatic time updates from an external source. There are special radio receivers for just receiving a time signal and GPS modules are also used to receive accurate time from the GPS satellites.
I've lately done a lot of LED projects. Towards the bottom of post #5 of this thread I list a few of these projects. The WS2801 RGB LED strips are a lot of fun to play with and JonnyMac's driver makes it easy to program chase sequences with them.
Yes, it's hard to go wrong with a QuickStart board. This thread has a list of links to many of QuickStart projects and demos I've seen (I haven't updated it in a long time).
You may want to take a look at the X10 modules. They use the power lines to send commands from the control modules to modules that control lights, motors, heaters, etc. You may still need a micro to send commands to the control module, although there are some controllers that are programmable.
I got the money together so I am going to go ahead and order a quick start board as you recommended but I wanted to run a couple of things by you and see what you think? I came across this http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/x10/List/0/SortField/4/ProductID/658/Default.aspx which seems to be a good base for the application I am trying to build. I am trying to understand the logistics about what I am reading in the description, for this board I still need some sort of controller board to go with it correct? I wanted to try and build in the RTC chip with some sort of method for updating as well as being able to program via USB. I am just trying to figure out what components would go along with this board or get your opinion on everything as well.
For an RTC you could use an external chip or module, or you could use one of the cogs on the qs propeller chip for time/date generation. You would need a small backup battery for the qs board if you use the prop cog for the RTC.
I've used these RTC from SparkFun. The attached backup battery keeps the time current while the Propeller isn't powered. As kwinn mentioned, if the Propeller can stay powered up, it can act as a RTC.
The QuickStart has a USB connection to make it easy to program. The RTC would be programmed (set) through the Propeller.