How to Use Arduino to Drive Buck-Boost Converter?

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
I am a student studying engineering, for my senior project I am trying to construct and demonstrate a maximum power point tracking system for a solar panel. My question is with regards to the voltage source that will drive the MOSFET in the attached circuit, which does exactly what I need it to during simulations. I am planning to use the pulse-width modulation output of an Arduino Uno to control what % of time the MOSFET "switch" is open or closed. This PWM needs to be seen from the source of the MOSFET to the gate for the circuit to work properly, but if I use an output from the Arduino won't it already be tied to ground inside the Arduino?

Is there a way around this? Do I need a different device to drive the MOSFET?

Any help is appreciated. Thanks,
Dylan
 

Attachments

ebeowulf17

Joined Aug 12, 2014
3,307
I'd use a P channel MOSFET instead of N channel, so that you don't need to deliver a voltage higher than the high side of your supply rail to operate the MOSFET. The Arduino won't want to see the 16V in any way, so an NPN transistor and a pull-up can be used to interface the 0-5V Arduino with the 0-16V MOSFET. Depending on the frequencies you need, the pull up may not be sufficient - you may need a totem pole arrangement or a dedicated MOSFET driver. Either way, this is the general idea:
Arduino-PMOS-16V.png
 

Attachments

danadak

Joined Mar 10, 2018
4,057
Normally you also include an R to ground at base of NPN to insure
if Arduino output tristated the output stays off, eg. it absorbs leakage
so NPN does not turn on.

The only drawback with circuit is MOSFET turn on is limited by R2 and
gate C of MOSFET. At low frequency not a big deal but as F increases
Pdiss in MOSFET gets impacted.

https://www.google.com/url?sa=t&rct.../slua618.pdf&usg=AOvVaw2iuo-DEdY01npKFn-UdmVA


Regards, Dana.
 

ebeowulf17

Joined Aug 12, 2014
3,307
Normally you also include an R to ground at base of NPN to insure if Arduino output tristated the output stays off, eg. it absorbs leakage so NPN does not turn on.
I'm well aware that this necessary when dealing with FET inputs, which will respond to induced noise even with almost no current. I don't have nearly your level of experience, but I was under the impression that a pull down resistor at the base of a BJT was generally not necessary, because transient noise at a floating input rarely has the power to deliver enough current through the base-emitter junction to have any effect. If I'm wrong, I'd love to hear more so I can learn from my mistake.

The only drawback with circuit is MOSFET turn on is limited by R2 and gate C of MOSFET. At low frequency not a big deal but as F increases Pdiss in MOSFET gets impacted.
I agree completely on this point. I thought I had already covered that with:
Depending on the frequencies you need, the pull up may not be sufficient - you may need a totem pole arrangement or a dedicated MOSFET driver.
Still, it doesn't hurt to re-iterate the point, or describe it in more detail, so thanks for the clarification.
 

danadak

Joined Mar 10, 2018
4,057
The pulldown on the base is good design. Leakage doubles every 10 C, and any high Z
input is subject to coupling, as it takes very little energy to start the NPN conducting,
especially in high beta conditions. Especially true of darlingtons. MOSFETS even worse
because they are truly very high Z and subject to C coupling into gate.

There are case where you don't care, no safety involved, and you do not care about the
state of driver as UP is starting up and has not configed its output from tri state to
drive mode until user code takes control.

Regards, Dana.
 

ebeowulf17

Joined Aug 12, 2014
3,307
.
The pulldown on the base is good design. Leakage doubles every 10 C, and any high Z
input is subject to coupling, as it takes very little energy to start the NPN conducting,
especially in high beta conditions. Especially true of darlingtons. MOSFETS even worse
because they are truly very high Z and subject to C coupling into gate.

There are case where you don't care, no safety involved, and you do not care about the
state of driver as UP is starting up and has not configed its output from tri state to
drive mode until user code takes control.

Regards, Dana.
Cool, thanks for the explanation.
 

ebp

Joined Feb 8, 2018
2,332
A P-channel FET simplifies the gate drive and is quite workable with only 16 volts input. A great many FETs have a maximum gate-source voltage of 20, and a solar panel that delivers 16 V at MPP will probably be well over 20 V when open circuit. This complicates a driver that switches the gate to circuit common ("ground"). A simple zener between source and gate can't be used because once the zener conducts to limit the gate-source voltage it creates a current path from the input positive supply to ground through the zener and the gate driver. You must add resistance between the gate and the driver transistor to limit the current.

Typically you would use a fast recovery rectifier rather than a very slow diode like a 1N400x, but at 500 Hz it won't matter much.

Although this circuit is commonly called a buck-boost converter it is neither buck nor boost but a distinct topology known as either an inverting converter or a flyback converter. During the switch ON time energy is stored in the inductor. During the OFF time that energy is delivered to the load. A no time is there current flow directly from the input to the output, hence the stored energy neither adds to (boosts) nor subtracts from (bucks) the input. The fact that the version using a single winding on the inductor inverts the polarity of the voltage can be a bit of a complicating issue if you need to measure what is going on at both the input and output. If your output voltage will always be less than the input, you can use a straight buck converter.

