A Low-Cost Portable Microcontrolled Nephelometer for Potassium Determination

Um nefelômetro microcontrolado portátil e de baixo custo é proposto para a determinação de potássio em água de coco e bebidas energéticas. O nefelômetro foi construído utilizando dois LEDs (diodos emissores de luz) como fontes de radiação em 465 nm e 880 nm, dois fotodiodos como fotodetectores e um controlador de interface periférica (PIC) para aquisição e processamento dos dados. O nefelômetro foi utilizado para determinar íons potássio pelo monitoramento do precipitado formado na reação entre íons K e tetrafenilborato em meio básico na presença de álcool polivinílico. A curva analítica foi linear para potássio na faixa de concentração de 5,0×10 a 5,0×10 mol L, com um limite de detecção de 4,0×10 mol L. Um desvio padrão relativo de 0,2 % para uma solução de potássio 1,6×10 mol L (n = 10) foi obtido. Respostas rápidas e confiáveis e baixo consumo de energia são outras características do nefelômetro proposto.


Introduction
2][3] This technique has been applied to determine sulfate in water, 4 aqueous drug solubility, 5 and for immunoassays such as of proteins in maternal milk, 6 cystatin-C in serum, 7 and serum myoglobin in patients with acute pancreatitis. 8Generally, spectrofluorimeters and fluorimeters are analytical instruments widely applied for this purpose.However, components such as high-intensity radiation sources, sophisticated detectors and wavelength selectors, and other optical devices make such equipments expensive. 1,3Furthermore, these types of equipment are not portable and need microcomputers for control and data acquisition.
LEDs (light emitting diodes) are semiconductor devices with p-n junction that exhibit electroluminescence properties when a current passes through them.LEDs are widely exploited in the development of analytical instrumentation because of the high stability, low power consumption, and low-cost. 9Since LEDs emit radiation in a fairly narrow band with half maximum intensity generally in the range of 20-50 nm and they have a large variety of wavelength available.LED-based analytical equipment generally do not require sophisticated optical devices such as interference filters, monochromators, lenses, mirrors, and rifts. 1,3,9,10hotodiodes are photodetectors that have been successfully applied in the development of optical instrumentation because of their high sensitivity, good linearity, fast response, ease of amplification, low cost, and small dimensions. 3,4,11,12When the radiation is incident on the photodiode, an electric current is produced and it can be proportionally converted to voltage and measured using, for example, a microcontroller as the specific data interface. 3 PIC microcontroller (peripheral interface controller) is a small integrated circuit that is able to accomplish several control functions as a microcomputer.It can be divided into functional units such as memory unit, central processing unit, in/out data unit, clocks, and analog-to-digital converter (A/D). 13All functions of the microcontroller are controlled by software and are recorded on its memory unit.4][15][16] The latest versions of microcontroller are equipped with USB (universal serial bus) technology that permits an easier communication with other peripherals connected to it or access and retrieval of experimental data stored on the memory unit of the microcontroller.
Potassium is an important ion in the formation of the sodium-potassium pump and the transmission of nervous pulses.The lack of electrolytes in the body, mainly potassium, can cause a disease known as hypokalemia. 17,18The main sources of potassium are fruits (grapes, banana, raisins, and coconut water), meat (fish), and beans.Different techniques have been applied to determine potassium, the most frequently are flame atomic absorption spectrometry (FAAS) 19 and flame atomic emission spectrometry (FAES). 20Besides these, several other techniques could be used such as inductively coupled plasma optical emission spectroscopy (ICP-OES), 21 inductively coupled plasma mass spectrometry (ICP-MS), 21 capillary electrophoreses, 22 ion-selective electrodes, 23 turbidimetry, 18 and nephelometry. 24,25n this manuscript we describe the development of a portable microcontrolled nephelometer (PMN) constructed using LEDs as radiation source, photodiodes as detectors, and a microcontroller for the acquisition and processing of data.The advantages of this novel system are its simplicity, low-cost, facility to carry out in situ analyses, fast responses, and high stability.The nephelometer was evaluated for potassium determination in coconut water and energy beverages.
The sodium tetraphenylborate solution was prepared dissolving the salt in water and sonicating for 30 min.The following solutions were used for studies of concomitants: sodium chloride, calcium carbonate, magnesium chloride, fructose, sodium benzoate, sodium citrate, sucrose, tartrazine, EDTA, amaranth, fast green and brilliant blue.A stock solution of formazin (4000 FNU (formazin nephelometric units)) 26,27 was prepared to be used as a standard solution in the nephelometric measurements.This solution was stored in an amber flask for 24 h at room temperature to obtain a high homogenization and stability of the formazin solution.All other reagents used were of analytical grade.
The samples of coconut water and energy beverages were purchased in a local supermarket.The coconut water samples were filtered before the determination of potassium and energy beverage samples were used as received.

