This winter I had some spare time and chance to do some further development on my (never ending) Poor man’s SMU (source measure unit / 4quadrant power supply) project. I now decided that I could share some of the outcome.
It’s currently based on a LM399 voltage reference using a LT5400-6 to divide it down to apprx 5V, This is used as shared reference voltage for the AD717x ADC (24bit) and LTC2756 DAC (18bit). The prototype actually use two LTC2756s. The second is used for setting limit, but I can get away with a cheaper DAC for that. AD8475 funnel amplifier is used to convert a +/-10V single ended signal to a 5V differential signal input of the ADC. The AD8475/AD717x combo is based on https://www.analog.com/en/design-center/reference-designs/circuits-from-the-lab/CN0292.html. I’m currently looking at replacing the AD8475 with the new ADA4254 that seem to be very capable.
Originally I used the 2.5V output from the AD7172 to set the common mode voltage, but the current prototype uses a precision divider from the 5V derived from the LM399 reference instead.
The control loop and current limit circuits are currently built around ADA4522 opamps. The output stage consist of a simple pushpull arrangement with an ADA4700 opamp driver and IRFZ24N / IRF9Z24N MOSFETS. It can be configured for constant current or constant voltage For now I have limited the bandwidth to apprx 10KHz to avoid instabilities. Typical raise and fall time from 0 to +/-10V is 100uS. The main reason for using ADA4522 is that it allow for high voltage (+/-27.5V) and have low offset and drift. I’m sure a lot of optimisations/improvements can be done here. I originally would like a much higher bandwidth to make it possible to measure very fast changes in current consumption for CPUs in and out of sleep mode. The loop control has a gain of 2 to allow max +/-10V capable DAC/ADC board to +/-20V input/output.
One of the main difficulties has been glitches and instabilities when reaching current limit (on voltage source mode) or voltage limit (in current source mode). I’ve reached stability, but the behaviour is not ideal.
There is currently no tracking preregulator. This means that the output MOSFETs gets very hot at high currents and low voltages. The plan is to keep it like this to avoid complexity. I believe this simple arrangement should be possible given proper cooling and max 20V/1A.
I might try to implement a special/manual mode for 3A to extend the usability (for example fast(er) charging/testing LIPO batteries). Initial experiments with parallel MOSFETS also seems very promising. In the >1A range I can accept lower current accuracy and avoid using expensive high current low tempco resistors. I currently use a 0.2ohm from Vishay VCS1625P series in the 10mA to 1A range, but even at 500mA the temperature rises more than I like. And it’s more expensive than I like. To my surprise the it seems that obtainable current measurement accuracy is directly proportional to the money you spend on such a simple device as a shunt resistor !
A Teensy 3.2 processor runs the show and 5″ capacitive touch display is used as main interface. Because the display I use already includes a graphics processor and that the current bandwidth is limited, I could probably get away with a less powerful CPU.
At this point it’s more of a four quadrant power supply, but I plan to extend it to be able to do pure measurements as well.
Also, there is currently no transformer etc. It’s powered by +/-24V from an external bench power supply! This is at a prototyping stage and I like to keep the unknowns at a minimum and wear both belt and braces…
It’s currently able to source and sink(!) 1A +/-20V. Two current ranges: 1A and 10mA. It seems quite stable with 1.23450V output typical staying within +/- 20uV ! My goal of accuracy within 0.05% + 100uV seems to be possible.
Current measurement is another story… Here I need to do more improvements. The 10mA range seems to work pretty good. It’s stable enough to be easily calibrated. The 1A needs improvements. For > 200mA it’s drifting, but I believe it’s mostly temperature related. Maybe I can throw in an extra shunt resistor in parallel. No autoranging implemented yet. I’m not sure if I want to try implement lower current ranges. Moving into nA/pA territory is way beyond by competence. I’ve already touched the volt-nut territory a bit and it’s scary !
The electronics is currently divided in two different PCBs. One containing the CPU and DAC/ADC. Optoisolators are used for all signals between Teensy and the DAC/ADC. The other PCB contains the output stage, loop control and current limit circuitry.
The display is a 5″ capacitive touch display with built in FT8xx graphics (https://www.hotmcu.com/5-graphical-ips-lcd-capacitive-touch-screen-800×480-spi-ft811-p-340.html?cPath=6_16) controller. I’m using this because I have had good success with it from other projects (https://weatherhelge.wordpress.com/2018/02/06/5-800×480-capacitive-touch-lcd-with-built-in-ft811-graphics-controller/). I’m using a slightly modified graphics library (https://github.com/jamesbowman/gd2-lib) originally written by James Bowman, the creator of Gameduino.
The UI look&feel is heavily inspired by Keithley 2450 SMU…
The crude non-edited video below shows some of the basic functionality and navigation. The included crash indicates that the software still needs som attention. Note that only the voltage output and voltage measurement in the range -5V to 5V were calibrated when this video was recorded.
The electronics/schematics is currently not good enough to be shared, but that is the plan if I have time to do improvements and cleanup. It contains a lot of parts that are not used other than for prototyping and experimenting. I’m using easyEDA and have got PCBs produced from JLCPCB. Some parts of the schematics are shown below just to give you an idea. Note that I’m a software engineer, not a hardware designer.
The software is in the same condition as the schematics, not ready to be shared. However, if you really want to take a look at the current code mess, you find it here: https://github.com/hellange/poor-mans-smu. Could be interesting if you want to take parts of it for you own experiments.
So what’s next ? Well, I have (at least) the following list in non-prioritized order:
- Improve voltage reference stability. The LM399 based circuit is how just “hacked” together. I believe it’s possible to improve that without going to extreme volt-nut territory
- Improve sampling speed and timing accuracy. Currently the software is based on polling. I want to see if I can use more interrupt based control but it brings it own set of problems… Unfortunately the ADC I’m using don’t have a dedicated “data ready” signal !
- Improve bandwidth and perform some heavier tests to verify stability
- Improve limiting behaviour. Get rid of overshoot and get it smoother
- Implement sense terminals
- Improve current measurement circuitry.
- Add pure measurement capabilities, at least voltage and current. The I can call it a SMU, not only a 4 quadrant power supply
- Extend measurement capabilities beyond 20V ?
- Protection ! There is currently no protection. That has cost me several expensive components…
- Add more ranges ? Note that I’ll probably not go for 100V and/or extremely low current/voltage ranges.
- Make sure output does not create significant spikes when changing current range
- Add self calibration. At least for zero and gain.
- Functionality to auto calibrate against my DMM6500 (or other equipment). Goal is to reduce nonlinearities.
- Improve output stage. For large currents and low voltages the MOSFET now gets real hot. Do I need a preregulator to reduce voltage ? Hope not. I’ll try to run more MOSFETS in parallel and use a proper cooling arrangement. Should be able to reach 1A. What about 2A?
- Autorange both for voltage and current.
- Improve SW and make it more modularized. This will simplify development and allow others to participate or use some of the code for their own projects.
- More than one channel? Event just an additional channel with lower specs would extend the number of applications the SMU can be used for. From a hardware perspective this could be cheap to implement. From a software and UI perspective it gives some challenges.
- Long time logging
- Optimise and improve PCB layout
- Test linearity
- Try out other DAC/ADC etc…
I’ll keep on working on this project, but expect slow progress… In the meantime I hope that people with some real skills and competence creates a usable DIY SMU. Take a look at https://www.crowdsupply.com/envox/eez-bb3 ! That’s really impressive ! Who will be the first to develop a SMU unit for that project ?
If you have questions or comments I’ll try to answer in the comments below.