Hi All, I have a question, if I have a voltage regulator: SC4501 , adjustable boost that can take 3V and output up to 32V, I want to use this regulator to output three different voltages 5, 9, and 12V, and different output voltages are setup with resistor divider (can be seen in schematics in attach circled in blue), when I use adjustable pot this is not a problem, turn screw in one direction to lower output voltage and turn in another direction to raise voltage, however I am looking for a way to make this possible via Arduino, how do I do that?
The only thing comes to mind is to preset three resistor divider configurations and enable needed one with mosfet. Right now I am not even sure that will work but I but I will try to see what happens, Is there a better way?
I know there are adjustable resistance ICs out there but I am not sure they will work because it seems like they use i2C protocol to control them, etc, this is something I don't want to do, I am just curious if there a simple agile way to be able to control regulator's output voltage digitally by couple arduino pins?
Any info is highly appreciated, thanks in advance.
Cool, so three resistor divider circuits that can be selected by mosfet will work.... That's great, I will go with that.
I think I can put 1:3 multiplexor so I can use only two pins to switch between three mosfets.
Thanks
There's an added complication I just thought of - if you switch the bottom with N-channel MOSFETs, the top side of the resistor divider is still connected.
So, you have one resistor from FB to the output, and three resistors from FB to ground.
Be sure to include a pulldown on the gates of the MOSFETs, to ensure that they remain off when not driven otherwise.
Set your feedback potential divider to give 12V output from your switching regulator. Then use the Arduino's analogWrite() to apply a small (smoothed) voltage to the bottom of resistor R2. As you increase the small voltage under software control, the output voltage of your switching regulator will decrease. You should need to apply only about 0.8V to get the output voltage to reduce to 5V. Be careful not to exceed the 2.5V maximum rating of the FB input at any time.
Archibald:
Set your feedback potential divider to give 12V output from your switching regulator. Then use the Arduino's analogWrite() to apply a small (smoothed) voltage to the bottom of resistor R2. As you increase the small voltage under software control, the output voltage of your switching regulator will decrease. You should need to apply only about 0.8V to get the output voltage to reduce to 5V. Be careful not to exceed the 2.5V maximum rating of the FB input at any time.
That's cool idea, thanks I may not use it as an actual solution but definately want to try it. By smoothed, do you mean RC smoothing?
DrAzzy:
There's an added complication I just thought of - if you switch the bottom with N-channel MOSFETs, the top side of the resistor divider is still connected.
So, you have one resistor from FB to the output, and three resistors from FB to ground.
Be sure to include a pulldown on the gates of the MOSFETs, to ensure that they remain off when not driven otherwise.
Thanks, will try that tonight, is it something like this (see attached illustration)?
I think I should have placed load resistors above FETs, but roughly, is that a correct plan? Circled in red are pulldown resistors and circled in blue are FB voltage defining resistors.
Yes, the "analogue" output of Arduinos is a pulse width modulated (PWM) waveform so needs to be smoothed with a resistor capacitor network. As you only need a small voltage and want to ensure you don't exceed the maximum rating of the FB input, I suggest you pass the Arduino's analogue output through a voltage divider and put a smoothing capacitor across the appropriate resistor of the divider. Note with the smoothing, the output of the switching regulator will not change very quickly when you change the analogue output.
What type of Arduino are you using? Is it running off a separate 5V supply or off a 3V battery? If the Arduino's supply voltage changes, the small smoothed voltage will change. Potentially you could monitor the switching regulator's output voltage using an Arduino analogue input with internal voltage reference in use (you would need to drop the output voltage with a divider). That way you could adjust analogWrite() value in software to maintain a fairly accurate output voltage from the switching regulator.
Archibald:
Yes, the "analogue" output of Arduinos is a pulse width modulated (PWM) waveform so needs to be smoothed with a resistor capacitor network. As you only need a small voltage and want to ensure you don't exceed the maximum rating of the FB input, I suggest you pass the Arduino's analogue output through a voltage divider and put a smoothing capacitor across the appropriate resistor of the divider. Note with the smoothing, the output of the switching regulator will not change very quickly when you change the analogue output.
What type of Arduino are you using? Is it running off a separate 5V supply or off a 3V battery? If the Arduino's supply voltage changes, the small smoothed voltage will change. Potentially you could monitor the switching regulator's output voltage using an Arduino analogue input with internal voltage reference in use (you would need to drop the output voltage with a divider). That way you could adjust analogWrite() value in software to maintain a fairly accurate output voltage from the switching regulator.
Well, when doing some RAW tests I am unsing Uno 5V, then move to Pro Mini 3.3V untimate goal is to move everything to stand along Chip on breadboard, the reason why I am a bit reluctant with this method is that I did not have great success using PWM out of arduino, it was a bit unstable, but that couple be totally me doing it wrong and just like you said if something goes wrong and FB pin gets more than 2.5V undesired results can happen. I will definately try it though, interesting experiment.
alexmg2:
Thanks, will try that tonight, is it something like this (see attached illustration)?
I suggest you have a resistor R2 that gives an output of 5V and then switch resistors in parallel with it to give 9V and 12V. That way you need only two MOSFETs.
Archibald:
I suggest you have a resistor R2 that gives an output of 5V and then switch resistors in parallel with it to give 9V and 12V. That way you need only two MOSFETs.
Yes. That will give 5volts if the mosfets are "off".
I would suggest 12volt out when both mosfets are "on", to prevent outputting more than 12volt.
One for 9volt, the other one for the remaining 3volt.
Not like the diagram in post#6 though. The switched resistors belong in the drain, not in the source line.
I use the 2N7000 for small switching jobs like this.
Leo..
I was replying/adding to Archibalds idea.
Calculating R2 for 5volt and adding two resistors that are switched with N-channel mosfets for 9- and 12volt.
Leo..
Thanks all, alot of info, some of it unfortunately is above my head since I am still learning, however I do understand general ideas, its' just the implementation still sounds easier to me with 3 mosfets, since it adds only 3-4 inexpensive components that I am also comfortable controlling with Atmega328p chip. I can be wrong but using DAC seems like I need to go into figuring out how to send commands to it via i2C protocol, and using voltage fed into R2 from arduino pin is a great experiment that I will try because I am very interested to see how it work to learn new stuff but for a final version I am a bit hesitant because in my recent experiments voltage on output pin can fluctuate a little bit depending on battery drain, so I can't completely rely on it as of today.
Wawa:
I was replying/adding to Archibalds idea.
Calculating R2 for 5volt and adding two resistors that are switched with N-channel mosfets for 9- and 12volt.
Leo..
I chose 200K for R1 and will go from there for R2. Going into digikey database now to order most suitable SMD mosfets for this project.
I thought only three fixed voltages were required. 5volt, 9volt, and 12volt.
That can be done with two N-channel mosfets.
R2_fixed should be 1/3 of the value of R1_fixed for 5volt out.
Assuming a bandgap voltage of 1.25volt (FB point).
Two extra resistors can be switched/added parallel to R2 to raise the voltage to 9volt and 12volt.
Ask if you need help with calculating those values.
Leo..