Limpkin's blog - Tag - nanosecond<div>An electronics geek blog, dedicated to sharing and open source. Check out my stores: <a href="https://lectronz.com/stores/stephanelec" hreflang="en" title="Lectronz store">EU</a> / <a href="https://www.tindie.com/stores/stephanelec" hreflang="en" title="tindie store">EU & US</a>.</div>2024-03-29T00:41:47+00:00Mathieuurn:md5:51de6a3d917257edeff5a252fe925b02DotclearAmplifying nanosecond pulses for quantum physics experimentsurn:md5:90942678a510e53122b929c867c4fcc22013-03-30T14:55:00+00:002023-04-14T13:52:40+01:00limpkinMy ProjectsGHzHigh speednanosecondopamp<p>Have no fear... even if this project sounds complex, you'll easily learn in this article many things about high speed electronics and PCBs.<br />
In fact, my goal here is to teach you some basics about all the new problems that arise when you're dealing with GHz signals :-) .<br /><br />
<img src="https://www.limpkin.fr/public/high_speed_project/.PCB_heatink_m.jpg" alt="PCB with cabinet and heatsink" style="display:table; margin:0 auto;" title="PCB with cabinet and heatsink, mar. 2013" /></p> <p>As you may have guessed, this is a work related project. Luckily, I didn't need to understand the quantum physics experiment my colleagues wanted to make in order to build this board :-D .<br />
Anyway, to put things simply, this project consists in amplifying <strong>the measured light intensity difference between two photodiodes</strong> (both receiving less than nanosecond long pulses).<br />
In my case, I chose to go for an operational amplifier (op-amp) based system (mainly for its ease of use), but FET based solutions would have worked as well (but they might have been more fragile).<br /><br /></p>
<h2>Basic principles<br /><br /></h2>
<p>First, a few things that we need to be aware of.<br />
1) The output of a photodiode is a function of <strong>current</strong>. As we want the output of our amplifier to be a voltage, we actually need to make a <strong>transimpedence amplifier</strong> (alias a current to voltage amplifier).<br />
2) Most high speed op-amp are using <strong><a href="http://en.wikipedia.org/wiki/Current-feedback_operational_amplifier" hreflang="en" title="current feedback">current feedback</a></strong> instead of conventional <strong>voltage feedback</strong>. Therefore, their inputs impedance are lower.<br />
3) Most of the characteristics of an op-amp will vary depending on the gain you set.<br />
4) As we are dealing with <strong>pulses</strong>, the most important parameter of the op-amp you need to look at is its <strong>rise/fall time</strong> rather than its bandwidth.<br /><br /></p>
<h2>Design choices<br /><br /></h2>
<p>You may ask: how can an op-amp have a <strong>"</strong>slower<strong>"</strong> rise time than its 1/3*bandwidth?<br />
Well my guess it that the fourrier transform of the fastest signal rise contains higher frequency components than ~3 times its rise/fall time (up->down->up) due to its gaussian-like shape. This may not be true with tiny output signals.<br />
Anyway, the best op-amp I found out there at the time was the <a href="http://www.ti.com/product/ths3202" hreflang="en" title="THS3202">THS3202</a> from Texas Instruments so I went for it.<br />
However, as it is a current-feedback operational amplifier, we had to take care of its <strong>inputs impedances which are quite low</strong>.<br />
Therefore, this conventional op-amp based transimpedance amplifier wasn't possible:<br />
<img src="https://www.limpkin.fr/public/high_speed_project/transimpedance_amplifier.jpg" alt="transimpedance_amplifier.jpg" style="display:table; margin:0 auto;" title="transimpedance_amplifier.jpg, fév. 2013" />
Moreover, as we needed a total gain of at least <strong>100</strong>, because of the previously explained reasons, I had no other choice than to <strong>cascade three op-amps</strong>, each one of them having a 5x gain, adding up to a total 125x gain.<br /><br /></p>
<h2>The schematics<br /><br /></h2>
<p><a href="https://www.limpkin.fr/public/high_speed_project/schematics.png" title="schematics.png"><img src="https://www.limpkin.fr/public/high_speed_project/.schematics_m.jpg" alt="The schematics" style="display:table; margin:0 auto;" title="schematics.png, fév. 2013" /></a>
Don't be overwhelmed ;-) .<br />
As the voltage variation we want to measure (at the node between D1 and D2) is around <strong>1 mV</strong>, <strong>parasite filtering is the key here</strong>.<br /></p>
<p>Here are all the techniques used:<br />
- <strong>ferrites</strong> are chosen to filter all the DC voltages going to key components (diodes, op-amps, re-biasing stages), with decoupling caps before and after them. These ferrites should be RF specified, as we'll need a high impedance at high frequencies.<br />
- to filter the input DC voltages, L12->L17 actually are <strong>dedicated LC filters</strong> that have a third pin that needs to be grounded.<br />
- we used very low noise LDOs instead of step-downs to avoid the <strong>switching noise</strong> to be introduced in the rest of our system<br />
- we bought a <strong><a href="http://www.digikey.com/product-detail/en/36503605/732-2499-ND/2337474" hreflang="en" title="shielding cabinet">shielding cabinet</a></strong> that will be placed <strong>on top of the PCB</strong> to <strong>shield it from RF signals</strong>. It should be connected to the shielding ground.<br />
- (in an ideal case) the <strong>ground inside the cabinet should be connected through a single connection to it (and therfore to the ground outside the cabinet)</strong>.<br /></p>
<p>The reason for the last point is that we should provide a single shielded ground to all the sensitive components. It should be a non-perturbated reference for all of them.<br />
However, because our ouput is <strong>single ended</strong>, the signal is coming back through the <strong>cable shielding</strong>. Therefore, the ground on the connector needs to be the same as the op-amp's.<br />
If the output had been <strong>differential</strong> (one coax for the signal, another for the return), then the <strong>cables shielding and connector ground would be connected to the cabinet's outside ground</strong>. The signal ground would only be present in a tiny space (inside the cabinet) shielded from possible perturbations.<br />
<a href="https://www.limpkin.fr/public/high_speed_project/cabinet.png" title="cabinet.png"><img src="https://www.limpkin.fr/public/high_speed_project/cabinet.png" alt="cabinet.png" style="display:table; margin:0 auto;" title="cabinet.png, fév. 2013" /></a>
A few words about the signal path.<br />
In these schematics, the transimpedance stage is made using a <strong>simple variable resistor</strong> connected to the ground. At the node, we are AC coupled with the positive input of our operational amplifier and a <strong>rebiasing stage</strong>.<br />
This has the main advantage of (if we wanted) to have different grounds for the diodes and the opamps. Moreover, as the choice of the opamp feedback resistors is <strong>dictated by its datasheet</strong>, we can get a <em>relatively</em> high impedance at the node, as we don't need to connect the node to the negative input of our opamp, as a normal transimpedance amplifier would need.<br />
You'll also see a <strong>second</strong> rebiasing stage, as the biasing voltage at R10/R11 may not be <strong>exactly 0V</strong> (due to the input bias current of the opamp) and therefore could be <strong>amplified</strong> by 25.<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/small_signal_frep.png" title="small_signal_frep.png"><img src="https://www.limpkin.fr/public/high_speed_project/small_signal_frep.png" alt="Small signal frequency response of the THS3202" style="display:table; margin:0 auto;" title="small_signal_frep.png, fév. 2013" /></a></p>
<p>You can see in this graph that depending on the feedback resistor, you actually can <strong>amplify the high frequency components</strong> of your signal, which was quite convenient in my case.<br />
Again, <strong>follow the guidelines of the op-amp datasheet</strong>, as you can't really use any resistor value you want under penalty of having an <strong>unstable</strong> circuit.<br />
To be sure of our bandwidth, I made a low pass filter using a capacitor in parallel with the feedback resistor. However, <strong>resistors have a parasitic capacitance of ~0.2pF</strong> so you need to take this into account.<br />
<strong>Parasitic capacitance</strong> is our biggest enemy. As we are dealing with GHz signals, you'll need to put a small resistor in series with the opamp output. Otherwise, it'd be like the opamp was <strong>driving a (parasite) capacitor</strong>, which can generate a high frequency ringing.<br />
The rest of the circuit is pretty much straight forward. There are two LDOs for each + or - Vcc simply because one can't provide enough current for two op-amps.<br /><br /></p>
<h2>The schematics - version 2<br /><br /></h2>
<p>As it turns out, when testing the PCB the <strong>first op-amp was oscillating by itself at 550MHz</strong>.<br />
One of the reasons I thought of was that setting so much gain on the amplifier <strong>created a positive feedback on the power supply</strong>.<br />
Because there's a load at the output of the op-amp (which is +/- <strong>required</strong> for a current feedback op-amp), any oscillation creates a load on the power supply and therefore a drop in voltage, which can be amplified by the operational amplifier if the <strong>power supply rejection ratio</strong> is not high enough. <a href="http://e2e.ti.com/blogs_/b/analogwire/archive/2013/02/01/xavier-ramus.aspx" hreflang="en" title="oscillating circuit">Here</a> is a very interesting article about that.<br />
The solution I thought at the time was therefore to <strong>spread the gain</strong> over the 4 op-amps.<br />
The guys at texas instruments also provided me with some useful advices:<br /></p>
<blockquote><p>The most likely cause for the ringing you observe would be the light compensation of the THS3202 in a gain of +5V/V. The datasheet, figure 10 & 11, shows ~2dB of peaking for 340ohm in the feedback resistance. The capacitor across the feedback resistors, C8, C10 & C16 may help flatening the response, but in general it is not a recommended implementation for a current feedback amplifier as it may destabilize it. The first THS3202 is likely to exhibit the problem more as there are 2 stages with the same peaking adding the overall peaking for that stage.
I would recommend removing C8, C10 and C16 and increasing the feedback resistances to 420ohm. Rg would then be 105ohm.
I notice the output of Amp A directly feeds into the + input of Amp B on both stages. In theory this is fine as the + input is high impedance. However, the input does have capacitances associated with it which can impact high frequency stability of the driver amp. It is recommended to place a 49.9-ohm resistor in series on each output to + input.</p></blockquote>
<p>which lead to the second version of the schematics:<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/schematics_v2.png" title="schematics_v2.png"><img src="https://www.limpkin.fr/public/high_speed_project/.schematics_v2_m.jpg" alt="schematics_v2.png" style="display:table; margin:0 auto;" title="schematics_v2.png, fév. 2013" /></a></p>
<p>You'll also notice that I added <strong>another decoupling 1nF capacitor</strong> to the opamps (better suited for <strong>higher frequencies</strong>), and also 500ohms loads on each op-amp. Adding the extra capacitor will also prevent our main capacitor from behaving like an oscillator (yes... this happens!).<br /><br /></p>
<h2>The "schematics" - version 3<br /><br /></h2>
<p><a href="https://www.limpkin.fr/public/high_speed_project/ringing.JPG" title="The op-amp ringing"><img src="https://www.limpkin.fr/public/high_speed_project/.ringing_m.jpg" alt="The op-amp ringing" style="display:table; margin:0 auto;" title="The op-amp ringing, mar. 2013" /></a></p>
<p>As it turns out, when receiving the second version of my PCB the <strong>ringing was still present</strong> (damn it!).<br />
However, I found the problem in less than an hour: the max <strong>quiescent current</strong> of one op-amp channel is <strong>so high that the THS3202 will get quite hot and then start to oscillate by itself</strong> (I love cold sprays!).<br />
To give you some numbers, as I'm using +7/-7V to power the op-amps and the max quiescent current of one channel is <strong>21mA</strong>, the total power that needs to be dissipated is therefore 14*0.021*2 = <strong>0.588W</strong>. This is quite a lot for a SOIC package that doesn't have <strong>good package dissipation ratings</strong>. I therefore had to add a homemade heatsink on the op-amps.<br /><br /></p>
<h2>The PCB<br /><br /></h2>
<p><a href="https://www.limpkin.fr/public/high_speed_project/PCB.jpg" title="The PCB"><img src="https://www.limpkin.fr/public/high_speed_project/.PCB_m.jpg" alt="The PCB" style="display:table; margin:0 auto;" title="The PCB, mar. 2013" /></a></p>
<p>When routing a circuit board containing high speed signals, there are a few rules to follow:<br />
- keep <strong>traces (very) short</strong><br />
- have an uninterrupted ground (and power) plane in one of the layers<br />
- try to keep power supplies away from analog signals<br />
- have a "natural signal flow" from the source of the signal to the end (quite subjective right?): no sharp turns, etc etc<br /></p>
<p>For long traces, depending on your components, you may need to design 50ohms traces (there are many calculators online for that) to be sure that all the transmitted power is correctly <strong>absorbed and not reflected</strong>.<br />
When routing, you should imagine that all your traces are <strong>inductors</strong>. Therefore, in a two layers setup, Vcc should respect this path: Vcc -> decoupling cap's pin -> component's pin.<br /><br /></p>
<h2>The assembly<br /><br /></h2>
<p><a href="https://www.limpkin.fr/public/high_speed_project/assembly.JPG" title="Assemblying the PCB"><img src="https://www.limpkin.fr/public/high_speed_project/.assembly_m.jpg" alt="Assemblying the PCB" style="display:table; margin:0 auto;" title="Assemblying the PCB, mar. 2013" /></a></p>
<p>As there is an uninterrupted ground plane on the bottom layer, the <strong>thermal inertia</strong> of the PCB is quite huge.<br />
If you're doing the same kind of PCBs, I advise you to buy a <strong>pre-heating</strong> station to heat your PCB to 60° celsius so <strong>soldering will be easier</strong> ;-) .<br /><br /></p>
<h2>The cooling<br /><br /></h2>
<p><a href="https://www.limpkin.fr/public/high_speed_project/heatsink.JPG" title="The heatsink"><img src="https://www.limpkin.fr/public/high_speed_project/.heatsink_m.jpg" alt="The heatsink" style="display:table; margin:0 auto;" title="The heatsink, mar. 2013" /></a></p>
<p>As previously mentioned, the THS3202 will get so hot that it will start ringing by itself. I therefore made a heatsink to make the SOIC <> cabinet contact.<br />
And on top of the cabinet, I added another heatsink:<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/PCB_heatink.JPG" title="PCB with cabinet and heatsink"><img src="https://www.limpkin.fr/public/high_speed_project/.PCB_heatink_m.jpg" alt="PCB with cabinet and heatsink" style="display:table; margin:0 auto;" title="PCB with cabinet and heatsink, mar. 2013" /></a></p>
<p>The reason why I chose the THS3202 in a SOIC package instead of MSOP (that has <strong>a heatpad</strong>) is that I <strong>didn't want to interrupt the ground plane</strong> to cascade the two op-amps in the chip.<br />
As there is no heatpad, the trace connecting the two op-amps is under the chip (red traces):<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/cascading.png" title="Cascading the op-amps"><img src="https://www.limpkin.fr/public/high_speed_project/.cascading_m.jpg" alt="Cascading the op-amps" style="display:table; margin:0 auto;" title="Cascading the op-amps, mar. 2013" /></a></p>
<p>For future versions we will use a <strong>4 layers PCB</strong> and the THS3202 in the MSOP package, especially now that <a href="http://www.seeedstudio.com/depot/fusion-pcb-service-4-layers-p-1383.html?cPath=185" hreflang="en" title="seeedstudio 4 layers service">seeedstudio</a> has a 4 layers service. The heat will therefore be directly <strong>dissipated in the ground plane</strong> and we won't need all these fancy heatsinks.<br /><br /></p>
<h2>The cooling V2<br /><br /></h2>
<p>Well, it turns out that this cooling "sandwich" was not optimal and that the THS3202 would also oscillate (damn it! bis).<br />
This is mainly explained by the fact that the cabinet is <strong>not a good thermal conductor</strong> and also because there is a <strong>big temperature difference between the die inside the SOIC and the top of the package</strong> (called junction temperature).<br />
I therefore lowered the supply voltage to +5/-5V, found an aluminium 2cm plate and used my favorite CNC:<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/homemade_heatsink.JPG" title="CNC made heatsink"><img src="https://www.limpkin.fr/public/high_speed_project/.homemade_heatsink_m.jpg" alt="CNC made heatsink" style="display:table; margin:0 auto;" title="CNC made heatsink, avr. 2013" /></a><br /><br /></p>
<h2>The fancy box<br /><br /></h2>
<p>As mentioned in the title, this PCB will be used by physicists. I therefore needed to make a "fancy" enclosure to protect the circuit from what may happen.<br />
I actually adapted my PCB outline dimensions so it could fit in a box I had found on digikey. This particular box had grooves on the inside ;-) . <br />
I then just needed to machinate the different openings:<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/CNC_machining.jpg" title="CNC"><img src="https://www.limpkin.fr/public/high_speed_project/.CNC_machining_m.jpg" alt="CNC" style="display:table; margin:0 auto;" title="CNC, mar. 2013" /></a><br /></p>
<p>to get this final result:<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/full_box_front.JPG" title="Complete project - front"><img src="https://www.limpkin.fr/public/high_speed_project/.full_box_front_m.jpg" alt="Complete project - front" style="display:table; margin:0 auto;" title="Complete project - front, avr. 2013" /></a><br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/full_box_back.JPG" title="Complete project - back"><img src="https://www.limpkin.fr/public/high_speed_project/.full_box_back_m.jpg" alt="Complete project - back" style="display:table; margin:0 auto;" title="Complete project - back, avr. 2013" /></a><br /><br /></p>
<h2>Final rise time<br /><br /></h2>
<p>Finally, we set up our experiment table and looked at our rise time:<br /></p>
<p><a href="https://www.limpkin.fr/public/high_speed_project/result_risetime.JPG" title="Rise time"><img src="https://www.limpkin.fr/public/high_speed_project/.result_risetime_m.jpg" alt="Rise time" style="display:table; margin:0 auto;" title="Rise time, avr. 2013" /></a><br /></p>
<p>If you look at the top trace, we measured in average around <strong>950ps</strong>, which is not bad at all :-) ;</p>