Email Print

No image

We have been wanting to design and build an open-design, relatively inexpensive but fully functioned charge regulator for solar PV, wind, pedal and small hydro systems for a while now.

The majority of off-grid renewable energy systems are based upon lead acid batteries. Lead-acid batteries need to be protected from over-charging by the renewable energy source and over-discharging from the loads. This can be one with a series regulator (in the case of solar PV) or a shunt regulator (for PV, hydro and wind). Please check the web or my electrical design guide in the information section for more details.

This post is a collection of a design ideas and background to the subject. I'll be updating this as I go along - I'd really like to know your thoughts and ideas.

Design specifications:

Available designs

The initial starting point for all projects nowadays is to do a trawl of the web. Here is a brief list of the projects I found. I am mainly interested in open-source projects, but the ideas and costs of others is also useful.

Typical prices are in the range of £10 (eBay cheapest) to £200. Basic designs do not have a low voltage disconnect, nor V or I monitoring.

This looks like a really interesting project, with plans to build an open source maximum power point tracking charge controller for solar PV (and wind) systems.

12V and 24V versions. Cost is $14.50 + P&P, from USA. Based upon the ZM33064 voltage controlled switch, with a IRFZ44N mosfet to control the dump load. Hysteresis is controlled with a resistor value. No dump load is included (it must have this to function).

This is a PIC microcontroller based PWM solar charge regulator. UK designed and made. £17.99. Simple in-line series regulator for PV up to 100Wp, 12 or 24V. One LED to display function. Information about the design of the device is on the website, but I could not find the full design details.

