1
\$\begingroup\$

I have a mixed-signal circuit, with the audio side using a \$\pm15V\$ supply, and the MCU and DACs using a \$3.3V\$ supply. The MCU's internal DAC and two external DACs provide control signals for the audio processing side. I need a rather well controlled ratio of a fixed voltage \$\sim3V\$(which in itself doesn't need to be super accurate) and the DAC reference voltage, so I'm using an external reference for all DACs.

My solution to this is to generate the reference from the \$3.3V\$ supply, with some filtering, and buffer it with an opamp supplied from the audio supplies. Then I can use that voltage to get the other voltage at a precise enough ratio.

After already destroying one prototype due a different mistake regarding the reference, I suddenly became worried about what happens at startup, once the reference is there: to my understanding, an internally compensated op-amp works essentially by charging its internal capacitor with a current proportional to the difference between its inputs, and that the capacitor is usually referenced to its negative rail. Now at startup, if the capacitor is empty, doesn't that mean that the output starts at \$-15V\$ in my case, before settling with the maximal slew-rate of the op-amp to its steady-state level?

My question is: am I right that there will be such a transient voltage, and if there is, will it destroy my MCU or DACs?

The opamp in question is a TL074, and here's the schematic:

schematic

simulate this circuit – Schematic created using CircuitLab

There are \$1\mathrm{\mu F}\$ and \$1\mathrm{nF}\$ caps further filtering the reference at the MCU Vref+ -pin, and no further filtering at the external DACs, which are very close to the reference op-amp.

