How to Use Arduino to Drive Buck-Boost Converter?

ebeowulf17

Joined Aug 12, 2014
3,307
@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!
Yes, that was it!

I apologize to both you and @ebp. I was reading a little too fast earlier and totally missed that we were discussing a different schematic now. Everything makes sense again. I'll try to slow down and read more carefully before making more comments and asking silly questions. Thanks!
 

ebp

Joined Feb 8, 2018
2,332
18.5 volts would be the panel voltage target for MPP operation.

Since the output of a boost convert must always be at least equal to (ignoring diode drop) the input, I would set the output voltage target at something a little higher than the panel open circuit voltage.

It is a common problem with things from ebay and amazon vendors that you can't find proper data. That inductor is very tiny for the amount of inductance and will saturate at a low current. Hopefully it will be adequate for the amount of power available with the LED lights on the panel, but it would be grossly inadequate if the panel had enough light for 50 W. Mouser and DigiKey will both sell similar inductors, and a reasonable approximation of how much current it can handle can be made by finding one of similar size, shape and inductance. They are sometimes called "spool core" because the ferrite core is shaped rather like a spool that might be used for sewing thread.

The IRF520 is not a "logic level" type intended to operate with gate drive voltage of 5 volts or less. From the datasheet it looks like it will probably be OK with 5 volt drive for the amount of power in the test setup, but it would be unsuitable for even a few hundred milliamps.
 

ebp

Joined Feb 8, 2018
2,332
Based on physical size, the inductor is probably rated for something in the range of about 150 mA or less.

For some reason I can't get to DigiKey at the moment, but from what I can find at Mouser I think you will have a hard time finding a 10 mH inductor suitable for the full panel output.

The output diode should also be rated for about 3 amps for the full panel output. Again, I recommend a fast-recovery type or even a schottky rectifier. It should be rated for at least 30 volts if you want to boost to around 25 V.
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
The IRF520 is not a "logic level" type intended to operate with gate drive voltage of 5 volts or less. From the datasheet it looks like it will probably be OK with 5 volt drive for the amount of power in the test setup, but it would be unsuitable for even a few hundred milliamps.
Looking at the datasheet, it states that the minimum and maximum gate-source threshold voltages are 2V and 4V respectively. Am I incorrect in in my thinking that this is what classifies the FET as "logic level", since they are under 5V?

By raising the load resistance to 220 ohms as shown in the attachment, I can lower the inductance to 1mH and still attain an output voltage of just under 20V. Any lesser inductance and I am unable to boost the voltage to the desired level. However, looking at the simulation results, the current through the inductor still reaches nearly 2A during the cycle, which will be well over the saturation current. Do I need to just keep increasing the load resistance while simultaneously lowering the inductor value, until I reach an inductor with an acceptable saturation current? It seems to me that this would have an adverse affect on power delivered. Or is there a way to limit the current through the inductor without affecting the output voltage?

The output diode should also be rated for about 3 amps for the full panel output. Again, I recommend a fast-recovery type or even a schottky rectifier. It should be rated for at least 30 volts if you want to boost to around 25 V.
Does this fast recovery have a significant effect on the performance of the circuit? The diode I'm using currently (because I had one on-hand) exceeds this voltage rating, so I figured it would suffice.
 

Attachments

ebp

Joined Feb 8, 2018
2,332
Threshold voltage for an enhancement mode FET (almost all power MOSFETs are enhancement mode) is the gate-source voltage at which some amount of drain-source current will flow. Usually there is a specification for the associated current magnitude. For the IRF520, the Vishay datasheet spec's 250 microamps. More useful info comes from the transfer characteristic curve (gate-source voltage v. drain currrent) and the gate charge curve (typically you want to operate somewhere to the right/above the plateau in this curve). The transfer curve for the 520 suggests typical drain current of around 2 A at 5 Vgs. Note this is typical, not a guaranteed value. Logic level FETs are usually specified to conduct their nominal steady-state rated current at a gate-source voltage of (often) 4.5 volts or somewhat less.

