All posts by Simon

ADCMP580 Ultrafast Comparator: it’s really fast!!

Some experiments with a tiny part that has remarkable qualities: the Analog Devices ADCMP580. It is a comparator, and a very fast one indeed, based on a SiGe semiconductor.

adcmp580 features

Its features are true extraordinary – everything specified in GHz and picoseconds.
Well, can this be made work without a lot of money invested in a special HF or microwave board? Yes, it can. You just have to keep the wires short:

adcmp580 board

This test board was constructed by first soldering thin wires to the chip, and then mounting it on a small piece of perf board, with some epoxy glue. The output is wires, within less than 2 mm, to a (50 Ohm) SMA connector.

adcmp580 schematic

Measuring the performance characteristics is not an easy task. I used a 54750a sampling scope, with a 54751a 20 GHz bandwidth plug-in.

The comparator is fed by a 8642b signal generator, which is also used to trigger the 54751a plug-in.

At the output, a 13.5 dB attenuator is used, at least for some of the tests, to get best output SWR (to avoid issues caused by reflected signals). However, as it turns out, the 54751a has quite reasonable input SWR, and the connecters are better than it first seemed. So the attenuator can be left out. Still good to have some attenuators at the 54751a input, remember, this can only handle +-2 V, and no ESD!

adcmp 500 mhz square

adcmp 2 ghz square

In these tests, “squaring up” a 500 MHz and 2 GHz (!) signal. Rise and fall time are about 50 ps, not bad at all for the simple construction.

adcmp fft

FFT shows bandwith to 10 GHz and up.

Output power is also quite useful, 400 mV Vpp.

LinuxCNC EMC2 HAL Files: 3 axis mill, 2 axis lathe with encoders, jog wheel, axis compensation, camera view

Due to frequent requests – here are the configuration files for my LinuxCNC (EMC2) controlled mill and lathe.

The mill is a 3-axis machine, with stepper motors and jog wheel (see earlier post).

emc2 linuxcnc fkm 3 axis mill hal with jog 150101

The lathe has 2 axis, stepper motors, and digital readouts. No feedback on the readouts, but they are great for highest precision work. Configuration files also include the setup for spindel-synchronized movement and spindle speed readout. I have run spindle-synchronized toolpaths for cutting regular and tapered threads with no issues at all, up to a few 100 RPM. The GUI (axis) is also configured for use with a little camera that is very handy to set the coordinates of the tools.

emc2 linuxcnc jet lathe with optical scale and spindel index 150101

Any questions, please ask. These files are meant as a source code collection for you to code your own HAL files, etc.; if you need help with a particular configuration, feel free to contact me.

Please consider that some fragments of the code might be copyrighted by others – however, I have modified it so many times that it is virtually impossible to trace back.
My contribution to these HAL files: You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. The work may not be free of known copyright restrictions in all jurisdictions. Persons may have other rights in or related to the work, such as patent or trademark rights, and others may have rights in how the work is used. I make no warranties about the work, and disclaim liability for all uses of the work, to the fullest extent permitted by applicable law.

Rong Hua (Bianhuan) “50 Watt” Travel Adapter: not enough iron, for this “wattage”

In interesting find, Made in China, a 50 Watt travel adapter.

autotrans sc-20c a

autotrans sc-21c

autotrans sc-21c receptacle

autotrans plug

This is used to convert 220 V (despite the US plug!) to 110 V – same device also seems to exist for conversion from 110 to 220 V.

The build quality is exactly what you expect for less than USD 7. A crude plastic case, two screws, no protection circuits or fuses, and a rather small transformer.

autotrans inside

Total weight of the transformer – about 140 g.

Looking at some transformer tables, this is about 6-10 VA (=”Watt”, if you wish) nominal size. For autotransformers like this, the nominal size needs to be converted to the actual power rating, by using the conversion ratio (voltage ratio). P_nominal=P_actual*(1-voltageratio). I.e., for a 220 to 110 Volts transformer, the ratio is 0.5, and a 10 VA nominal transformer can handle 20 VA if configured as an autotransformer.

Quite obviously, 20 VA is not 50 VA – please use these these transformers with great caution, and only for really small appliances. Never leave it plugged in unattended, it might catch fire any time if overloaded, or if it fails!

HPAK 8642B Synthesized Signal Generator: backlight replacement

The 8642B is an excellent generator, very clean, at least at offsets >1 kHz, hard to beat. It is also very heavy, thanks to a special modular concept that HP was pushing at the time. Their intention was to make the unit more serviceable, with the result that the generator is super heavy, and so expensive that it never was a real commercial success for HP. Frequency range is from below 100 kHz, to 2115 MHz. Pretty useful, with amplitudes from -140 dBm to 20 dBm.