\$\endgroup\$
  • \$\begingroup\$ I am not sure how you come to the conclusion that the output is being driven to -15V \$\endgroup\$ – PlasmaHH Apr 20 '16 at 12:17
  • \$\begingroup\$ At startup, +/- 15V will likely ramp relatively slowly up to their set voltage, much slower than the OP-amp output. Good question though. \$\endgroup\$ – pipe Apr 20 '16 at 12:23
  • \$\begingroup\$ @PlasmaHH there is an application note, I think by Analog Devices (I couldn't find it right now, will try to look harder), which describes the various decoupling techniques for opamps, and goes to length about how the op-amp is really referenced to its negative rail. Then if there is any leakage path from the internal cap so that it empties when the circuit is off, I'd imagine that at turn-on it starts from the negative rail? \$\endgroup\$ – Timo Apr 20 '16 at 12:29
  • \$\begingroup\$ Also, when I use a similar buffer in the audio side, there is a pretty big turn-on thump, so there is definitely a voltage excursion somewhere. \$\endgroup\$ – Timo Apr 20 '16 at 12:30
  • \$\begingroup\$ Of course, if @pipe is correct, then the \$-15V\$ -rail may be far from its nominal value. \$\endgroup\$ – Timo Apr 20 '16 at 12:31
3
\$\begingroup\$

Without seeing your power supply turn-on and turn-off behavior, there is simply no way to be sure how it will behave on power-on.

However, if you're worried about negative excursions, you have a simple way out. Connect the V- input to ground, rather than -15. You're not trying for a bipolar excursion, after all, but rather a constant 3.3 volts.

Check the data sheet figures 2 and 3, and you'll see that even for a 2 k load, the output will get within 2 volts of the supplies. For a 15 volt supply, this is a range of about 2 to 13 volts. Since you need 3, you should be all set. Actually, you're even better off than the data sheet indicates, since the op amp will be sourcing current at the lower ouput voltages, and the NPN portion of the output stage will be doing the work, and will have 12 volts across it, so there is no chance of the output stage getting starved.

EDIT - There is a way to check for transients without a scope, but it will take a bit of extra circuitry, and one or more power supplies. If you make a comparator combined with an SR flip-flop,

schematic

simulate this circuit – Schematic created using CircuitLab

Use the pot to set your trigger voltage, and close the switch momentarily to reset the flip-flop. The circuit must be live before you turn on the circuit you're testing. If the input drops below the set point, even for a few microseconds, the LED will turn on and stay on until the reset switch is pressed.

The CD4011 is powered by +15 and GND, not +/- 15.

\$\endgroup\$
  • \$\begingroup\$ Bad idea. You might have the output range, but I suspect you don't have the common mode input range for +3.3. It will be a close thing. That op amp just isn't single supply. There are pin-compatible rail to rails, though. \$\endgroup\$ – Scott Seidman Apr 20 '16 at 13:25
  • \$\begingroup\$ Well, I've got DIP versions of the same op-amp, so I could simply test this on a breadboard before cutting any tracks on the PCB. For what it matters, the PSU is a 15VAC half rectified to make +- about 20V and regulated by standard three-pin linear regs to make the three supplies (for this prototype, that is). I'd guess the supply turns on relatively gradually as the \$2200\mathrm{\mu F}\$rectifier caps have to charge up, but again, would need to measure... I guess there's no way around eventually getting a scope. \$\endgroup\$ – Timo Apr 20 '16 at 13:38
  • \$\begingroup\$ @Timo - You don't need a scope. See edit. Plus, check out PC oscilloscopes. Probably smaller than one of your power supplies. Connects to a PC via USB and uses the PC's display. Not terrible money, either, at least for moderate speeds. \$\endgroup\$ – WhatRoughBeast Apr 20 '16 at 14:46
  • \$\begingroup\$ @WhatRoughBeast Wow, thanks! I'll see if it's easier to gain access to a scope or just go to the local electronics store to get the CD4011's. \$\endgroup\$ – Timo Apr 20 '16 at 15:42
  • \$\begingroup\$ @Timo - Oops. Got the comparator inputs mixed up. See diagram. \$\endgroup\$ – WhatRoughBeast Apr 20 '16 at 16:15
2
\$\begingroup\$

If you are not keen on changing the power rails then add a diode (red): -

enter image description here

This will ensure that only positive voltages are produced. Also, because the diode is within the feedback loop, accuracy will be maintained. However the TL074 is pretty crappy and will give anything up to a 10 mV error on your 3V3 reference output due to its input offset voltage.

Don't forget power supply decouplers too.

\$\endgroup\$
  • \$\begingroup\$ Putting the diode in the loop is a good idea. PCB-wise though, it would be easier to put a diode from the ground to the reference, as I could probably piggyback that on one of the decoupling caps (I think I have extra 0603 zeners lying around), that should work too, right? As the diode will be reverse biased, it should have only a minor effect on normal operation? Don't worry, I do have decoupling on the op-amp power supplies, just forgot to put it on the schematic. \$\endgroup\$ – Timo Apr 20 '16 at 15:26
  • \$\begingroup\$ If easier to implement then I'd got for that as a decent solution. \$\endgroup\$ – Andy aka Apr 20 '16 at 16:10
0
\$\begingroup\$

I don't think this is a good solution as a reference voltage. The offset voltage of the opamp will give you a reference voltage different fron the 3.3v you seek. A better solution is a shunt voltage reference diode- something like an LM4050-3.3V.

That said, im not convinced about your transient concerns at power up. Like some else said earlier, the supplies will ramp up slowly, so your op-amp output voltage should have no trouble tracking the voltage at the noninverting input. I don't believe you have to worry about any transients at the op-amp's output.

If you find the app note, I'd love to read it.

\$\endgroup\$
  • \$\begingroup\$ As mentioned in the question, I don't need an exact reference, just a precise(ish) ratio between the max DAC output and another reference voltage (generated with the same method), so small offsets don't matter. Note though that there indeed is a transient, see my answer. Also, the app note is this one, which I already linked in comments to the question itself. \$\endgroup\$ – Timo May 2 '16 at 16:45
0
\$\begingroup\$

I ended up actually measuring the startup on an oscilloscope (thanks to Fab Lab Reykjavik) on the remains of the PCB destroyed in this incident.

Indeed, a lot of the time the output of the op-amp is perfectly fine during startup, it ramps up to the \$3.3\mathrm{V}\$ as dictated by the input RC filter, shown in the schematic in the question. However, several times while I was measuring, the output would first ramp up linearly, in worst cases to over \$+10\mathrm{V}\$, then collapse to a bit less than the set reference, and finally settle to steady state. At worst, the op-amp output would spend several milliseconds way beyond the STM32's absolute maximum voltage of \$3.6\mathrm{V}\$. I got the impression that this would most often happen when toggling power rather quickly (a few seconds between power up and power down), such that the PSU caps do not have time to empty up, but I wasn't able to get that to happen systematically enough to be sure.

op-amp output on startup Fig. 1: One example of a startup transient that reaches \$6.4\mathrm{V}\$. Apologies for the cellphone picture, there was no computer easily available to extract the trace directly.

In addition I occasionally observed a minor negative transient, just before the main positive transient, that was somewhat uncomfortably close to or just below the absolute minimum \$-0.3\mathrm{V}\$.

So I was wrong that the transient would be on the negative side. However, I was right that there would be a transient, and a one big enough to wildly exceed the absolute maximum ratings, therefore potentially damaging the MCU.

I solved the problem, for now, by soldering a pair of Schottky diodes between the reference and VCC and GND, as there happened to be convenient decoupling caps between which I was able to sneak the diodes (not pretty, but works):

schematic

simulate this circuit – Schematic created using CircuitLab

Note that, to my understanding, this is almost as good as Andy aka's suggestion to place the diode in the loop: the feedback is directly connected to the point between the diodes, so that is the voltage the op-amp will attempt to control during normal operation. The only downside is that the current from the transient gets dumped onto the \$3.3\mathrm{V}\$ rail (or GND if it goes negative), but the voltage regulator and capacitors there are able to deal with it, as an oscilloscope measurement shows.

This morning, I finished building all of this, and indeed the device has survived several startups and the DAC is working. The diodes are slightly underrated for passing the full maximum output current of the TL074, but as they only need to do it very briefly during the startup, they seem to be holding up this far. I'll come up with a more robust solution for the next PCB revision.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.