Electronic – How to switch dumthe load circuit on/off with pwm

pwmswitching

I built pretty much the simplest dummy load for testing batteries I found on youtube (EEVBlog #102) , but I modified it little bit. I used 0R1 resistor, because I needed bigger currents from battery (expecting little bit over 2A max). I also use rail-to-rail operational amplifier TS912. I use voltage on sense resistor for feedback to have more control over the current. Also, I use my ATMega32 to control this circuit. It works perfectly in these two "modes":

  1. Constant current: I set voltage on DAC and it sets the current
  2. Constant load: I check battery voltage to calculate DAC output, therefore current to maintain constant load

I need to add PWM switching, switching on/off with ATMega32 and I am desperate to make it work. I tried adding N-channel MOSFET and connecting PWM to it directly, but it did not work. Then I read that I need bigger Vgs voltage and there was this "switching circuit" to make it work- see image. But it can´t possibly work, since PWM is only 0/5V. With 12V supply, P-channel MOSFET is on all the time. Only workaround here would be to find some P-channel MOSFET with Vgs(th) like -8V, but I can´t find any. I could also lower supply voltage, but I am not sure if it works.

I already ordered parts to test it, but in the meantime I still think about it. There is probably different solution to that problem. Can you please help me? What do I use to just simply switch this circuit on/off with PWM?

Thank you,

Jakub

Edit – So I have been thinking about it and what if I just did not include that "switching circuit" at all, I would just set voltage on DAC with the same frequency as I wanted with that N-MOS. I guess I will definitely try this and the other answer recomendation.

enter image description here

Best Answer

If you wish, you can buy logic level mosfets that are intended to be controlled by 3.3v or 5v and use them directly in your circuit. You can also get mosfet drivers with a variety of functions.

Check out a MIC4426/7/8. You can use it to speed up switching and drive the gate of a 10V Vgs mosfet with a logic level (5v) circuit. You do need an additional source at gate drive voltage. You can also get boosting mosfet drivers that create a drive voltage way above the positive rail for you, so you can drive N mosfets on the positive side of the circuit.