Within the open charge regulator we must control power, either to limit the power flowing into the battery or to control the power flowing to the dump load.

This requires some kind of power switching. This article explains the different types o power switching available to us and the decision on which type of power switch to use.

It also covers testing the chosen device (a MOSFET) and explains how to correctly and efficiently switch the MOSFET.

Power switching

In power electronics there are often times when we need to control a high current or high voltage using a much lower current or voltage. This is called power switching.Within the charge controller project we need to control the power flowing from the renewable energy source to the load (either the battery or a dump load). In this case our maximum current is 20A DC and our maximum voltage is 40V DC.

Techniques for controlling power are:

  • a manual switch
    • Using human input to control a higher current
    • This is obviously not practical in this situation
  • a mechanical switch
    • Such as a relay which is a switch controlled by an electro-magnet
    • These have low switching frequencies.
    • They create noise.
    • Mechanical outputs which will arc and wear.
    • Quite low cost
    • Readily available (such as automotive relays)
  • an electronic switch
    • Such as a transistor.
    • These can be switched at very high frequencies.
    • They can control high currents with either small voltages or small currents.
    • Very low cost
    • Quite widely available
    • They are not perfect switches hence they dissipate a small amount of power as heat.

From these main types of power switches for reliability and ease of control we really have to choose an electronic switch. This will allow us to have very fine control over the switch.

There are a number of types of electronic switches available including:

  • Bipolar Junction Transistor (BJT)
    • This is a current controlled current source (ie. small input current is amplified to control a larger output current)
    • These are generally low voltage and relatively low current devices
    • They can exhibit thermal runaway if they get too hot.
  • Metal Oxide Semiconductor Field Effect Transistor (MOSFET)
    • This is a voltage controlled current source
    • They are low voltage and high current devices
    • They are low cost and easy to obtain
    • They can be used in parallel as the thermal characteristics mean they will share current.
  • Insulated Gate Bipolar Transistor (IGBT)
    • This is a current controlled current source
    • They are generally used in high voltage, high current applications
    • They are slightly higher cost and harder to find (although that is changing)

The MOSFET is the best choice in this project. We are dealing with a low voltage but quite high currents. MOSFETs are easily available in the correct voltage and current ranges and they are very low cost.

We now need to choose which MOSFET to use in this design and also how to correctly drive that switch so it is controlled efficiently.

MOSFET choice

There are a multitude of MOSFETs to choose from.

N channel or P channel?

There are two main types of MOSFET – N-channel and P-channel.

N-channel MOSFETs are cheaper and available in higher power ratings than P-channel. Due to their construction N-channel MOSFETs have a lower ON resistance. This means that they dissipate less power for the same current, hence they are available in higher power ratings.

There are a number of arrangements for placing the MOSFET. The main arrangements are shown here (where G = Gate, D = Drain, S = Source):

Screen shot

N-channel Low-Side

In this configuration the load is switched from the low-side. To switch ON the N-channel MOSFET you must apply a voltage to the Gate of > 5V DC (depending upon the device). If you apply less than this voltage then the FET might not be fully switched ON.

This configuration is easy because the Vgs is relative to ground, hence if you apply Vin, then the load will switch ON, and if you apply 0V it will switch OFF.

The main issue with this is that the ground of the load is not the same as the ground of the input. This can cause problems when used in applications where the grounds might be connected together (such as a solar charge regulator….).

P-Channel High-Side

A P-channel FET switches ON when Vgs > -5V. It switches OFF when Vgs = 0V. So we can switch the MOSFET ON by applying 0V (Vgs  = -Vin) and we can switch the MOSFET OFF by applying Vin (Vgs = 0V).

This is good as we are switching in the high side and have a common ground.

The main issues with this are: the higher cost and lower availability of P-channel FETs and the higher power dissipation of the P-channel FET.

N-Channel High-Side

So what if we place an N-channel MOSFET in the high side?

In this configuration we get the benefit of being able to use high power and low cost N-channel FETs, but with a common ground.