(Edit 15/11/12: The circuit schematics have been made available: http://www.256.co.uk/?p=917)

A number of electronic circuits with a couple of solar regulator circuits (one and two). Relatively simple circuits. Full circuit diagrams.

Another reltively simple design (from an edition of ETI (Electronics Today International). Uses a 555 timer. For a 5W solar panel.

A simple PWM series regulator from an article in Elektor Electronic magazine, March 2000. This is for 12V panels up to 53Wp. I have made a number of these and they work well. They do not give enough information about the battery voltage.

Only for very small solar panels.

A load of solar circuits, mainly relating to solar tracking.

Based upon the LM2575T-ADJ switching regulator. Design is only OK for up to 1A, but is a switching regulator so should have very good efficiency.

timnolan - a hill-climbing maximum power point tracking solar PV regulator.

This uses realys to control the dump load and the supply.

Uses a realy to control a dump load

Initial design

There are five main parts to the system:

An overview of the system is here (27/6/12):

Overview

This has been updated from the original idea to make it more versatile and to include either PICAXE or Arduino microcontroller systems. The plan is to have a basic board with the power supply, power electronic components, voltage and current monitoring which would work as a stand alone unit.

A display and data aquisition board can then be easily slotted in to expand the system, if required, but would not be required for basic operation. This will include another microporcessor, most probably based upon the Arduino, which will control an LCD display and SD card data storage.

This adds current monitoring to the list of things to investigate.

Update 11/12/12: High-side MOSFET switching will be used on the input. This will allow a common negative connection which will be easier to implement and is more standard.

Voltage monitoring

This is done through a simple voltage divider circuit. Zener diodes ensure that the inputs to the microcontroller are protected.

The input voltage is read via a potential divider. Initially the maximum voltage will be 32V dc (this is for a fully charged 24V system). The maximum input to the PICAXE is 5V, so we need to convert 32V to 5V, at a very low current. Check here for the theory. If we use 10kΩ as the lower resistor (R1), then R2 is 54kΩ. The standard resistor value near to 54k is 56k Ω, so lets use that value. Total resistance is 66kΩ, so at 32V the current is 0.5mA, consuming 0.0165W (16.5mW). We could change this to 100kΩ and 560kΩ for even lower power consumption.

Here is a schematic diagram, but with a 680k resistor, rather than a 560k:

Voltage divider

We need to think about the resolution of this. The PICAXE only has an 8-bit ADC, hence the 5V input is converted into 28 levels (256 levels). Each inout level is equivalent to 5/256 = 0.01953V (19.5mV). This goes through th potential divider to give the voltage level steps of 0.01953 x ((56+10)/10) = 0.128V (128mV). This is OK but not great. The PICAXE can also do 10 bit resolution using the command adcread10. This requires 2 bytes to hold the information (210 levels = 1024 levels). I will use this command in the code.

A 5V1 zener diode protect the input to the PICAXE from any spikes or over voltage. A 0.1uF/100nF capacitor smooths the signal to stop any fast variation.

EDIT 16/8/13

Please see my voltage monitoring and accurate voltage monitoring posts.

Current Monitoring

While not strictly necessary for regulation (most charge controllers just use voltage regulation), measuring current is a very useful system parameter and allows lots more decisions to be made and scope for expansion. It is also a very useful parameter to know what is going on within the system and allows us to display the input power from the multiplication of voltage and current.

I have posted some work on current monitoring here. I will narrow down th choices based upon accuracy, cost and component availability and place the final design here.

Here is an application note from Maxim on high-side current monitoring.

Microcontroller

This design will be micro-controller based. this means that people can load their own code onto the system, in case they would like to change any of the functions. I have been using a number of microcontrollers including PICs, ATMEL, Arduino boards and PICAXE chips. I wanted to make the design suitable for a wide range of people and not limit the design to any one particular microconroller or system. For this reason I have now decideed to make the system compatible with the PICAXE and the Arduino which means it will also be compatible with PIC microcontrollers and Atmel microcontrollers.

PICAXE

I have been impressed with the PICAXE as an inexpensive, but very easy to use and program. The programming environment is free and the programming cable is very cheap (I made my own using parts from my junk box). The only issue is that the bootloader is not open-source. The cost of a PICAXE is low and very close to the part cost of the actual PIC.

The PICAXE system is not open source, though.

I am basing this deign on the PICAXE 14M02. This component has 12 input/output pins, of which 7 can be analogue channels. This component can also support parallel tasks, 6 PWM outputs and touch sensors.

The various I/O require are:

  1. Voltage - INPUT - ADC
  2. Current - INPUT - ADC (future use)
  3. LED Red - OUTPUT - PWM
  4. LED Blue - OUTPUT - PWM
  5. LED Green - OUTPUT - PWM
  6. Power stage - OUTPUT - PWM
  7. LVD stage - OUTPUT - PWM (future use)
  8. Serial IN - INPUT
  9. Serial OUT - OUTPUT
  10. SD card storage - 3 lines required. Use SPI? (future use)
  11. SD card storage - 3 lines required. Use SPI? (future use)
  12. SD card storage - 3 lines required. Use SPI? (future use)

And that is the full quota of I/O pins on the PICAXE 14M2. This component could be changed for another part as the project moves along - but its better to get something going and working.

The circuit diagram for the PICAXE microcontroller logic board is shown here (Note: this is out of date as of 28/6/12):

No image

Note: This is a work in progress and I might change the circuit schematics. (Last updated 6/4/12)

Arduino

Update 27/6/12: As can be seen from the new overview at the start of this article I have decided to make the design both PICAXE and Arduino compatible.

The Arduino is a ubiquitous microcontroller system based upon the Atmel ATmega 328 microcontroller. It has an amazing amount of code examples and a huge user base. It is all totally free and open source. Check out the huge array of Arduino projects out there for more information. At the beginning of this project I did think that it was over-specified for this project but as I have moved further then I have been basing more and more of my work on the Arduino and feel that it is suitable for this project.

The Arduino is basically a boot loader and programming environment for the Atmel ATmega328 microcontroller.

Power stage

A 20A or higher MOSFET will be used to control the output power stage. This must have the correct driving circuitry (enough current reserves to switch on and off fully). This will be pulse width modulated to control the power from the PV module.

Initially I chose to use low side MOSFET driver circuits. The main problem with this is that the ground of the solar PV panel and the battery cannot be directly connected. This could be an issue in some situations. Hence I plan on using high side MOSFET driver. The low side FET driving has been left for information and it will also be used for the low voltage disconnect.

Low side FET driving

For the prototype I am using 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 NOT the 1N4001 shown here (see below)) allows any current to flow away when the FET is switched OFF, otherwise there would be a spike on switch OFF.

MOSFET driver schem

This works OK but when viewed on an oscilloscope there were very high voltage spikes when the FET was switched ON. This is unusual and must be caused by a change in current and it not having anywhere to go. The voltage spike is in the region of 60V for a 12V system, so pretty high. Ideas on why this is happening are:

12/1/12 Update: There was a high voltage spike during the MOSFET switch OFF. This is seen when the current in the load has nowhere to go. I mis-read this by connecting up the 'scope incorrectly and I thought it was a spike at switch ON, which would be very unusual.

The reason for the OFF voltage spike was the fact I was using a 'regular' low frequency (50Hz) rectifier diode (1N4001), rather than a high speed diode (type 1N4937). When replaced with a high speed diode everything looked a lot better with virtually no spike seen.

MOSFET choice

There are loads of MOSFETs to choose from. In this application we have set the prarmeters that it must be N-channel, able to cope with 20A continuous drain current and have a relatively low ON resistance (hence low power loss). The initial design used a 10A logic level MOSFET. This was running too hot when using a 12A load, as you would expect. So I had a look for suitable replacements:

27/1/12 Update: Changing MOSFETs fom the logic level 10A one to a 'normal' requires a bit more than just replacing the component in the circuit. 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.

When tested the microcontroller output pin was connected directly to the MOSFET gate pin. This switched the FET fully on and off when there was no load.

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 shotScreen 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 a MOSFET driver.

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 inbetween 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 above, but with the driver installed. Here are the waveforms.

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 waveforms - 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 shotScreen 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 waveforms. 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 noticably 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 circtuitry 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.

No image

High-sdie FET driving

While low-side FET driving is quite easy (although still needs a driver as shown above), for the solar PV connection it would be most sensible to use high-side FET control. I will write up notes and ideas on this here as they happen.

To implement high side FET switching we could use a P-type FET. Unforetunately 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. I am looking into 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):