Apparatus
An atomic absorption spectrophotometer Intralab model GEMINI AA 12/1475, equipped with potassium hollow cathode lamp L 233 with emission at 766.5 nm and acetylene/synthetic air flame, was used.The blue LED (InGaN, 465 nm) model OVLGB0C6B9, ultrabright was acquired from Electronics ® (USA) and the infrared LED (AlGaAs, 880 nm) model QED 223 was from Fairchild Semiconductor ® (China).The photodiodes TSLB257 (blue sensor) and TSL260R-LF (IR sensor) were purchased from TAOS ® (USA).An Ocean Optics model USB 2000 (USA) spectrophotometer equipped with an optical fiber model ps50-2 was used to measure the emission spectra of LEDs used as radiation sources.An Orion model EA 940 (USA) pH meter equipped with a combined glass electrode (Analion, model V 620), with an external Ag/AgCl (3.0 mol L −1 KCl) reference electrode was used to determine pH.

Hardware
The emission spectra of LEDs are shown in Figure 1.The wavelengths of maxima emission (λ max. ) were 465 nm and 880 nm for blue and infrared LEDs, respectively.Bandwidths (λ 1/2 ) for blue and IR LEDs are 25 nm and 80 nm, respectively.The infrared LED (IR LED) was installed in the PMN in accordance with the ISO 7027 norms for nephelometers based on LED as the radiation source.According to ISO 7027 norms, lower reading nephelometrics for colored suspensions are always obtained owing to absorption of light of the measured wavelengths at the visible region.
As can be seen in Figure 1, the blue LED has a narrower bandwidth than the IR LED.It is due to an intrinsic limitation of the materials used in the manufacture of the IR LED (AlGaAs).
Nevertheless, the radiation emitted by the IR LED used in this study is more stable and it presents a narrower bandwidth than those furnished by other IR LEDs found in the market.Besides, the use of a radiation source with a bandwidth of 80 nm did not compromise the performance of the nephelometer as discussed in section results and discussion.
The LEDs were coupled to a BC548 driver (transistor) intended to provide greater power needed to obtain the maximum radiation intensity required for nephelometric measurements.However, to avoid heating and improve their reproducibility, precision, and accuracy, LEDs were coupled to resistors to limit the current that passed through them to a maximum of 40 mA and 90 mA for the blue and IR LED, respectively.This current is less than maxima electric current recommend by the manufactures, in these case 50 mA of continuous forward current for the blue LED and 100 mA for IR LED.
The photodiodes (TSLB257 and TSL260R-LF) were chosen because of their high sensitivity at a broad wavelength in blue and infrared regions, respectively, according to the manufacturer's datasheet.The TSL12S and TSL257 photodiodes both furnished by TAOS 12,[28][29][30][31] are compatibles with the photodiode TSLB257 and it could also be used as detectors in the developing of the proposed nephelometer.
Figure 2 shows the electronic circuit of the LEDs bias and the conditioning of the photodiodes and its connections  to the PIC microcontroller.The same electronic circuit was used for blue LED and TSLB257 or IR LED and TSL260R-LF.
The programmable microcontroller used was PIC18F4550 from Microchip Technology ® (USA) with the following features: 2048 bytes of RAM; 32000 bytes of Flash program memory; 256 bytes of EEPROM data memory; 35 ports type in/out; Interface USB 2.0 with a speed of 12 Mb/s and16384 possible instructions.The microcontroller exhibits an A/D multichannel converter with 10-bit resolution (2 10 = 1024 digital data) and was used as control and processing unit in the PMN (portable microcontrolled nephelometer) developed.
The PIC microcontroller sends 25 mA at a potential of 5 V for 0.25 s through the digital output port (pin 29) to the base of BC548 which amplifies to a maximum current of 200 mA.However, the current that reaches the blue LED was limit to 40 mA by variable resistors VR1 and VR2.The TSLB257 detects the light emitted and generate a current which was amplified and converted to voltage through the internal current-to-voltage converter, the voltage was output at the pin 3 of the photodiode.The programmable time of 0.25 s was enough to obtain an expressive amount of data and avoid drifting of the intensity of radiation emitted by the LED.This collected analog signal was converted to digital by the internal converter of the PIC (input at pin 2) and displayed on the LCD screen.The same procedure was carried out by the microcontroller to control the IR LED and TSL260R, however using the pin 30 (digital output) and pin 3 (A/D channel) of the PIC microcontroller, respectively.To IR LED the electric current was limited to 90 mA in order to produce the same radiation intensity emitted by the blue LED.
A block diagram of the constructed PMN is shown in Figure 3.The PIC controls all the functions of the equipment.Besides switch on/off of the LEDs and receive the analog data from the sensors, the PIC is able to read the control key commands, display the information on the LCD screen, storing data in the memory, and communicating externally with a computer through USB or serial ports.
An 8 MHz crystal oscillator was used as a time control to synchronize the functions of the nephelometer.The PIC functional capability enabled reducing the number of electronic components and permitting also the changing of different functions of the PMN without hardware modification.The use of PIC and small optic components reduces significantly the size of the constructed PMN.Thus, a high level of automation and portability of the PMN was achieved.
Figure 4 shows a picture of the developed equipment.The user can adjust the intensity of the LEDs using variable resistors located on the panel of the equipment, Figure 4(a).Three keys on the control unit permit the user to access any function of the main menu written in the software, Figure 4(a).As the equipment has a low current consumption of 240 mA h −1 , a Ni-MH 9 V rechargeable battery was used to provide power supply to the PMN.Therefore, four AA or AAA rechargeable batteries can also be used as power supply in the PMN.The use of a battery is advantageous to allow a higher portability which is very important mainly at in situ and online analyses.The electronic circuit was housed in a black box measuring 21 cm × 15 cm × 20 cm.The optical part was housed in a separate compartment to Inside the optical compartment, the LEDs are fixed to a moving piece of acrylic with a central hole of 1 cm diameter that allows radiation reach the sensors.
The movement of LEDs allows adjusting the intensity of the emitted radiation and an accurate focus toward the sensors.The LEDs were set at a distance of 4 cm from the sensors.All the analyses were performed using a plastic cuvette of 1 cm of optical path with four sides polished.The PMN's construction allows easy adaptation for a flowinjection analysis.