The main issue with this is to switch the FET ON we need to apply Vgs >5V, but the this means applying Vload +Vgs, which means we need to apply a voltage which is greater than Vin. This means we need to look how to drive the N-channel MOSFET in the high side.

For those that like a visual demonstration of this, there is a great demonstration of driving N and P channel MOSFETs starting here in 4 parts.

Available MOSFETs

Doing a search for readily obtainable MOSFETs which work up to 45V DC and with a minimum average current of 20A a few suitable candidates are:

  • STP24NF10
  • PHP50N06 – 52A, 0.028Ω, TO220 package, not available RS/Farnell, not yet tested
  • 75337P – 75A, 0.014Ω, TO220 package, not available RS/Farnell, not yet tested
  • HUF75339P3 – 75A, 0.012Ω, TO220, Farnell cost = £0.81, not yet tested in this design
  • IRLI3705N – 52A, 0.01Ω, TO220, RS cost = £1.47

As can be seen, there are quite a number to choose from.

There are two main additional aspects to investigate, one is the thermal design to ensure that the MOSFET stays within its correct working temperature range (discussed within the heatsink section) and the other is to ensure that the device is correctly and efficiently switched on and off (which we will investigate further here).

MOSFET switching

The design interfaces a microcontroller to a power switching stage. A microcontroller works at ‘logic-level’ which generally means 0-5V. It is the level at which the device is switching its inputs and outputs, which in this case is 5V.

We are trying to interface a 0-5V digital signal to the MOSFET so it can switch up to 20A. MOSFETs are voltage-controlled current sources, which means they switch on when a voltage is applied, but that is a bit of a generalisation.

Within the MOSFET there is a parasitic capacitance, which means we do need to supply and remove current to the gate to switch the device on and off.

Also we need to supply enough voltage to fully switch ON the MOSFET (as we are using it as a switch). If we only apply 5V then we may not switch the device fully ON – we should really apply a higher voltage (typically to fully switch ON a power FET we need to have the gate voltage at least 10V higher than the source voltage (Vgs)). Also we need to supply some current.

The microcontroller can probably do this but switching at high speed might mean the microcontroller cannot supply enough current for correct switching. To do this we need to three choices – we can use a logic level FET, we can use a FET driver or we can build our own driver from an additional transistor. The first option adds some cost, but might be a good option in the future. The second option adds an additional part which is typically non-standard. The second option is how I will move forwards with this prototype, as it is the fastest option to get working.

The need for a MOSFET driver

To show the need for MOSFET driver, we tested the microcontroller output pin connected directly to the MOSFET gate pin. We used a ‘logic level’ MOSFET, which means it has a low switch on voltage (Vgs) so we should be able to drive it with the 5V from the microcontroller.

It can be seen that a 5V signal did switch the FET fully on and off when there was no load, but it gets worse when we have a load to switch:

Screen shot

Screen shot

This is with no load resistor (left shows the Vgs, right shows the voltage across the dump load).

You can see that there is a slight step in the Vgs voltage and also the visible slope on the dump load voltage, which is not so good.

Screen shot

Screen shot

This is with 4.7Ω load resistor (at 12V = 2.5A) (left shows the Vgs, right shows the voltage across the dump load).

Again, you can see that there is a slight step in the Vgs voltage and also the visible slope on the dump load voltage, which is not so good.

Screen shot

Screen shot
This is with a 1Ω load resistor (at 12V = 12A) (left shows the Vgs, right shows the voltage across the dump load).

You can see that there is a slight step in the Vgs voltage, some flickering in the waveform due to the fact this is a big load and causes the voltage to vary when switched on. Again there is a visible slope on the dump load voltage, which has got worse at this current level. This means that the FET is only slowly being switched on. This will cause high power dissipation in the FET (it was getting very warm) and is not good design.

All in all, this shows that we cannot use the output from the microcontroller to directly control the FET (OK – some of you might have known that already). So we need to use some form of MOSFET driving.

Low side FET driving

For one of the initial prototypes we used a logic level driven MOSFET (type IRL520N), but this is only a 10A rated device. The series resistor helps ensure that there is less of a switch ON spike. The gate-to-ground resistor ensures the MOSFET switches fully OFF. The diode (this should be a high speed diode such as the 1N4937, NOT the 1N4001 shown here) allows any current to flow away when the FET is switched OFF, otherwise there would be a spike on switch OFF.

