Electronics > Beginners
DC/DC converter with uC interface
(1/7) > >>
aix:
I am a hobbyist working on a microcontroller project in which I’d like to control the speed of a 12V BLDC fan by varying its supply voltage (no PWM).

I’d like to power everything from a single 5V USB supply (with no Quick Charge etc = fixed at 5V).  This will ordinarily be a USB power bank, so I’d like to keep things reasonably efficient.  The power bank can supply 3A, though I don’t need anywhere near as much.  There’s no requirement to power from a computer USB port.

So in a nutshell, I have a 5V rail and I’d like to derive a variable 3V-12V supply with a reasonably convenient microcontroller interface (an I2C digital pot?)  If this drastically simplifies the design, I can forgo the step-down and just have 5V-12V.

In a steady state, the fan draws:

* 25mA @ 3V
* 52mA @ 5V
* 172mA @ 12V
I also need to be able to switch the fan on and off (so maybe inrush currents need thinking about, given that the uC will sit on the same 5V rail?)

I can probably find an off-the-shelf DC/DC module that’s close to my needs.  But since this is mainly a learning exercise, I feel it would be more instructive to design something at the component level.

How would you tackle this?

I’ve been looking at MC34063A (and might still play with it to learn) but it seems that it’s not very efficient and there are better modern ICs.  I don’t know if there’s anything else about it that would outright disqualify it for my application.

Would love to hear your thoughts.
David Hess:

--- Quote from: aix on May 05, 2019, 09:17:34 am ---I also need to be able to switch the fan on and off (so maybe inrush currents need thinking about, given that the uC will sit on the same 5V rail?)
--- End quote ---

A common boost converter requires an extra transistor to disconnect the output from the input.  Or the SEPIC configuration can be used at the cost of an extra inductor and capacitor.


--- Quote ---How would you tackle this?

I’ve been looking at MC34063A (and might still play with it to learn) but it seems that it’s not very efficient and there are better modern ICs.  I don’t know if there’s anything else about it that would outright disqualify it for my application.
--- End quote ---

The MC34063A is actually one of the better choices because its peak switch current limiting function can be used to limit input current.

Controlling the output voltage just requires injecting a current into the feedback network which can be done with a DAC.  This would commonly be done with a filtered PWN output from the microcontroller.
mariush:
Turn fan on and off - there are regulators with ENABLE pins.

There are fan controller ICs but often they're expensive in small quantities.

You could just use a switching regulator in SEPIC mode and control the output voltage ignoring the current and that would allow you a wide output voltage range, like 3v.. 12v.
You can go for the cheaper route and use only step-up regulator, and configure fan between 5v and 12v... step up would only allow you an output voltage as low as the input voltage.
 
You could set the output voltage of a regulator using a DAC on your microcontroller, here's a "tutorial" : https://www.microchip.com/forums/FindPost/688260
You can use ANY switching regulator, just have to look up the datasheet and determine the voltage reference value inside the chip (listed in datasheet) and adjust resistor values accordingly (keeping in mind minimum resistor value mentioned in datasheet)

34063 or 33063 would work, but personally I would choose a switching regulator that works at slightly higher frequency than 100-150kHz because while you lose a bit of conversion efficiency, you get much smaller and cheaper inductors and you can use smaller ceramic capacitors instead of electrolytic capacitors.

For example, have a look at
* LM4510 : https://www.digikey.com/product-detail/en/texas-instruments/LM4510SD-NOPB/LM4510SD-NOPBCT-ND/1679844
* MP1540 : https://www.digikey.com/product-detail/en/monolithic-power-systems-inc/MP1540DJ-LF-Z/1589-1857-1-ND/5291720
(up to 12v 200mA with 5v input , 2.7v..5.5v input voltage, 1.3 mhz switching frequency, super simple to wire and very few extra components)

You can use the DAC method on these to mess with the adjust to limit current. But if you don't want or don't have DAC....
 
