Op Amp and MOSFET Selection, Circuit Question

Hi all,

First post in the community, so forgive me if I'm in the wrong place. I'm looking to build a battery discharge cycle tester to determine how fast certain devices drain batteries. I'm planning to use an Arduino Zero to command the system, but I'm unsure of which exact circuit configuration and components would best suit my needs. The system will basically act as a programmable DC electronic load that can be varied during each cycle (ex: draw 20 mA for 3 mins, then 60 mA bursts for 1 min, then off for 5 mins, and repeat). I also need to be able to continuously measure the voltage of the battery pack to stop the test if a prescribed low voltage limit is reached, to simulate the voltage being too low to power the theoretical device.

I'm fairly familiar with how everything works, but I don't have a ton of experience with circuit design so I could use some advice. I've found two example circuits on YouTube (pics attached), but there's some variation between them. If I'm going to be working with a max battery voltage of 12V and have to draw a max current of roughly 300mA, but be able to accommodate as low as 1.5V and 0A, which circuit would work better? And what Op Amp(s) and MOSFET would be a good choice? I'm hoping to use a single supply Op Amp that the Zero can power, but I can figure out another solution if this can't happen.

Please let me know if there's any important info you need that I left out. Thank you so much in advance!

Interesting design. Your code will be interesting and I expect you will have problems with loop timing. Second you will not have any control, the analog pins are inputs, not digital to analog (DAC) converters. Your Arduino is missing a voltage reference for the battery (Ground). I think this is what you are trying to do: The voltage, VIN (A0 is an input not a voltage output you need a DAC) which is the input voltage is given to the non-inverting input terminal. The inverting input terminal is driven by the feedback voltage which is across the RL resistor, 5 ohm in your design. ... That is, the load current, measured by A4, which is the input voltage, this should work. To be safe add maybe 5K or so resistance in series with this line incase to much voltage is applied to the battery + input.

Hmm. Interesting. The second example is from a video that also includes the code to run the system, but he didn't mention anything about issues with loop timing. What sort of problems do you foresee? Here's the video link in case it's helpful: How to Build a Simple DC Electronic Load with Arduino Part 2 - YouTube

From what I read about the Zero board, the A0 pin supports true analog output when using analogWrite(). This is what was used in the video as well, but am I mistaken in interpreting how this functions? Would you also be able to elaborate upon what you mean by the board missing a voltage reference for the battery?

Thank you for your reply and other comments/suggestions too!

I'm going to be working with a max battery voltage of 12V and have to draw a max current of roughly 300mA

The bottom circuit looks as if it could work - except as has been said it needs a ground connection; and you will have to change the resistor values for the divider. Anyway those values are nonsense (9.98kOhm).

I suspect you may also need to drop the value of the 5 ohm resistor.

I dont see why you cant use a rail-rail op amp running single supply from the zero's 5V

op amp recommendations here

The circuit is standard, but lacks a stability capacitor, and you should be using a rail-to-rail opamp.

Without the capacitor/resistor network there's a chance the feedback loop has enough
phase lag to be unstable at high frequency. The high frequencies have a feedback path through
the cap that bypasses the MOSFET and any lags it has.

The opamp should be able to handle inputs down to the -ve rail. Then you don't need any negative
supply.

The resistors in the DC path prevent any over-large current flows in the opamp inputs when the
device saturates. Its generally a bad idea to have both inputs driven by low impedances (for instance
the NE5534A originally suggested may fry if you do this).

Thank you both for your feedback and advice. This is extremely helpful. I believe I have a good handle on how to proceed. Cheers!

If you want you can check some project tasks that I prepared for operation amplifiers. It can help with projecting that kind of stuff op amp tasks

@michaelpuk,
Very informative op amp tutorial page !
Very useful !

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.