MOSFET driver schem


Low-side MOSFET drivers

In order to correctly switch on the FET, a MOSFET driver can be used. Some information on designing and specifying a MOSFET driver is available here. Here is a list of a few different types, along with costs and information.

I obtained a TC427 MOSFET driver to test in this application. This was pretty easy to wire in as it just sits in-between the micro-controller and the FET, but it needs some local capacitors and I have installed it on some relatively long pieces of wire (around 40mm) I have performed the same tests as the initial ‘why do we need a MOSFET driver’ section, but with the driver installed. Here are the wave-forms.

Screen shot Screen shot

This is with no load resistor (left shows the Vgs, right shows the voltage across the dump load).

Much cleaner ON/OFF signal with no rise or step when switched on.

Screen shot Screen shot

This is with 4.7Ω load resistor (at 12V = 2.5A) (left shows the Vgs, right shows the voltage across the dump load).

Loads cleaner wave-forms – the MOSFET is driven fully ON very quickly. There are a few spikes, for the Vgs, this most probably relates to the length of the wires (which would have some resistance and inductance).

Screen shot

Screen shot

This is with a 1Ω load resistor (at 12V = 12A) (left shows the Vgs, right shows the voltage across the dump load).

Again we have much cleaner wave-forms. There is a slope when the resistor is ON and this is due to the fact it is taking high current pulses. There is also some negative voltage when switched off – this is due to the load inductance and is dealt with by the high speed back-emf diode we are using.

The difference between using a driver and not is very apparent. with a MOSFET driver the FET is switched on quickly and cleanly. The FET did not get noticeably warm, whereas previously it was getting very hot (due to the fact it was not being switched ON quickly). The driver IC is a through hole component and cost £0.69 + VAT, hence I will use these when developing this project.

One issue might be due to the maximum supply voltage of the driver, which is 20V. It might be that the board will need 2 voltage supplies, one at 5V for the microcontroller and one at 12V to power the MOSFET driver. This circuit has been tested with 5V supply to the driver and the FET is fully turned on/off as required, so we can run all the circuitry at 5V.

The circuit diagram for the MOSFET and driver circuit is shown here: Space had been left for another MOSFET channel which will control the Low Voltage Disconnect (LVD) on future implementations of this circuit.

High-side FET driving

While low-side FET driving is quite easy (although still needs a driver as shown above), for the renewable energy connection it would be most sensible to use high-side FET control. This will mean that we have a common ground connection.

To implement high side FET switching we could use a P-type FET. Unfortunately P-type FETs have a higher on-resistance, hence they will have a higher (approximately three times) power loss of a similar sized N-type FET. This makes P-type FETs more expensive and a larger resistive loss. We are using N-type FETs as a high side switch as this makes most sense.

To switch ON an N-type FET we need to apply a Vgs of >4V (typically up to 10V, but check the data sheet for this information). This makes the supply to switch ON the FET difficult if we use an N-channel FET in the high-side position. The diagram below shows the problem – basically we need a higher voltage than the supply in order to switch ON the FET:


Screen shot

This brings in the requirement to generate a voltage higher than the supply voltage. This is generally done using a technique called ‘Bootstrapping’ or using some kind of charge pump circuit to give us the higher voltage required.

Some information on high-side FET driving, mainly using simple components, has been found from here:

Each of these circuits requires quite a number of components to function. There are a number of ‘all-in-one’ driver ICs available. Some commercial high-side FET drivers are listed here (Note: Prices shown for comparison only. Date: 15/11/12):

  • ZXGD3003E6TA – 40V max, 5A peak High-side driver. SMT. £0.30 from RS
  • LTC1155 (single)/ LTC1255 (dual) – designed for 9-24V automotive range.
  • LT1910 – 8-48V supply. £2.94 from RS
  • AUIRS2124S – 0-25V supply voltage,0-625V high-side voltage. £1.49 from RS
  • TC4431COA – 4.5-30V supply voltage, 1.5A output, high-speed. £1.55 from RS
  • TD351IN –  £1.98 from RS

