UA315 Design Story. Part 5. First Prototypes

I have started the project in April 2015. I had high hopes and great curiosity, and I enjoyed the journey, playing the role of schematics designer. Over this few months I have turned from a mere software enthusiast into advanced builder. This journey with building better and better prototypes could go on indefinitely, until a "software developer's" side of me insisted on setting hard deadlines, milestones and getting some reusable "scientifically proven" results.

 

You can look at the exercise as the adventures of a software guy in analog world of precision measurements.

Prototype 1. Just put together chip and probes. What else is needed ?

For first prototype I just used ADI evaluation board and complimentary PC software. The results were as advertised and the board was gathering dust. The board demonstrates capabilities of AD5933 in some narrow range of impedances and frequencies. The frequencies are 30KHz or so and impedances are around 100KOhm. The demo board can not go much lower or much higher with frequency or impedance. Or else user has to modify analog frontend.

 

Demo board does just one thing: helps user to evaluate the advertised device as quickly as possible. And as a software engineer and Arduino hobbyist, I could not stand the use of proprietary software blob, requiring whole PC to run few simple formulas.

 

EVAL-AD5933EB demo kit from Analog Devices

EVAL-AD5933EB demo kit from Analog Devices

Prototype 2. Getting rid of PC software. Adding Arduino

Why Arduino ? I have possibly every popular board like Parallax Propeller, XMOS kits, Intel Galileo Gen 2 and Edison, Arduino Mega R3, BeagleBone. And I am obsessed with small TFT screens. In many of my exercises, I tried to connect small TFT screen to each of those with simple goal of herding the pixels using 100% opened code.

 

So for this prototype #2 I chose Intel Galileo Gen 2 and Arduino sketch language to talk to ADI board through I2C protocol and display data on tiny 1.5 inch screen with SPI protocol.

 

It was a success mixed with disappointment. The success part was that all software and sketches were easy to code. The disappointment was that power consumption was high, range limitations were same as on the PC setup and noise was awful. The next prototype had to beat the range limitations and noise.

 

Galileo Gen 2 with 1.5 inch SPI TFT screen. Beginning of Prototype 2

Galileo Gen 2 with 1.5 inch SPI TFT screen. Beginning of Prototype 2

Prototype 3. Batteries and Radioshack

I was done with proving that firmware writing is manageable. The problem on hands was ranges and noise. The lower impedance ranges were limited by very high internal output impedance of AD5933 - hundreds of Ohms. The input stage is also limited by value of Rfb. Looking at the perspective of building my own analog frontend I had to choose some common opamps. These were Radioshack TL072 ones. The ranges were extended but opamps brought more power rails requirements.

 

Well, there are many contemporary opamps which can work well within very limited power rails, but the tradeoffs are whole new science for me. Choosing between single 3V rail and dual 15V was not difficult. The gut feel was that linearity is the king for precision measurements. May be there are low voltage precision opamps with very high linearity and good frequency range, then those will be in next version of my device. For now I chose in favor of desktop-tabletop design direction, where multiple power rails are OK to have. The handheld direction with tight power requirements is much more advanced, I will go there only after I complete the tabletop design.

 

So with relaxed requirements for power rails, I added 9V batteries everywhere, buffered inputs with simple followers, beefed output with classic inverting stage. The result was awesome absence of any noise. The measurements were precise and repeatable. No bobbing or spikes.

 

 

Prototype 4. Precision, resolution is good thing to have, but what about accuracy ?

For next prototype I had to replace very expensive Intel Galileo Gen 2 with something cheap. I chose Arduino Mega R3. You can not go cheaper. The debugging convenience is important, so I replaced SPI screen with 4.3" TFT + SSD1963. Well, and batteries had to be replaced with power supplies.

 

Picking small mains transformers from here and there I realized how awful the contemporary choices are when you need more than just 1-2 power rails. I made a note, that for final product I should give up on using any off-the-shelf transformer, the power supply will be completely custom.

 

After fitting prototype #4 into nice white metal box the only achievement I have got was general proof of that thing can be somehow built. Can it run ? Yes. Can it run for long hours ? I kept making basic personal discoveries of analog design nature. The boards ate so much power from 5V rail, that 7805 chip had to use a heatsink. All power was going through 2 AC mains transformers and those were impossible to replace with some single multitap transformer. I kept thinking about safety and buildability, and eventually gave up on idea of making kit, powered from AC mains.

 