The plan (as of 15/11/12) is to obtain a few samples of different drivers and then test them under relatively high current loads.

Testing high-side FET drivers

Three samples were obtained:

From my three samples only one was 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 my sample:

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

 I rigged the three 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. I will test with a higher current load in the future.

Screen shot

As I have 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.

This testing shows that a specific high-side N-channel FET driver or driving circuit is required for correct and efficient operation of high-sid switching. This will add to the cost and complexity, but it would make the unit more stanard 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 lenght 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 (left) 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 (left) 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
     
 
I have been quite pleased with the performance of the bespoke bootstrap circuit. 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.
 
EDIT 16/8/13
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:

LED Display

This will be a three colour LED to indicate the function of the device and the voltage of the attached battery. An RGB LED will be used in the prototype. An output of the actual data values would be nice here - so this could be viewed on a computer or via another microcontroller (get your Arduino out here). It would be nice to have an LCD display with the real data on it here, but that is an additional cost.

The display chosen was the Piranha RGB LED from Rapid code 72-8998. This is a common-anode device, so when the microcontroller pin is pulled LOW then the LED will switch ON. The red LED needs 2.0V, while the green and blue LEDs need 3.2V. Hence the resistors required to give 10mA through the device are:

Here is a short video of the RGB LED in prototype stage:

Update 26/1/12: There have been a few issues with the RGB LED display - the main problem being that the voltage is sampled every so often and if it is sampled when the dump load is switched ON then the voltage will be lower than with the dump load switched OFF - even with the PWM. This causes the LED to flicker with different colours each time it is sampled. To solve this I need to average the values to give a much smoother display.

LCD display

An LCD display would be useful as an add-on feature to this device.

****TO DO - design and cost****

Power supply