Be careful to select an inductor that won't saturate at your intended operating current. Saturation won't hurt anything (by virtue of the fact that a solar panel can be short-circuited without damage or excessive current), but it will prevent your circuit from operating the way you expect it to.
 

ebeowulf17

Joined Aug 12, 2014
3,307
@danadak and @ebp, I've tried to incorporate your advice. Let me know if this looks better. I know the performance of this is still highly frequency dependent, but aside from that, I think I've got the pull-down and the Zener setup properly. It's a 10V Zener, so Vgs is limited to ~10V. Let me know what you think - I'm still learning stuff here all the time. Thanks!
Arduino-PMOS-16V_2.png
 

Attachments

ebp

Joined Feb 8, 2018
2,332
ebeowulf, that looks good, but you probably could make R5 and R2 lower in value. It really depends on the what the maximum voltage is and how much power you are willing to waste.

This sort of driver is pretty slow, but the period shown in the original post is 2 ms so switching loss is going to be small. It might be possible to reduce switching losses by selecting a FET with lower gate charge. FET manufacturers have made gate charge reduction a fairly high priority.

One drawback to these simple circuits is the risk of inadequate gate voltage if the input supply is very low, causing the FET to operate in the "linear" region. In this particular instance there is probably no risk of any sort of damage since by the time the PV panel voltage gets too low to fully enhance the FET there is very little power available. Dedicated gate driver ICs typically have undervoltage lockout and are sometimes worth using for that reason alone. If you've got something like an SO-8 size FET that is switching 10 amps at 50 volts, you really don't want it hanging around at 200 W of dissipation because your gate drive supply voltage is too low.
 

Sensacell

Joined Jun 19, 2012
3,789
Be sure to consider the fun you will have when your code crashes and holds the FET in the ON state... poof...

That's why MCU's that perform these kind of tasks usually don't do much else.
 

ebp

Joined Feb 8, 2018
2,332
With a solar panel as the input supply the circuit is likely to be poof-proof simply because the short circuit current is inherently limited to something typically not more than about 20% higher than the normal operating current. Care would be required if a very large capacitor were used across the panel.

Useful information for an MPP device can be had by deliberately short circuiting the the panel and measuring the current, which is very linearly proportional to illumination. If both open circuit voltage and short circuit current are known, MPP can be quite accurately predicted rather than "scanned" for (which is a non-monotonic process). With a circuit like the inverting converter, the DC resistance of the inductor winding can be used for short-circuit current measurement. The temperature coefficient of resistance of copper is rather high but likely quite acceptable in this case.
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
Thank you all for the feedback, I'm still learning and this is helping to broaden my understanding.

A no time is there current flow directly from the input to the output, hence the stored energy neither adds to (boosts) nor subtracts from (bucks) the input. The fact that the version using a single winding on the inductor inverts the polarity of the voltage can be a bit of a complicating issue if you need to measure what is going on at both the input and output.
Since there is never direct current flow to the output, does this defeat the purpose of MPPT? Or will this circuit still improve the power delivered by the solar panel, rather than if it were connected directly to the 50Ω load?
 

ebp

Joined Feb 8, 2018
2,332
You can definitely use the inverting converter for MPP tracking. It simply works in a different way (compared with a true buck or true boost) to deliver energy from the input to the output. Energy is stored in the inductor during the first part of each switching cycle then that stored energy is delivered to the ouput during the second part of the cycle. The converter has the advantage that the output voltage magnitude can be less than or greater than the input voltage magnitude, but the sign is the opposite. For example, if your input were +15 volts you could produce minus 4.2 volts if you wanted to charge a single lithium ion cell (or paralleled cells) or -28 volts if you wanted to charge a 12-cell lead-acid battery.

If your required output voltage is always greater than the voltage from your solar panel (remember to consider the open circuit voltage from the panel), the simplest converter is a boost type. With a boost converter the switch can be a N-channel MOSFET with the source connected to circuit common, so you can drive it with a "low side" driver, which can be very simple - even directly from a processor output depending on the FET and the switching frequency. There is no polarity inversion so it makes it easier to monitor all the voltages and currents with A to D inputs on your controller. For voltage you would likely only need voltage-divider resistors. You would need an amplifier for the current sensing, but it can be quite simple if you put the sense resistor(s) in the "low" side.

A simple buck converter can be used if the output voltage required is always less than the input voltage. Since the voltage from a solar panel can go very low, this may not seem suitable, but typically if the light is so low that the voltage has fallen significantly, the total power available is very small. You'll see this if you have good curves for the behavior of your panel. You do need a high-side driver, like the one already discussed, but there is no polarity inversion.
 

ebp

Joined Feb 8, 2018
2,332
Something I should have mentioned with regard to the inverting converter:

