0

This is more of a thought experiment, as I don't know if I'll have the time to work on it.

Items:

Idea:

Looking at the Instructable, that seems like a fairly interesting and robust circuit, originally developed by one Tim Nolan whose website no longer seems to exist.

I'm somewhat lazy/fearful of messing things up when building from scratch, so I like to get preassembled modules and tinker instead. So, my thought is simple (ish). Looking at the LM2596 module, the output voltage is determined by the setting of the multiturn pot. I'd like to replace that pot with, say, a PWM controlled voltage from an Arduino, which I can then adjust using Tim Nolan's code to achieve MPPT.

So to be very specific, the question is: can I safely remove that pot and use a PWM'd voltage in its place, in order to control the output for MPPT?

1

No.

The switching frequency of the LM2596 is 150kHz, but the sampling frequency of the Arduino is only 10kHz (on a good day). You won't be able to adjust the PWM quickly enough to fine-tune the LM2596 output voltage. The LM2596 uses the 1.23V feedback voltage to change what it's doing. But the feedback voltage will only change as fast as the Arduino can change the PWM feeding it (and that the RC smoother will allow).

It will be like pushing a shopping cart backwards, blindfolded. By the time you feel the directional change in the cart, it will have steered off course by quite a bit. Then you have to compensate wildly to bring it back on course.

The same would probably happen here: the LM2596 would begin adjusting the output voltage to make the feedback voltage come back towards 1.23V. But the Arduino doesn't respond in time. The Arduino has to do an ADC conversion, do some calculations, change the PWM, which eventually changes the RC output voltage, which is the feedback voltage. So the LM2596 changes some more... and even more. Eventually the feedback voltage does change, but by this time the output voltage has changed significantly.

Another way to look at is that the LM2596 is like another "processor", trying to optimize its own function, output voltage instead of MPPT. It's running much faster than the Arduino, so there's no way the Arduino can trick the LM2596 into doing what it really wants, MPPT.

  • This makes sense, I wasn't thinking about the switching vs. sampling frequency. Knew I was missing something. The second answer here seems plausible - using a digital pot instead to replace the trimpot, or feeding it a fixed PWM voltage separately from the output. I might try that and see, but based on your answer direct PWM control is clearly out of the question. – Boloar Dec 12 '15 at 6:47
  • Yes, as Gerben suggested, a digital pot would be ok, because it has the same (nearly) instantaneous response as a passive resistor. This decouples the Arduino from the response cycle, which is good. It will be free to measure current and voltage at its leisure (you still have to measure both). Of course, the software will be different, as you would be changing the digital pot value instead of the PWM frequency/duty cycle. – slash-dev Dec 12 '15 at 14:33
  • @Boloar, here is a relevant discussion at EEVBlog. Reply #6 mentions using PWM+filter to offset the feedback resistor voltage. This also allows an instantaneous response to be seen by the regulator. Just make sure the PWM freq is high enough and the filter RC is slow enough that the regulator doesn't see a ripple it needs to correct. Oscillation, anyone? :) – slash-dev Jan 8 '16 at 15:45
1

The pot is actually part of the feedback mechanism, so you can just feed it a fixed voltage (based on PWM duty cycle). See the second diagram on page 9 of the datasheet

You could however replace it with a digital pot (not necessarily 10k).

  • Thanks, I don't know why I didn't think of a digital pot. I'll look into both options, :-) – Boloar Dec 12 '15 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.