0

Can I have an N-Mosfet controlled by one power source to control a separate power source. I want to have power from a USB port to control wether power is going to a fan and water cooling pump, and to leave the power on for some time after the computer is turned off. It simulates ok, but simulations are not always real life.

Any other notes are appreciated.

Below is an image of the circuit. The lower left corner from the ADC on is only for testing. A simulatable version is at Falstad, but I had to remove the timer. Simulation image

traisjames
  • 199
  • 1
  • 11
  • Your N channel mosfet is currently in a high-side switching configuration. You might want to change that to low side switching (https://electronics.stackexchange.com/questions/188745/high-side-driver-and-low-side-driver) – BeB00 Apr 20 '18 at 19:26
  • 1
    Also, you're violating the USB current inrush spec with your 100uF capacitor. USB 2.0 max inrush capacitance is 10uF (www.testusb.com/inrush_issue.htm) – BeB00 Apr 20 '18 at 19:27
  • @BeB00, so I want to use a P channel MOSFET that is in line after the two relay coils? I am trying that now but the load doesn't get power unless the USB side has no power, which is the opposite of what I want. What can I do to limit the inrush? I measure a peak of 5mA at start, 1.8mA after 100ms. – traisjames Apr 20 '18 at 22:12
  • @BeB00 I think I can solve the inrush issue by simply having an N-channel mosfet connected between the 5V supply rail and where it was going in on the USB side, and that controlled with the gate getting 5V on the USB. – traisjames Apr 20 '18 at 22:27
  • Though now the MOSFET controlling the relays only gets up to 3.5 V (MOSFET set to 1.5v threshold), so it turns off faster. Though I could fix that with a larger resistor. – traisjames Apr 20 '18 at 22:31
  • No, you should use an N mosfet, but have it between the coil and GND, rather than between the coil and +V. – BeB00 Apr 20 '18 at 23:10
  • Got it. And for the USB? – traisjames Apr 21 '18 at 01:32
  • Either a smaller capacitor or a resistor to limit inrush current – BeB00 Apr 21 '18 at 01:34
  • You're still not going to have great accuracy though. The relay will turn off way before you reach the threshold voltage of the mosfet, but it wont be easy to predict when. You need a sharp transistion between on and off. – BeB00 Apr 21 '18 at 01:36
  • That is ok, I dont need 7.5 minutes exact, just a few minutes to cool down the cooling system. – traisjames Apr 21 '18 at 01:52
  • If you put your response as an answer I can mark it as a good one seeing noone else has anything to add. – traisjames Apr 21 '18 at 01:53
  • Well ok, but depending on the mosfet and the current required for the relay, you may get way less than 7.5 minutes. – BeB00 Apr 21 '18 at 01:53

1 Answers1

0

See comments, basically it will work okish, needs a resistor to limit the inrush current, and should be a low side switch, not a high side one. You'll still have large innacuracy, as explained in the comments.

BeB00
  • 5,465
  • 2
  • 18
  • 35