# How to switch dummy load circuit on/off with pwm?

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.

• "* I used 0R1 resistor, ... (expecting little bit over 2A max).*" From V = IR we get that your battery voltage is 2 x 0.1 = 0.2 V? Jul 28, 2018 at 14:08