Software Nephe 0.3
The software Nephe 0.3 to drive all functions of the PMN was developed in C language.Initially, the software checks the digital and analog ports of the PIC after it automatically initializes the control functions of the device.The control functions are chosen and selected using the three keys on panel of the instrument.A message is then displayed on the LCD screen as a main menu containing information on the kind of measurement that should be executed by the equipment.Thus, the user can choose a particular function (nephelometry at 465 or 880 nm, instrument noise, reading of blank or reset).When the nephelometric function is selected, the software automatically performs all calculations to convert the digital data to arbitrary units (A.U.) for nephelometric measurements at 465 nm [1][2][3] or to FNU (formazin nephelometric units) at 880 nm as recommended by ISO 7027 26 and ASTM (American Society for Testing and Materials) norms. 27he obtained response was calculated through a preset process of integration carried out by the PIC which performs 60 cycles (program loop) during 0.25 s.The maximum signal obtained from the photodiode-LED system is 5,000 mV (state of saturation of the sensor) which it is equivalent to 60 × 1024 digital data (61,440) obtained from the PIC's analog-digital converter (ADC).In other words, each 1 mV from the photodiode-LED system is equals to 12.288 digital data from ADC of microcontroller.To avoid saturation of the photodetector used, the PMN was programmed to operate at ca. 4,899 mV (60,200).After this, the result is shown on the LCD screen of the equipment.

