Introduction
There are plenty of features to explore in IoT; this post starts with the analog side. The ability to handle analog I/O is attractive for IoT wireless sensor node use to make use of many of the interesting sensors out there.
Often analog sensors need to be interfaced, however many sensors (such as thermocouples or photodiodes) output tiny voltages or currents. When designing IoT devices, it may be desirable to replace the sensor with a fixed voltage source or current source or current sink, in order to test with a fixed known value.
This post shows how to build a very low-cost (about $20) three function reference device with reasonable accuracy. It is switchable between constant voltage and constant current modes, and has fixed output values of 100uV (~2% max, 75ppm/deg C drift) and 50uA (~1.5% max, 50ppm/deg C drift) current sink and 100uA (~1% max, 25ppm/degC drift) current source.
Here it is in action in the current source mode, passing a 100uA current through a load (22k resistor in this example):
The level of accuracy may also be good for go/no-go testing of basic multimeters (high-end multimeters will have a higher accuracy) – assuming the device under test is capable of measuring down to these very low levels.
How does it work?
The device uses a precision current reference integrated circuitprecision current reference integrated circuit from Texas Instruments (TI). The chip actually contains two current sources, and a current mirror. The three portions are totally separate, which makes it an extremely versatile IC. This project uses one current source to serve two roles (depending on switch position); either as a current source, or as a voltage reference. The other current source is combined with the current mirror to create a current sink.
Two buttons are used to select between the three modes.
Building it
The circuit is shown below. It is made up of a selection of circuits from the data sheet. A precision resistor is needed as part of the 100uV reference portion of the circuit, a good compromise was a 1% 50ppm device which was not expensive. For the IC, although a surface-mount SOIC device was used, it is available in a normal PDIP through-hole package too. After construction, the board should be cleaned of flux and any grease. The entire circuit is powered from a 9V battery.
The photo below shows the completed circuit assembled on perf-board. 4mm banana jacks would be a good idea, but for now I just used a pin header connector:
The plan for this board is to fit it inside this enclosure:
Testing it and using it
We have more recent multimeters in the lab, but my most highest-resolution device at home is an old Keithley 2000 series 6.5 digit multimeter, and I tested with that. The results were as expected (see photos below); this multimeter needs calibration however. Additional testing ought to be done.
The voltage source does not have a buffer (there are circuits for this in the IC datasheet if desired) so is only suitable for connecting to high resistance loads (about 100 ohms at a minimum, which will result in a small error), otherwise expect the voltage to drop and the error to increase. Also bear in mind that each dissimilar metal junction will produce a small voltage (much like a thermocouple). The photo below shows the voltage source in action:
When using the current source, a certain voltage is needed for the device to operate, and therefore the load resistance cannot exceed a certain amount - about 50k max should be ok; I only tested at 22k, as shown in the photo in the introduction.
As a small digression, I was interested to find out if LEDs are usable at such a small current. Convention states that about 20mA is required to light up a red LED, but even 5mA is very bright for modern LEDs. I connected up the 100uA current source to a 5mm clear LED, and it was clearly dim but still extremely visible under normal home lighting conditions, with enough light to view the LED by reflecting it off a white surface too.
Here is a photo of it:
With some quick camera adjustments, it was possible to view the die inside the LED:
The cross shape is the wire bonded onto the surface of the die. So, the summary is that LEDs can be visible at just 100uA (depending on the LED).
When using the current sink, again a minimum voltage is needed for the circuit to function; a minimum of around 1.5V should be across the pins; I only tested about 2.1V, using a 3V battery and a 22k resistor. See the photo below.
Summary
This was just a short blog post to get prepared for more exciting IoT topics. However a voltage/current reference device was needed, in order to begin working on designs that involve analog sensors and measurements.
Furthermore at such a low cost, it is proposed that it is may be worth building up a device like this even for just quickly performing go/no-go tests of multimeters.
Top Comments