We obtained a few samples of different drivers and then test them under relatively high current loads.

Testing high-side FET drivers

Three samples were obtained:

  • ZXGD3003E6TA – 40V max, 5A peak High-side driver. SMT. £0.30 from RS (Note: Not a high-side N-channel FET driver)
  • AUIRS2124S – 0-25V supply voltage,0-625V high-side voltage. £1.49 from RS
  • TC4432CPA – 4.5-30V supply voltage, 1.5A output, high-speed. £1.65 from RS (Note: Not a high-side N-channel FET driver)
  • IR2117 – 10-20V supply voltage,0-600V high-side voltage. £1.76 from RS

From the samples only two actually a high-side N-channel FET driver (The AUIR2124S). Its a bit confusing when ordering these components that many are called “high-side drivers”, but that means they will drive a P channel FET, NOT an N channel one. The device must have a charge pump to be able to supply the correct voltage to the N-channel FET. Here is a summary of the main features of the samples:


Device Cost Output I Input V  Package Notes
AUIRS2124S £1.49 500mA 600V SMD (SOIC 8) Gate drive 10-20V

I rigged the samples into a test circuit and tried it out. A number of the FET drivers were only available in surface mount designs, hence I needed to make a test PCB, which included some passive components required and an N-channel FET. The load was a simple LED and resistor. We also test with a higher current load.

Screen shot

