Shop OBEX P1 Docs P2 Docs Learn Events
Small lighting controller project — Parallax Forums

Small lighting controller project

ForbiddenForbidden Posts: 4
edited 2013-03-01 15:05 in General Discussion
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

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-02-23 00:53
    By "education kit" did you mean Propeller Education Kit (PEK)?

    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.
  • ForbiddenForbidden Posts: 4
    edited 2013-02-23 09:36
    Wow thanks for the reply Duane!
    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
  • ForbiddenForbidden Posts: 4
    edited 2013-02-23 10:15
    One major question I have which will decide if this a good route to go is, do the controllers have to be connected to a PC for the programming to work? For example my goal is to have the controller programmed with a 24 hour clock and fire relays according to what time of day it is. Another goal of mine is to be able to use the controller to design led diode light chase sequences, or to be able to control dimmer relays to dim lighting fixtures.
    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?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-02-23 10:43
    Once the program has been loaded, you no longer need a PC.

    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.
    Forbidden wrote: »
    would something like the quick start board be a good place to start learning the programmer?

    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).
  • kwinnkwinn Posts: 8,697
    edited 2013-02-24 10:19
    Forbidden wrote: »
    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

    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.
  • ForbiddenForbidden Posts: 4
    edited 2013-03-01 13:13
    Hey Duane,
    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.
  • kwinnkwinn Posts: 8,697
    edited 2013-03-01 13:45
    You still need a controller board, and the quickstart (qs for short) will be good for that. The qs comes with USB so you can use that for programming as well as updating.

    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.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-03-01 15:05
    My main concern about the Input/Output board is its need for a 12V power supply. While 12V wall-warts are pretty common, they're not as common as 5V wall-warts. There are lots of relays that can be powered by 5V. The same 5V could power the QuickStart board. I don't know if it's safe to power the QuickStart with 12V.

    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.
Sign In or Register to comment.