That's an integrator with a very small cap.
Although the cartoon in the datasheet shows something with the same detail as the OP's block diagram
The diff amp is comparing the DAC signal from the ATmega32U (connected to the + input) to the current signal developed by R14 as ISENSE. Its output then drives MN1 until the op amp's + and - terminals are ~equal.
Cartoon ? I assume that's just your wording. You do mean one of the figures in the datasheet , right ? (I didn't know datasheets had cartoons ) I thought cartoons were things like Bart Simpson or The Flintstones)So if I connect a rechargable battery to the connector at the top and use a DAC output the voltage the battery should have when it is charged, then it will charge the battery and stop when it's charged ?I can use a Pro Mini for something like this. Is there anything special about the code ?
I also attached a complete circuit diagram of the current controlled battery simulator. Yes, the battery is floating. But since the OP Amp gives me only the differential voltage between the battery poles it should be ok.
I don't understand how your FET is controlled...
I'm about to get on a plane for San Jose BTW. From what you've put in this thread, it sounds like you're near there.
rom which link did you get the exact circuit that you built? I think you might be showing how circuits that are simple in the cartoons are actually difficult to implement as real schematics.
uint32_t current_setpoint =20;
Maybe the op amp is having difficultly driving the gate capacitance? The cartoons show a "gate driver" block for a reason, even though it's sometimes as simple as two resistors.
As big bobby mentioned, it might be my input signal or other frequencies messing around. My input signal is also sent by the same Arduino with a simple PWM signal which is smoothend by a third order low pass filter.One of the things I noticed so far is that my current starts to get really noisy when I just increase the cable lengh between my discharge board and battery. But like I said, I will work on a prober circuit diagram and post more as soon as possible.