**2. Materials and methods**

**1. Introduction**

82 Biofuels - Challenges and opportunities

, and CO2

mono-alkyl esters mixture [8].

alternative to diesel [13, 14].

yellow and white fat as raw materials.

by diesel, since diesel has a high heating value [5].

SO2

The trend in fossil fuel consumption is increasing; adding to that, the emissions of NO, CO,

ment, as well as the population quality of life [1–4]. Currently, engines with a highly developed torque are used for heavy work like urban transport, cargo transport, light passenger transport, agricultural machinery, emergency systems, craft and power generation powered

Some studies prove that increasing the percentage of biodiesel, that substitutes diesel, decreases the emissions produced by its combustion [6, 7]. The biodiesel is considered a renewable and ecological fuel drawn from lipids that are made to react with short-chain alcohol in the presence of a catalyst that can be acid, base or enzymatic, to produce a fatty acids'

The biodiesel contains oxygen in its molecule, which helps to increase the combustion efficiency inside the compression ignition engine's (CIE) combustion chamber [9]. The European Union is the leading producer of biodiesel across the world. In the case of America are the United States, Argentina and Brazil, who use soy, corn, canola, rapeseed, and palm oil, tallow

In 2013, the production of biodiesel was of 25 billion liters; while in 2015, it was around 129 billion liters. The world production of biodiesel grew 5.1 times between 2013 and 2015 [10, 11]. Diesel substitution for biodiesel, because of their similar characteristics, represents an alternative in many diesel applications, ranging from boilers to internal combustion engines [12].

It is essential to quantify the emissions caused by the CIE fueled by diesel and to determine the decrease in emissions regarding diesel. Biodiesel is acquiring increasing importance in the international context for it represents a rapid expansion of the industrial sector as a biofuel

Currently, international governments and organizations are introducing new regulations that establish a stricter limit to emissions as an effort to mitigate the emissions of greenhouse gases [15–17]. To verify that a reduction of emissions or more efficient combustion is being obtained, it is imperative to have systems to quantify the emissions. Usually, the systems to register the internal combustion gas emissions use specialized analyzers that operate based on standardized methodologies [18]. These systems provide information about the concentration in parts-per-million (ppm) or concentration percentages according to the type of gas released in the combustion. They are tools used to monitor and control combustion. At this time, there are many systems to determine the concentration of emissions; these systems can be portable or permanent, they present advantages and disadvantages, among these stands out the high acquisition cost with a range of 2000 up to 20,000 USD, rigidity, and the impossibility of being scalable [19, 20]. The use of these systems is limited to specific applications without having the versatility and flexibility to adapt them to other required uses. Nowadays, hybrid systems based on virtual instrumentations, a DAQ (data acquisition system), and a personal computer are being used

as an alternative to the traditional systems customarily used to measure emissions.

caused by the use of fuel oils like diesel affect directly and indirectly the environ-

### **2.1. Diesel-biodiesel mixtures**

The fuels used were PEMEX diesel, ultra-low sulfur, and biodiesel. It was obtained biodiesel through the transesterification of soybean oil in the presence of methanol, by alkaline catalysis. With these fuels, the following mixtures were prepared: B2, B5, B10, and B20. Some of the physicochemical properties for each of the mixes are presented below.

#### **2.2. Fuel kinematic viscosity**

The determination of the kinematic viscosity of the fuel mixtures B2, B5, B10, B20, and diesel was performed using a CAP 2000+ Viscometer, where the information of the PEMEX diesel kinematic viscosity was entered, whose value is between 1.9 and 4.1 (mm2 /s) at 40°C [30]. All determinations were performed in triplicate.

#### **2.3. Fuel heating value**

The high heating value (HHV) measurements were performed by the utilization of a calorimetric bomb IKA WERKE model C2000 basic. The equipment was calibrated before experimentation. The procedure was followed according to ASTM E711. The tests were performed in triplicate to obtain reliable results.

#### **2.4. VI for the measurement of O2 , CO, CO2 , NO, and SO2 gases**

The hardware system is composed of four systems. The first system is comprised of the O2 , NO, CO, SO2 , and CO2 sensors listed in **Table 1**. The characteristics and operating ranges of each of the used sensor are described, which were of infrared response and work under the nondispersive infrared (NDIR) principle. This analyzer is used to detect the presence of carbon dioxide up to a volume of 100%. It is possible to determine said gas concentration through an infrared source with a specific filtration, which is assembled inside the optical/ gas cavity. The infrared sensor interconnects with an electronic signal. The signal processing implies the linearization and compensation in temperature using algorithms in the system software. The infrared gas sensor uses a low frequency flash lamp drive that is controlled by an excitation circuit. Infrared radiation pulses reflect inside providing a trajectory through the gas and objective. "Pyros" pyroelectric detectors are used to determine the infrared signal change. The active pyroelectric is sensitive to the changes in the infrared wavelengths that are usually absorbed by the gas, passing between the transmitter and receiver [18].

