MOSFET comparator

Discussion in 'The Projects Forum' started by caplja, Dec 1, 2014.

  1. caplja

    Thread Starter New Member

    Dec 1, 2014
    6
    0
    Hi to all, I have stumble upon this forum by Google and I have find some helpful threads close to my problem but still don't know how to solve it.
    I know in theory how MOSFET works but have some problem with practice :)

    I need to build MOSFET comparator that will switch between two different sources. Source 1. is between 0-35V and Source 2. is battery pack of 8.4V. So I need to build automatically switch that will connect LOAD to battery(Source 2) when Source 1 is under 9V, when it comes over 9V the battery is switch OFF.

    So, my problem is that I don't know which MOSFET to use and have to menage this above. The maximum current will be 500mA from Source 1 and from battery the LOAD will take ~1.5A.

    I will appreciate you help, and excuse me if there is similar thread, in that case I will bi grateful for showing it to me.
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,048
    You need a comparator, such as LM339 (4 comparators in one package) to make the switching decision. The MOSFET itself is not smart enough - it's just a switch.

    One problem you have to account for is that, the instant you remove the load from the source, the voltage of the source will shoot up.
     
    caplja likes this.
  3. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,049
    3,813
    Just put a diode on your battery and connect the diode to the circuit. If the voltage from the power supply is higher than the battery, then no current will flow from the battery. If there is no power supplied by Source 1, then current will flow through the battery to power the circuit.

    In simplest terms, current only flows from a high voltage to a low voltage in a diode so no current will flow from your power source to the battery (diode is a one-way valve).

    This, of course, means that the battery will not "turn on" at 9 volts, but 0.3 to 0.6 volts less than the current battery voltage (voltage drop across a diode - depending on which type of diode you use).
     
    caplja and #12 like this.
  4. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,048
    Is Source 1 a solar panel? I'd put the diode there and let the battery-to-load path be direct.
     
  5. caplja

    Thread Starter New Member

    Dec 1, 2014
    6
    0
    I'm making charger for bicycle with dynamo hub. So I need this kind of switch because max current of my dynamo is 500mA (that's Source 1). Battery is the there because I want it to pop in when I slow down and voltage from dynamo is not high enough to power light,mobile etc...

    The solution with diode won't work because the LOAD will drain current from battery if I allow it(and diode does that). That's because battery can give more then 500mA and Source can't.
     
  6. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    I don't understand why you think the diode solution won't work. A diode in series with each source will allow current to the load only from the source with the higher voltage, which is what you said you wanted. Use Schottky 5A diodes for minimum voltage drop.
     
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Does your hub dyno output DC or AC?
     
  8. caplja

    Thread Starter New Member

    Dec 1, 2014
    6
    0
    As I have understand @GropherT is talking about connecting sources in the parallel and just putting diod where the batteries are so no current will go from hub to battery and when voltage from hub is higher then voltage from battery the load will use the hub as primary source.

    I think here is the problem in the load, because if I connect the light that can take up to 1200mA and the hub is giving me the max of 500mA wouldn't in that case load drain the battery too? even if the voltage from source is higher then batterys.

    Yes, the hub is AC but I will use the gretz to make it DC and step-down converter to go max voltage that load can use. So the case from above would look like this:
    [​IMG]
     
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Eh? What's that?
    And how do you hope to run a 1200mA load from a dynamo that can only supply 500mA max?
     
  10. caplja

    Thread Starter New Member

    Dec 1, 2014
    6
    0
    I thought it is the same word in English as we use, Graetz is normal diode bridge to convert AC to DC.

    The load that use 1200mA is light, T6 led emitter so with 500mA it just won't be as bright as with 1200mA when on battery.
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Post deleted
     
    Last edited: Dec 2, 2014
  12. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    No. As long as the source voltage is higher than the battery voltage, the diode in series with the battery is reverse biased and won't conduct any current.
     
    caplja likes this.
  13. caplja

    Thread Starter New Member

    Dec 1, 2014
    6
    0
    Hah! As simple as it can be, I completely forgot the main function of diode.-.-' Yes, the voltage from hub when higher will reverse polarize the diode. Thank you!

    But, now there is the problem will this work with Buck converter in the circuit? I have to lower the voltage to the 8.4V maximum as that is the maximum voltage the LED can handle.
    So, If I set the Vout=8.4V from Buck converter how will that affect circuit? I assume that the battery will drop little lover from the 8.4V from maximum and then the hub will be the main source as long as it gives higher voltage then battery.

    Also, I'm repeating this limit of 8.4V from hub because I'm planing to implement manual switch so I can charge battery(it has to be charged with precisely 8.4) when there is no need for load.
     
  14. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,800
    1,103
    Unless your LED light has built-in current-limiting you should be driving it from a constant-current source; not from a fixed 8.4V (especially if that is the rated maximum for the LED).
    BTW, what type of 8.4V battery are you using, that requires a fixed-voltage charger?
     
  15. caplja

    Thread Starter New Member

    Dec 1, 2014
    6
    0
    Ok, as I also now have more questions then answers and according to your status message maybe it is the best way to describe whole project in its own thread. Who knows how many simple solutions as this diode is there:D

    So when I make schema and describe everything will post it. Then moderators can move this posts there. After building it(and I believe solving all problems), I will summarize everything with needed documentation.
    Yes, I know there is nothing impressive about this, just simple charger. But I choose this to be my first project so I can learn step by step while entering "electronic hobbyist world".
    At the end I hope to build charger with higher efficiency and my own Buck converter using MC34063, with battery to pop in when speed is low and the hardest part I believe - the automatic charger of two 18650 batterys connected in series when there is no load. And sugar to the end - making it waterproof :)
     
Loading...