12V switching challenge

Discussion in 'The Projects Forum' started by Zapstrap, Dec 17, 2012.

  1. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    Well, I looked for a thread that's similar to my situation and drew a blank, so...

    Ok, first off, greetings from Canauckistan! Second, electronics is not my strong suit. We live completely off grid in the mountains of BC, generating our power from a small hydro unit, the ES&D Stream Engine. It's the step up from my original system that consisted of an old wire spool, a mountain bike frame and a 12V Delco alternator... that I was constantly repairing. The joke is that I learned electricity from the creek up...

    While we have a good pure sine inverter to handle our 110 needs, we also want to take full advantage of the 12V power available. We have a few 12V lights around but never really gave much thought to them as a permanent lighting solution, since when we started, LED's weren't that common yet and bloody expensive anyway.

    Being that we live in the middle of nowhere, one would expect a quiet, idyllic lifestyle. And for the most part it is. However, being at the end of a road always seems to attract the weirdest folks. Some are just exploring and that's not so bad, but some of them are up to no good, knowing that if no one is home, it's easy pickings. A big dog won't work, because there would be nobody to feed it while we are away for extended periods, so our only solution is a CCTV system.... Don't worry, we're getting closer to the question...

    After much consideration, we have decided that we would like to be able to accomplish a few things.

    A. To be able to control 4 light circuits via good old fashioned wall switches.

    B. To be able to employ our 4 channel remote control.;

    C. And, to be able to control these circuits via our android phones.

    I already have the ability to view the cams via an app on my phone. I can control the PTZ cam as well.

    My question is... How do we get all of these features to work together without interfering with each other? I thought that one relay for each circuit would work, but I'm concerned that the power might overlap on the control side and cause problems in the DVR relay controls.

    Like I said, I have been learning electricity, and electronics, from the creek up, so I have a lot to learn!

    Thank you in advance for any and all advise!
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    I'm not entirely sure where to begin but you may want to learn about home automation hardware. Some would allow you to, for instance, control various things in your house remotely over the internet. If you have internet...
     
  3. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    Do we have internet? Oh boy have we got internet!

    We have 3 ISP's! Hughesnet satellite, a Line-of-Sight service and tethering through our cell phones... All that for around $300 per month for a whopping 47GB! woo flippin hoo... Oh well land taxes are cheap so we gotta pay extra for other things. The joys of being hermits, eh?

    As it is right now, I can control the lights via my phone's app, gDMSS, that controls the 3 no/c ports on the DVR. I can also control them with the remote control unit. What I'm worried about is, if I have 12v to my relays, will they not backfeed into the DVR no/c ports, thus causing damage, since there is normally no power to or from these ports. The rest is relatively easy if I can figure this out.
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    I can't guess without a schematic or a diagram.
     
  5. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Do you have a block diagram of your power system? That would help us (and may help you too) to visualise exactly how the system works and where the power can flow/backflow. Photos are also nice.

    Congrats on getting a hydo power system working, that is very commendable and quite cool too! :)
     
  6. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    Here is an attached file of the diagram. I tried to load it directly but it was too big... My non-geekiness does cause me some problems now and then. haha...

    Thanks for the replies and maybe even a solution!
     
  7. k7elp60

    Senior Member

    Nov 4, 2008
    478
    69
    I'm not sure if I can help. The DVR ports you say are no/c. I wonder if that is logic level. I have an idea you may be able to use opto couplers to turn on some power mosfets(transistors) and not use 12v relays at all.
    There are 12V Led systems now that provide a lot of light and are reasonably priced as well.
    Ned
     
    Last edited: Dec 18, 2012
  8. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    Maybe it's just me, but I'm still utterly lost. You've mentioned cameras, lights, alarms, wall switches, remotes, motion detectors, a DVR and android phones. I have no idea how any of these are related or connected, or what the question is. Sorry, but the diagram doesn't yet resolve that.
     
  9. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    I am sorry if my goal isn't clear. I just re-read it and I guess it is a bit vague.

    What we are attempting to accomplish here is to have 4 circuits, as represented in the diagram by the LED's and the buzzer, that will be controlled by various switching devices.

    The DVR has motion detection (that comes from the cameras themselves) and the three normally open or closed switches. The Android is simply used as a type of remote to control those switches.

    The 12V remote control also has 4 switching circuits.

    Then there will be regular old fashioned wall switches.

    We want to have all of these switching devices control all of these circuits.

    An example would be, one circuit is dedicated to the outdoor flood lights. I want to be able to turn them on and off with any of the different switching devices. Not that complicated to my thinking.

    Another example: I have an app on my phone that lets me monitor my cameras from anywhere there's cell service, which in itself is pretty cool. In that app are three switches that can be used to control the no/c ports on the DVR. Say I want to turn the 12V lights on in the main house while laying on the beach in Cancun. Let's say that's circuit 1. I bring up the app, go to the switch panel and touch the on button that controls circuit 1, the lights come on.

    The motion detection is built into each camera and can be used to trigger the alarm port, which can turn on lights, a strobe, siren, barking dog recording, a recording of the sound of a shot gun chambering a round, whatever... I am not completely clear myself on what this will be in it's final form. It is not the priority here anyway.

    I know this is an uncommon situation, that's why I came here. If I was an electrical engineering teacher, I think this would be on a test! :D:eek:
     
  10. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    OK, thanks for this. I'm much closer to understanding.

    You've got 4 channels and they're all the same? Let's talk about just one, say the floodlights, or a generic AC-mains powered load.

    You want to be able to control each channel by either of 4 inputs: Wall switch, motion detector triggered by DVR, local remote (an oxymoron, but you get my point), and distant remote, ie. your cellphone. The android phone input already works, at least to control the switches on the DVR. Is this all correct?
    Maybe there's a dedicated alarm channel that will be different than the other 3?

    Are the DVR switches sufficient to switch your loads (rated for the amperage?) and you "just" want to gain more control over them?

    I'm getting some ideas. How do you want to handle the interaction of the various controls? An easy way might be to "OR" them, so that if any one or more of the inputs says "on", the lights are on. Another choice would be to use the last received instruction, so that any input causes a toggling.
     
  11. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    My replies are in red...

    Thanks Wayneh! I have my test bench cleared and ready!
     
  12. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    Since the DVR switches are only good to 2A, I think it would make sense to use 4 external switches and just use the DVR switches for "information". This might have been required to get the functions you want anyway, and I think it will give you more flexibility.

    If it was me, I'd use MOSFETs to switch each circuit. They are functionally a bit like relays in the sense of switching big loads with a small signal, but are cheaper and smaller than mechanical relays. Since your loads are all 12V DC, they'd be great. There are many choices. I often use IRF540N because I bought a bunch to use as my generic, go-to MOSFET. Using MOSFETs would allow you to go wild and even use dimming or other effects someday, it that was interesting.

    All your logic circuitry can probably run on the same 12V DC used for your loads. Do you have regulated 12V, or what is it exactly? A regular (not "logic") MOSFET like the IRF540N needs at least about 10v on its gate to be fully on like a triggered relay, so 12V is fine.

    One thing I have no idea for is the wall switches. Are these already in place, wired with 120V? If you're talking about all new stuff, this is not a problem but otherwise we'll need a way to communicate a switching event.

    Do the DVR switches actually supply power out, so 0V when off and 12v when on, or are they like a relay, in which case you would supply 12V and then get 12V on the output when the relay closes?
     
    Last edited: Dec 19, 2012
  13. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    Thanks for the quick reply wayneh,

     
  14. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    Just a quick question...

    I went into my junk box and found an old UPS. There are 7 MOSFET's in there, and I'm not sure if these are what we want...there's 5- IRF540's, one KA317 and a L7812CV. There's some pretty hefty diodes in there too!
     
  15. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    Cool, those latter 2 are both voltage regulators that may come in handy. Those MOSFETs would be fine too, but new ones are something like only 60¢ each.

    [update] Just read your logistics issues. Pulling MOSFETs off an old PCB is an attractive option!
     
    Last edited: Dec 19, 2012
  16. wayneh

    Expert

    Sep 9, 2010
    12,148
    3,058
    If you want to play with a MOSFET to get familiar with it, connect the source pin to ground and the drain to the low side of your load, say a 12V light bulb. (Of course, get the datasheet to learn the pinout.) The high side of the load connects directly to +12V, and the MOSFET controls the path to ground.

    Put a high-ohms (1K to 1MΩ) resistor from the gate pin to ground. This will hold the gate low and prevent it from floating if/when there is no input. It's optional, but good form. The MOSFET has very little resistance when driven fully on by 10V or more, but a lower voltage can cause it to have some resistance. At high current load, that resistance will create too much heat. So you always want to be sure a MOSFET switch is either fully on or fully off, not in between.

    Touch the gate to +12V to turn on the light. It should turn on nicely and then back off when you remove the signal.

    One very cool thing about MOSFETs is that the gate doesn't draw any current, it just needs a voltage. Whatever resistor you used on the gate-source connection, try using a value of 1/10th that to connect +12 to the gate. The light should still switch nicely even though there is very little current available to flow to the gate. A regular (BJT) transistor would need about 1/10th of the load's current in order to be fully driven "on".
     
  17. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    Before I dig out the disk grinder to clean the bread board...:eek::eek:...(hey, it's fast and it works:D) ((J/K!)) I thought I'd post a pic of it to see if we cant incorporate it some how. I took the heat sink off so maybe we can just attach them to that?

    [​IMG]
     
  18. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    Sorry, I missed this post... I am playing with my MOSFET now.... dang, that sounds bad doesn't it? :( :D

    Alrighty then, High Ohms Resistor eh? Ok, I will be trying to figure where to find one and then go back to playing with my MOSFET...:)

    You do realize that I am just barely electrically literate don't you? It's all very fascinating though, and it keeps the old brain from turning to mush...
     
  19. Zapstrap

    Thread Starter New Member

    Dec 17, 2012
    24
    0
    My first discovery about MOSFET's is that it doesn't take much to fry one!
     
  20. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    You played with it too much. ;)
     
Loading...