About SPICE |
SPICE Basics |
Running SPICE |
CIRCUIT COLLECTION
SPICE Commands |
SPICE Downloads |
About |
Contact |
Home
Let's build an ultra-lite SMU to learn digital control. Why? A small system provides an easy on-ramp to grasp bigger
ideas without getting lost in a myriad of circuit details. Later,
you can develop more complex SMU's on a solid foundation.
Part 1 - describes the essential
blocks of a digital SMU (with SPICE file).
Part 2 - builds a prototype with the Arduino and a just few components.
Back to SMU Series
SMU SPECIFICATIONS
Here's the schematic of our SMU showing connections between the Solderless Breadboard, a DAC board and the Arduino UNO Board.
CIRCUIT NOTES
There is no easier way to prototype a circuit than with the Solderless
Protoboards. Drop in a component and begin wiring! You can easily test, modify and
experiment with your design.
A handy online drawing program
(www.cirkitstudio.com/) allows you to create a parts-based wiring diagram as
shown below.
Please note, the diagram above is only a suggestion. Arrange parts and wire the circuit anyway you prefer!
Even with the most basic components, you can build a working SMU. Feel free to select alternate components for preference / availability / cost.
Qty
(Ref)Description Part Number
(Digikey option)1 Arduino Uno Rev3 Microcontroller Board A000066 1 USB Cable Type A/B generic 1 DAC Breakout Board, 12-Bit, I2C Interface MCP4725 (Sparkfun) 1 Solderless Breadboard, SparkFun Electronics PRT-12002 (1568-PRT-12002-ND) 1 pkg Jumper Wires, Various Lengths, M to M, Adafruit Industries (1528-2185-ND) 2
(R1,R2)RES 100K OHM ≤5% any available 1
(C1,C2)CAP CER 1nF X7R any available 5
(Rs)RES 100,1K,10k,100k,1M OHM ≤1%
(Various values for different ranges)any available
The overall code blocks for the SMU is fairly straightforward.
Here's the fast track version of running a C program (sketch) on your Arduino Board.
The program is straighforward, many examples have been published for writing the DAC and reading the ADC inputs.
We need to add the Wire library for the MPC4725 DAC board and set its address.
The writeDAC function handles the low levels details of writing an integer value into the 12-bit DAC registers.
This code excecutes once in the Arduino Sketch.
The code sets up the SMU test.
This code runs continuously. The main SMU controll loop code simply follows the flow chart above.
The code above implements the control loop functions.
This code displays all the SMU measuments every 250 ms on your computer screen. The variable testTime keeps track of the time (ms) since the program started.
Because the measurements may be noisy, we'll apply a running average to the readings.
The code implements a circular buffer that subracts the oldest value and adds the newest value. The average is simply the sum total of the buffer divided by the number of readings in the buffer.
Finally! We'll calculate the resistance measurement from the averaged values Rcalc = MVave / MIave.
What can we test even though the analog circuitry has NOT been prototyped? Good news! We can jumper the Arduino's 3.3V supply directly into the A0 analog input.
Back to SMU Series