Electronics > Beginners

Constant current PWM

<< < (3/4) > >>

Ian.M:
High side sensing is a lot easier than high side switching.  Move R2 to above L1 but within the L1, D1 loop and the interrupted current sensing problem goes away.  That should be simple enough to do as long as the rail is under about 70V with an 'over the top' OPAMP (see https://www.analog.com/media/en/reference-design-documentation/design-notes/dn533f.pdf ), otherwise isolated sensing will be required.

With 100uH of inductance and 50V across it during the 'PWM' on time, ignoring its resistance, the dI/dt is 500000, so to maintain a ripple current of 0.5A pk-pk, the on time resolution must be of the order of 1us.  This is too fast for software control on an affordable MCU, so the switching controller must be implemnted in hardware.   It should be possible using a Microchip PIC with a CLC (configurable logic cell) or with any other MCU that has configurable  autonomous logic, comparators, and some means of setting precision analog comparator thresholds, but on an AVR based Arduino, there's no configurable logic and I don't believe the 16 bit PWM module is versatile enough or fast enough to handle the required function, so an external hardware control loop to drive the MOSFET will be required.

RoGeorge:
This kind of application seems to be needing a SMPS where the coil is also the load.  I wouldn't put the microcontroller to stabilize the current.  Instead, let the stabilization to be done by an analogical circuit, and use the microcontroller just to set the desired current.

This poster has most of the possible topologies of SMPS:  https://www.techpowerup.com/articles/160/images/switching_reglation_topologies.pdf 

Choose one that suits the application and the type of MOSFET available, then see at the bottom of the table which dedicated IC to do the stabilization part.  If more details are needed for the design, TI has a handbook for that, https://www.ti.com/seclit/ug/slyu036/slyu036.pdf

MrAl:
Hello,

There is a relationship between the current vs time in R2 and the current vs time in the inductor, but you probably dont want to be bothered by that so a different setup is probably best.  All you have to remember is since you want to sense current in the inductor, you need to have the sense resistor in series with the inductor itself.  You'll still probably end up having to average that reading however because the current usually is not constant.  It depends on the value of the inductor and the PWM frequency.  With f=5kHz and L=100uH however the ripple current will be quite high, so high in fact that it may end up in discontinuous operation which is probably not what you want.

ZeroResistance:

--- Quote from: Ian.M on April 23, 2019, 01:22:56 pm ---High side sensing is a lot easier than high side switching.  Move R2 to above L1 but within the L1, D1 loop and the interrupted current sensing problem goes away.  That should be simple enough to do as long as the rail is under about 70V with an 'over the top' OPAMP (see https://www.analog.com/media/en/reference-design-documentation/design-notes/dn533f.pdf ), otherwise isolated sensing will be required.

With 100uH of inductance and 50V across it during the 'PWM' on time, ignoring its resistance, the dI/dt is 500000, so to maintain a ripple current of 0.5A pk-pk, the on time must be of the order of 1us.  This is too fast for software control on an affordable MCU, so the switching controller must be implemnted in hardware.   It should be possible using a Microchip PIC with a CLC (configurable logic cell) or with any other MCU that has configurable  autonomous logic, comparators, and some means of setting precision analog comparator thresholds, but on an AVR based Arduino, there's no configurable logic and I don't believe the 16 bit PWM module is versatile enough or fast enough to handle the required function, so an external hardware control loop to drive the MOSFET will be required.

--- End quote ---

Hi some amazing deductions! The "over the top" op-amp sounds good too. However I don't have one in my tool box at the moment.
How about a op-amp controlled current source driving a mosfet in closed loop. The uc would then only need to feed in the set point. I had tried that few weeks ago however the op-amp used to oscillate sometimes. Is there a way to stabilize the op-amp.

@Rogeorge and @MrAl
Thanks for your marvelous suggestions too!

Ian.M:
That will work if you compensate the feedback loop properly but, at 10A  load current and 50V supply voltage, there's going to be a lot of dissipation in the MOSFET.  You'll probably need several, which must be rated for linear operation, to handle the  worst case peak dissipation, and each will need its own control loop, (OPAMP + sense resistor) with a common control voltage to provide the current setpoint.   Its either going to need a *BiiiiiiiiiiG* heatsink for passive cooling or fan cooling.    Around 100W per heatsink is easily achievable with commodity CPU coolers, which fits in well with typical MOSFET package dissipation limits.

However I believe a linear solution is the wrong way to go about it.   

* Do you need extremely fast control of the solenoid  current? 

If not, putting a low resistance 1mH choke with a  saturation current  >10A in series with it would go a long way to tame the PWM control requirements as it would reduce the max dI/dt by slightly over an order of magnitude, reducing the required on time resolution accordingly.  If you can adequately model the solenoid, it would be possible to run it open loop from a MCU PWM output, and get approximate current control with acceptable ripple, then run a much slower software control loop to tweak the open loop setpoint for precise control.

If its got to handle different solenoids with no user intervention to set parameters it gets somewhat more complex, and if it cant exercise the solenoid to determine the parameter on startup, it becomes rather challenging.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod