Build Your Own Sourcemeter
This is an explanation and set of building plans for a USB-powered sourcemeter with a personal computer interface. The sourcemeter uses an open-source Arduino microprocessor and the user interface uses the open-source Processing environment. The sourcemeter was designed as a homemade current-voltage (IV) tester to measure the IV characteristics of a solar cell by sweeping applied voltage across the device and measuring the current at a series of voltages, but it could be applied to other measurement tasks.
For questions, please contact David Berney Needleman (dbn AT mit DOT edu) or Rupak Chakraborty (rupak AT mit DOT edu).
The basic circuit for the sourcemeter is as follows:
- The Arduino Nano microcontroller (Arduino) uses 3 digital output pins to control a dual-channel digital-to-analog converter (DAC).
- This DAC programs two voltages:
- The first voltage is applied across the device under test (DUT), in our case a solar cell. In order to insulate the DAC from the current through the DUT, a buffer amplifier (in our case an operational amplifier wired for unity gain) is placed between them. The voltage across the DUT is also split off and read at one of the Arduino’s analog input pins.
- The second voltage is used as part of a summing amplifier to make our current measurement readable by the Arduino (details below).
- The current through the DUT is converted to a voltage by dropping it across a 0.1 ohm resistor, so that it can be read at one of the Arduino’s analog input pins. This negative terminal of the DUT and the second voltage output from the DAC, each in series with a resistor, are both wired to the positive terminal of an op amp configured as a summing amplifier. The resistor values in our circuit were chosen to convert our expected current range (+/-30mA dropped across a 0.1 ohm yields +/-3mV by Ohm’s Law) to the internal reference voltage for the Arduino (0V to 1.1V). For a good explanation of using a summing amplifier for this type of conversion, see http://masteringelectronicsdesign.com/design-a-bipolar-to-unipolar-converter/. Note that it is important that these resistance values be fairly precise. Variations will result in the scaling and zero of the current measurement being off slightly. This discrepancy can be corrected in the currentReadingmA function in the Arduino code.
Circuit Diagram (download in .sch format here).
*Note: To put a solar cell in forward bias, the p-type side would be connected to the V+ terminal in this diagram. For reverse bias, the n-type side would be connected to the V+ terminal.
Parts List: These were used for our implementation. Substitutions (e.g., to change the current range or due to availability) should be fine though they may require small modifications to the software.
- Printed Circuit Board
- Arduino Nano Microcontroller
- Microchip MCP4822 dual-channel Digital-to-Analog Converter
- Texas Instruments TLV4110 Operational Amplifier (2)
- Ohmite WNBR10FET 0.1 ohm +/- 1%, 1W resistor
- Panasonic ERO-S2PHF3000 300 ohm +/- 1%, 0.25W resistor
- Panasonic ERO-S2PHF3001 3k +/- 1%, 0.25W resistor
- Panasonic ERO-S2PHF1202 12k +/- 1%, 0.25W resistor
- Panasonic ERO-S2pHF3002 30k +/- 1%, 0.25W resistor
Firmware and GUI Software
*Note: these instructions assume that you have the Arduino IDE and Arduino driver installed. See the Arduino help pages to get started.
Download and extract the IVy zip file locally. Navigate to “source” > “IVy_arduino”. Open the file “IVy_arduino.pde” with the arduino IDE. Compile the code and upload it to the arduino board.
Once the arduino board is loaded, use the Processing application to run the board. For convenience, the Processing code is already compiled and exported to an executable format for Linux 32/64-bit, Mac OSX, and Windows 32/64-bit. These are located in the “application” folder. Within the “application” folder, navigate to the folder which matches your platform. If the 64-bit version does not work on your 64-bit system, use the 32-bit version.
Make sure the arduino board is connected to your computer, and then run the executable. A window showing the IVy user interface should open. Under the “Connection” section, there is a drop down menu displaying all available serial COM ports. Select the COM port that the arduino board is using, and then click the “Connect” button. The status bar at the bottom should display “Connected” if the connection was successful. As long as the IVy interface stays open and the arduino board remains physically connected to the computer via USB, this step does not need to be repeated.
For more detail: Build Your Own Sourcemeter
This Post / Project can also be found using search terms:
- arduino mcp4822 library
- build your own sourcemeter
- how to build sourcemeter with dac