The generator has a rather large (for the time) LCD display – fully story can be found in the HP Journal, December 1985.

backlight assy

backlight detail

The backlight has a very thoroughly designed light diffusor, which directs light from two 5V axial bulbs evenly to the LCD. Sure enough, these bulbs can burn out.

Some webpages claim that such bulbs would only last a few 100, maybe 1000s of hours, but such statements are incorrect. The bulbs used, 5 V, 115 mA, will typically last about 40000 hours, much longer than common household light bulbs.

bulb
t-1 axial lamp

These little bulbs have 1.9 Lumen each, not bad. To replace with a LED, 14000 mcd, at 25 deg angle, are about 2.2 Lumen. Close enough.

Found some 3 mm superbright white LEDs:

ligitek superbright 3 mm white

0.04 USD each!! Amazing!

Also these won’t least forever, white LEDs do lose intensity over time, like, 50% remaining intensity after 20000 hours.
I decided to run them below the rated current, at about 16 mA (120 Ohm series resistor with 5.2 V supply). Maybe this will make them last a bit longer.

Note that the backlight is software-controllable (special functions 134 and 234). This is how it is implemented (let me know if you need to full schematics of the 8642A or 8642B):

8642b backlight driver

The resistors (1.8 Ohm) make sure that the lamps operate at 5.0 Volts, not 5.2 Volts, and don’t interfere with the operation of the LEDs. Quite amazingly, running at 5.2 V vs. 5.0 V would reduce the life span from 40000 hours, to 25000 hours!

5-0 volts bulb
5-2 volts bulb

Agilent sold these bulbs for about USD 18 each!!