Electrocatalytic analyzers utilize sensors that were developed as an outgrowth of fuel cell technology and are commonly used to detect O2 concentrations in sample streams. These sensors use a solid catalytic electrolyte to aid the flow of electrons from a sample gas cell to a reference gas cell. In practice, catalyst-coated ceramic materials (such as ZrO2 ) separate the reference cell (containing a high concentration of O2 ) and the sample stream.

The second system is composed of the conditioners and signal amplifiers for each one of the sensors. The third system is comprised of the DAQ card and PC. The function of the data

N/A N/A N/A N/A 5 V

**SO\*₂ NO O₂ CO CO₂**

N/A 1000 ppm 100% O2 1500 ppm CO N/A

<±50 ppm SO2 −0.06–4.5 ppm NO N/A <±3.1 ppm of CO N/A

0–4 ppm SO2 N/A N/A N/A N/A

−20 to +50°C −20 to +50°C −20 to +55°C −20 to +50°C −20 to +55°C

15–95% RH 15–90% RH

Noncondensing

0–99% Noncondensing

Resolution 5 ppm SO2 0.5 ppm NO 0.1% O2 1 ppm CO N/A response time t 90 < 60 s t 90 = 35 s t 90 < 15 s t 90 < 30 s N/A

Pressure range 90–110 kPa 90–110 kPa 90–110 kPa 90–110 kPa 80–120 kPa

15–90% RH Noncondensing N/A 55–85 nA/ppm CO N/A

http://dx.doi.org/10.5772/intechopen.80533

85

Development and Implementation of Virtual Instrumentation for the Measurement…

Operating ranges 0–2000 ppm 0–250 ppm 0–30% O2 0–500 ppm 0–100% Vol. Model EC4-2000-SO2 EC4-250-NO EC410 EC4-500-CO IR11BR

of NO

The used DAQ was a USB model 6009, with eight analog inputs of 14 bits, 48 kS/s, two static analog outputs of 12 bits, 12 digital inputs-outputs, and a 32 bit counter of National Instruments. The digital signals are transferred to the PC model Sony Vaio VGN- CR190 Intel

The integrated circuits are used to condition and amplify the signal given by the sensors when the information about the gas quantity or concentration is registered. The voltage, Vo, registered is of 2.435 V when 1% of oxygen is present, being this the minimum concentration the sensor can detect. It means that the data acquiring card (DAQ) process increases equivalent to

[O2

sensor's conditioning

%] (1)

. To determine the output voltage, in the case of the O2

acquisition card is to digitize the information provided by the signal conditioners.

Core Duo T7100 @ 1.8 GHz, Windows 7 operating system.

Vo = 2.5 V − 65 mV/% <sup>∗</sup>

**2.5. Integrated circuits**

**Table 1.** Sensors operating ranges.

0.065 V/1% of O2

output signal, Eq. (1) was used.

**Features Operating conditions**

Maximum overload

Zero in air at 20°C

Zero deviation (−20–+40°C)

Temperature range

Operating humidity

DC supply recommended

Sensitivity 8–20 nA/ppm SO2 320–480 nA/ppm

15–90% RH Noncondensing

When heated, the electrolyte allows the transfer of ionic oxygen components from the reference cell to the sample cell. The surface of the electrolyte has a special electrocatalytic coating that catalyzes the transfer process and serves as an electrode surface to attract released electrons.

The ions are migrating from the reference side to the sample side release electrons on this surface, striving toward the equilibrium. However, since the sample is continuously replenished, a continual flow of electrons is induced across the measurement load resistor, and the current flow is used to infer the concentration of oxygen in the gas sample stream. Because the electrons contain a finite catalytic activity, it is necessary to establish a limit to the diffusion speed of objective gas in the sensor, guaranteeing that gas reacts appropriately. It is performed through a barrier taking the shape of a small hole or capillary located on the sensor cover [18].


**Table 1.** Sensors operating ranges.

**2.2. Fuel kinematic viscosity**

84 Biofuels - Challenges and opportunities

**2.3. Fuel heating value**

NO, CO, SO2

determinations were performed in triplicate.

in triplicate to obtain reliable results.

**2.4. VI for the measurement of O2**

, and CO2

technology and are commonly used to detect O2