Applications Operating procedure of the PMN
The measurements using the PMN were performed very simply.The equipment was initially switched on, and because of its simplicity and stability, a short time (5 min) was necessary in your stabilization.The plastic cuvette was filled with the solution and placed in the support cell, and soon after the optical compartment was closed.The microcontroller executes the command signals and drives the LEDs according to the user's choice, performs the A/D conversion and integration of data, as previously discussed.Enabled by the Nephe 0.3 software, the PIC performs all these steps automatically.

Study of performance, reliability and calibration
In order to check up the performance and reliability of the equipment, studies of stability, signal-to-noise ratio, and calibration with formazin standard solution were performed with the proposed nephelometer. 26,27

Analytical application
The analytical application of the PMN was evaluated in the determination of potassium (A) using sodium tetraphenylborate as reagent (R) and polyvinyl alcohol (S) as colloid protector. 24,25In general, a suspension is formed by reaction between the reagent (R) and the analyte (A) in the presence of the surfactant (S) at a controlled pH.All of these variables are important and should be simultaneously studied.Thus, a 2 4 factorial design with replicates at the central point (n = 3) was developed to determine potassium at the levels of each variable noted in Table 1.
The following sequence of addition was executed: Firstly, the reagent was prepared at a specific pH (the pH of reagent is prepared according to the factorial design) and added into a 5.0 mL volumetric flask; the analyte was then added followed by the addition of surfactant.The nephelometric data shown on the LCD screen of the PMN were collected after a lapse of 2 min to allow the formation and stabilization of the suspension.This procedure was performed for all experiments.To minimize the changes in the properties of the precipitate such as shape and size of the particles, all the experiments were carried out at a controlled temperature of 18 ± 2 °C. 32,33

Performance of the PMN
The signal-to-noise ratio of the developed PMN was estimated measuring the detected signal in the absence of radiation and with an incident radiation of an LED positioned at 180º to simulate the maximum amount of light scattered that could reach the detector in the nephelometric determinations.Data of potential (mV) are shown in Figure 5.For this purpose, in Figure 5(a) the LED (465 nm) was switched off and the instrument noise or dark signal (spurious signal detected in the absence of radiation) was registered.On the other hand, in Figure 5(b) the LED was switched on and the useful signals were registered during 0.25 s to each measurement.
According to Figure 5, the instrument noise (dark signal) is very low and corresponds to 0.34% of the useful signal.So, the PMN has a wide range of operation, in fact, 99.66% of signal is available for analytical purposes.Besides, before each measurement, the PMN driven by software discounts the instrument noise, thus, the acquired data will be exclusively due to light scattering.Besides, the relative standard deviation of 0.01% obtained from the data collected (Figure 5 (b)) shows the precision of the equipment.
These tests were performed to evaluate the stability of the electronic circuit of the developed nephelometer and not of the chemical system, which explains the use of the empty cuvette in the optical compartment.
The same tests employing the IR sensor (TSL260R-LF) and IR LED were performed and the optical behavior was close to that obtained previously, due to the similarity of configuration.In fact, a useful signal of 99.70% and a RSD   of 0.03% were achieved.The data were collected at a room temperature of 25 °C.The stability of equipment was tested in the temperature range from 20 to 45 o C and a very stable response with a RSD of 0.07% was found.

