File: readme.txt for pulse_stretch_lockin .sch .rrb A function generator provides the reference signal for the lockin amplifier. It's sync output is a 2V 50ns pulse which is too low and maybe too short to trigger the lockin. The lockin wants >3.5V for a high and <0.5V for a low. Not sure how narrow the pulse can be. A comparator (U1, ADCMP600BRJZ) was used to convert the 0-2V pulse to a 0-5V pulse (output on TP2, COMP). A potentiometer (R2) is used to set the voltage level that the comparator triggers at (level voltage on TP1, Level). I set the level to the midpoint of the input pulse (about 1V). R3 & R4 add about 50mV of hysteresis to the input pulse. By adding the hysteresis one should get a smooth transition even with a slow moving input signal. The input to the comparator is terminated with eight resistors in parallel to form a 50 ohm resistor, A single resistor wasn't used in case this is used with a long 5V pulse. The smallish 805 resistors can't dissipate much power. Without the 50 ohm resistor the fast edges from the pulse generator will cause a reflection which would lead to a distorted pulse and higher voltages (at least temporarily). The 0-5V pulse goes to a one-shot (a pulse generator IC controlled by a RC time constant). The incoming pulse goes through J4 allowing one to select the rising or falling edge to trigger on (i.e. start the output pulse on either edge). R5 & R6 are pull down and pull up resistors to hold the pin in the proper state when not used as the input pin. R7, R8, & C10 control the pulse width. R8 sets the minimum pulse width when R7 is turned down to 0 ohms (about 0.5us). When R7 is turned up all the way (about 10K ohms) the pulse width is about 5us. The output of the one-shot is on TP4 (PULSE). The output pulse is sent to the line driver (U3, SN74ACT244DWR). Since this will be driving a 50 ohm terminated line it needs to put out about 0.1A (5V/50ohms). I tied four of the inputs and four of the outputs together to make sure that it could drive the required current without much droop. When high the output is about 4.7V when terminated with 50 ohms. A BNC-T and 50 ohm terminator is used on the input to the lockin to eliminate reflections. Each IC has multiple decoupling caps close to the IC to minimize power supply fluctuations when outputs are switching. Note: Larger caps can provide more current but respond slower than smaller caps. Ex: a 10uf cap may act like a cap up to about 500KHz. Above that frequency it's inductance dominates and it acts like a smaller capacitor as frequency increases. Smaller capacitors, say 10nf, may act like a capacitor up to about 50MHz before it's inductance dominates. By paralleling different size capacitors they work over a wider frequency range. Ferrite beads (tiny inductors) are used on the power input and to each chip to cut down on HF noise from the power supply or ICs from effecting the power supply. The ferrite beads on the comparator and one-shot has a fraction of an ohm DC resistance. The ferrite beads on the power supply and line driver have less than 0.1 ohms DC resistance for a lower voltage drop at high current. It also has lower inductance (and therefore have less filtering ability) than the ones used with the low power comparator and one-shot. Note: Since I developed and etched the PCBs I made the holes smaller than I would if sending the boards out to be made. I like a tight fit and can always drill the hole larger. If you have the boards made increase the ID (inside diameter) on all through hole parts to compensate for the thickness of the plating on vias (if a multi-layer board) and also add some slop as my home-made library parts aren't perfect and were made assuming I'm making the boards. When printing make sure it's printed 1:1, 100%, or whatever. Some print drivers shrink to fit and everything will be a bit too small. pulse_stretch_lockin_drill_label.pdf shows the drill location. I printed it and cut out the second drill image (2nd from the top) and taped it to the box where I wanted it. I used a center punch to mark the drill locations then drilled out the holes. I then filed the holes a bit to make things match. The power connector, being square, took the most time with lots of putting the PCB in and looking to see if it fits. Once everything lined up I cut out the third image from the top (the label) and centered it with the holes (it helps to back light the holes). I used a piece of clear strapping tape to tape the label in place. I used an exacto knife to cut out the paper where the holes are. Then I put the PCB in the holes hand used the nuts on the BNC connectors to hold it in place.