I found a schematic online that uses a lm2576 in a buck converter to regulate 2A of current.
I simulated the circuit and it is working perfectly. However, I have no idea on how this works and what is the function of each components. I have also read the website that posted this and i do not understand what has the gain got to do with the circuit.
Attached is the schematic and the information from the website
* R_SC is a shunt to measure the current.
* IC2A is a difference amplifier
* IC2B amplifies this signal.
2A load current --> will become 0.24V across R_SC --> will become 0.24V referenced to GND at the IC2A output --> will be amplified to 1.236V by IC2B --> to get the desired FEEDBACK voltage for LM2576.