The microcontroller and display all work at 5V dc. The incoming voltage could be anywhere from 8V to 60V dc (for a 48V battery system the maximum voltage will be around 14.4V * 4 = 57.6V). The microcontroller is low power but still consumes some current. With the MOSFET being driven and the LEDs all at 100% the total current consumed is around 50mA. Power = V * I, so at 5V the power consumption of the circuit is 5 x 0.05 = 0.25W max. But we also need to step down the voltage.

If we use a linear converter, then the max power will be 57.6V at 50mA, power = 57.6*0.05 = 2.88W, which is way too much as a standing load. It will also get relatively hot. The prototype uses a simple 7805 linear voltage regulator. These are cheap and available, but with a high voltage difference they start to become very inefficient. The initial prototype used a 7805 voltage regulator, but this will be changed as he project moves forward.

Hence we need an efficient DC/DC step-down converter, with a voltage range of up to 60V.

There is an interesting application note on DC-DC converter topolgies from Maxim here (Tutorial 660).

Step-down converter

A review of available DC-DC converter designs shows the following as suitable for this application. We need an input voltage of up to 60Vdc (for a fully charged 48V lead acid battery). The current consumption of the circuit is in the region of 100mA maximum (this needs to be tested and checked), so we must supply 100mA. The DC-DC converter will always step-down (also called a buck converter). Another factor is cost - I am trying to keep the circuit easy to build and inexpensive. Here we review some available ICs which can perform this function and application notes which might be useful. Texas Instruments/National Semiconductors has a design calculator for DC-DC converters available here. This suggested designs based upon LM5574, LM5010A, LM34923 which gave efficiencies greater than 70%.

(Note: Prices checked on 7/2/12, they might not be accurate when you read this)

As you can see there are lots of solutions. The main limiting factor is the high input voltage requirement to run this circuit up to 60V DC. There are only a few options when this is factored in.

The final circuit board will be designed in such that either a 'standard' 7805 linear regulator or the efficient high-voltage DC-DC converter circuit can be used. This might take up a bit more PCB area but allows people to easily get started with no hard-to-source components, but then it can be upgraded to use the converter circuit.

The voltage regulator prototype chosen was a switching regulator based upon the LM2574 0.5A step-down switching regulator. As mentioned before linear regulators are not an efficient way of regulating voltage as they must dissipate any excess voltage drop at the supply current (volts x amps = power) and hence they get hot. This IC comes in two versions, the normal one for up to 40V operation and a high voltage version for up to 60V operation (but costing twice the price). I used the standard configuration circuit for a 5V supply (please check the datasheet). It required 2 capacitors, an inductor and a diode. The total cost of these parts is around £2.50. A bit more information on voltage regulation is on another blog post here.

No image

No image

(1) The parts: LM2574 IC, IC holder, 300uH inductor, 22uF and 220uF capacitor and 1N5819 diode. (2) The completed 7-40V input, 5V output efficient voltage regulator.

The circuit diagram is here:

No image

 

This was tested at 30V with a 5V 100mA load. The input current was around 20mA (not accurately measured) so the efficiency was:

Power in = 30V x 0.02A = 0.6W

Power out = 5V x 0.1A = 0.5W

Therefore efficiency is around 0.5/0.6 x 100 = 83%, which is pretty good and certainly better than the 16% efficiency that a linear regulator would have.

Over-voltage and reverse Polarity protection

An additional idea is to protect the input from high voltage spikes and from reverse polarity.

Over-voltage protection

Over-voltage transients can occur due to inductive loads being attached to a battery, lightning strikes or due to crossing cables. Protection from this can be provided by:

These break down at high voltages and cause a short circuit which then blows a fuse. 
Examples include:
These clamp the voltage within certain limits. They have a fast response time and can cope with high peak powers.
Examples include:

Reverse polarity protection

This can be provided by some form of diode. The problem with this is that the diode must be rated for the full current and, as all diodes have a voltage drop, then there will be some power lost within this device when it is running at high current. To try and minimise this loss then low voltage drop diodes (called Schottky Diodes) should be used. A heat sink might also be appropriate. Some examples include:

