Attenuator

"Attenuator" is just a fancy word for voltage divider. This hack will not win many points for beauty:
attenuator_1
Enclosed in a box it looks nicer 🙂
attenuator_2

This attenuator goes between two op-amp circuits where I figured the first circuit will be able to drive a 10 kOhm load, and the input impedance of the second circuit is high enough not to load the voltage divider too much.

The back-of-the envelope design called for six voltage dividers with log-spaced attenuation between -6 dB and -40 dB. The input and output are connected to a 2-pole 6-position rotary switch that selects which voltage-divider is in use. The measured attenuation differs from the design by about 0.5 dB at most. For a large input-signal at the -6 dB attenuation setting the -3 dB bandwidth is about 600 kHz.

Design spreadsheet:
attenuator_design

Laser noise

I've been measuring the beat-note (wikipedia talks about sound-waves, but it works for light-waves too) between two HeNe lasers. It jumps around maybe +/- 5 MHz quite rapidly which is not nice at all:

One laser is a commercial stabilized laser (I've tried both a HP5501A and a Mark-Tech 7900), and the other laser is a tunable one which I want to use for my experiment. But with this much jumping around the tunable laser is no good for the experiment I want to do 🙁

A second photodiode amplifier PCB

I made this PCB for a second photodiode amplifier today. This one is designed for higher light-levels and higher bandwidth. I will post the schematics along with measurement data when I've tested the circuit.

beat_amp_pcb_bottom beat_amp_pcb_top

The V-cutter is designed to cut a slot that is nominally 8 mils (0.2 mm) wide, but the actual cut-width depends on how the z-axis is adjusted. Removing the ground-plane copper from under the high-speed op-amps is supposed to minimize stray capacitance.

Photodiode amplifier assembly

Some assembly of the PCB and enclosure for the first photodiode amplifier has happened today. Soldering the surface-mount components under a microscope was mostly easy - but trying to solder larger parts that require significant heating with the same tiny soldering iron used for small SMD parts was a mistake. The big parts were easy once I switched to a bigger soldering iron, but the BNC-connector was already a mess by then.

13010007

On the left a BNC connector. The black box in the middle is a DC-2-DC converter that produces +/-12VDC outputs from a single +9...18VDC input. The transimpedance amplifier on the right is based on an ADA4817 op-amp and is housed inside an RF screening can. On the far right is a white TO-18 socket for the photodiode.

13010009

The underside of the board has 7805 and 7905 voltage regulators that produce stable (hopefully!) +/-5V supply voltages for the op-amp.

13010010

Here two holes have been drilled in to the back-plate for the BNC-commector (ca 12.2 mm diameter) and a DC-input jack (5.5mm diameter with a 2.5mm pin). The PCB is attached to the back-plate and slides into the body, while the photodiode looks out through the hole of the face-plate.

The only setback was a disagreement between the 1-2-3 pin-sequence in the datasheet vs. my PCB-software for the SOT-89 packaged 7905 negative voltage regulator. If you look closely you can see it is soldered up-side-down on this board because the PCB footprint is wrong.

PCB Milling

I'm making photodiode (transmipedance) amplifiers, and here is the first PCB being milled today. In the foreground a test-run where the cutter-height was too low resulting in too thin or vanishing PCB-traces. Note how the PCB material is not held in place along the Z-axis at all. The PCB-blank is just located in X/Y on the table using two locating pins/holes. In the Z-direction the idea is that the pneumatic cylinder pushes the lower flange of the spindle into contact with the PCB-material, and the exact cutter-height is adjusted relative to this flange only.

The toolchain is (old!) commercial software: PADS PowerLogic for schematic design, PADS PowerPCB for PCB-design, CircuitCam for converting the gerbers to HPGL, which BoardMaster uses to drive the mill (over RS232).

pd_amp_pcb_top pd_amp_pcb_bottom

For general purpose 3D CAD at work we have Vertex (a Finnish Inventor/SolidWorks clone) and I used it to draw a model of the amplifier:
pd_amp_assembly pd_amp_exploded

The size of the PCB and enclosure is mostly limited by how much of the powersupply one wants on-board, and how big connectors one wants to use. I'm using a standard BNC connector (SMA would have been smaller). The board is powered by a +9...18VDC supply which is DC2DC converted into +/-12 V and then regulated to +/- 5 V for the op-amp circuit. The box at the front is an RF shield for the amplifier itself. Light enters through an 8 mm hole in the face-plate and hits a TO-18 mounted photodiode. More on the circuit later.

The enclosure is 48 mm in diameter with a 16 mm thick face-plate, a 4 mm thick back-plate, and the body (55 mm length) bored out to an inner-diameter of 34 mm. The body should fit a 25x54mm PCB. The end-plates are attached to the body with five M3 screws on a 40 mm diameter bolt-circle. There is an M6 thread on the bottom of the face-plate, for attaching the amplifier to an optical-table or other instrumentation. I made two of these from 50 mm aluminium round-bar on a manual lathe and mill (using a rotary table for the holes/threads).

pd_amp_enclosure

Note: for manual machining five evenly spaced holes the angle-sequence is: 0 - 72 - 144 - 216 - 288 - 0.

I'm thinking about polishing these a bit and then anodizing them. But for RF-shielding the contact-surfaces of all three parts would then have to be sanded/milled-down after andoizing. to ensure good electrical conductivity between the parts.

2012 Exercise statistics

2010 2011 2012
Running (km) 1133 1053 1132
- Half-marathons 3 (2:12, 1:57, 1:50) 1 (1:53) 1 (1:42)
- Marathons 1 (4:42) 1 (4:13) 1 (4:00)
- Orienteering (events) 0 7 30
0-km weeks (no running at all) 12 8 11
Cycling (km) ~100? 2924 1853

The running kilometres include orienteering. Some goals for 2013:

  • 1:3x half-marathon.
  • 3:4x full marathon.
  • >3000km cycling. A 200km brevet ride would be nice.

See also: 2011 statistics

LPKF Protomat S91 PCB-mill

Update: here's a picture of how the original spindle looks like.
lpkf_protomoat_original_spindle

By popular demand, some pictures of the modified LPKF Protomat S91 PCB-mill (featured here). The spindle assembly on this mill has been re-built. The original has an LPKF spindle motor and a solenoid for pushing/pulling the spindle up/down along the Z-axis. This modification uses a Proxxon spindle and an air-cylinder for the Z-movement.

overview 

overview2

These two pictures shows the spindle from the front. Pressurized air is input to the valve which routes it either to output A or B. This pushes the air cylinder either to the UP or DOWN position. The cylinder pushes on an aluminium plate to which the spindle motor is attached. The moving plate is guided by a linear bearing. A screw at the top of the linear bearing allows adjustment of the Z-depth of the DOWN position. A spring at the top also helps with pushing up the spindle.

cutter

 

This picture shows the cutter. A vacuum cleaner attaches to they grey tube, and sucks away all chips produced during drilling and milling. A cylindrical cover or "door" around the spindle (now open for tool change) is rotated shut when the machine runs.


connections

This shows the electrical connections. The modification of the spindle involves connecting a cable from the second connector from the right to a custom-built relay box. Otherwise the connections are as on a standard machine.

relay_box

 

This shows the relay box. The cable from the base of the machine is used to control three On/Off devices: vacuum-cleaner on/off, spindle-motor on/off, and Z-axis up/down. The spindle-motor and vacuum cleaner connect to standard AC-mains sockets. The Z-axis up/down control signal is connected to the air-valve on the spindle assembly.

spindle
up_down

Some additional views. Note how small the required Z-movement is.

z-cylinder
z-cylinder2

These pictures show the air-cylinder.

 

Dual-needle pyVCP meter

dual_meter

By popular demand, a quick hack that modifies the pyVCP meter widget to have two independent needles. It's used inside the <meter> tag by specifying <halpin2>"my2ndpin"</halpin2> and hooking up something to that pin. If <halpin2> is not used meter works as before, showing only one needle.

There's an XML file for this test-panel, a short HAL-file that hooks up the pins, and a shell script to run it all here: pyvcp_dual-needle-test

The modifications to linuxcnc source required are in lib/python/pyvcp_widgets.py: 0002-dual-needle-meter-use-with-halpin2-meter2-halpin2.patch
NOTE: This is a quick hack to make it work - don't take my code/patch too seriously...

Thursday manual milling

I made this ca 78x48x31 mm mount for a Faraday Isolator (Model IO-7-633 Optics For Research, now sold by Thorlabs) from 50x50 Aluminium bar on the manual mill at work. It raises the isolator up from the table by 31 mm. The isolator is attached to the mount with two M6 screws, 28 mm apart. The cap-head screws are countersunk so they don't protrude from the bottom. This mount is clamped to the optical table using the 8x5 mm slots in the sides.

Real-Time Tuning

I tried a number of things that are supposed to improve real-time performance, as described in this forum post.

But not much changed. This series of jitter-histograms shows little or no changes:

0 1 2 3 4

The things I tried are roughly

  1. measure first latency histogram 0.png
  2. uninstall the package irqbalance using synaptic. reboot.
  3. measure 1.png
  4. in /etc/default/grub modify GRUB_CMDLINE_LINUX_DEFAULT="isolcpus=1 acpi_irq_nobalance noirqbalance"  (Aside: why are the files in /etc/grub.d/ made so incredibly hard to read? Someone should re-write them in Python!). Run sudo update-grub. reboot.
  5. measure 2.png
  6. Add irq-affinity.conf to /etc/init/
  7. Add set-irq-affinity and watchirqs to /usr/local/sbin. reboot
  8. measure 3.png
  9. Try to tweak BIOS settings. Turn off power-saving features, etc.
  10. measure 4.png

The output of watchirqs looks like this:

watchirqs_before_boot watchirqs_last

The scripts mentioned above: irqstuff