Calibration of the PMN
Results of calibration with formazin for nephelometric analyses were performed at wavelengths of 465 nm and 880 nm are shown in Table 2.
According to the results shown in Table 2, the linear ranges and coefficients of correlation for both wavelengths are compatible; however, the measurements carried out at 465 nm yielded a higher analytical sensitivity compared to those performed at infrared wavelength.In fact, the intensity of light scattering is inversely proportional to the fourth power of the wavelength of incident radiation (1/λ 4 ). 3 Thus, the difference between wavelengths of 465 nm (blue) and 880 nm (infrared) is enough to influence the quality of the nephelometric measurements.Thereby, as can be seen in Table 2, the detection limit of nephelometric measurements at 465 nm was one decade lower than those obtained at 880 nm.Therefore, the nephelometric determination of potassium was performed at 465 nm for further experiments.Meanwhile, the measurements at 880 nm were employed to avoid the interference effect of colored sample solutions.

Factorial design applied to determine the best parameters for potassium analysis
In order to find the best parameter for potassium determination, a 2 4 factorial design 34 employing the variables shown in Table 1 was elaborated.The most important variables of the factorial design were evaluated in the graph of effects, shown at supplementary information, SI, Figure S1.Altogether 19 experiments were carried out, 16 from factorial design and 3 from the replicates at the central point.
According to studies performed, the analyte (A) and the reagent (R) exert the highest effects and should be set at their higher levels (+) because these variables accentuate the scattering of light generating an increase of the analytical signal.On the other hand, the pH solution must be set at its lower level (−), because high pH values cause a negative effect decreasing the radiation scattering.Although the surfactant variable (S) had no statistical significance at the studied levels (the effect is close to zero in the axis of probability), it proved to be important to keep the stability of suspension and, hence, this variable was maintained in the factorial design.Thus, the experiment which supplied the best results was the following: A (+) = 1.3×10 −3 mol L −1 , R (+) = 2.5% (m /v), S (+) = 0.09% (m /v) and pH (−) = 11.1.All further experiments were carried out with these optimized parameters.

Potential interferences and recovery
Potential interferences in the determination of potassium ions (K + ) with sodium tetraphenylborate reagent using the nephelometric method were investigated at concentrations of 100, 10, and 0.1 times the concentration of the standard solution of 2.0×10 −4 mol L −1 K + .Among all the concomitants that were listed in materials and reagents section, only the fast green, amaranth (red), and tartrazine (yellow) dyes with −2.3%, −12.3%, and −76.2%, respectively, caused interference in the method used to determine potassium ions.As can be noted, tartrazine and amaranth are mainly responsible for decreasing the intensity of light scattering and consequently inducing the negative errors found.This absorption phenomenon was more pronounced with the yellow dye because it is the complementary color of the incident blue light (465 nm).The use of the IR LED reduced the levels of interference for all concomitants added to values lower than 1.0%.Because of this phenomenon, the ISO 7027 recommends the use of infrared radiation as standard for nephelometers based on LEDs aiming to overcome these drawbacks.Thereafter, addition and recovery studies were performed in order to evaluate the possible matrix effects on analyzed samples employing the proposed method.For this, three aliquots of standard solutions were added to each sample, as shown in Table 3.
As can be seen from Table 3, the recoveries varied from 95.8 to 105%.These recovery results suggest an absence of the matrix effect in the determination of potassium ions in those samples.

Analytical parameters for potassium determination
An analytical curve was constructed using the nephelometer at a wavelength of 465 nm to determine potassium ions by applying the reaction with tetraphenylborate.In supplementary information is shown this analytical curve, Figure S2.
The analytical curve presented a linear range of two decades of concentration and a correlation coefficient of 0.995.Some other results were summarized in Table 4.
The use of the nephelometer to determine potassium by the tetraphenylborate method supplied a satisfactory analytical sensitivity demonstrating its usefulness mainly at low concentrations.In fact, a low limit of detection of 4.0×10 −7 mol L −1 was obtained by applying the following equation: LOD = 3 Sb/B (Sb is standard deviation of blank and B is the analytical sensitivity).Besides, the microcontrolled nephelometer showed a reliable stability with an RSD of 0.2% for a 1.6×10 −4 mol L −1 potassium solution (n = 10).These values of RSD and LOD are better than those found in some of the works in the literature employing the same method. 18,25

