PWM and a filter cap produces linear voltage although it's stability is open to debate. Probably good enough for your application. Connect this to a n-mosfet and you are done. I don't see why it wouldn't be reliable, maybe not accurate/stable enough. Try simulating it with LTSpice to test the theory and then breadboard it. No matter what, at least you will gain more experience.
Thank you for your answer alxnik.
I don't know why smoothed PWM voltage would be unstable nor have I doubted it's reliability.
It's stable and reliable enough for my needs when used to light/blink/dim a small LED and sourcing power from the uC or to drive a transistor and source from an external line for higher power than the uC can safely source.
I'm guessing this second usage pattern is what you're suggesting but...
I don't think it's equivalent to what I was asking for.
You see... I have this converter module. I feed it power within its rated input voltage range, adjust it with a POT to the desired output voltage and connect a load with a resistance such that it would not go over the converter's rated output current and power. And it works perfectly. If I then connect a different load, with a different resistance, but still within the converter's rated output current and power, it keeps working just fine and keeps the voltage setting. It's a switching converter, so it's fairly efficient too. Compact as well. All advantages as far as I'm concerned. So I want to use this (or similar) module as the power source for my load. All I want from my uC (Arduino or otherwise) is to adjust the converter module as I program it. Essentially I want to build a smart/programmable POT from an Arduino.
What
I think you're suggesting is to effectively reproduce the existing converter's design but substituting it's switching IC with my uC...
I know far from enough about circuit design and EE in general to trust myself to do that at this time.
Obviously... I don't know enough to even build the "smart POT" but
I think it would be an easier endeavor... hence me asking here.
To be honest, I thought it would be a fairly known design pattern for someone in the know. When I say pattern I mean... like when you want to drive a relay with a digital out pin from an uC... the recipe is generally the same... resistor, transistor, relay + diode... done. The values (and quantities) may vary but the pattern is generally the same. I thought there would similarly be a recipe (even if more complex) for substituting a POT with a uC PWM output.
Still hoping...
Jon86, many thanks for taking a little interest.
The problem(s) that I see with using a DPOT is that it is just a bunch of fixed resistors. It outputs discrete (stepped) resistance values, depending on how many internal resistors it has. I would like to be able to control the DC-DC converter as close to continuously as possible, like a regular, linear POT would. I know the Arduino's "analog output" is also discrete but is has more resolution (8bit) than the DPOTs I have at hand and could be made to have more from what I've read. Alternatively, a separate DAC could be used to get even more resolution.
And second, I would like to be able to vary the DC-DC converters's output rapidly, to create, for example "voltage ramps" in short spans of time and I'm not sure that talking to a DPOT over a serial connection would be fast enough or leave time for other work to the uC.
Get some higher resolution DPOTs, they're not expensive... And as long as you don't buy the crappiest ones ever made, it'll be fast enough.
But if you want to to try the PWM method, go for it, LT SPICE it and see what happens, but when it's built up you need to make damn sure that your output signal is clean. That PWM could give you some real problems if you're not careful.
Oh I know DPOTs are not that expensive... not if you don't want them to be "log" scale and suitable for audio and be called PGA2310...
those sort of are...
And I know I could control them fast "enough"... The problem, as far as I'm concerned is that digital communication takes time... send some bits, wait some time, send some more bits, wait some more time... the protocol is irrelevant... be it I2C, SPI... or CAN or RS232... it's a very long operation compared with setting a PWM value out on a pin and forget about it... do other stuff while the uC timer takes care of maintaining the duty cycle until such time as the external device that I wanted to control has time to read (measure) it.
This is why I'm trying to find a way to use the PWM... because it's fire and forget, until I want to change the value. Meanwhile though... the uC can do other things instead of kissing the bits goodbye as they go out on some bus (if I may use a comedic licence here).
Regarding the "LT-SPICE/go for it" part... I haven't yet learned how to use LT-SPICE.
And, even ignoring that... I don't understand the suggestion. I have voltage out (PWM) on one hand... and "resistance in" on the other... simulated or not... how do you suggest I... "connect" them?
All I want the PWM to do is control a converter module. Not be the switching element in a DC-DC converter itself.