There are many reasons to avoid AC mains for beginners, especially for a beginner merchant, trying to sell kits to strangers. The problem and the answer was obvious: use off the shelf power wart supply, which is sold separately by somebody else.

 

Accuracy experiments failed. I gained very little proof of accuracy simply because low noise AC supply was dead end. The accuracy road was blocked by basic error in priorities.

My dog disapproves ...

My dog disapproves ...

... the use of stacked off-the-shelf boards

... the use of stacked off-the-shelf boards

Prototype 5. Switching power supply. Noise is back!

To get rid of at least one mains transformer, I cracked opened few 5V USB and 5-6V non-USB cheap switching supplies and replaced 7805 with off the shelf assembly. The size and weight went way down and I could continue to do mods, at least mechanically there was some space fro experimenting with front end.

 

But nothing good happened with this replacement. Space was still a matter. The stacks of boards were awfully unwieldy, there was still dangerous AC mains inside metal box and on top of it the noise. Measurements were very poor. I tried to do something futile, like taping the sticky aluminum shield around switcher, adding filters, rewiring. No. Hopeless.

 

The prototype #5 was dead end. I learned very simple lesson about design priorities (by following wrong priorities):

  1. Good power rails is easy but tedious to achieve. Do it first.
  2. Having any noise on power rails in measurement device is nonsense.
  3. Stop using large off the shelf boards after first 2-3 prototypes, start making your own PCBs.
Prototype 5 With off the shelf boards stacked inside a metal box

Prototype 5 With off the shelf boards stacked inside a metal box

Prototype 6. Homebrew Arduino.

At this point I had lot of confidence in precision, but little proof of accuracy. I needed full control of noises, clocking, timing, powering, grounding and shielding. Demo boards with silly jumper wires running across breadboards became an obstacle. I needed to design my own PCBs.

 

I have the design split into 2 obviously separate parts: Single board computer with screen and analog board.

 

The panel mount Arduino with screen is a worthy product by itself. I enjoyed making the batch of 42 boards. And this was my first CAD designed board ever. The Diptrace is one wonderful software, though it was not free for my pincount (the license is up to 1000 pins per board).

 

Arduino board has all I ever needed for universal lab instrument computer.

  1. It is large 4.3" panel mount single board computer with bezel and screws
  2. Open source. All bits are mine, all schematics is mine, all software is free and plenty
  3. It is single board, not 4 modules: TFT screen, GPU module, level shifter mezzanine board, Arduino.
  4. It is optionally externally clockable
  5. It is using 0.1" header
  6. The power can use either switcher, or run from external linear regulators
  7. The 4 layers PCB with dedicated ground and power layers keeps noises as low as possible
  8. The software induced noise can be controlled by careful timing of "delay" the routine

 

I learned myriad things about board design and it was quite a journey. The analog board went much slower. At first I chose to limit the height of every component to 15mm. I hoped that kit will be more attractive, if user can add second custom board on top of flat analog board. But  I had to break this height limit later.

 

The power supply on analog board was designed to beat the noise in a manner of "take no prisoners"

  1. If multiple cheap through hole parts can replace single expensive part, use cheap parts
  2. The labor is not an issue, because this is kit, high parts count is OK
  3. External power supply is 5V/1A USB kind
  4. Internal power supply is switcher with multiple rails
  5. Internal and external power supplies are shut during measurement phase, every 1 second
  6. During measurement phase power is supplied by supercapacitors
  7. All critical analog rails are fed through linear regulators
  8. The switcher must stay completely shut during measurement phase, even internal oscillator must be silent

 

With this requirements I had to study existing switchers for days. There is myriad of switcher chips and none of them is quick to understand. I concluded that in general I am targeting completely different goal than majority of switcher designs. Those are made to fit to very tight efficiency requirements, they do not care about noise or convenience of external control, some are self destructing when loads are odd, other are requiring too much knowledge about magnetics. And so on. After all the study I went back to the principle: it does not matter for kit builder, if there are too many parts as long as they are cheap and common. I can build switcher with just few 555 chips. And so I did.

 