As mentioned, only one of these drivers was a true high-side N-channel FET driver. The other two were just FET drivers (useful for either P-channel FET driving or for low-side N-channel FET driving. I compared the output from the  ZXGD3003E6TA ‘normal’ FET driver with the output from the AUIRS2124S ‘high-side N-channel’ FET driver. This includes a charge pump and hence requires a feedback diode and capacitor on the output. A frequency generator was used as the input to the driver and the Vgs (Gate-Source) voltage was monitored:

Screen shot  Screen shot

Above: Both these displays show Vgs on the N-channel FET in high-side configuration. On the left is the ‘normal’ driver. On the right is the ‘high-side’ driver. It can easily be seen that the Vgs is much higher (driving to 10V, which would be fully ON) with the ‘high-side’ driver. This would mean the FET is driven quickly from OFF to ON and hence have low power dissipation.

Screen shot  Screen shot

Above: These graphs show the input voltage and the load voltage for ‘normal’ FET driver on the left and ‘high-side’ driver on the right. Again the higher output voltage can be seen, as the FET is being driven fully ON, rather than just partially ON.


Device Cost Output I Input V  Package Notes
IR2117  £1.76 420mA 600V DIP8 Gate drive 10-20V

***** to do****



This testing shows that a specific high-side N-channel FET driver or driving circuit is required for correct and efficient operation of high-side switching. This will add to the cost and complexity, but it would make the unit more standard and allow common negative connections (which is standard in automotive electrical systems).


Due to the cost of the specific driver (cost of around £2 including all the parts) I also wanted to look at using bootstrapping and a number of less expensive components to provide the correct Vgs for the FET. I decided to build the circuit shown here and compare it with a commercial high-side FET driver. This circuit was found on this post (I cannot find the original author – if you know who originally did this circuit diagram then please get in touch and I can give due credit).

Screen shot

This circuit can be built with around £0.30 worth of components. The output is inverted and also this only works with 12V, although a zener diode could be used to limit the maximum Vgs. Another issue is that this only works for a short length of time (depending upon the capacitor value). hence this circuit only works with pulse-width-modulation (PWM), which is actually how we will be controlling the FET. The circuit was built on breadboard alongside the same N-channel FET, shown here with wires everywhere:

Screen shot

The following graphs compare the bespoke drivers (on the left) with the commercial driver (on the right). Both have the same input voltage and around 2kHz square wave input frequency.

Screen shot  Screen shot

The graphs above show the Vgs applied to the N-channel FET. It can be seen that the bespoke driver (top) has slightly more rounded profile, which would equate to slightly higher losses in the MOSFET. Both are easily switching the MOSFET ON, though.

Screen shot  Screen shot

These graphs show the output voltage (across the load) with a 2A load (at 12V DC). With the bespoke circuit (top) there is a little bit more noise and overshoot, but nothing too bad.

Pro and cons of the bespoke driver against commercial driver:
  Bespoke driver     Commercial driver  
Cost:  £0.30 (approx) £2.00 (approx)
Ease of production:  Lots of components, but easy to find  Surface mount – needs SMD skill
Performance:  OK – problem with voltages  Very Good
Shut down on under voltage?:  No  Yes
Lock-out protection?:  No  Yes
Component availability: Easy Hard
The performance of the bespoke bootstrap circuit is good when compared to the bespoke IC. It has great advantages due to its lower cost and easily available parts, but does not work with a wide range of input voltages (the Vgs gets higher as the supply voltage increases). This could cause problems. Also the bespoke driver has an issue when there is low voltage and the FET can be left in the high state. This could cause problems with a battery based system if there is a low voltage issue. Protection would be required, which would cost more. The commercial driver works with supply voltages up to 600V (!) and has in-built lock out and shut-down protection.
There is no clear winner for this part. I may design the circuit board to use either system and then people can chose, dependant upon availaility and cost.

High-side N-Channel FET driving for 12 and 24V DC

The low cost discrete electronic circuit works well for 12V systems. With 24V system this circuit does not work and needs adjustment. The reason is due to the fact that the capacitor charges up to the applied voltage (12V or 24V). This voltage is then applied to the gate of the MOSFET above the supply voltage, thus turning it on. The maximum Vgs for the MOSFET I am using is 20V. The best range for Vgs is in the region of 10 to 20V. This is perfect for a 12V system, but when we use it for a 24V system we are applying 24V as Vgs and the MOSFET does not like this. It causes heat loss within the 1N4148 diode and stress on the MOSFET. For the 24V version I need to come up with a better circuit.

Here are some note on high side FET driving:

Final design MOSFET and driver



5 responses to “Charge Controller Project – Power Switching

  1. Thanks for posting a great overview of possible components! I noticed that the AUIRS2123S datasheet doesn’t actually provide values for the capacitors listed in it’s example schematic. What capacitor values do you recommend?

  2. Quoting Guest:Thanks for posting a great overview of possible components! I noticed that the AUIRS2123S datasheet doesn’t actually provide values for the capacitors listed in it’s example schematic. What capacitor values do you recommend?

    Thanks for reading!
    I think that the capacitors required are for ensuring the voltage does not dip when in use, but they could also be required for decoupling (noise on the lines). In my tests I dont think I used any capacitors and it worked ok, but it would be better to have them close to the power supply lines of the IC.
    So I would suggest 10uf or 100uf between Vcc and COM and between Vs and Vb (ensuring correct polarity). I might also put a 100nf capacitor (polyester type) on the input power supply (between Vcc and COM), which might help with any noise on the line.
    Hope that helps – I could also be totally wrong about this, if you are getting problems then it would be best to view the output on a ‘scope then add capacitance to see if it helps.

  3. wow. first came here just searching for high, low side FET, then I found a goldmine!
    I have a plan to build a small mppt pv system controlled by raspberry pi but without any idea!
    yes this is it! it is exactly what I’m looking for!
    thank you very much! you enlighten me!

  4. wow I found a goldmine!
    I have a plan to build a small mppt pv system controlled by raspberry, but without any idea!
    thank you very much. you enlighten me!

  5. sir i have review the details above.. i had done my design and got stuck because i refer the code library from your gifthub pv iv curves tracer. i had run my simulation in proteus because proteus is the easiest way for Arduino simulation. iam use 2 mosfet as you mention before, along with 2 driver, but i had replace the TC427 with IR2112 low side mosfet driver that attach with opto coupler as an isolation. But the design cannot get a reading of Pwm signal throughout the oscilloscope in Proteus. It is the code that you give doesnt comply with my chosen design.. or i just proceed with your design only? I need an instant answer from you sir..

Leave a Reply

Your email address will not be published. Required fields are marked *