Research article Special Issues

A USB high resolution lock-in photometer

  • A design is presented, in which the DDC112 current-input analogue-to-digital converter is combined with a PIC microcontroller and associated circuitry to give a simple and economical dual-beam photometer / electrometer. The PIC supervises the operation of the analogue-digital converter and performs a lock-in function using a rolling average filter, which enables intensity measurement to parts per million. It also synchronously controls a regulated current source to drive, typically, one or more power LEDs as light sources. It has been applied in various fluorescence and absorbance measurements and can be used with Cavity Enhanced Absorption Spectrometry to determine ultra-low absorbance. An expanded version has been created with a PIC32 processor handling eight channels for a PixelSensor multispectral detector. All circuit details and source code are made available.

    Citation: Simon Bateson. A USB high resolution lock-in photometer[J]. AIMS Electronics and Electrical Engineering, 2019, 3(1): 1-15. doi: 10.3934/ElectrEng.2019.1.1

    Related Papers:

    [1] Vasileios Delimaras, Kyriakos Tsiakmakis, Argyrios T. Hatzopoulos . Analog interface based on capacitance multiplier for capacitive sensors and application to evaluate the quality of oils. AIMS Electronics and Electrical Engineering, 2023, 7(4): 243-270. doi: 10.3934/electreng.2023015
    [2] Stephen L. Durden . Spatial variability of airborne radar reflectivity and velocity measurements of tropical rain with application to spaceborne radar. AIMS Electronics and Electrical Engineering, 2019, 3(2): 164-180. doi: 10.3934/ElectrEng.2019.2.164
    [3] Folasade M. Dahunsi, Abayomi E. Olawumi, Daniel T. Ale, Oluwafemi A. Sarumi . A systematic review of data pre-processing methods and unsupervised mining methods used in profiling smart meter data. AIMS Electronics and Electrical Engineering, 2021, 5(4): 284-314. doi: 10.3934/electreng.2021015
    [4] Tarun Naruka, Debasis Tripathy, Prangya Mohanty . Power quality enhancement by a solar photovoltaic-based distribution static compensator. AIMS Electronics and Electrical Engineering, 2025, 9(2): 192-214. doi: 10.3934/electreng.2025010
    [5] Edwin Collado, Euribiel Valdés, Antony García, Yessica Sáez . Design and implementation of a low-cost IoT-based agroclimatic monitoring system for greenhouses. AIMS Electronics and Electrical Engineering, 2021, 5(4): 251-283. doi: 10.3934/electreng.2021014
    [6] Vasudevan Karuppiah, UmaMaheswari Gurusamy . Compact EBG structure for ground bounce noise suppression in high-speed digital systems. AIMS Electronics and Electrical Engineering, 2022, 6(2): 124-143. doi: 10.3934/electreng.2022008
    [7] K. Madhava Rao, B. Karthik Reddy, C. Rameshkumar Reddy, K. Charan Kumar, Jakka Yeshwanth Reddy . Implementation of on-chip high precision oscillators with RC and LC using digital compensation technique. AIMS Electronics and Electrical Engineering, 2022, 6(2): 188-197. doi: 10.3934/electreng.2022012
    [8] Hakkee Jung . Analytical models of threshold voltage and drain induced barrier lowering in junctionless cylindrical surrounding gate (JLCSG) MOSFET using stacked high-k oxide. AIMS Electronics and Electrical Engineering, 2022, 6(2): 108-123. doi: 10.3934/electreng.2022007
    [9] Imad Ali, Faisal Ghaffar . Robust CNN for facial emotion recognition and real-time GUI. AIMS Electronics and Electrical Engineering, 2024, 8(2): 227-246. doi: 10.3934/electreng.2024010
    [10] Suliana Ab-Ghani, Hamdan Daniyal, Abu Zaharin Ahmad, Norazila Jaalam, Norhafidzah Mohd Saad, Nur Huda Ramlan, Norhazilina Bahari . Adaptive online auto-tuning using Particle Swarm optimized PI controller with time-variant approach for high accuracy and speed in Dual Active Bridge converter. AIMS Electronics and Electrical Engineering, 2023, 7(2): 156-170. doi: 10.3934/electreng.2023009
  • A design is presented, in which the DDC112 current-input analogue-to-digital converter is combined with a PIC microcontroller and associated circuitry to give a simple and economical dual-beam photometer / electrometer. The PIC supervises the operation of the analogue-digital converter and performs a lock-in function using a rolling average filter, which enables intensity measurement to parts per million. It also synchronously controls a regulated current source to drive, typically, one or more power LEDs as light sources. It has been applied in various fluorescence and absorbance measurements and can be used with Cavity Enhanced Absorption Spectrometry to determine ultra-low absorbance. An expanded version has been created with a PIC32 processor handling eight channels for a PixelSensor multispectral detector. All circuit details and source code are made available.


    The author had been tasked with improving the signal conditioning around a fluorescence sensor for ammonia measurement [1]. The existing system used an unstabilised continuously illuminated LED and a photodiode, a combination certain to give poor results [2]. Initial improvements centred on sine wave LED modulation at audio frequencies with synchronous detection to remove the effects of DC offset and uncorrelated noise, but low frequency noise and drift remained a problem; this was because LEDs exhibit large temperature coefficients, both of forward voltage and of luminous efficiency, typically 1%/℃ [3]. The solution adopted was a dual fluorescence cell and a high gain differential amplifier prior to synchronous rectification. Results were good but not robust, still having too much drift and general instability.

    Related experiments on absorbance measurements clarified the need, not just for sensitivity, but for very wide dynamic range. Fluorescence and scattering are 'dark-field' measurements, that is, the whole signal is due to the analyte, so no fluorescence = no signal. Absorbance measurements are 'bright-field', which is to say that the analyte causes a reduction (which may be a very small reduction) in the detected signal; it is much easier to make a detector of high sensitivity to detect small amounts of light than it is to make a detector of high stability to detect small variations of light.

    A digital lock-in amplifier was tested (Scitec 450) which offered a wide dynamic range and selectable voltage or current mode input. It appeared that one could directly connect a photodiode to the input in current-input mode, but this proved impossible, as the photodiode capacitance induced instability and oscillation at the input stage. There is a wide range of literature on the difficulties of amplifying photocurrents and a well understood set of trade-offs between gain, bandwidth and noise in transimpedance amplifiers [4].

    A paper by Dorrington and Künnemeyer [5] provided the inspiration for this design. They used the DDC112 and a very low-end microcontroller to create a lock-in amplifier. This paper offers a refinement of that work, with the intention of bringing the technique up to date and complementing recent instrumental bioassays, most of which employ fluorescence, scattering or absorbance.

    The DDC112 (Burr-Brown, Texas Instruments) is marketed as a "Dual Current Input 20-bit Analog to Digital Converter". It is the fusion of a medium-speed 20-bit delta-sigma ADC with a switched-integrator front end. The front end is available separately as the ACF2101 [6] which is perhaps simpler to understand. Essentially it uses a capacitor, rather than a resistor, as the feedback element around an electrometer amplifier. Thus it is a charge integrator. Internal signal routing is handled by FET switches. Anyone who has used such switches, for instance the common CD4051 transmission gate for the control of analogue signals, will have met the problem of charge injection. Logic level switching voltage applied to the FET gate transfers, through the gate capacitance, a small amount of charge into the channel, creating synchronous noise; a clear explanation of FET switch pathology is given here [7]. In a fully integrated system, charge injection can be completely cancelled, by controlling matched pairs of FETs with complementary switching waveforms [8]. The ACF2101 is built around a low-noise DIFET operational amplifier and can be used in place of any transimpedance (current-in, voltage-out) amplifier where data is to be collected in discrete intervals, rather than continuously; fortunately, that is exactly the situation in a lock-in amplifier. As a stand-alone device, the ACF2101 has a wide range of clocking speeds, but when coupled with an ADC, there is no need to integrate for less than the analogue-digital conversion time. In the DDC112, a state machine automatically sequences the various switches to provide auto-zero, integrate and hold across two integrating input channels. As one channel is integrating current from the photodiode input, the other channel output is made available to the ADC for conversion, so photocurrent collection is continuous. Within the same device family, much larger systems are available, such as the remarkable DDC2256 with 256 inputs and 24-bit converters – extreme performance for slightly more than $1 per channel, and a key component for Computed Tomography (CT) scanners, where X-rays impinge on large arrays of scintillators and photodiodes. At the more sedate data rate of this photometer, the DDC112 communicates via a simple clocked serial data stream in the time slots between conversions.

    Microchip's mid-range microcontrollers include several devices with built-in USB capability. Device support from Microchip includes firmware examples for a range of USB profiles so that, upon connection, the device can announce itself to the host computer's operating system by a 'profile'; for example, an audio device, a mass storage device, a communications device (COM port), or a Human Interface Device (HID) such as a mouse or keyboard. These various profiles incorporate different communication protocols – for instance, a mass storage device does not need to respond instantly, but must transport bulk data efficiently. An audio device does not have a high throughput, but must transport data at exact, uninterrupted speeds (isochronous transmission). A HID is quick to respond, but only carries small amounts of data (64 bytes) at each transfer and is not isochronous but depends on the host's operating system. In fact, even though HID transfers are called 'interrupt', there is really no such thing in USB – the device is always polled by the host [9].

    The DDC112 requires precise timing for its integration and conversion cycles, so it is not possible to run the chip directly from a general purpose computer. Instead, the PIC microcontroller uses internal interrupts to control the DDC112, while employing the spare time between USB communications to do the subtraction and averaging necessary for the digital lock-in function. In the first design presented, a relatively low-end device, the 8-bit PIC18F14K50, handles all calculations and communication; the whole circuit is powered through the USB connection, and an optically isolated output facilitates synchronous switching of (typically) a LED light source.

    Untangling the state machine for the internal operation of the converter requires careful study of the data sheet. There is just one A–D converter multiplexed between two front ends, and 'continuous' and 'non-continuous' integration modes, the latter occurring when the integration time is shorter than the ADC measurement intervals. In this application, the sequence always uses continuous mode, and the state machine was explicitly initialized by sequencing the DDC112 control line 'CONV' following power-up [10]. Once initialized, CONV was subsequently toggled constantly by a short, high priority interrupt routine triggered by PIC Timer 1. With a timer clock rate of 1.5 MHz, interrupts are generated at intervals adjustable from about 0.4ms (>2500 samples per second) to about 43 ms (>23 samples per second).

    The interrupt was very simply coded as


     | Show Table
    DownLoad: CSV

    Here, CONV is actually the memory-mapped address of a hardware port pin, so the DDC is directly controlled. To further ensure predictable synchronous operation, both the DDC112 and the PIC are clocked from the same 12 MHz oscillator. FET is the address of another pin, which synchronously switches the light source. Thus, a full Phase Sensitive Detection (PSD) cycle comprises two integrations and conversions (one for each input channel) with the light source on, and then two further conversions with the light source off. The results of the latter are subtracted from the former and a running average taken as described below. The timer reload value determines the interrupt frequency and can be altered from the host computer via USB.

    As proposed by Dorrington [5] a single pole low pass IIR filter was implemented with a single coefficient N = 256:

    yn=yn1+(xn1xn)N2yn1NwhentheLEDisoff,and (1)
    yn=yn1+(xnxn1)N2yn1NwhentheLEDison. (2)

    This is similar to the Exponential Moving Average, the simplest possible discrete low pass filter. Using the mid-range PIC processor there was ample time for division rather than bit shifting; the expression takes 137 uS for both channel at a 48 MHz master clock rate.

    In early experiments with this system, N was made variable in order to give different filter time constants. However it was found that, if N was large, rounding errors in the division would cause a steadily increasing offset such that yn would eventually become quite different to xn. This is shown in Figure 1, where the sampling rate and N were both 2425; the X axis shows time of day, so it is a slow but significant drift. After identifying the problem, the incoming 20-bit values from the ADC were left-shifted, effectively multiplying by 256, during the process of reading each byte from the converter and the coefficient N was restricted to a range of powers of 2 to prevent rounding errors.

    Figure 1.  Digital filter: integer arithmetic rounding errors cause drift.

    The output of the lock-in calculation can then be low-pass filtered by saving in a circular buffer with a boxcar average taken by adding the newest values and subtracting the oldest values. This method maintains the original sample rate and is therefore of use in dynamic measurements and control systems. However, we needed the sample rate to be decimated, that is, greatly reduced to produce manageable amounts of data for static and slowly changing samples. Decimation was simply performed by summing and averaging samples at the desired data intervals. Combinations of filtering and decimation are used to give a consistent final measurement rate, even though actual integration times vary.

    A useful property of the integrating converter, most commonly seen in digital multimeters, is that if the integration time is a multiple of the electrical mains supply period, any induced interference cancels out [11]. For this system, that means that long integrations should be timed as multiples of 20 ms (or 16.66 ms for 60 Hz mains). Conversely, an integration period of 10 ms with a lock-in cycle of 20 ms is the worst possible setting because the lock-in will detect mains frequency as a valid signal. A simple on/off lock-in detector is also susceptible to harmonics of the mains frequency [12]. Consequently, short integration rates must be non-harmonic multiples: 75 Hz, 125 Hz, 175 Hz, ranging up to 2425 Hz, the fastest possible, given a 12 MHz master clock. A selection of these integration times were made available in the software.

    The USB 'stack' exercises specific hardware within the PIC, to communicate bi-directionally through a pair of wires. USB cables carry +5 V and ground as well as signals, and the USB standard provides for the supply of up to 500 mA per device which is ample for this application, including driving indicator LEDs and an opto-isolator for LED modulation control. The HID protocol used in this project is simple and predictable: each transaction takes 1ms so a command and reply takes 2 ms.

    The PIC uses a special 2-port RAM so USB transactions are independent of the main program flow. The usual way of running the USB stack in a PIC is by interrupt; the USB hardware interrupts the program when it needs servicing - for instance, when a message has arrived in the buffer. Interrupt operation is unacceptable here, since the lock-in has to have priority. It would be possible to prioritize the interrupts, but it is much simpler to put the USB stack in 'polling' mode, called at frequent intervals from the main loop. The USB stack must be serviced by calling the function USBDeviceTasks() at least once every 1.8 ms [13], requiring a reasonably fast main loop. In fact, the main loop and calculations must be complete within 0.66 ms to make use of the DDC112's maximum conversion rate. The time taken to do these calculations can be found through simulation, but it is more reassuring to use a spare pin on the PIC, toggle it with a command at the beginning and end of a software routine and measure the resulting pulse length on an oscilloscope – proving, in this case, that the calculations for phase-sensitive detection and averaging, with call and return, take 0.28 ms.

    There are three functional sections: the microcontroller, switching interfaces and the converter with its high impedance current-sensing inputs. It can be assumed that the +5 V power line is noisy – very noisy, relative to the signal levels we want to measure, so precautions are needed in terms of filtering and circuit board layout. Power is filtered right at the entry point with low-inductance ceramic capacitors and a ferrite-cored inductor. Standard inductors should not be used, as noise spikes can induce ringing; ferrites suppress this problem. The circuit board was laid out with regard to the usual need to separate analogue and digital ground planes; these are joined at just one point (Figure 2).

    Figure 2.  DDC112 lock-in photometer circuit diagram.

    One interesting issue was that, in an early version, both power and ground were separated by inductors in an attempt to minimize analogue noise. This caused early mortality to two (expensive) DDC112s when, at switch-on, the voltage at the digital ground pin was briefly quite different to that of the analogue ground pin, causing unintended internal conduction. Separately named analogue and digital ground pins in ADCs can be somewhat misleading; the two should always both be connected to the analogue ground plane, but, when directly interfaced to a processor, the analogue and digital planes must be at practically the same potential. This was resolved here by ensuring that the analogue and digital ground planes are joined, but only in one place, and in a place that ensures that noisy digital ground currents do not flow through any of the analogue ground plane [14]. Data sheet guidance was followed, placing power supply decoupling capacitors as close as possible to the device pins, and buffering the reference supply voltage. In the 'all-in-one' combined source and detector circuit board shown below (Figure 3) the source LED is run at a constant 20 mA, derived by impressing 2 V across a 100 ohm resistor in a conventional current sink circuit. Rather than modulating the current source, the LED current is diverted through FET Q2 to turn it off. This means that the current draw remains constant so as not to disturb the supply rail. This scheme is generally applicable for LED modulation even at very high currents and ensures fast switch-on and switch-off.

    Figure 3.  DDC112 'all-in-one' and user interface.

    Microchip provides a.dll [15] which simplifies the creation of host applications. This project used Visual C# 2008 originally, now updated to Visual C# 2017, to make a simple chart-recorder type user interface. HID.dll does require some 'unsafe' code, that is, not managed by the dotnet framework, because of the use of pointers; if a more secure environment is required, the 'libusb' library [16] is a well-known multi-platform alternative. Within the C# project: Following initialization, communication involves loading a 64-byte buffer (typically with a command to read data), sending it and receiving a 64-byte buffer by return. Results are reconstituted from the string of bytes and can be saved to a.csv file – this has been used for subsequent import to Excel. As well as HID.dll, the NPlot chart library [17] was imported and set up as a scrolling chart recorder, with a few numeric controls and buttons added to control integration time, filter coefficient etc. Further buttons allow the user to set up zero and full scale readings. Zero is of course not necessary when in lock-in mode – it is constantly auto-zeroed. Once a 'full scale' reading (corresponding to 100% transmittance or zero absorbance) the graph switches to present absorbance units directly; absorbance calculations are explained in section 5, below. Windows is not the only presentation platform; a more recent application took the HID framework made available by Measurement Computing [18] to attach the device to a Raspberry Pi as an embedded photometer within a microbioreactor system.

    A large proportion — too many to list here — of instrumental chemical and biological assays have an optical basis. In optical absorbance measurement, an excitation source generates radiation (ranging, according to the instrument, from infra-red to ultraviolet wavelengths) which is passed through the sample and measured by a detector. Generally, the instrument includes a method of selecting the radiation wavelength, using filters, prisms or gratings. Absorbance is related to concentration in accordance with the Beer-Lambert Law:

    absorbance=log[P0P]=molarabsorptivity×pathlength×concentration (3)

    where P0 is the optical power measured with no sample (or, more commonly with a non-absorbing 'blank' sample to allow for optical losses in the sample vessel walls) and P is the optical power measured with the sample in place. Molar absorptivity is a property of the material being measured (the analyte) and varies with wavelength, so analysis is normally carried out at a particular wavelength. Instrumentally, there are difficulties when absorbance is very high, because the detected radiation power P is very low and possibly lost in noise.

    A different problem — that of resolution — arises when the absorptivity is weak, or the sample dilute, such that the absorbance is very small and P ≈ P0. As seen in the equation, the ability to resolve small values of absorbance corresponding to dilute or weakly absorbing samples depends directly on measuring very small reductions in light level – as stated before, this relies on ADC resolution. If we adjusted the blank intensity to maximize the ADC reading and could achieve the ideal 20-bit resolution, the smallest measurable absorbance would be about 4 × 10-7 absorbance units. This performance is not possible in practice, due to shot noise, sub-optimal set-up, stray light, scattering, reflections, temperature drift etc.

    It is possible to increase instrumental sensitivity using 'cavity enhancement', where the light passes through the sample multiple times in a resonant mirrored cavity [19], but it's also worthwhile using the best detector resolution available.

    At the high-current end, the DDC112 is limited by the integration capacitor and integration time. Although the data sheet specifies an external capacitor limit of 250 pF, the application note [20] states that much larger capacitors can be used, up to 2 nF which equates to 7800 pC per integration. With a minimum integration time of 333 us, this equates to 23 uA continuous current and, according to the application note, 750 uA momentary maximum. At the low current end, the DDC112 can integrate for long periods, limited by charge leakage, but in this design, at 200 ms and 50 pC (the smallest integration capacitor) full scale equates to about 240 pA (remembering the 4096-count offset). It is found that, with filtering, the device noise equates to only 1–2 counts as shown later and each count corresponds to about 0.2 fA – around a thousand electrons per second.

    The chart (Figure 4) records the output of a blue LED (470 nm, HLMP-CB2A-VW0DD, Broadcom) run at 20 mA forward current, illuminating (but not equally) two TO-18 housed photodiodes (BPX65, Centronic). The circuit was contained in draught-proof box and left for about half an hour. The very high resolution can be seen from the y-axis, which, zoomed in, easily demonstrates a problem – drift.

    Figure 4.  Resolution of thermal drift.

    Sources of Noise and Drift

    Note that the full-scale reading is only half of 220 - 4096, that is 520192, since the LED is only on half of the time. The short-term noise is only a few counts in several hundred thousand. It differs between channels A and B: this is attributed to a non-symmetrical circuit board layout, where the current source was located close to one input and the LED current flowed through that area – a different version, with an external LED supply and modulator, did not exhibit this problem. The most obvious problem is temperature-induced drift: all LEDs exhibit a large temperature coefficient of both efficiency and forward voltage [2] which is not prevented simply by operating from a constant current source. Similar problems apply to all light sources, so the normal arrangement is the 'dual beam', where a single light source is split into two paths, one of which includes the sample (measured intensity P), one of which is blank (measured intensity P0). Then, the measurement is ratiometric so the source intensity should be uncritical.

    However, in Figure 4, we saw that the ratio also drifted, even though the photodiodes were adjacent, because they were not sufficiently closely thermally coupled. This was corrected with a few turns of copper tape joining the photodiodes and, as seen in the next set of results (Figure 5) the ratio is quite constant. This would be the normal situation in an instrument: the detectors would be mounted in a solid block, typically of aluminum. When converted via the Beer-Lambert equation, this variation in ratio corresponds to an uncertainty of about 3 × 10-5 absorbance units – despite the fact that the circuit was at this time open to room illumination, which is why the average reading varies noticeably even though the lock-in reading is unaffected. There remain some short-term correlations between the noise in the two channels, visible in the lock-in readings. This is due to the common source, that is, the LED and drive circuitry, and could be due to relatively short-term variations in LED temperature; the LED, being warm, is more affected by draughts and convection than are the photodiodes.

    Figure 5.  Results with thermally coupled photodiodes.

    The device has also been used in fluorescence detection. Here, we require low noise and high sensitivity. To illustrate; in (Figure 6) the LED power is turned off and the photodiodes covered with black cloths, though evidently not completely – notice the ingress of ambient light in the lower, average-readings plot. The sensitivity was increased by a factor of 340 by increasing the integration time to 20 ms with 50-sample averaging and reducing the integration capacitor to 50 pC full-scale. Again it is seen that the lock-in ignores stray light and indicates noise below 2 counts rms.

    Figure 6.  Low light response.

    This noise level equates to

    2counts×50pC×50samples/sec21940961fA (4)

    A later version of the USB photometer employed a PIC32MX processor (again with USB) connected to two DDC114 converters, each handling four inputs from an 8-photodiode array (Figure 7). This circuit uses a FET gate-drive opto-coupler, (ACPL-P483, Avago) seen at the left below, to switch an external power FET and high-current white LED source. The PIC32 needs very good power supply decoupling with at least 10uF (ceramic) directly at the pins to minimize noise. Performance was similar to the DDC112. Care was taken to keep the low-noise analogue circuitry away from the digital areas: in this example the earth planes were separated by ferrite beads but these were of very low resistance, and no opto-isolator LED current was taken through the analogue plane.

    Figure 7.  8-channel detector using 2 x DDC114 and PIC32MX (voltage ref. on rear side).

    The PIC32 processor, costing hardly any more than the 8-bit version (and far less than the converters) has single-cycle multiply and will can do a 32-bit divide in less than a microsecond. With hundreds of microseconds of spare time between conversions, a higher-order digital filter could be implemented if required, though the noise figures already demonstrated should show that there is no longer a place for conventional photodiode amplifiers in photometers. There are more advanced modulation schemes which could be applied in open-air measurement designs such as the measurement of turbidity in water treatment plant: The present system uses the most basic on/off (square-wave) phase-sensitive modulation and is susceptible to external noise at odd multiples of the modulation frequency – hence the restricted range of integration times. Using extra pins on the processor to synchronously switch three or four current sources could give a pseudo-sine source modulation waveform (a Walsh function modulation) which, with suitable multiplication coefficients, would greatly suppress spurious harmonic responses [21]. The ability of integrating converters to reject such periodic interference does depend on knowing the exact mains frequency, which can drift; a previous publication [22] has discussed this and used a frequency-tracking scheme for optimization. Such tracking could also be applied here, if the circumstances of use exposed the detectors to mains-powered ambient light.

    Switched-integrator input analogue-digital converters originally designed by Burr Brown and presently manufactured by Texas Instruments can be used to make high-performance lock-in electrometers and photometers. Supervision and communication with a low-cost microcontroller facilitates the construction of an easy-to-use USB plug-and-play system with unusually wide dynamic range. Since most small microcontrollers have limited arithmetic abilities, care is needed to avoid errors in filter calculations. There is little extra cost and significant benefit in using 32-bit microcontrollers. More advanced noise-rejection techniques, such as the Walsh demodulator, would extend the system's utility further. A version to fit on the Raspberry Pi as a HAT (Hardware Attached on Top) is planned; although the Pi can perform complex digital filtering, a supervisory microcontroller would still be required to ensure predictable CONV switching. In many cases, short integration times are required (shorter than the 20 ms (16.66 ms) period of mains interference) but the benefits of rejection may be easily claimed by summing the results of multiple conversions – for instance, ten 2 ms integrations and conversions, summed, equate to a single 20 ms conversion with mains rejection.

    The author declares no conflict of interest in this paper.

    Circuit diagrams, indicative PCB layouts, Gerber files and source code are available on request from the author at the contact email address. Both the PIC18F14K50 (8-bit) and the PIC32MX250F128B (32-bit) processors were programmed with Microchip's bootloader program, which greatly simplifies updates: pressing and holding a switch causes the processor to reboot using an alternative USB HID identity, so that the compiled hex file can be downloaded without using a programmer. The bootloader itself does have to be programmed in using a programmer such as the PICkit3, but only once. Due to the small amount of memory in the 8-bit PIC, the bootloader requires heavily optimized compilation which is only briefly available in the free version of the compiler (during the evaluation period) but there is no need for recompilation, one may simply use the provided.hex file.

    Tools used during development:

    MPLAB IDE v8.92

    https://www.microchip.com/development-tools/pic-and-dspic-downloads-archive

    C18 Compiler

    https://www.microchip.com/Developmenttools/ProductDetails/SW006011

    XC32 Compiler

    http://ww1.microchip.com/downloads/en/DeviceDoc/xc32-v1.30-windows-installer.exe

    Visual Studio 2008 Express

    http://download.microsoft.com/download/8/B/5/8B5804AD-4990-40D0-A6AA-CE894CBBB3DC/VS2008ExpressENUX1397868.iso

    Visual Studio 2017 Community

    https://visualstudio.microsoft.com/downloads/

    Schematic & PCB Design

    Proteus Design Suite https://www.labcenter.com



    [1] Seetohul LN (2009) Novel applications of optical analytical techniques. Unpublished PhD Thesis, Teesside University.
    [2] Johnson M (2003) Photodetection and measurement: maximizing performance in optical systems. McGraw-Hill.
    [3] ibid, p165–166.
    [4] Jung WG (2006) High Impedance Sensors. Op Amp Applications Handbook. Section 4-4, Analog Devices, 4.39-4.56. Available from: https://www.analog.com/media/en/training-seminars/design-handbooks/Op-Amp-Applications/Section4.pdf.
    [5] Dorrington AA and Kunnemeyer R (2002) A simple microcontroller based digital lock-in amplifier for the detection of low level optical signals. Proceedings of the First IEEE International Workshop on Electronic Design, Test and Applications (DELTA 02), 486–488. doi: 10.1109/delta.2002.994680
    [6] ACF2101 Data Sheet: Texas Instruments. Available from: https://www.ti.com/lit/ds/symlink/acf2101.pdf.
    [7] Analog Devices Engineering (2009) Analog Switches and Multiplexers Basics. Available from: http://www.analog.com/media/en/training-seminars/tutorials/MT-088.pdf.
    [8] Baker BC (1993) Application Bulletin AB-57A Comparison of the noise performance between a FET transimpedance amplifier and a switched integrator. Available from: nic.ath.cx/PDF/Burr-Brown/apnotes/AB-057.pdf.
    [9] USB Implementers Forum (2000) USB 2.0 Specification section 5.7: 48. Available from: http://sdphca.ucsd.edu/Lab_Equip_Manuals/usb_20.pdf.
    [10] Burr-Brown Data Sheet (2004) SBAS085B Dual Current Input 20-Bit Analog-to-Digital Converter DDC112: 28. Available from: http://www.ti.com/lit/ds/symlink/ddc112.pdf.
    [11] Kester W and Bryant J (2009) MT-027 ADC Architectures VIII: Integrating ADCs. Available from: https://www.analog.com/media/en/training-seminars/tutorials/MT-027.pdf.
    [12] Amatek Scientific Instruments (2008) Technical Note TN 1001. Available from: https://www.ameteksi.com/-/media/ameteksi/download_links/documentations/7210/tn1001_specifying_lock-in_amplifiers.pdf.
    [13] Comment in usb_device.h (line 197) Microchip Libraries for Applications. Available from: http://ww1.microchip.com/downloads/en/softwarelibrary/mla_v2013_06_15_windows_installer.exe.
    [14] Zumbahlen H (2012) Staying Well Grounded. Available from: http://www.analog.com/en/analog-dialogue/articles/staying-well-grounded.html.
    [15] Microchip compiled library for inclusion in .net projects. Available from: http://ww1.microchip.com/downloads/en/softwarelibrary/mla_v2013_06_15_windows_installer.exe: HID class.dll found in \USB\Device - HID - Custom Demos\HID DLL - PC Software\Microsoft Visual C++ 2008 Express\ HID class.dll.
    [16] Linux library 'libusb' generic access to USB devices. Available from: https://libusb.info/.
    [17] Howlett M, et al. (2014) NPlot graph plotting library. Available from: http://netcontrols.org/nplot/wiki/index.php.
    [18] Measurement Computing HID library for Raspberry Pi. Available from: https://www.mccdaq.com/TechTips/TechTip-9.aspx.
    [19] Seetohul LN, Ali Z and Islam M (2009) Liquid-phase broadband cavity enhanced absorption spectroscopy (BBCEAS) studies in a 20 cm cell. Analyst 134: 1887–1895. doi: 10.1039/b907316g
    [20] Burr-Brown application Bulletin SBAA027. Available from: http://www.ti.com/lit/an/sbaa027/sbaa027.pdf
    [21] Johnson M (2003) Photodetection and measurement: maximizing performance in optical systems. McGraw-Hill, 104–108.
    [22] Bateson SW and Woodward AT (1994) High-resolution noise-rejecting ADC. Computing & Control Engineering Journal 6: 113–119. doi: 10.1049/cce:19950303
  • This article has been cited by:

    1. Mayur Parekh, AbdulAziz Ali, Zulfiqur Ali, Simon Bateson, Fathi Abugchem, Leon Pybus, Christopher Lennon, Microbioreactor for lower cost and faster optimisation of protein production, 2020, 145, 0003-2654, 6148, 10.1039/D0AN01266A
    2. Abbas Salman, Helen Carney, Simon Bateson, Zulfiqur Ali, Shunting microfluidic PCR device for rapid bacterial detection, 2020, 207, 00399140, 120303, 10.1016/j.talanta.2019.120303
    3. Anna Fischbach, Michael Lamberti, Julia Alexandra Simons, Erik Wrede, Alexander Theißen, Patrick Winnersbach, Rolf Rossaint, André Stollenwerk, Christian Bleilevens, Early Blood Clot Detection Using Forward Scattering Light Measurements Is Not Superior to Delta Pressure Measurements, 2023, 13, 2079-6374, 1012, 10.3390/bios13121012
  • Reader Comments
  • © 2019 the Author(s), licensee AIMS Press. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0)
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Metrics

Article views(6387) PDF downloads(981) Cited by(3)

Figures and Tables

Figures(7)

Other Articles By Authors

/

DownLoad:  Full-Size Img  PowerPoint
Return
Return

Catalog