reference cell (containing a high concentration of O2

The determination of the kinematic viscosity of the fuel mixtures B2, B5, B10, B20, and diesel was performed using a CAP 2000+ Viscometer, where the information of the PEMEX diesel

The high heating value (HHV) measurements were performed by the utilization of a calorimetric bomb IKA WERKE model C2000 basic. The equipment was calibrated before experimentation. The procedure was followed according to ASTM E711. The tests were performed

The hardware system is composed of four systems. The first system is comprised of the O2

of each of the used sensor are described, which were of infrared response and work under the nondispersive infrared (NDIR) principle. This analyzer is used to detect the presence of carbon dioxide up to a volume of 100%. It is possible to determine said gas concentration through an infrared source with a specific filtration, which is assembled inside the optical/ gas cavity. The infrared sensor interconnects with an electronic signal. The signal processing implies the linearization and compensation in temperature using algorithms in the system software. The infrared gas sensor uses a low frequency flash lamp drive that is controlled by an excitation circuit. Infrared radiation pulses reflect inside providing a trajectory through the gas and objective. "Pyros" pyroelectric detectors are used to determine the infrared signal change. The active pyroelectric is sensitive to the changes in the infrared wavelengths that are

Electrocatalytic analyzers utilize sensors that were developed as an outgrowth of fuel cell

sensors use a solid catalytic electrolyte to aid the flow of electrons from a sample gas cell to

When heated, the electrolyte allows the transfer of ionic oxygen components from the reference cell to the sample cell. The surface of the electrolyte has a special electrocatalytic coating that catalyzes the transfer process and serves as an electrode surface to attract released electrons.

The ions are migrating from the reference side to the sample side release electrons on this surface, striving toward the equilibrium. However, since the sample is continuously replenished, a continual flow of electrons is induced across the measurement load resistor, and the current flow is used to infer the concentration of oxygen in the gas sample stream. Because the electrons contain a finite catalytic activity, it is necessary to establish a limit to the diffusion speed of objective gas in the sensor, guaranteeing that gas reacts appropriately. It is performed through a barrier taking the shape of a small hole or capillary located on the sensor cover [18].

**, NO, and SO2**

 **gases**

concentrations in sample streams. These

) and the sample stream.

) separate the

sensors listed in **Table 1**. The characteristics and operating ranges

/s) at 40°C [30]. All

,