Another trick you could do would be to use a LED driver IC as a fan controller... use a regular switching regulator to boost your battery voltage of 3.7v .. 5v to around 12v or whatever voltage you want (maybe you'd like max 10v for a more silent fan ... and pick inductor and other parts, for example to really optimize for around 12v.. 12.5v output instead of a wide output voltage range - would be safe to go up to around 13v, most PC fans have +/- 10% tolerance) and then use a super cheap and simple buck (step-down) led driver IC to limit the current.  The fan always gets around 12v (minus some losses in the led driver and resistor that measures current) but the current is limited by the "brightness" setting which you could control through PWM or i2c commands.

Here's a short selection of such led drivers : https://www.digikey.com/short/pzh00p

For example the cheapest AL8860 would be quite suitable: https://www.digikey.com/product-detail/en/diodes-incorporated/AL8860WT-7/AL8860WT-7DICT-ND/6226981
Datasheet: https://www.diodes.com/assets/Datasheets/AL8860.pdf

You can set the maximum current (for example 0.2A) using a resistor, and then you can use the CTRL pin for ON/OFF or adjust current between 5% and 100% of the value set using the resistor:

--- Quote ---Multi-function On/Off and brightness control pin:
•Leave floating for normal operation.
•Drive to voltage below 0.2V to turn off output current
•Drive with DC voltage (0.3V < CTRL< 2.5V) to adjust output current from 0 to 100% of IOUT_NOM
•Drive with PWM signal from open-collector or open-drain transistor, to adjust output current.Linear adjustment range from 1% to 100% of IOUT_NOMfor f < 500Hz
•Connect a capacitor from this pin to ground to increase soft-start time.(Default soft-start time = 0.1ms. Additional soft-start time is approx.1.5ms/1nF

--- End quote ---

Another example :  TS19376 :  https://www.digikey.com/product-detail/en/taiwan-semiconductor-corporation/TS19376CY5-RMG/TS19376CY5RMGCT-ND/7359728
Datasheet : https://www.taiwansemi.com/products/datasheet/TS19376_A12.pdf

Again, set maximum current using a resistor and then use PWM pin to "dim", aka adjust current to your desires.

--- Quote ---The TS19376 allow dimming with a PWM signal at the DIM input. A logic level below 0.3V at DIM forces TS19376 to turn off the LED and the logic level at DIM must be at least 2.0V to turn on the full LED current. The frequency of PWM dimming ranges from 100Hz to more than 20 kHz.

--- End quote ---


You could use a step-up led driver IC and basically use it to also boost 3v..5v to 12v ... but you'd have to add a zener diode or something to cap the output voltage to 12v or thereabouts..
There's loads of 10v, 11v and 12v zener diodes... and cheap : https://www.digikey.com/short/pzhv3z
Simon:
Why do you not want to use PWM? that you need to boost the voltage is clear but the ability to control the output voltage may complicate the control or require specific parts. Most SMPS circuits will be more efficient at their designed condition. Boosting is not as efficient as bucking anyway.

Why not have a fixed boost to 12V and then PWM the fan? You can just send the PWM signal to a single low side mosfet so no need for level shifting. with PWM you can also do softstart to prevent too much current being drawn at startup. You will also be able to get to lower speeds as PWM tends to keep the torque up even at lower speeds allowing you to operate slower than if you just lower the supply voltage.
David Hess:

--- Quote from: Simon on May 05, 2019, 01:16:21 pm ---Why not have a fixed boost to 12V and then PWM the fan? You can just send the PWM signal to a single low side mosfet so no need for level shifting. with PWM you can also do softstart to prevent too much current being drawn at startup. You will also be able to get to lower speeds as PWM tends to keep the torque up even at lower speeds allowing you to operate slower than if you just lower the supply voltage.
--- End quote ---

Pulse width modulating the power to a DC brushless motor is a really bad idea unless it uses hall effect sensors to directly commutate the transistors which has not been done in decades.  It is not a good idea even then.

The power input to the fan includes a decoupling capacitor so a pulse width modulator has to operate into an AC short.  If you check old PC motherboards which did this to control fan speed, they include a big LC filter on the output of the pulse width modulator effectively making an open loop buck converter.  Or at least the reliable ones did; the ones with burnt out transistors left the filter off.


Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod