Category Archives: Electronics

Electronics

Force compensating precision balance: a few very interesting, very rare schematics

With the recent repair of a Mettler AE analytical balance, I never thought that the schematics would be available and obtainable anywhere. Maybe even the Mettler corporation only has some dusty copies in their Swiss secret archive. But, as luck would have it, a very kind reader provided some of the schematics to facilitate repair and understanding of the working principle.

At the time of the balance, like, 40 years back, it was still a challenge (maybe it is still challenging today), to build a mechanical system and ADC converters that are stable in resolution and drift to 1:10E7 counts and similar.

The basic working principle of force compensation and precision balances has long been known from the relevant patents, Sartorius, Mettler, Shimazu and similar. There is position sensor that can very precisely detect the position of the balance, to better than a micron. Then, there is a force coil, a magnetic system similar to a loudspeaker to compensate the force. Various levels and hinges may be involved. Then, there is a current regulation, a current reference, and a ADC to deal with the conversion to digital information. There are also normally temperature sensors to compensate temperature drift. Normally, the balance is continuously measuring the reference current and the coil current, and for best results, always leave it plugged in. Inside, there is some quite heavy aluminum case not only as an electrical shield but to avoid temperature imbalance. Accordingly, even when “switched off” by the front panel switch, these balances are actually internally on, doing their thing.

Key part is the position sensor. It works by a differential pair of photodiodes, and the total photocurrent is kept constant by active regulation (the left opamp), both diodes work vs. ground in essentially short-circuit current mode. Note that at the red point, the currents of both diodes add up (as total flux reaching the diodes) and need to cancel out the current from the 680 k resistor to 15 V rail. One diode, of course, has a resistor in the feedback loop of the right opamp (transimpedance amplifier) that will drive current through the 680 k resistor in its feedback loop to cancel out any differential current of the two diodes (to keep the negative terminal at virtual ground). More precisely, both diodes are keep at constant bias (short circuit) even if the photo current various or is unbalanced. Such setup has very linear response over several tens of micrometers. Rather than the BPX48 diode, you can use better Hamamatsu parts. Normally a small slit is used to illuminate the diodes, say, 30 um. You don’t want to make it too small, otherwise, there will a lot of light needed with associated heat and drift, and you don’t want to make the slit to wide otherwise sensitivity will be less. Certainly good to use a high efficiency light source like the SFH401-2 (15 degree emission angle, IR emitter).

The ADC, it works by an integrator, a reference current source (based on a LM399 high precision reference in some balances!), and a few current switches.

The magnetic coil current is simply regulated by a control loop that has some lead-lag elements similar to a PID regulator (otherwise such loop won’t be stable because of the nature of the electromagnet and phase angle).

Such system is integrated in a custom ASIC. Probably the best solution at the time.

Fake DAC8512, AD8512, Mixup, or both?

The semiconductor industry is quite a bit plagued with counterfit parts, and there are all kinds of variations – plain fakes, parts that work similarly, parts that are actually true and real silicon dies but packaged by someone else, relabeled parts…

Troubled with these parts – clearly marked as DAC8512…

So I took a file and some patience to cut open the thing, until the bare die came to light.

Not easy to read on the picture – but my eyes are still good enough, clearly, there is the Analog Devices logo, and a marking, 17012, AD8512A.

Is this real? Did someone package AD8512 dies (probably sitting around in a box for some time, rejects or aged stock) and then put a DAC8512 label on then?

Found this picture on the web, of a genuine AD8512, decapped by a professional company – clearly, the same die.

No wonder I couldn’t get it to work as a DAC…. It is an opamp.

GHZCTRL6: a new GHz-PLL control board, and a few learnings when prototyping with cheap (fake!) parts

Recently, we have to work with many PLL designs, mostly the frontends, based on ADF41020, ADF5002, ADF4157 and similar circuits, including their programming. So I decided to design a little board that can flexibly interface to all these circuits, and provide enough power.

(1) Power supply to allow 10 V full scale output, 5V supply, 3.3V (or 3V) design. Noise should be low and flat without any discontinuities or peaks.
(2) A pretune circuit with 12 bit monotonous tunable voltage, scaleable to 0..10 Volts to control the main coil current drive of YTOs.
(3) A PLL loop amp to adjust the working range of the PLL FM tune (PLL circuit may provide 0-5 V, but need to have a driver to translate to, say 0-10 V). Used an ADA4048-2 low noise rail-to-rail opamp. These are reliable, and can tolerate somewhat capacitive loads like long cables.
(4) An isolated RS232 (TTL level) interface that can work at any reasonable baud rate (7.3278 MHz will do the trick as MCU clock).
(5) Easily in-circuit programmable, we use a common ATMEGA8L-8 MCU.
(6) Some status LEDs. Say, 3 LEDs.

After not too long, came up with this design and had it manufactured as boards at 40 eurocents a piece(!).

The schematics, they are a bit rough, but if you need more detail, let me know. All fairly standard. The regulators are good old LM317T, with 10 uF bypass caps. This gives reasonably low noise, and we can operate this without special cooling over a wide range of input voltages (15-20 VDC). Current consumption incl. LCD is about 40 mA.

The LCD, any common LCD board will do. I use a 1602A 2×16 character.

After some fiddling around, it is working temporarily. Programmed the ATMEGA8 just fine.

The LCD, it took some in-circuit repairs because after a short time of operation the contrast faded away. Note that this is a 3.3 V LCD that has an ICL7660 to convert +3.3 V to -3 V. But not with this module, just getting about -0.2 V. After replacing the ICL7660, it turned out to be a shorted capacitor (tested 10 Ohm!).

With things working pretty well, soldered in the SMD DAC, a DAC8512 (DAC7761 also works with same pinout and performance). But rather than the expensive parts for production sourced from major distributors, resorted to some low price parts purchased in sets of 10 pcs, and at hand here in my temporary Japanese workshop. Did do much D to A conversion, but rather shorting the inputs to almost ground and consuming lots of power. Not good. Some forensics showed that these are certainly not DAC8512, but something else (with diodes and circuits inside) marked as such. Strangely, from the same reel/cut tape, there are Philippines and China made parts, all a bit scratched and strangely smelling like fake. The laser marking are all the same.

Markings on the Philippines parts:

Markings on the China parts:

I have some genuine parts back in Germany but no picture handy currently. Well, I ordered some more DACs to get this to work, but won’t be an issue, the amplifier is working just fine.

Motorola 2N5160 PNP RF Transistors: new-old-stock, medium old stock, fake stock?

Some of the 1980s, 1990s pulse and signal generators use push-pull power amp stages to provide output levels of +-10 V into 50 Ohms, and similar. These are often discrete circuits, utilizing PNP-NPN small power transistors. While the NPN types are still widely available, there used to be some shortages of 2N5160 PNP transistors. Recently, there are are many offers for “Motorola” branded parts, with datecodes from about 1998 (K98xx) to about 2004 (K04xx). In contrast to the earlier Motorola parts (Rxxxx date codes), these have shiny cases. It is quite unlikely that Motorola actually manufactured RF metal can transistors in 2004… (1999 onwards, Motorola no longer made transistors, but transferred the business to ON Semiconductors).

Strangely, the cans have “KOREAN” stamped into them, in various styles and sizes. Would a fake producer have stock of many different kinds of fake cans? Or did ON Semi produce these parts with some existing stock from the 1990s? Many semiconductor producers actually have decade old wafers in stock that they package whenever there is a need.

Let’s have a closer study. Unfortunately, no electron microscope here. But we do our best. Here the die of the defective HP branded original Motorola part. Red arrow shows the burn mark, defect area.

I sacrificed one of the 0.7 USD suspicious parts with K0439 datecode. To my great surprise, they are exactly identical in die, bonding method, and die attachment method.

A quick function test – put the new K0439 date code 2N5190 into an 5 MHz power amplifier. And working just great at >20 dB gain and about 1 Watt output.

Further, we study the collector-base capacitance, at -28 Volts bias U_CB (note that some datasheets specify “28 Volts U_CB” but this won’t work with a PNP transistor – it is conducting like a diode in C-B, if the collector is positive vs. base).

A test with the trusty HP 4192A, and 2.5 pF measures. Exactly the typical value. Also checked one of the certainly genuine Rxxxx date code transistors, and this measured at about 2.7 pF.

Test done at 1 MHz, and calibrated the 4192A with open and short.

So far, so good. All I can say is that these transistors are good 2N5160, whoever made them.

A low frequency xtal oscillator: Austrian generosity, gold, and crystals

A while ago, an Austrian fellow contacted me for some collectibles, long-range telephone line filters (from carrier multiplex phone lines). Many decades ago, phone lines were used at some 50-100 kHz frequencies, to transmit several (!) calls per wire pair. This required good filter, quartz filters were commonly used.

These are 4-electrode filters that are held only by 4 wires soldered to it. Probably oscillating in some flexing mode.

The electrodes are normally connected diagonally, and with a few resistors and an amplifier, I got the part to oscillate nicely. Be aware that you can’t feed a lot of power to these crystals, so it needs a rather high impedance oscillator circuit.

Resonance is at about 50 kHz.

Also connected the specimen to a HP 3562A analyzer, in swept frequency mode, and good nice response plots. There is another dip at 100 kHz!

The schematic, pretty simple, using a 74HCU04 unbuffered inverter, it is a very handy circuit, and years ago I got several tubes of these… you may use any other type of amplifier, gate, or even transistor circuit to get any such xtal oscillating.

Also did some some study on the temperature effect – heated to 100 degC, the frequency dropped by 200 Hz!

A precision current source: a mirror, and a TL431

There are many uses for a good current source, in particular, to drive a noise generator, Noise Source TWS-N15. Not much to write home about, but because of frequent requests, I am publishing the circuit here. It will work for small current from 2 or 3 mA up to 10 or 20 mA with no problem, and very little drift over temperature and time. For R, uses a good resistor. Input voltage can be up to 35 V, or even higher.

The big crash: Server failure

This blog is hosted by a professional provider, but the manuals archive (which needs quite a bit of storage), and other webpages, and my fileserver, is running on two machines, a Dell OptiPlex FX160 as the main, eco-efficient system (in Germany), and a Dell PowerEdge SC1425 with a Raid 1, 3 TB hard drive system as the backup, and currently my main system in Japan (where I am living on a temporary business assignment). Recently, the SC1425 failed, it just would not start up anymore. Power supply seems OK – likely, a severe issue. Checked all the memory and everything, but to no avail.

After fiddling around for about 2 hours, and still no success, I decided to order a new server – a new old server, Dell PowerEdge 850. Just about 35 Dollars used. Rather than 2x XEON processors, it has a Pentium D, 3.2 GHz Dual-Core. Plenty of power for a web- and fileserver.

A couple of days later, the unit arrived – removed the SATA Raid controller (running on Ubuntu with software Raid), and some BIOS settings (activate SATA, disable Keyboard error, enable boot from USB, default power up status is ON) plus BIOS Update. Also, reconfigured the router to make sure this machine will get all the HTTP requests.

A few tests – the harddrive is working fine, about 100 MB/s (sure there is a cache). The Raid 1 is up with no repairs or anything.

A quick check – also the web server is reachable.

I wouldn’t recommend a single PowerEdge for your super critical applications, but they are pretty good for the current cost, as long as you don’t mind the fan noise.

u-blox GPSDO: a simple, low cost, yet – high performance approach

There are many circuits around in the web, related to GPSDOs, and a more sophisticated design with a self-steering u-blox receiver has been published earlier here. Now I felt tempted to try an easier approach, without the hassle of precision references, operational amplifiers, DAC, and other devices that are great but high cost when you need to avoid noise and other complications.
Essentially, this design is a clean-up PLL, with some monitoring of the receiver, and the PLL health. All monitored by a simple 8 bit microcontroller, an ATMega8-16PU in this case.

We have some elements here, (1) the OCXO and amplifier, distribution amplifier – to provide the outputs, 4 in this case, and a good TTL level 10 MHz signal for the PLL, (2) a u-blox receiver, configured to provide either 5 Hz flashing in non-locked condition (no GPS reception, or no good reception), and 125 kHz, 50% duty cycle as a phase reference in locked condition, (3) the MCU, ATMega8, that is configuring the GPS received, providing a 125 kHz signal derived from the 10 MHz OCXO (the OCXO is used as the microprocessor clock – don’t introduce a new clock in such circuits, which will only lead to spurious signals!), (4) a 74HC86 that is used as a phase detector, and to convert the GPS output (a 3.3 V signal) to 5 V level.

That’s the OCXO and distribution amplifier…

The phase detector…

The controller and PLL filter – a simple two pole filter. It replaces all the expensive references, DACs and opamps of the more sophisticated designs. There is another small, faster filter to convert the phase angle to a voltage – converted by the 10 bit ADC of the ATMega8, 1 bit is about 4 ns.

The circuit full view…

Some first tests turned out well. Monitoring the OCXO phase with a scope…

To do a more thorough tests, without all my various test gear that it back in good old Germany, I used the 10 MHz to run another GPS receiver (after upconverting to a 26 MHz clock), then the NAV-CLOCK message can be used to report phase and drift. The short term stability of the OCXO is better than the GPS, as can be seen, but there is no long term drift – because the OCXO is now steered by the 1st GPS receiver via the PLL (XOR phase detector and loop filter).

The phase detection is done at 125 kHz, a convenient frequency for precise measurement, and high enough for filtering.

About 20 ns of jitter are clearly visible in the u-blox output, because it is running on a 48 MHz internal clock.

The circuit is running well, because of the few parts the cost is low and should be easy to reproduce. Let me know in case you need the ATMega code (written in GCC).

The display shows the phase angle, essentially, the duty cycle of the phase comparator output, the stability of the OCXO voltage (by a low pass algorithm), and the lock condition of the GPS (detected by measuring the frequency with timer0 of the ATMega8, and the INT0 interrupt at rising flank to reset the timer).

Phase noise is very small, there are no visible spurs (the lines seen on the screen relate to recalibration events of the analyzer rather than spurious signals, except those at +-125 kHz – at -90 dBc – probably you can get rid of these by better shielding and compartmentalization).

Sure there could be more sophisticated phase noise measurement, by analyzing the control voltage with a low frequency analyzer. I may proceed with such analysis these days but don’t expect to find much, anyway, would be best to fit the circuit to a shielded box first.

All in all, I believe this is a very workable solution that will give you great performance at lowest cost, and with little effort. Sure it will work with various types of OCXOs, the Trimble unit used is generally very good in terms of drift and phase noise. Be aware that some newer Trimble units aren’t all that good. The OCXO draws about 2 Amps at 12 Volts upon startup, but it is OK to start it with a current limited supply, at about 1 Amp, if you don’t want to overdesign the power supply.

GPSDO: a new 10 MHz distribution (and isolation!) amplifier

Many attempts have been made in the past to provide a low phase noise 10 MHz signal as a frequency reference, however recently I experienced some trouble because of ground loops. Normally no problem to decouple from DC voltages, but still the ground stays connected. The only way to avoid such ground loops is to use potential-free isolation, best using transformers. Capacitive coupling may be an option, but it is best avoided, at least it is though to get good isolation, say 2 kV or above, with capacitors that can transmit 10 MHz, at reasonable cost and size.

I am looking for about 1 V p-p, reasonably square shape output, into 50 Ohms, or TTL level (about 5 V) into high impedance. About 5-10 dBm at the 1st harmonic, 10 MHz. So we need to drive about 15 mA through a 50 Ohm load.

As amplifier elements, I am using 74HCU04 unbuffered inverters, these are balanced for propagation delay, and I have plenty of these in a box. The HCU04 is essentially a single stage inverter, a gate with a pretty good linear region – an amplifier. Propagation delay is about 5 ns at room temperature, so it is good solution to amplify clocks, and so on. We are using it to amplify a 10 MHz signal from an OCXO.

For isolation, looking for some small transformers (generally speaking ethernet transformers will work well), I found the PE-65612NL at low cost (list price is about 4 USD per piece, but some sellers have them at a small fraction of this cost, most likely, from surplus). These are 1:1, 2 kV min, signal transformers originally intended for digital audio signal separation. Good enough for our purposes.

A really affordable offer… sure you can substitute any other reasonable signal transformer that can cope with at least 20 mW, and is reasonably inexpensive.

The schematic – first, a single HCU04 is used to square up the OCXO output, and then distribute to 3 outputs, two are used to drive 2 isolated outputs each (4 outputs total), the other output is routed to a PLL circuit (because this isolation amp is part of a GPSDO). Any phase drift of the 1st stage HCU04 introduced by thermal and other slow effects will be canceled to some part by the GPS loop (because the sampling of the phase is very close to the isolated outputs, only followed by a set of paralleled-up gates) – although I don’t expect such drift.

The resistors were selected as 3×330 Ohm, giving about 100 Ohms source resistance and about 1.4 V pp when terminated in 50 Ohms.

Output power is fairly consistent, like, +-0.2 dBm when comparing 4 units. Fundamental output at 8 dBm is exactly the right range. Probably you can adjust it in the range of 5 to 10 nominal without changing much the other characteristics of the circuit, by changing the resistor values from the paralleled-up gates to the isolation transformer.

u-blox GPSDO: Joe’s and Gisela’s magic generator

In reply to an earlier post, GPSDO Update, I received the following great implementation of a GPSDO using u-blox receivers. The pictures are rather self explanatory.
>>>>
Hello again Simon!
I trust you are well and are enjoying the year end break.

We ( My good Wife and I..) have put your GPSDO software to good use. We used your message processing code almost as is, and added the various functions to drive my specific hardware and DAC, etc.

I have built up the complete GPSDO, with the 1-50MHz Analogue Devices AD9854 Quadrature DDS as a signal generator, provided with a 200MHz clock from the SI5351 PLL.
I also have a ‘signal generator’ output from another Si5351 channel, 1 to 200MHz, and a third channel output. square wave, from the GPS time pulse output, and can set outputs from 1Hz to 10MHz in decade steps.
I used a 7inch NEXTION graphics display for the display and control inputs ( touch screen) – that works very nicely!

I have run the unit for a few days now, and logged a 48hour period of data, every 10seconds, regarding the clock bias, drift, DAC output voltage etc, and the result looks very good indeed.
I am very pleased with the instrument and grateful for your assistance in providing your code. Thank You!

I have attached a few photos for interest.

Kind regards, and have a very good Christmas!

Joe and Gisela.
>>>>