Because of the way energy is stored in and delivered from the inductor there are implications with regard to the switching frequency and, beyond that, to the relationships involving input and output voltages and ON and OFF times. Since this is a student project, I won't elaborate, but leave you to think about those matters and what they mean in terms of "throughput" of the converter.
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
If your required output voltage is always greater than the voltage from your solar panel (remember to consider the open circuit voltage from the panel), the simplest converter is a boost type. With a boost converter the switch can be a N-channel MOSFET with the source connected to circuit common, so you can drive it with a "low side" driver, which can be very simple - even directly from a processor output depending on the FET and the switching frequency. There is no polarity inversion so it makes it easier to monitor all the voltages and currents with A to D inputs on your controller..
Thank you for the explanation. Open circuit voltage is said to be 22.7V on the back of the panel, while I measured it to be 20.2V while exposed to my test lighting at full brightness. I built a boost circuit, as shown in the attached file. When I wire my panel to the circuit however, the voltage supplied from the panel drops to around 8V. While the simulations I run perform as expected, I cannot seem to get any kind of a boost from the physical circuit. Adjusting the duty cycle, the maximum voltage I can get across the load is 6V.

Thoughts? Thank you again for the input.
 

Attachments

ebp

Joined Feb 8, 2018
2,332
What are you using to illuminate your panel for testing?
If you are using artificial lighting you probably will only be able to get a very small amount of current from the panel. What seems like really bright indoor lighting is still far below the light you would get outdoors even on an overcast day.
Assuming you are using artificial light, this illustrates how the panel voltage doesn't change a lot with illumination. Panels are typically specified at 1000 watts per square metre, which corresponds to full direct sunlight (more or less, depending on geographic location). The open circuit voltage you are measuring isn't much less than the specified open circuit voltage.

If the FET is kept turned off, the voltage across the load should be about a volt less than the voltage across the panel. You seem to be getting about twice as much drop, which suggests that your inductor might have quite a lot of resistance. In any case, if you are getting over 20 volts open circuit and 8 volts with the FET off it means that even without boosting you are operating far below the MPP voltage of the panel. Try connecting the 50 ohm load directly to the panel to see what you get. With the light you have available, my guess is that you will only get around one watt (based on 6 V into 50 ohms = 0.72 W, plus a bit more in the inductor and diode) at MPP. Since you are boosting, set your test resistance to something that will give a voltage of greater than the expected MPP voltage when there is no boosting. If 16 volts is what you expect at MPP, and assuming you can get one watt, this would be around 250 ohms.

If you can confirm that you aren't getting much power into the 50 ohm load it should be safe to do a short-circuit test by directly measuring the current from the panel with an ammeter. Short circuit current has a very linear relationship to illumination, with a small positive temperature coefficient. The specs for your panel will probably include short circuit current at standard test conditions.

Can you post the datasheet for the inductor, or a link to it?
Panel data?
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
I am using three 40W, 4500 Lumen LED's suspended approximately 6" above the panel for testing. Using a photometer, I recorded 24,000 lux directly on top of the panel, under the lights. I understand this is much weaker than actual sunlight, though I figured it would suffice for this project.

Using a multimeter, I measured the panel's open circuit voltage to be 20.2V and the short circuit current to be 179.3mA while being energized by the three lights. As you said, this current is much less than that which can be produced by the panel in full sunlight. When I connected the panel directly to the 50 ohm load, I measured 8.57V and 171.8mA. This would equate to 1.47W of power being dissipated.

Attached are the panel specs and a link to the product page for the inductor I am using, I couldn't seem to find a datasheet for it. Looking at Vmp for the panel, it seems pretty clear that the goal would be to use a converter to boost the voltage to 18.5V, correct? Or would this value vary under different conditions, say the lesser lighting that I am using to test the system?

10mH Inductor: https://www.amazon.com/gp/product/B00EZ8AJJA/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1
 

Attachments

ebeowulf17

Joined Aug 12, 2014
3,307
If the FET is kept turned off, the voltage across the load should be about a volt less than the voltage across the panel.
I must be misreading or misunderstanding the schematic. Wouldn't turning the FET off prevent any current flow, resulting in no voltage across the load?

It also looks to me like the only way to maintain current through the load is by cycling the FET repeatedly, because D1 prevents any current flow that would be induced by the solar panel directly.

I'm assuming I'm just misreading something here. If you could help me understand it, I'd appreciate it. Cheers!
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
@ebeowulf17
I believe this is the case with the schematic originally posted, the inverting converter. However, if my understanding is correct, with the boost converter D1 is switched around to allow current flow such that the solar panel can power the load despite the FET being in the off state. I attached a schematic of this circuit in an earlier reply.

Hope this helps, correct me if I'm wrong. Thanks!
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
@ebeowulf17
I believe this is the case with the schematic originally posted, the inverting converter. However, if my understanding is correct, with the boost converter D1 is switched around to allow current flow such that the solar panel can power the load despite the FET being in the off state. I attached a schematic of this circuit in an earlier reply.

Hope this helps, correct me if I'm wrong. Thanks!
 
Top