Connect with us

Missing feature - voltage level monitor

Discussion in 'General Electronics Discussion' started by flippineck, Aug 5, 2014.

Scroll to continue with content
  1. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    It's a question about my solar energy setup again.

    I used to have a cheap ebay MPPT charge controller to regulate the power coming from my solar panels into my 2 leisure batteries configured as a nominal 12V parallel pair.

    Discovered it wasn't MPPT, it was a PWM design.

    Went out and bought a true MPPT controller having studied reviews.

    Great, all's working with the real MPPT now fitted.

    BUT.. the old PWM jobby used to do a good job of switching off the load output when the battery voltage fell below a certain level, and then switching it back on again when the level rose back above a certain slightly higher level. The hysteresis seemed just about right.

    The new controller just keeps the load on all the time until the battery voltage falls to inverter cut out level. Whereupon the 240V output from the inverter fails, but the load output from the MPPT controller is still 'on'.

    There are a whole bunch of settings for different modes of load output control but they all seem to be more concerned with the timing control of the output, relative to dusk/dawn, for a solar powered 'street lighting' type setup. Nothing really to do with battery content monitoring.

    I wanted to use the load output from the controller to switch a relay, to automatically switch between appliances using the inverter output or grid mains, depending on how full the storage battery was.

    It now seems I can't use the new charge controller to switch the inverter output like this.

    So, it looks like I need to build a seperate, standalone battery voltage monitoring circuit. The requirements would be as follows:

    - operating / monitoring current as low as possible.
    - when battery voltage falls below say 11.0V, make the control output 0V
    - when the battery voltage rises back above say 12.0V, make the control output equal to the battery voltage.

    The output would be fed to a relay: http://www.maplin.co.uk/p/round-base-10a-relay-12v-dc-3pdt-jg62s

    120 ohm coil, 100mA @ 12vdc

    I'm thinking, transistor / potential divider type circuit? What part numbers would be suitable? All I really remember from control tech 101 was 2 resistors feeding the base of a generic transistor, whose collector was wired into the relay coil.
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    Is there any reason you can't leave both controllers connected, charging through the MPPT controller and discharging through the PWM one?

    I agree it's not an ideal arrangement as you'll be powering both controllers, but as an interim measure it might protect your batteries.

    Yes, a standalone battery monitor would also work. Just check that it requires less power than the PWM controller :)

    You might be best off using a pair of comparators driving a flipflop (which interestingly describes the 555) and arrange voltage dividers to set the cut in and cut out point independently . For this to work in an absolute sense, the 555 needs to be powered from a regulated supply since the comparators are referenced to 1/3 and 2/3 the supply rail.
     
  3. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    I'd simply not thought about leaving the PWM connected.

    In common with most other similar controllers it has 6 terminals - 2 for solar panels + & -; 2 for battery + & -; 2 for load + & -. So I should be ok just to feed the battery to the battery terminals of the PWM & feed the relay off it's load terminals?

    That should be pretty good because it's already designed to keep the self-usage current low, and the cut-in and cut-out levels are nicely programmable.

    Should I short the PV terminals or leave them open circuit, bridge with a diode or resistor, something else?

    This is the type of PWM I have: http://www.ebay.co.uk/itm/LCD-30A-M...90939963897?pt=UK_Gadgets&hash=item43bd5f89f9

    Looks like it only wants 15mA to run, which is pretty small compared to the 100mA the relay wants when it's energised
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    Yep 15mA vs 100mA -- I sort of expected that. Just leave the PV terminals open. It would be similar to it always being night :)
     
  5. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    Rigged up & all's well, nothing went bang and the PWM seems to be happily doing it's thing.

    I still have the 100mA going through the relay all the time the load is on.. that's how I'm keeping the load switched to the inverter when the batteries are up to it. Drops back to 0mA when the PWM's load output disconnects, and the relay de-energises and flips the 3 sets of contacts back to the grid side.

    I'd love to find a latching relay (and maybe the necessary interface circuitry) that will only consume power during the switchover i.e. not need 100mA permanently to keep the inverter switched in and the grid switched out. Anyone knows of such animals do let me know :)
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    What is the current you're switching? I'd think that a mosfet would be the ideal device to use.

    If it's a huge current then several mosfets may be required, but you wouldn't be switching them often, so you may not need to be too elaborate in your gate driving.
     
  7. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    I've been sat mentally playing with electrolytic capacitors, diodes and relay coil trying to convert the load output's on/off square pulse into two pulses - a positive going one following the rising edge, then later a negative going one following the falling edge - in the hope of providing 2 seperate discrete pulses with which to pulse/flip a latching relay first on, then off, without having to hold the current on constantly. But, I can't think of a simple arrangement of these components that does this. I keep thinking I've cracked it then see the diode is the wrong way round for one eventuality :-(

    The biggest common UK household plugs are usually fused at 13 amps. The biggest single appliance I can think of ignoring a welding kit is probably a 3kW kettle. So what, P=IV 3000/240.. 12.5A

    To give a bit of headroom should I say 15 amps?

    If I can improve on a non-latching 3PDT relay's 100mA constant consumption that'd be very good

    Could I use mosfets to isolate the inverter's & grid's neutral lines from each other as well as their live lines?

    The inverter's 240VAC outlet receptacle has it's earth pin tied to chassis. I'm tempted not to switch this at all and equipotentially bond the inverter's output earth to the main building earth permanently. I believe this would have the effect of making the whole inverter's output configuration float at whatever the prevailing level of the grid mains, safely providing earthing functionality to the whole system regardless of whether the inverter or grid were supplying power on the live line.

    I'm slightly more comfortable with a 3PDT relay because of the physical isolation between the two mains-level power supplies. But I guess a relay could fail in unpredictable ways so this still wouldn't negate the need for judicious fusing, circuit breakers etc. Would mosfets be likely to have have safer, similar or more catastrophic failure modes than a physical relay?
     
  8. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    Hang on... Are we talking about switching the mains, or switching DC to your inverter?
     
  9. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    Hopefully a diagram will help explain the setup;
     

    Attached Files:

  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    OK, I see. I've looked for latching relays that will handle the voltage/power. The one I found was around $110 and is the sort of thing you'd see in a switchboard.
     
  11. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    That's it, bang on, well found Steve. I was going to mount the whole lot in one of those IP65 type electrical enclosures that can easily incorporate a length of din rail so that's ideal. RS tend to be expensive in my experience so possibly I can find an equivalent a bit cheaper locally.

    Now.. how would I go about converting one long 0V --> 12VDC --> 0V transition, as per what comes out of the PWM's load terminals, into a brief pulse on the rising edge then a brief pulse on the falling edge?

    The rising edge seems to be easy, just a large capacitor in series with the relay coil. But I can't figure out how to generate a discrete relay control pulse from the falling edge of the PWM load output.

    I figure I'll need to store some charge in a capacitor whilst the load output is at +12VDC, then detect the falling edge, then allow the capacitor to discharge through the coil as the load output drops to zero?

    Designing this bit has got me foxed.
     
  12. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    The most important thing to know is the voltage/current required to turn this on and off.

    I think that this one requires 240V, and as such you might be best using a solid state relay to switch it.

    If so, you may find you can't switch from one to the other if mains has failed. Perhaps use the inverter power to switch to the inverter and mains power to switch away from it. Of course this will discharge your batteries to inverter cutoff if there is no mains power.
     
  13. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    Looking at the data sheets for the relay family you found, it looks like they're very modular. I can see quite a few coil options at 12VDC.. I'll have to study carefully to figure out exactly what combination of modules I would need to get 2 x 16A changeover poles with a 12VDC coil. Looks like the power required by the coil would be 9 Watts if i'm reading it right, with a control pulse duration of 50ms.

    If I go with a solid state relay, the scenario you mention about grid mains failure would be ok.. if there's no grid mains, might as well empty the battery down to inverter cutoff.

    How would I control the solid state relay though.. still need to detect that falling edge on the PWM's load output & convert it to a minimum 50ms discrete pulse?

    I'm coming across a number of small latching relays with a DPDT contact configuration, that are operated by two seperate coils - one for each bistable state. These look interesting but the biggest contact rating I've found so far is 2 Amps. Again.. if I found a suitably highly rated one of these, I'd have to figure out how to drive the 'flip over to grid' pulse.

    Colin55's post on another board seems to have a circuit that does exactly the sort of thing needed:

    http://www.electro-tech-online.com/threads/transistor-capacitor-confusion.90306/#post-709869

    This will provide a pulse to unlatch the relay when the feed is removed, as well as latch it when the feed rises from low to high? What sort of constant drain would this circuit impose on the PWM load output though. I take it works something like, the falling edge of the input triggers the transistor to discharge the 220uF through the coil?

    To me it looks like it would be constantly shorting the PWM's load output across the transistor and the two diodes, all the time input power were applied?

    Either that or, the transistor's always going to be 'off' no matter what the situation (what with the base being tied directly to the lower supply rail?

    Mind you, I suppose you're going to get a big base current from the capacitor when the input is removed.. and the 'lower supply rail' just goes floating.. scratching my head a bit here.
     
    Last edited: Aug 7, 2014
  14. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    How about something like this:

    POPO.png

    If the supply voltage drops (pretty quickly) the output has the capacitor discharged through the load.

    However, it might be smarter to have a solution that limits the speed of switching from mains to inverter and back again.

    You can probably do the whole lot discretely (perhaps with some 555s) but it could be a whole lot simpler using a microcontroller.
     
  15. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    Go on, tell me how it works (treat me as a simpleton)
     
  16. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    OK, imagine the capacitor is charged and Q2 doesn't exist (and there is no input voltage). Basically assume there is nothing to the left of D1. Resistor R1 turns on transistor Q1 discharging C1 through the load.

    OK, now assume the whole circuit is there and power is applied.

    C1 charges through D1. Transistor Q2 is turned on through resistor R2. This pulls the base of transistor Q1 low, turning it off. (Diode D2 exists to make Q1 easier to turn off by lifting the potential of the emitter a little).

    Now the power fails. Diode D1 stops C1 discharging through the power supply. Transistor Q2 loses drive to the base and turns off. This essentially causes everything to the left of diode D1 to cease to have any effect on the circuit. And this is where we came in :)
     
  17. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    I think I follow. So am I right, this won't provide a pulse at the output on the rising edge of the input.. but it *will* provide a pulse on the falling edge of the input?

    (so, I'd have to combine this circuit with a rising edge pulse generator?)
     
  18. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,497
    2,839
    Jan 21, 2010
    That is correct
     
  19. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    If I put a capacitor C2, equal to C1, across the collector and emitter of Q1.. would that allow a short pulse to flow through the load on application of input power without disturbing the existing operation of the circuit?
     
  20. flippineck

    flippineck

    309
    12
    Sep 8, 2013
    (would I need a diode in series with that capacitor..?)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-