I'm new to the electronics world. I've been trying to build a switching voltage regulator circuit using the LM2574N-5G (datasheet) IC. I'm trying to switch 9V (from a 9V battery) to around 5V. I've tried to implement the circuit that the datasheet suggests, which looks like this:
Notice the red box I superimposed on the schematic. The manufacturer suggests a resistance of 3.1Kohms for R2 to achieve an output of 5V. I went ahead and used 2Kohms for R2 to try and get a voltage between 3.3V and 5.0V.
Here's my attempt to implement this circuit:
I connected two LEDs in series as a load at the output, and they immediately burnt up. I quickly unplugged the battery and checked to see if the battery or any of the other components were hot - they weren't.
After removing the LEDs, and with no load on the supposed "regulated" output, I then measured the voltage between the output and ground, and I measured 7.40V! I swapped R2 with some different value resistors and measured the voltage each time. Here is what I found:
R2 - Voltage
22 ohm - 5.01v
200 ohm - 5.24v
510 ohm - 5.61v
1k ohm - 6.20v
2k ohm - 7.40v
Nothing was running hot during these measurements. Am I missing something obvious or critical? How am I meant to interpret this data? I wouldn't be surprised if my problem can be attributed to a silly mistake on my part - I have no intuition for this sort of thing. Thanks for any input.