kinematic viscosity was entered, whose value is between 1.9 and 4.1 (mm2

**, CO, CO2**

usually absorbed by the gas, passing between the transmitter and receiver [18].

a reference gas cell. In practice, catalyst-coated ceramic materials (such as ZrO2

The second system is composed of the conditioners and signal amplifiers for each one of the sensors. The third system is comprised of the DAQ card and PC. The function of the data acquisition card is to digitize the information provided by the signal conditioners.

The used DAQ was a USB model 6009, with eight analog inputs of 14 bits, 48 kS/s, two static analog outputs of 12 bits, 12 digital inputs-outputs, and a 32 bit counter of National Instruments. The digital signals are transferred to the PC model Sony Vaio VGN- CR190 Intel Core Duo T7100 @ 1.8 GHz, Windows 7 operating system.

#### **2.5. Integrated circuits**

The integrated circuits are used to condition and amplify the signal given by the sensors when the information about the gas quantity or concentration is registered. The voltage, Vo, registered is of 2.435 V when 1% of oxygen is present, being this the minimum concentration the sensor can detect. It means that the data acquiring card (DAQ) process increases equivalent to 0.065 V/1% of O2 . To determine the output voltage, in the case of the O2 sensor's conditioning output signal, Eq. (1) was used.

$$\text{Vo} = 2.5\,\text{V} - 65\,\text{mV/}\%\,^{\circ} \,\text{ [O}\_{2}\%] \tag{1}$$

In **Figure 1**, the integrated circuit diagram used to condition and amplify the signal provided by the O2 sensor is presented.

The registered voltage, Vo, is of 2.508 V when 1 ppm of NO is present, being this the minimum concentration the sensor can detect.

It means that the data acquisition card DAQ process increases equivalent to 0.004 V/1 ppm of NO. Eq. (2) was used to determine the output voltage.

$$\text{Vo} = 2.5\,\text{V} + 8\,\text{mV/ppm}^\* \,\text{[NO ppm]} \tag{2}$$

**Figure 2** presents the integrated circuit diagram used to condition and amplify the signal provided by the NO sensor.

The registered voltage, Vo, is of 2.5047 V when 5 ppm of SO2 is present, being this the minimum concentration the sensor can detect. It means that the data acquisition card DAQ process increases equivalent to 0.00476 V/5 ppm of SO2 . For the output voltage estimation, Eq. (3) was used.

$$\text{Vo} = 2.5\,\text{V} + 0.952\,\text{mV/ppm}^\* \left[ \text{SO}\_2\,\text{ppm} \right] \tag{3}$$

In **Figure 3**, the integrated circuit diagram used to condition and amplify the signal provided by the SO2 sensor is presented.

The registered voltage, Vo, is of 2.5039 V when 1 ppm of CO is present, which is the lower limit the sensor can detect. It means that the data acquiring card DAQ process increases equivalent to 0.00392 V/1 ppm of CO. For the output voltage calculation, Eq. (4) was implemented.

$$\text{Vo} = 2.5\,\text{V} + 3.92\,\text{mV/ppm}^\* \,\text{[CO ppm]} \tag{4}$$

In **Figure 5**, the absorbance fraction regarding the CO2

carbon dioxide.

is presented.

**Figure 4.** Designed circuit to condition the CO signal.

**Figure 2.** Designed circuit to condition the NO signal.

**Figure 3.** Designed circuit to condition the SO2

by the CO2

finding the sensor's sensitivity that ranges between 0 and 100% of concentration volume of

signal.

Development and Implementation of Virtual Instrumentation for the Measurement…

http://dx.doi.org/10.5772/intechopen.80533

87

In **Figure 6**, the integrated circuit diagram used to condition and amplify the signal provided

concentration is observed. It allows

In **Figure 4**, the integrated circuit diagram used to condition and amplify the signal provided by the CO sensor is presented.

**Figure 1.** Designed circuit to condition the O2 signal. Development and Implementation of Virtual Instrumentation for the Measurement… http://dx.doi.org/10.5772/intechopen.80533 87

**Figure 2.** Designed circuit to condition the NO signal.

In **Figure 1**, the integrated circuit diagram used to condition and amplify the signal provided

The registered voltage, Vo, is of 2.508 V when 1 ppm of NO is present, being this the mini-

It means that the data acquisition card DAQ process increases equivalent to 0.004 V/1 ppm of

Vo = 2.5 V + 8 mV/ppm<sup>∗</sup> [NO ppm] (2)

**Figure 2** presents the integrated circuit diagram used to condition and amplify the signal

concentration the sensor can detect. It means that the data acquisition card DAQ process increases

In **Figure 3**, the integrated circuit diagram used to condition and amplify the signal provided

The registered voltage, Vo, is of 2.5039 V when 1 ppm of CO is present, which is the lower limit the sensor can detect. It means that the data acquiring card DAQ process increases equivalent to 0.00392 V/1 ppm of CO. For the output voltage calculation, Eq. (4) was implemented.

Vo = 2.5 V + 3.92 mV/ppm<sup>∗</sup> [CO ppm] (4)

In **Figure 4**, the integrated circuit diagram used to condition and amplify the signal provided

signal.

. For the output voltage estimation, Eq. (3) was used.

is present, being this the minimum

[SO2 ppm] (3)

by the O2

by the SO2

sensor is presented.

86 Biofuels - Challenges and opportunities

mum concentration the sensor can detect.

provided by the NO sensor.

equivalent to 0.00476 V/5 ppm of SO2

sensor is presented.

by the CO sensor is presented.

**Figure 1.** Designed circuit to condition the O2

NO. Eq. (2) was used to determine the output voltage.

The registered voltage, Vo, is of 2.5047 V when 5 ppm of SO2

Vo = 2.5 V + 0.952 mV/ppm<sup>∗</sup>

**Figure 3.** Designed circuit to condition the SO2 signal.

**Figure 4.** Designed circuit to condition the CO signal.

In **Figure 5**, the absorbance fraction regarding the CO2 concentration is observed. It allows finding the sensor's sensitivity that ranges between 0 and 100% of concentration volume of carbon dioxide.

In **Figure 6**, the integrated circuit diagram used to condition and amplify the signal provided by the CO2 is presented.

**Figure 5.** Absorbance's fraction relation regarding the CO2 concentration.

through "Acquisition time" control. The sub-Vl "Direction by test" generates the name and the

Development and Implementation of Virtual Instrumentation for the Measurement…

http://dx.doi.org/10.5772/intechopen.80533

89

The sub-IV "Write to Spreadsheet File" generates a new file for each registered variable which will be shown through the graphics display "Test." The latter is inside the "Event Structure" module, which allows synchronization with the computer clock through a timeout of 2000 ms, while loop 1 remains in continuous execution, while loop 2 is focused on the acquisition of sensor signals. It is possible because of the sub-Vl "Acquisition." It also configures the entries of storage directions for the several variables to measure and as indicator outputs own numeric of the "double" type. The frequency of this cycle depends directly on the configured

The cycle owns an implementation of the "Continue if true" type which is controlled through the "start/stop" button, and the sample of the program block is shown in **Figure 7**. The sub-Vl "Acquisition" is focused on sensor data recompilation through the use of Vl express "DAQ ASSISTANT," which is configured as an analogical entry, referenced to earth type (RSE) for continuous sample taking of voltage, in an allowed measurement range from −10 to 10 V. The output of Vl "Acquisition" shows the measurements to the user through a numerical indicator. The data are processed for its storage using the sub-Vl "Write to spreadsheet". All of this are made for a maximum amount of eight sensors, and the data flow is controlled by the

"Flats sequence" structure to avoid information saturation in the acquisition time.

address of the file, which will contain the test samples in the implementation process.

value in the "Acquisition time" control.

**Figure 7.** Block programming.

**Figure 6.** Designed circuit to condition the CO2 signal.

#### **2.6. Virtual instrument for emission measurement (VIEM)**

This section shows the programming description of the main blocks that are part of the virtual instrument for emission measurement that was developed in a LabVIEW 2010 platform. In the figures, the operation performed by each programming block is shown. The VIEM counts the tests performed to organize the file experiment. It is made through the test counter (Sub-Vl), which saves a text file (.txt) with a start value of zero and an increment of 1 for each VIEM implementation, in the "Configuration tab" through a "property node", and the menus and the toolbar are configured by the VIEM. **Figure 7** illustrates a programming block. Within while loop 1, routines are executed for test configuration and execution. The test duration, in turn, is selected through "Time test" control. The rhythm configuration of the sample is executed Development and Implementation of Virtual Instrumentation for the Measurement… http://dx.doi.org/10.5772/intechopen.80533 89

**Figure 7.** Block programming.

**Figure 5.** Absorbance's fraction relation regarding the CO2

88 Biofuels - Challenges and opportunities

**Figure 6.** Designed circuit to condition the CO2

signal.

This section shows the programming description of the main blocks that are part of the virtual instrument for emission measurement that was developed in a LabVIEW 2010 platform. In the figures, the operation performed by each programming block is shown. The VIEM counts the tests performed to organize the file experiment. It is made through the test counter (Sub-Vl), which saves a text file (.txt) with a start value of zero and an increment of 1 for each VIEM implementation, in the "Configuration tab" through a "property node", and the menus and the toolbar are configured by the VIEM. **Figure 7** illustrates a programming block. Within while loop 1, routines are executed for test configuration and execution. The test duration, in turn, is selected through "Time test" control. The rhythm configuration of the sample is executed

**2.6. Virtual instrument for emission measurement (VIEM)**

concentration.

through "Acquisition time" control. The sub-Vl "Direction by test" generates the name and the address of the file, which will contain the test samples in the implementation process.

The sub-IV "Write to Spreadsheet File" generates a new file for each registered variable which will be shown through the graphics display "Test." The latter is inside the "Event Structure" module, which allows synchronization with the computer clock through a timeout of 2000 ms, while loop 1 remains in continuous execution, while loop 2 is focused on the acquisition of sensor signals. It is possible because of the sub-Vl "Acquisition." It also configures the entries of storage directions for the several variables to measure and as indicator outputs own numeric of the "double" type. The frequency of this cycle depends directly on the configured value in the "Acquisition time" control.

The cycle owns an implementation of the "Continue if true" type which is controlled through the "start/stop" button, and the sample of the program block is shown in **Figure 7**. The sub-Vl "Acquisition" is focused on sensor data recompilation through the use of Vl express "DAQ ASSISTANT," which is configured as an analogical entry, referenced to earth type (RSE) for continuous sample taking of voltage, in an allowed measurement range from −10 to 10 V. The output of Vl "Acquisition" shows the measurements to the user through a numerical indicator. The data are processed for its storage using the sub-Vl "Write to spreadsheet". All of this are made for a maximum amount of eight sensors, and the data flow is controlled by the "Flats sequence" structure to avoid information saturation in the acquisition time.

Graphical programming in LabVIEW 2010® uses the programming model by data flow unlike programming based on a text focused in a flow model control programming. Instead of laboriously write lines of text, with the risk of syntactic and logic errors, LabVIEW 2010® is based on the linked of icons with cables. Besides, to most of the users, including the experimented ones, it is easier to visualize and interpret graphical programming compared to text programming. The VIEM flowchart is displayed in **Figure 8**.

interrupted, and it divides them in a minute obtaining rpm as a result. In **Figure 9**, it can be seen a block diagram describing the program operation based on the ARDUINO platform. Once the program was obtained, the circuit will be welded on a printed circuit board. For temperature measurement, LM35 solid sensors were used which provide us a linear output signal with a scaling factor of 10 mV/°C, considering a range of −55 with a conversion factor of −550 mV up to 150°C with a conversion factor of 1500 mV, and this temperature range is enough to measure all the system temperature. A sensor was programmed in ARDUINO to compare

Development and Implementation of Virtual Instrumentation for the Measurement…

http://dx.doi.org/10.5772/intechopen.80533

91

the sensor precision, as it is explained in the block diagram of the program in **Figure 10**.

The used motor consumes 1.30 L/h in experimentation. Fuel consumption of the engine per second was quantified, relying on the result, and a virtual instrument was designed as well as

**2.8. VI for measurement of fuel consumption**

**Figure 9.** Block diagram of the program to measure rpm.

#### **2.7. VI for temperature and revolutions per minute measurement**

A virtual instrument was developed based on Arduino to register the run of the motor revolutions per minute using an infrared diode and a receiver diode. One of them is located in front of another with a distance no longer than 1.5 cm sending a continuous signal between the two: a "low" or a "0" V. Basically, the program quantifies the times that the signal was

**Figure 8.** VIEM flow chart of the operation.

interrupted, and it divides them in a minute obtaining rpm as a result. In **Figure 9**, it can be seen a block diagram describing the program operation based on the ARDUINO platform.

Once the program was obtained, the circuit will be welded on a printed circuit board. For temperature measurement, LM35 solid sensors were used which provide us a linear output signal with a scaling factor of 10 mV/°C, considering a range of −55 with a conversion factor of −550 mV up to 150°C with a conversion factor of 1500 mV, and this temperature range is enough to measure all the system temperature. A sensor was programmed in ARDUINO to compare the sensor precision, as it is explained in the block diagram of the program in **Figure 10**.

#### **2.8. VI for measurement of fuel consumption**

Graphical programming in LabVIEW 2010® uses the programming model by data flow unlike programming based on a text focused in a flow model control programming. Instead of laboriously write lines of text, with the risk of syntactic and logic errors, LabVIEW 2010® is based on the linked of icons with cables. Besides, to most of the users, including the experimented ones, it is easier to visualize and interpret graphical programming compared to text

A virtual instrument was developed based on Arduino to register the run of the motor revolutions per minute using an infrared diode and a receiver diode. One of them is located in front of another with a distance no longer than 1.5 cm sending a continuous signal between the two: a "low" or a "0" V. Basically, the program quantifies the times that the signal was

programming. The VIEM flowchart is displayed in **Figure 8**.

90 Biofuels - Challenges and opportunities

**Figure 8.** VIEM flow chart of the operation.

**2.7. VI for temperature and revolutions per minute measurement**

The used motor consumes 1.30 L/h in experimentation. Fuel consumption of the engine per second was quantified, relying on the result, and a virtual instrument was designed as well as

**Figure 9.** Block diagram of the program to measure rpm.

**Figure 10.** Programming operation in ARDUINO of the LM35 sensor.

the hardware. The VI uses a proximity sensor to measure the fuel difference and determine its consumption. The measurement is made by emitting and receiving ultrasonic signals with the proximity sensor. The proximity sensor is designed as an accessory for Arduino and integrates a signal conditioning system. **Figure 11** describes the operation of the virtual instrument with the use of Arduino as an interface for the measurement of fuel.

**3. Results**

The viscosities of the different fuel mixtures in relation with temperature are listed in **Table 2**. The fact that the biodiesel viscosity is higher than the diesel one was observed. When improving the biodiesel percentage in the mixture, viscosity increases, which improves the lubrication of the parts that are in contact with the mix, such as the low pressure pump, the high

Development and Implementation of Virtual Instrumentation for the Measurement…

http://dx.doi.org/10.5772/intechopen.80533

93

About the high heating value determination of fuels, the diesel (PEMEX) presented a higher value of 44.97 MJ/kg and for the B100 was of 39.08 MK/kg. As a consequence, depending on the percentage of the biodiesel increase in the mixture, the high heating value decreases. The following values were obtained for the mixtures: B2 44.97 MJ/kg, B5 44.81 MJ/kg, B10

pressure pump, injectors, and the system of fuel distribution [30–32].

44.37 MJ/kg, and B20 43.68 MJ/kg [33].

**Figure 11.** Block diagram of programming using Arduino.

Tests were made to characterize the virtual instrument, using a measuring cylinder of 1 liter with a precision of ±10 mL. One of the benefits of this sensor is that it was not necessary to develop a signal conditioning circuit. It was programmed in ARDUINO. Based on the above, a 2.5 L capacity container was made using the acrylic material. The cubic container had a design area of 12.2 × 11.1 cm to obtain a total area of 135.4 cm2 . With the container area, a correction factor was added to the programming obtaining a final margin of error of ±50 mL.

Development and Implementation of Virtual Instrumentation for the Measurement… http://dx.doi.org/10.5772/intechopen.80533 93

**Figure 11.** Block diagram of programming using Arduino.

#### **3. Results**

the hardware. The VI uses a proximity sensor to measure the fuel difference and determine its consumption. The measurement is made by emitting and receiving ultrasonic signals with the proximity sensor. The proximity sensor is designed as an accessory for Arduino and integrates a signal conditioning system. **Figure 11** describes the operation of the virtual instru-

Tests were made to characterize the virtual instrument, using a measuring cylinder of 1 liter with a precision of ±10 mL. One of the benefits of this sensor is that it was not necessary to develop a signal conditioning circuit. It was programmed in ARDUINO. Based on the above, a 2.5 L capacity container was made using the acrylic material. The cubic

container area, a correction factor was added to the programming obtaining a final margin

. With the

container had a design area of 12.2 × 11.1 cm to obtain a total area of 135.4 cm2

ment with the use of Arduino as an interface for the measurement of fuel.

**Figure 10.** Programming operation in ARDUINO of the LM35 sensor.

of error of ±50 mL.

92 Biofuels - Challenges and opportunities

The viscosities of the different fuel mixtures in relation with temperature are listed in **Table 2**. The fact that the biodiesel viscosity is higher than the diesel one was observed. When improving the biodiesel percentage in the mixture, viscosity increases, which improves the lubrication of the parts that are in contact with the mix, such as the low pressure pump, the high pressure pump, injectors, and the system of fuel distribution [30–32].

About the high heating value determination of fuels, the diesel (PEMEX) presented a higher value of 44.97 MJ/kg and for the B100 was of 39.08 MK/kg. As a consequence, depending on the percentage of the biodiesel increase in the mixture, the high heating value decreases. The following values were obtained for the mixtures: B2 44.97 MJ/kg, B5 44.81 MJ/kg, B10 44.37 MJ/kg, and B20 43.68 MJ/kg [33].


**Table 2.** Viscosity of the B2, B5, B20, B100 fuels and diesel.

The result of the virtual instrument development used to measure the CIE parameters is shown in **Figure 12**. The main user screen that exhibits the graphic interface represents the instrument when choosing the configuration option. The software allows defining the time test, the acquisition time, and the start option to proceed to the predefined tests.

as those presented. It is not possible to access the programming of the other instruments sold

Development and Implementation of Virtual Instrumentation for the Measurement…

http://dx.doi.org/10.5772/intechopen.80533

95

The VIEM main function is to measure the concentration of gases coming from the mani-

sions of combustion gases are generated, by using infrared and electrochemical sensors. These sensors determine the gas concentration in ppm or percentage of the concentration

, NO, CO, SO2

, and CO2

emis-

commercially due to the protection of their programs.

**Figure 12.** User graphic interface, principal window, and configuration tab.

fold of the combustion chamber of the CIE, where the O2

**4. Application**

**Figure 13.** User graphic interface.

**Figure 13** displays the user graphic interface, where the measures in real time of O2 , NO, CO, SO2 , and CO2 can be observed, such as the temperature, the fuel consumption, and the rpm, which are being monitored and where information is being obtained from each one of the parameters considering the predefined values by the user.

The results obtained from the integrated circuits are specific, because signal conditioning circuits were designed for each sensor. It is unlikely that there are circuits that are the same Development and Implementation of Virtual Instrumentation for the Measurement… http://dx.doi.org/10.5772/intechopen.80533 95


**Figure 12.** User graphic interface, principal window, and configuration tab.


**Figure 13.** User graphic interface.

as those presented. It is not possible to access the programming of the other instruments sold commercially due to the protection of their programs.

### **4. Application**

, NO, CO,

The result of the virtual instrument development used to measure the CIE parameters is shown in **Figure 12**. The main user screen that exhibits the graphic interface represents the instrument when choosing the configuration option. The software allows defining the time

**Temp (°C) Viscosity (P) Temp (°C) Viscosity (P) Temp (°C) Viscosity (P)**

56.53 0.0180 49.90 0.0203 49.90 0.0203 59.13 0.0150 55.07 0.0187 55.10 0.0180 63.70 0.0140 59.63 0.0170 59.63 0.0160 67.50 0.0133 64.17 0.0160 64.20 0.0157 71.47 0.0130 68.77 0.0147 68.80 0.0137 75.43 0.0120 73.30 0.0143 73.30 0.0130 79.23 0.0110 77.90 0.0127 77.90 0.0120 83.33 0.0107 82.17 0.0123 82.13 0.0117 86.97 0.0103 87.00 0.0113 87.07 0.0110 91.37 0.0100 91.10 0.0113 91.10 0.0100

**B2 B5 B10**

94 Biofuels - Challenges and opportunities

**B20 B100 Diesel**

49.90 0.0213 54.57 0.0320 55.77 0.0210 55.00 0.0193 57.83 0.0303 59.37 0.0193 59.67 0.0177 62.37 0.0280 63.63 0.0173 64.10 0.0160 66.43 0.0257 67.57 0.0160 68.73 0.0143 70.57 0.0243 71.43 0.0150 73.33 0.0140 74.70 0.0227 75.43 0.0143 77.93 0.0127 78.80 0.0217 79.20 0.0133 82.13 0.0117 82.93 0.0200 83.40 0.0130 86.97 0.0110 87.03 0.0193 87.00 0.0123 91.13 0.0107 91.20 0.0183 91.17 0.0113

which are being monitored and where information is being obtained from each one of the

The results obtained from the integrated circuits are specific, because signal conditioning circuits were designed for each sensor. It is unlikely that there are circuits that are the same

can be observed, such as the temperature, the fuel consumption, and the rpm,

test, the acquisition time, and the start option to proceed to the predefined tests.

parameters considering the predefined values by the user.

**Table 2.** Viscosity of the B2, B5, B20, B100 fuels and diesel.

SO2

, and CO2

**Figure 13** displays the user graphic interface, where the measures in real time of O2

The VIEM main function is to measure the concentration of gases coming from the manifold of the combustion chamber of the CIE, where the O2 , NO, CO, SO2 , and CO2 emissions of combustion gases are generated, by using infrared and electrochemical sensors. These sensors determine the gas concentration in ppm or percentage of the concentration of the emissions generated when burning diesel-biodiesel mixtures. When the combustion takes place in the engine, the gases are conducted by a pipeline and then passed to a heat exchanger to reduce the gas temperature at 40° C. This process is necessary to ensure a proper functioning of the sensors, because the maximum temperature for operation specified is 50 **±** 5°C, after that the gases pass through a water trap, a humidity trap and finally reach each of the sensors so that each sensor reads real-time readings and generates registration data, databases provided by the signal conditioning devices processed through the virtual instrument on the PC. There is the versatility to measure the readings every 15 and 20 seconds, as well as 1 and 5 minutes. Other applications of virtual instruments are used in monitoring stations, chemical stations, iron and steel industries, restaurants, power plants, combined cycle, diesel internal combustion engines, gasoline, and natural gas motor test vehicle departments. They represent an option for the use of the VIEM through its redesign and adaptation to function as a portable system.

**Acknowledgements**

**Conflict of interest**

**Author details**

Armando Pérez1

Héctor Campbell2

California, México

California, México

en9020097

[Accessed: 14-11-2017]

**References**

The authors declare no conflict of interest.

, Rogelio Ramos2

, René Delgado1

\*Address all correspondence to: gmontero@uabc.edu.mx

University of Baja California, Tijuana, Baja California, México

ments/1598/en14214.pdf [Accessed: 23-02-2017]

The authors thank the Consejo Nacional de Ciencia y Tecnología (CONACYT) and the Instituto de Ingeniería of the Universidad Autónoma de Baja California for its support in the development of this work. They also thank the Programa de Fortalecimiento de la Calidad

Educativa 2018 (PFCE) for the financial support in publishing this chapter.

, Gisela Montero2

2 Institute of Engineering, Autonomous University of Baja California, Mexicali, Baja

3 Faculty of Engineering, Autonomous University of Baja California, Mexicali, Baja

and Alejandro Suástegui<sup>3</sup>

1 School of Sciences of Engineering and Technology, Unit Valle de las Palmas, Autonomous

[1] Environmental Protection Agency. Light-Duty Vehicle and Light-Duty Truck—Clean Fuel Fleet Exhaust Emission Standards [Internet]. 2017. Available from: http://epa.gov

[2] Plint M, Martyr A.Book Engine Testing: Theory and Practice. 4th ed. Oxford: Butterworth-

[3] Automotive Fuels—Fatty Acid Methylesters (FAME) for Diesel Engines—Requirements and Test Methods [Internet]. 2010. Available from: http://agrifuelsqcs-i.com/attach-

[4] Ganjehkaviri A, Jaafar M, Hosseini S, Musthafa A. Performance evaluation of palm oil-based biodiesel combustion in an oil burner. Energies. 2016;**9**:9-97. DOI: 10.3390/

Heinemann; 1995. pp. 1-549. DOI: 10.1016/B978-0-08-096949-7.00001-7

\*, Conrado García2

Development and Implementation of Virtual Instrumentation for the Measurement…

, Marcos Coronado2

http://dx.doi.org/10.5772/intechopen.80533

,

97

## **5. Conclusions**

The development of hardware and software of the virtual instrument for the measurement of emissions (VIEM) and for the measurement of parameters such as emission gases of O2 , NO, CO, SO2 , CO2 , rpm, FC, and temperature is constituted by the platforms of programming LabVIEW 2010® and ARDUINO MEGA as well as a data acquisition card model DAQ 6009 the National Instruments and an acquisition card model ARDUINO ONE, PC model Sony Vaio VGN-CR190 Intel Core Duo T7100 @ 1.8 GHz, Windows 7 operating system. These elements make up a combination of nonexclusive operation hardware with powerful software, obtaining an instrument of scalable architecture, with the possibility of being modified if necessary, presenting versatility and flexibility to adapt to other required uses, showing as the main advantage the cost of the system compared with conventional systems. The VIEM shows in real time the results of each of the measured parameters, graphs the results, and generates a database of each of the experimental activity.

As a result of the characterization of the diesel-biodiesel mixtures, the value of the calorific value of the diesel that was used as a reference point is 44.97 MJ/kg, and for the B100, it is 39.08 MJ/kg. It is necessary to develop specific circuits for gas sensors such as O2 , NO, CO, SO2 , and CO2 **,** where the integrated circuits were designed to obtain equivalent increments of 0.065 V/1% of O2 , 0.004 V/1 ppm of NO, 0.00476 V/5 ppm of SO2 , and 0.00392 V/1 ppm of CO, with the schematic diagrams presented in this chapter and the model of the sensors, and it is possible to replicate the hardware used for gas measurement.

With the development of the VIEM, it is easier and accessible to implement a test bench used to quantify the performance, emissions, and efficiency of the CIE. It was obtained a more demanding control on the inputs and outputs of the system, as well as the operating parameters of the diesel engines using a biofuel, or any other engine that works with any other fuel, biofuel or mix of both considering the minimum and maximum parameters of the sensors.