No mechanical modification of the 8642B at all, the LED and the resistor fit well into the cavity (don’t worry about the lens of the LED – the light will find its way.

8642b backlight mod

The result:

8642b backlight uneven

– not to my full satisfaction (non-uniform brightness, looks a bit dark on the left hand side, albeit, very easy to read).

After a bit of head scratching – turns out I soldered in the left LED with incorrect polarity – so it can’t work.

With this little mistake corrected, all is good:

8642b backlight

Now, let’s hope that these LEDs will last. Never mind, I have a bag of spares!

Note: the display assembly is said to be rather ESD sensitive. Make sure not to damage it!

Homemade Hard Candy: sugar free extra-strong eucalypt-menthol

In winter time, nothing better than some low-calorie, strongly flavored candy. It works against germs, improves general health and well-being, and preparing such candy yourself is fun, and you can make them ‘extra-strong’.

That’s how it works. First, you need to get some isomalt. Isomalt is a sugar alcohol – much less (about half) of the calories than regular sugar, it doesn’t attack your teeth, and is slowly metabolized by the human body (doesn’t lead to spikes of you blood sugar level). It is sweet, but not quite as sweet as sugar. No metallic after-taste, it is purely sweet. And, it is non-hygroscopic (it will not absorb water when stored), resulting in less sticky mess, and eliminating the need to wrap each and every candy separately.
This makes isomalt a nearly ideal ‘carrier substance’ for any flavor.

candy isomalt

Take about 150-200 g of isomalt, and melt in a small cooking pot. Ideally, use an electric stove – don’t overheat! Stirr!

candy melting isomalt

Once everything is molten, pour onto a silicon baking pad, or siliconized/non-stick (lightly oiled – vegetable oil) paper.

candy sf molten isomalt

Watch out! This is dangerously hot stuff – it can cause severe burns! Keep children away! I always wear a pair of cotton gloves for isolation, and a pair of rubber gloves on top.

Now, the tricky part. Using a metal blade, knife, or similar tool, move the molten isomalt around, outside in, until it is cooling down a bit, and getting more viscous. This requires some practice.

Next, most important step – addition of the flavor.

candy eucalyptus oil

candy menthol

The flavor – a saturated solution of (-)-Menthol in Eucalyptus oil (this is about a 1:1 ratio). This is best done directly in a pipet bottle, very handy for easy dosing. The active ingredient of Eucalyptus oil, 1,8-Cineol is a really great compound, it kills bacteria of all sorts, and constitutes about 80-85% of the oil.

Menthol –
menthol

1,8-Cineol –
cineol

The right time to add the flavoring is reached when the viscosity is just about high enough to handle the molten isomalt with your hands (make sure to thoroughly lubricate the gloves with neutral-taste vegetable oil).

The flavoring is put directly on the semi-liquid isomalt, and folded in from the perimeter, to the inside of the melt.

candy folding and pulling

Then, take the candy in your hands, and pull it, fold it, pull it, until it is cool enough to be portioned into candy pieces. Can be a bit hot, but never mind. Once the right temperature/viscosity is reached, timing is everything! Now things have to happen quickly!

Using a strong pair of scissors, with some vegetable oil applied, cut the candy into pieces of adequate size. Rush!

candy cutting

Best use some non-stick paper, and let the candies cool down.

The final step – put them into some nice metal containers for storage. I never store too many in a single container, because they will lose favor more quickly, with a large container being opened all the time to take out a few candies only.

The result of a single batch – you can handle up to 250 g of isomalt in one batch with some practice.

candy sf final

Resistive Power Splitter: trying out a low-cost construction

For leveling of signals, or test that require two tracking channels, like tracking insertion loss measurements, a resistive two-element divider is very handy. These are broad-band, and rather robust devices.

One input, two resistors (50 Ohms each), in series with two outputs.

Such devices are available from various suppliers, and cost anywhere from 25 to 300 USD, depending on level of precision and frequency range.

Why not try to build one yourself, with some small 0603 resistors; I used China-made SMA connectors, and 4 pcs of 100 Ohm resistors.

splitter

How does it perform? Well, let’s connect to it a network analyzer and try:

splitter test

Port A through measurement (port B terminated):
thru port a

Port B through measurement (port A terminated):
thru port b

Tracking is pretty good, 0.05 dB @2 GHz, 0.15dB @2 GHz.

ret loss

swr

1.2 input SWR – well, pretty acceptable; might still be able to improve by adding some solder or by changing the length of the pin. Good enough.

Here, some specs of a HP resistive splitter:

hp11667a

DCF77 Frequency Reference: a resonably accurate 10 MHz source

For those out there that need a good 10 MHz source to calibrate their counters – there is an easy method, at least in Europe – the DCF77 transmitter, near Frankfurt. It uses a 77.5 kHz carrier, which is kept very close to 77.5 kHz, all the time, and puts out about 30 kW of power. The carrier is controlled to within 2*10^-13, way better than I need.

To make use of these waves, I build a little receiver, using a tuned circuit, a FET pre-amp (which is located in a plastic case, several meters away from the bench, to avoid interference.
The 77.5 kHz signal is then converted to a square wave by a limiter circuit, and phase-compared to a 77.5 kHz derived from a 10 MHz OCXO. For the OCXO, I used a Piezo brand Model 2920136, but any reasonably good 10 MHz OCXO will do.

piezo 2920136

No need to go to a rubidium oscillator, which will only consume a lot of power and wear out over the years.

dcf77 input

dcf77 limiter

The amplified signal is also available at a rear BNC connector, for troubleshooting, and to find the best spot for the antenna (just connect a scope and align antenna orientation/place for best amplitude).

The tricky part – deriving a 77.5 KHz signal from a 10 MHz source. This requires a fractional divider. First, the 10 MHz signal is divided down to 310 kHz (4x 77.5 kHz), followed by two :2 dividers (74F74 flip-flops). This will give fast transitions, and exact 50:50 duty cycle.

The 10 MHz to 310 kHz divider is implemented using an ATMega8515 (you can use any other microcontroller that can handle a 10 MHz clock). The program does a simple trick – it generates 31 transitions for any 1000 clocks; and it does this with reasonably well distributed jitter.
7 blocks, with 33-32-32-32 cycles; and 1 block with 33-32-32 cycles; in total: 23 sequences with 32 cycles, and 8 sequences with 33 cycles – a total of 1000 cycles over 31 sequences. I am so glad that microcontrollers exist, this would have taken quite a few TTL circuits to realize this hard-wired.

dcf77r_p.c AVR GCC file

dcf77 divider pll

The PLL, build around a 4046 has a long time constant, several minutes, however, you could improve the frequency stability by using a constant of several hours – which is not quite practical, and also not necessary, for the given purpose (to provide a reference that is accurate and stable to better than 1 ppm, and that has a phase stability of better than a few microseconds).

dcf77 aux

dcf77 output

Some auxilliary circuits, for the lock detector, and the outputs. Outputs are TTL, but you can also add some transformers, resonant circuits, etc., in case you need other signals. I found these TTL signal very suitable to lock all kinds of test equipment, and never had any issues with ground loops so far. If you do phase noise measurements, I would recommend to use a local Rb reference anyway, or a free-running precision/low noise OCXO, not the output of this device.

dcf77 view 1
Note the shielding of the input circuit, using some copper clad board. A bit curde but works.

dcf77 view 2

The thing, put into a nice box:

dcf77 front

After some days of monitoring the output phase vs. a GPS-adjusted Rb oscillator – the device is working just fine. There are some phase fluctuations, most likely, due to the propagation of the 77.5 kHz waves, and these cause phase shifts of about 1 µs. Well, just temporary shifts, and by all means good enough to calibrate any OCXO to full resolution.

Why not use a GPS disciplined oscillator, or a Rb oscillator? Well, the GPS signal, who knows when they will shut it down; and it needs a rather facy antenna, and, you can’t build it from scratch (well, you can, but would be a major effort!). Why not a Rb oscillator, well, I actually have a good Rb, but rarely use it, because it needs so much power, and way too accurate for the general tasks at hand – rather have the DCF77 running, which only needs very little power and generates no heat; and, the OCXO won’t wear out so soon!

Oscillator Driver/PLL: tuning fork oscillator

Recently, a “very special” circuit had to be designed – a driver for a mechanical oscillator. The objective – to find the natural frequency of such oscillators, to a very high degree of precision, and at very small amplitudes, in the µm range.
Measurement of the frequency is easily done by a frequency counter – what is needed is a circuit that keeps the oscillator going at a constant amplitude.

The oscillator (a mechanical tuning fork, metal tube) carries a small magnet that can be used, together with a stationary coil, to make is oscillate and sustain the oscillation.
The movement of the tuning fork is sensed by a light gate – an IR emitter diode, and a photodiode.

The oscillator is running at a few 100 Hz, in a very well thermostated environment.

First part, the photodiode amplifier, and signal conditioning circuits.
osc pickup and amp

The second part, the PLL (a classic 4046), and some auxiliary circuitry to provide monitor outputs.
osc pll-vco
For operation at other frequencies – adjust the VCO timing capacitor, or use an external VCO.

The coil driver – and monitor driver, this is a very low power systems, a few milliamps are plenty for the coil.
osc coil driver

Tesla/Voltcraft BK127C Power Supply: a trusty fellow

One of the first pieces of electronic equipment I have ever owned, maybe the very first, a 0-20 V power supply, 1 A max. current. Made for Voltcraft (brand of the “Conrad” electronic mail-order company, popular in Germany), by Tesla, “Czechoslovakia”.

In the mean time, I have 3 of these, and despite the “1 Amp” limit, these are very useful supplies, and there are hardly any circuits that need more than 1 Amp. The output is reasonably low-noise – very similar to other DC supplies or power packs.

bk127c

Build quality is very sturdy, folded steel – and a basic but very reliable circuit, designed around a uA723.

bk127c schematic

Years ago, I had one of the supplies fail on me, when powering a high voltage circuit – this caused the power transistor, a KD606, to fail. Replaced it with a BD317 – working perfectly fine.

The manual – sorry, in German only.
tesla bk127c pwr supply

Braided Bread: German “Hefezopf”

One of the staple foods, at least in the southern part of Germany: Hefezopf – a type of braided bread made with yeast (rather than baking powder), which is sweet but not too sweet – still goes well with eggs, pickles, smoked meet, just give it a try!

To prepare, follow these instructions:

(1) Let 1 kg of wheet flour (general purpose non-bleached flour is prefered), 2 eggs, 125 g of butter warm up to room temperature. If there is no time to let the butter warm up – just cut into small pieces and add to the heated milk later.

(2) Take the 1 kg of flour and put into a large plastic bowl. Using a spoon, make a little hole and add 25 g of yeast (half a standard cube of fresh yeast; add 1 tablespoon of sugar). Alternatively, thoroughly mix with 1 bag of active dry yeast. No need to add too much yeast!

(3) Take 480 mL (about 480 g) of milk and heat to a warm temperature. It should be warm to hot, not just lukewarm.

(4) If fresh yeast is used, add some of the milk, like half a cup, to the yeast and stirr to form a semi-liquid starter; cover with some flour and let sit for 15 minutes to activate the yeast. Skip this step if active dry yeast is used.

(5) Add 125 g of butter, 160 g of sugar, 1/4 tablespoon of salt, 2 eggs and the remaining milk to the bowl. Mix thoroughly, knead for for a few minutes; best done by hand. Add a bit of milk (or warm water) if dough is too stiff. Dough should be rather soft.

(6) Cover with a towel and let rise for about 60 minutes. Avoid air drafts – keep at a warm place. Dough should rise to about double its size.

(7) Knead properly, add a bit of flour if needed.

(8) Split into 4 equal sized strands, and form braided bread.

(9) Pre-heat oven to 165°C, circulating hot air type oven; 180°C, regular oven.

(10) Let braided bread rise for about 15-20 minutes. If golden crust is preferred, cover with a mixture of egg yolk and water (1:1).

(11) Bake for about 30-35 minutes.

(12) Let cool. Don’t cut while still hot!

Not the most beautiful braiding, but, delicious:
zopf

Note: this type of braided bread is ideally suited for freezing – just put in plastic bag. For best taste, don’t store for more than 6 months.