Issues getting LT3080 to be controlled by PWM

After watching Dave's EE Blog episode 221 & 222, I decided to risk my spare LT3080 IC by experimenting.

Being a rank newbie when it comes to circuit design, I didn't see the need for the buffer/op-amp that Dave used, so I just used a low-pass RC filter right on the LT3080's SET pin (a fool dares to tread...). I also don't care about current sensing or limiting, so all that went away too. What I ended up with (I think) is attached below.

R1 and the 2.2uF capacitor form, supposedly, a low-pass RC filter to smooth the Arduino's 1kHz PWM to a reasonable level. The transistor Q1 (2N2222) acts as a level shifter so that the Arduino pin is not exposed to 12V.

This setup "works", as in, varying the PWM duty cycle 0-100% causes the LT3080 OUT to vary between 1.0V and 1V less than Vin.

As for the upper voltage, Vin-1V is troubling, as the LT3080's dropout should be no more than 0.2V at this amperage. Any suggestions on why this is and how to fix it?

As for the lower voltage, I had initially omitted R2, but adding it let the LT3080 regulate down to 0.5V. This is as far as I got, because I realized that I have no clue what I'm doing here. I think that the SET pin produces 10uA of current as per the LT3080 datasheet, which current is sunk to ground through the RC filter (and through R2). Altering the PWM duty cycle changes the effective voltage on SET... I think. So by changing R2 to a lower value, I think I can get closer to 0V, but more importantly, I'd like to understand why R2 is even necessary in the first place? Also, it seems like R2 is going to mess up the low-pass RC filter characteristics (adding ripple), which isn't good.

And if the answer is "this is why you use an op-amp buffer, dummy", I can accept that. But I would like to understand why. :slight_smile:

Thanks in advance for any thoughts...

Ok, update. After hours of tedious resistor swapping, I think I kind of sort of understand what's going on here. Updated schematic below.

A 4.7K (1mA) pullup is used on the transistor base so that when the circuit powers on and the Arduino is booting, Q1 base pin is pulled high to pull the SET pin down close to ground. Otherwise, the lab supply boots up at maximum output voltage, which isn't nice. Care must also be taken that the 5V supply comes online at the same time as the 12V supply! Once the Arduino boots and the PWM begins, the same 4.7K is further used to protect the Arduino pin from sinking too much current during the LOW part of the PWM cycle, and the diode prevents excessive current from reaching the transistor base during the HIGH part of the cycle. If there is a more elegant arrangement for this, I'm all ears.

So, ostensibly, the SET pin produces a 10uA current as per the datasheet. However, I got an exponential voltage curve on the LT3080 output throughout the 0-100% PWM duty cycle just hooking things up directly. So, R1 is used to flatten the curve. It's still not quite linear -- one step of (8-bit) PWM results in 0.2V change up around 11V and around 0.05V down near 0V, but this is acceptable for now -- I plan to move to 10-bit PWM (via direct register access) eventually, and can probably further flatten the curve by tweaking resistor values (sigh) and in software.

R2 and C1, of course, form a low-pass filter (the 15pf is just per the LT3080 datasheet). I have oscilloscope parts on their way from Amazon to actually measure the ripple, but this:

http://sim.okawa-denshi.jp/en/CRlowkeisan.htm

says there should be about 0.01V ripple with a 7.8K PWM frequency (again, via register manipulation). Ripple can be improved but we're already at ~5Hz cutoff and I don't want to make things too unresponsive to user input.

So, output regulation is now from 0.3V to Vin minus 1V. I guess that's as good as it's going to get without throwing ICs at it.

Suggestions welcome.

This is why you use an op-amp buffer, dummy :stuck_out_tongue:

The op amp is there to be a low-impedance drive point that can sink the 10uA SET current without changing output voltage, something that your transistor circuit completely fails to do. And quite frankly, given that transistor collectors are best modeled as current sources (which are inherently high-impedance), I don't see any way a simple transistor circuit could do this very well. A FET would have the same problem.

Regarding your first circuit, when the PWM is all the way off, the transistor is also off, blocking current. This means all of the 10 uA SET current has nowhere to go, pulling the SET pin as high as it can go. There's probably some leakage in the capacitors acting as a high value resistor in parallel with the transistor, causing the voltage to not go as high as it could. When you turn PWM all the way on, the SET current goes through the 100 k resistor, giving an output SET voltage of 1 V.

Adding R2 should seriously damage your supply's performance. 0% PWM should give 1 V output ,and 100% PWM will give about 0.5V.

Your second circuit is quite frankly a bit beyond my ability to casually analyze because of R1.

An op amp buffer will be superior to pretty much any transistor design you come up with.