I designed and built a LM2596 type DC-DC converter as a small battery charger for fun, and because I enjoy laying out circuit boards and tinkering. During the design process I talked myself into adding a "protection" diode before the output to ensure that current can only flow in one direction. After I made the boards and built the circuit, I've found that this diode gets fairly hot. Now I'm questioning whether the D4 diode is actually doing anything other than making heat?
This device is a battery charger that would step down the input voltage to 13.5v for charging a 12v lead acid battery, and I believe that I was thinking that D4 would protect against a reverse polarity connection to the battery.