The current in the inductor is key to the whole power conversion process. I sometimes say the only thing you need to know to understand switchers is the equation
δi/δt = V/L - the differential of current with respect to time is equal to the potential across the inductor divided by inductance, where i is in amperes, t in seconds, V in volts and L in henries.
It really isn't the only thing you need to know, but it explains a great deal.
Also remember
E = (Li^2)/2 - energy stored in an inductor is equal to one half of (inductance in Henries times the (current in amperes squared)) - the current here is the instantaneous current at the time E is to be calculated
(I've used lower case i instead of normal upper case for current to avoid ambiguity with sans serif lower case L)

Since there is a lot of info on the web about boost converters, I won't go through all of the operation, just a few points.
  • As the equation says, the current in the inductor will ramp up and down as it is charged and discharged. Usually some moderately large capacitance is added at the input of the circuit to average the current from the input supply.
  • Returning to my comments at #14: Hint - consider your switching frequency, inductance, the equation above and the concept of "continuous versus discontinuous inductor current (which you'll find in general discussions of switchmode converters). This will guide you to selection of a suitable inductance. Experiment with the value of the inductor in your simulation while looking at the currents. Think about what operation in discontinuous current mode means in terms of ability to transfer power from the input to the output.
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
Thank you for the explanation. I did a considerable amount of reading on boost converters and I now see the importance of operating in the continuous mode, which highlights the importance of the inductor value. I came across an equation for calculating an adequate inductor value, which relates this value to the switching frequency among other things. What I found was that for the switching frequency of an Arduino's PWM output (around 500Hz), the inductor would need to be around 80mH. Raising the frequency up to 20kHz, the inductor value needed is approximately 1.8mH, which is much more reasonable given the current running through the circuit. This suggests that a different PWM controller may be necessary for this application.

My next (and possibly final) question is this: When I attached the 50ohm load directly to the panel, I read 8.57V and 171.8mA being supplied, giving 1.472W of power. If the voltage across the load is to be boosted to, let's say, 20V, then according to Ohm's law, current through the load would be 20V/50ohms = .4A. However, moving in the direction of positive voltage on a solar panel's IV curve will never result in increased current, so how is it possible to provide the load with .4A?
 

ebp

Joined Feb 8, 2018
2,332
With your test setup you are stuck with a very small amount of power available and have no alternative but to increase the load resistance to something much higher than 50 ohms.

The short circuit current is directly and quite accurately proportional to illumination. The current at the MPP voltage will be somewhat less. You can get a reasonable idea of the magnitude of current you will get in your test setup at MPP voltage by considering the MPP current spec at standard test conditions (STC) to the short circuit spec at STC. (e.g. if your short circuit current were 200 mA and at STC the short circuit current is spec'd at 2 A and the MPP current at (say) 1.8 A, then you could expect about 180 mA at MPP (1.8A/2A * 200 mA) with your test setup. Multiply that current by the expected voltage at MPP (again, not a lot of change with illumination) to get the amount of power you can expect at MPP. You are getting about 1.5 W at about 8.6 V. The expected MPP voltage is about twice that. The current won't change very much, so you will probably get around 3 W at MPP. 3 W at 20 volts requires ??? ohms.
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
I see, that makes sense. Thank you.

Does that mean that as well as altering the voltage, the load resistance must also be continuously adjusting during the MPPT process?

In addition, with a constant load resistance, wouldn't boosting the voltage as high as possible result in the maximum power produced? Why would the voltage at maximum power not be as close as possible to the open circuit voltage?
 

ebp

Joined Feb 8, 2018
2,332
If you are using a boost converter you would typically boost to a voltage higher than the open circuit voltage of the panel, just because a simple boost converter output is nearly equal to the input when not boosting, but you don't really have to do that. The only critical requirement is that you boost to a voltage greater than the MPP voltage, otherwise nothing can be gained by boosting. If you were using the system for battery charging, which is a very common industrial application, you would want to assure that under no circumstances would you apply excessive voltage to the battery, which means you must either add extra circuitry to the boost converter, use a buck-boost circuit, or use a panel whose open circuit voltage is always less than maximum for the battery.

The load can be fixed or variable. When you use a boost converter, if the load resistance is too low, so that the panel is forced to operate at a voltage below its MPP voltage, there is nothing you can do - you would need to be able to buck. If you boost and the load resistance is high, you adjust the duty cycle to accomplish an output voltage high enough so that the power delivered matches the MPP. For example, if you have one watt available at MPP from the panel and you have a 1000 ohm load, you would need to boost to 31.6 V, assuming 100% efficiency in the converter, to put 1 W into 1000 ohms. If you had 10 W at MPP you would need to boost to 100 volts to put 10 W into 1000 ohms. A battery, of course, behaves differently - it is not a resistor but (when considered in a very short time interval) a constant voltage in series with a small resistance. You can greatly increase the power delivered to the battery with only a small change in voltage. A very small change in duty cycle would translate to a large change in power delivered.
 

Thread Starter

dylwheeler87

Joined Feb 13, 2018
12
That makes perfect sense. I was getting too caught up in trying to figure out the voltage. I was overlooking the fact that power is the component that dictates the voltage value, not the other way around.

Thank you again for your help throughout this process.
 

Plamen

Joined Mar 29, 2015
111
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:
View attachment 150503
Petkan:
An emitter resistor would convert the NPN to controllable constant current source, which will allow the MOSFET gate to be driven by lower and stable voltage
 
Top