Homebrew Arduino boards with CPU+GPU+TFT

Homebrew Arduino boards with CPU+GPU+TFT

Prototype 7. Onion shells of accuracy

Story of lab device design is the story of removing onion shells. Designer has a solid theory of operation, and ideal device behavior is in the center of the onion. To reach the center designer has to remove shells one by one. In my sequence of prototypes I kept removing shells in no particular order, I kept just stumbling on every next obstacle and sometimes chose wrong priorities.

 

The core: Physics and math will tell us that Johnson's noise is not the last obstacle (you can beat it with averaging), but very much close to the core. To reach this layer I must be able to at least recognize this effect, and for this, I need precision and repeatability. So lets start with outer layers.

  1.  First shell is choice method and of references. Did I pick a correct onion ? I think I did. Ratiometric method and AD5933 seems to be great choice. I am way past the point of proof that this method is very worthy.
  2. 2nd shell: Removing noises which are easy to remove. The supercapacitors supply works well, it proved to be the foundation of precision, repeatability of measurements.
  3. 3rd shell: Drifts of DC rails at supercapacitors. This is well reduced with simple linear regulators (major ideas were taken from DIYAudio forum, where people are obsessed with low noise supplies). In general for ratiometric method, the power supply drift of few mV should not cause the problem. The design is much more sensitive to DC drifts of signal itself, and has high PSRR. PSRR effects is double shell, it is obvious that analog rails must be regulated, but after next few shells, I expect it to get into the picture again. I am not there yet.
  4. 4th: Unavoidable interferences. With silent supply, there are clocking generator and divider. At the moment, I have prototype #7 with multiple routing mistakes fixed. It is latest build for today (Oct 9 2015), and analog boards for #8 are on the way. This interferences became visible in #7 as sudden (0.1..0.2%) spikes in measurement, when consequent measurements show only 0.00..0.01% bobbing.
  5. 5th: Input to output interference of AD5933. It is being fixed in prototype #8 with guard ring. The pins assignment of AD5933 is so unfortunate: input is next to the output pin and pF capacitance is becoming noticeable when upper layers of noise are removed.
  6. 6th: Future expected effects for prototype #8. I expect to resolve IO coupling and divider spikes with better grounding, decoupling grounds with using star patterns, with more R-C filters on rails. What will interfere next ? It most likely will be analog switches. The switches are non-linear and their resistance is very sensitive to common mode DC offset. I have upgraded the analog switch to more costly one and added common mode rail for instrumentation amplifiers to be fed directly from divider next to AD5933 voltage REF input. This common mode rail is unfiltered on purpose to deliver boardband noise of V REF into common mode inputs of PGA281s. I expect the drifts to be cancelled. Also the analog switches resistances are cancelled by including switch into feedback loop of transimpedance amplifier twice.
  7. 7th: The final effect I hope to see in prototype #8 is just thermal noise with amplitude of 1 count of 20000.

 

 

Prototype 7 with a lot of hardwiried mistakes and hardwaired patch wires

Prototype 7 with a lot of hardwiried mistakes and hardwaired patch wires

Prototype 8. The PCB house matters.
Starting prototype 8 (right). Prototype 7 (on left is full of patch wires and patch boards). I hope this is final and best build.

Starting prototype 8 (right). Prototype 7 (on left is full of patch wires and patch boards). I hope this is final and best build.

Today (Oct 13 2015) I just received boards from Elecrow for prototype 8. Unfortunately, they have ignored my ring pattern for shielding. Many traces with 1, 1.6 and 2mm width were completely ignored and traced with some thin default width. I am very disappointed.

 

But enough bad news. I will change the PCB house for a better one for a large batch, after PCB turns final. The good news is my Hakko FX888D soldering station. Just bought it at Microcenter, and it works well. I keep the solder at 600 F instead of default 750 F. I want to keep copper traces little cooler, so they will not flake off. My previous no-brand air+pencil workstation died recently. IT helped me to finish dozens of boards, but eventually died.

I tried for about 5 min working with some random Radioshack soldering stick. It has is very high unregulated temperature and is too small and damaging the boards.

NEXT: PART 6

BACK TO PART 4

BACK TO TOP: OFFICAL UA315 PAGE