Program design

I am using pulse-width modulation (PWM) to switch the FET. I am implementing Proportional-Integral control for the voltage set-points.


There are two main different modes, depending upon how the regulator is being used:

Series regulation

****diagram of circuit****

This uses the MOSFET to either let current through to the battery (when ON), or to stop current getting to the battery (when OFF).

This works with voltage-limited devices such as solar PV modules, but will not work with rotating devices such as wind turbines, pedal generators or hydro generators. This is due to the fact these devices will over-speed if there is no load applied.

For example, if a PV panel is left open-circuit on a sunny day there is a maximum voltage to which output will reach (typically 20V for a 12V nominal module). If a wind turbine is lefty open-circuit and it is windy, then the blades will rotate and spin fast as there is no load. The wind turbine will quickly over speed. Hence for rotating devices we must use shunt regulation, where the turbine is always connected and the power is 'shunted' or dumped to a diversion load, typically a heater/resistor.

Shunt regulation

****diagram of circuit****

 

****this is unfinished work in progress****

The main flow of the code is:

Read in the battery voltage

Check the battery voltage against a look up table relating voltage and regulation (either series or shunt)

Update PWM % on time to the power controller

Check the battery voltage against a look up table relating voltage and state of charge (depends upon type of battery)

Update the LED PWM values depending upon the SOC

Output battery voltage data to the serial port

Small delay (10ms?)

Repeat

 

 

****flow diagram of code****

 EDIT 16/8/13
There will actually be three different modes: Series Control, Shunt Control and Low Voltage Disconnect.

Circuit design

The circuit and PCB have been designed in KiCAD, an open source, multi platform and extremely powerful EDA for circuit schematics and printed circuit design.

I will make all files available when I have got them completed.

****circuit schematic****

 

Additional features to note:

Enclosure design

The way that this circuit is enclosed is quite important with this project. We are working with quite high currents, so we must make sure the PCB is designed correctly and that any parts which might get hot (diodes, MOSFETs etc) have correct and adequate heat sinks. We want to use standard sized housings with easy to do cut-outs and drill holes. There will be connections to the device for the PV module, battery and LVD (if used) so these must be easy to do and robust and solid.

Heat sink calculations

Please see the heatsink design calculations post here.

PCB design

The PCB must fit correctly into the enclosure. Generally it is easiest to decide upon a standard enclosure design and then design the circuit board to fit the enclosure, which is he process I am taking here.

 

 

Make your own

Please take any information here, copy it, modify it and do what you would like with it. If any information has been useful then I would appreciate it if you could reference this work.

Creative Commons Licence
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Prototype progress

Here are some updates to the progress of the charge regulator:

Breadboard start point:

Putting the parts onto stripboard:

The prototype in a metal heatsink box working in both series and shunt regulation.

Jobs to do

  1. Change MOSFET for a higher current version. Done 6/2/12
  2. Test with MOSFET, rather than logic level FET. - Done 6/2/12
  3. Add MOSFET driver - Done 8/2/12
  4. Test MOSFET driver with 5V power - what are current requirements? - Input capacitor gets hot - use larger capacitor - Done 14/2/12
  5. High-side FET driving - Tested 11/12/12
  6. Voltage mesurement at start up (code)
  7. RGB LED to give smooth display of voltage (needs averaging over time to stop flickering) (code)
  8. Low Voltage Disconnect - add a MOSFET and code
  9. Buzzer warning: Done 26/1/12
  10. Power supply for high voltage inputs (up to 60V if possible) - efficient DC/DC converter. - Done 13/2/12
  11. Test unit for full current for a decent length of time
  12. Circuit schematic design - this has been broken into sections:
    1. Microcontroller - Done 6/4/12
    2. MOSFET driver - Done 6/4/12
    3. Power supply - Done 6/4/12
  13. PCB design - include both PICAXE and Arduino on basic board
  14. Add overview of device - Done 28/6/12
  15. Explain Arduino and pin specifications of arduino
  16. Circuit schematic design
  17. Enclosure choice