Determination of potassium and reference method
The performance of the microcontrolled nephelometer to determine potassium ions was evaluated applying the method based on flame atomic absorption spectrometry (FAAS) used as reference.The data of concentrations of potassium samples determined by the proposed and reference methods are shown in Table 5.
As can be observed from Table 5, the data obtained using both methods are in close agreement at a confidence level of 95% (n = 3) and within an acceptable range of errors.It was also observed that the samples of coconut water had a high potassium concentration.These levels  were expected, since the coconut water is an excellent drink for the replenishment of this cation in humans.Applying the developed instrumentation is possible reach a good analytical throughput (ca.30 determinations in batch).Although the batch procedure has been used a reduced volume of waste was generated (5 mL per analysis).Besides, with the PMN is possible to couple it to a flow analysis system allowing increase the analytical throughput to ca. 90 determinations and reduce the waste generation to few mL or µL. 35lthough the equipment has been used for the nephelometric determination of potassium, it can be applied to the analysis of other analytes using techniques such as photometry and fluorimetry.This is possible because of the multiple arrays of detectors and radiation sources which together with the microcontroller allow a multifunction (multichannel) characteristic of the developed equipment, increasing consequently its applicability and robustness.Currently, our research group is exploring these multi-function features of the microcontrolled equipment developed in this study.

Conclusions
The PMN remained stable for a period exceeding 6 h uninterrupted with an RSD of 0.02%.Furthermore, studies assessing the signal-to-noise ratio were performed with the equipment and a useful signal average of 99.70% was obtained.This means that the microcontrolled nephelometer developed in this work can be used for a wide linear range, especially at low concentrations.The concentrations of potassium obtained using the proposed equipment were compared with those obtained by a reliable and wellestablished technique in the literature (FAAS) and there are not statistic difference to confidence level of 95%.The microcontrolled optical system developed and its control software were responsible in obtaining the satisfactory results of the PMN.Besides, the developed PMN can be advantageous, mainly for in situ and online analysis in remote places, often where access is difficult and measurements can be hardly obtained employing conventional equipments.The low-cost, ease-to-use, portability, robustness, low power consumption, and possibility of multi-channel detection are intrinsic features of the developed equipment based on microcontrollers as CPU.

Figure 1 .
Figure 1.The blue LED spectrum (InGaN, 465 nm) model OVLGB0C6B9, ultrabright acquired from Electronics ® and the infrared LED spectrum (AlGaAs, 880 nm) model QED 223 from Fairchild Semiconductor ® .The spectra were recorded using an Ocean Optics model USB 2000 spectrophotometer.The intensity values were recorded in arbitrary units (A.U.) and normalized to 4000 A.U.

Figure 2 .
Figure 2. The LEDs bias circuit (blue LED or IR LED) and electronic circuit of the conditioning (dotted box) of the photodiodes (TSLB257 or TSL260R-LF) used in this work are presented.R1, R2 and R3 are 330 Ohm, 10 kOhm, 10 kOhm, respectively.VR1 and VR2 are variable resistors of 100 Ohm and 1 kOhm.BC548 = transistor.

Figure 4 .
Figure 4.The PMN and its optical compartment.(a) PMN picture (1) key to activate the battery module, (2) potentiometers to adjust the intensity of LEDs, (3) control keys, (4) LCD screen, and (5) optical compartment.(b) A schematic diagram of the optical compartment with sensor TSLB257 (blue) at 90° with blue LED and TSL260R-LF (IR) at 90° with IR LED.To avoid spurious light, the compartment was painted with matte black ink.

Figure 5 .
Figure 5. Series of data (12 measurements) collected at a lapse of 30 min (total 6 h).(a) Instrument noise (dark signal, average of 17 mV) and (b) useful signal (an average of 4,900 mV).For this purpose, an empty plastic cuvette was used.

Table 1 .
4evels of variables applied in 24factorial design with replicates at the central point (n = 3)

Table 3 .
Addition and recovery of potassium ions in coconut water (A1) and energy beverage samples (A2 and A3).Each analysis was performed in triplicate (n = 3).The measurements were carried out at 465 nm

Table 4 .
Some analytical parameters obtained by application of the PMN and the proposed nephelometric method in order to determine potassium ions