The LED/Pump driver circuit is where the work get's done. Everything else is just so this section and do it's thing and make stuff move or light up or whatever.
In electricity; they like to call what's using the power the "load". So this section controls the load. It has the ability to turn the load on and off via the transistor (labeled IRL3714ZPBF for the part number I'm using).
For high power (lots of amps and volts) you need to use a MOSFET style transistor (look for an upcoming post all about them). The other BJT, bipolar junction field, transistors are just wussy and can't hang with the high power stuff. Plus, which would you rather talk about? A BJT or a MOSFET? It just "sounds" cool. This one is rated for 36 Amps, which is a lot more amps than most of your house circuits can handle. You can't run that much power without handling the heat that gets generated somehow (like with a big heat sink, chunk of metal, or a fan or something). 10 amps is a lot for a device this size.
This circuit sends power directly from the micro-controller output pin to the gate of the MOSFET transistor to turn it on. This particular MOSFET has a "logic level" gate, meaning it can be switched on and off with zero to five (5) volts (which is really handy).
The really cool thing is that you can switch the MOSFET on and off really fr**ck'n fast. Like 5,000 times per second... and that's considered slow for this kind of stuff. Getting the switching process to run cleanly when there's a lot of power running through the MOSFET is where things get tricky. If it's not switching cleanly then the MOSFET's silicon parts will be in an "in-between on and off" state for too long and they get hot because it's basically a resistor turning energy into heat in that in-between state. You need a scope (Oscilloscope) to be able to see what's going on electronically at those kinds of speeds. You can get scopes that plug into your PC for <$250.
The resistor R1, should be labeled something like 300 Ohms because it needs to current limit the output pin to a max of less than 20 milliamps in order to preserve the life of the output pin circuitry. Good MOSFET driver IC's claim drive currents in the amps (like 1.5 or even 3.0 Amps) range so the power applied to the gate, and how quickly it gets there, and goes away, is key to really running them cleanly. A MOSFET driver is not used here because the amperage is relatively low and it's cheaper not to use one.
The diode, D2, is there if you are driving a motor, like a pump. A motor is what they call an "inductive load" meaning you're powering an inductor (a piece of iron wrapped with copper wire). This makes an electro-magnet. When you suddenly stop current from flowing in an inductor the electricity wigs out and does all kinds of crazy, chaotic, explosions and things because the nature of inductors is that they want to keep current flowing. Power electronics has a lot to do with the electro-magnetic properties of inductors. So the diode is there to prevent this possible electro-magnetic explosion of energy from coming back from the motor and zapping your MOSFET dead by puttting a sudden, super high voltage spike into the drain of the MOSFET. I've heard a lot of robotics guys say they just left them off and nothing bad ever happened. But it's pretty standard knowledge that a "back EMF" protection diode is needed when switching an inductive load (such as an irrigation pump or a robot motor).
The extra cool thing about this circuit, is that when you're switching it on and off thousands of times per second you can vary how long it stays "on" for each on/off cycle. Known as PWM (Pulse Width Modulation) or changing the width of the pulse of energy your letting through your circuit, you can vary the speed of the motor very accurately. Robotics nerds are really into complicated motor driver circuits that support reverse and super quick, accurate, turning, for each wheel, etc.
This can be used as an energy conservation technique too. You can dim your LED's by varying the PWM ratio (how long the switch stays "on" for each on/off cycle). You can slow your pump motor down when the battery is nearing it's discharged level and extend battery life. So you have very accurate control of the load with a circuit like this.
For LED's you don't need the back EMF protection diode. Also worth saying that this circuit is not an LED Driver in the way that those limit current or voltage precisely. You would connect your LED driver to this circuit in order to control your LED's brightness and power consumption.
Here's a picture of the entire board. The load driver MOSFET is in the bottom right corner, with the resistor right below it. The back EMF diode is not installed and the silk-screened outline can be seen between the two MOSFET's near the bottom of the picture (the one on the left controls the solar panel - covered in a previous post)
That's a lot of words for such a simple looking schematic. It is really pretty simple and very powerful once you get a handle on how the MOSFET's work.