Design and Calibration of a 3D-Printed Cup-Vane Wireless Sensor Node

: There has been constant growth in the wind energy market. A study conducted in January 2018 by Global Market Insights Inc. predicted that the global wind energy market will surpass USD 170 billion by 2024. Before installation of a wind turbine, wind data must be collected from a prospective site for a minimum of one year. This has compelled the high demand for instruments used for collecting wind data. Various commercial cup anemometers and wind vanes have been manufactured for sale, some of which lack proper calibration or are not affordable for small-scale wind farmers, especially in developing countries. Wind data are a big data affair and call for instruments that handle them as such, unlike most commercial wind data collection instruments. This paper presents the design and calibration of a wireless 3D-printed cup-vane instrument for collecting wind data. This instrument represents a Wireless Sensor Node (WSN) in the Internet of Things (IoT). This study gave rise to an instrument system that was able to acquire wind data within a mean ﬁtting deviation of ± 0.063398 m/s, store them and present them wirelessly to an IEEE 802.15.4 protocol sink node. This was veriﬁed in the lab using 1 m/s to 16 m/s wind speeds at the Armﬁeld TM wind tunnel and outside in an open ﬁeld with 1 m/s to 5 m/s wind speeds.


Introduction
Wind energy farming is a non-polluting alternative to fossil fuels.It does not involve burning of fossil fuels, an exercise that contributes to global warming [1].Countries around the globe have continued to invest in wind energy.China has become the world's largest electricity generator from wind energy with around 188 GW by 2017 [2].Kenya launched a 310 MW wind power project in 2016, which became the largest wind farm in Africa [3,4].
At the beginning of a wind turbine project, wind data must be collected for at least one year to capture the wind speed and seasonal variations in direction.There are various instruments that can be used to measure wind speed.In reference to [5][6][7], these instruments may include the following: 1.

2.
Pressure anemometers These include plate anemometers and tube anemometers.
Despite the recent growth of sodar and LiDAR anemometers, from the above listed instruments, the cup anemometer is widely accepted as the standard instrument for measuring wind speed [8][9][10][11].Among other attractive advantages, L.Kristensen [12] stated that, 'experience has shown that the cup anemometer is a robust and reliable instrument which can operate unattended for years'.Companies such as Ammonit TM have specialized in making cup anemometers and wind vanes [13] and have emerged among the best in serving the wind data collection market.These companies are well established in the market and serve most large-scale wind power projects.However, most small-scale wind farmers in developing countries do not have access to well-calibrated high-end instruments, and this frustrates small-scale wind farmers.In addition, most wind data collection instruments are not able to collect wind data in a way that can be networked with others to deliver big data to a common Internet of Things pool, ready for analysis and prediction.This study strives to close this gap.

Cup and Vane Instrument Design
Taking a look at the design of the cup anemometer, since its invention by T. R. Robinson in 1846 [14], the greatest interest in the cup anemometer design was only its linearity.Even though further studies have shown that it is actually 'almost linear', the calibration of the cup anemometer is highly linear [12].This is still an attractive feature that makes the calibration process easy and reliable.However, from the year 1920, this linearity feature of interest has shifted to the over-speeding nature of the cup anemometer.As explained by L. Kristensen et al. [15], over-speeding of cup anemometers is a characteristic effect caused by the fact that cup anemometers tend to respond more to an increase in speed than to breaking.This is commonly known as the asymmetric response of the cup anemometers.This may be perceived to be a negative feature, but it is actually a property that allows the cup anemometer to start off.
For wind vane design, J. Wieringa [16] showed wind vane motion described by the damping ratio, natural wavelength and decay distance to be insufficiently described by a second order equation.This was as a result of the torque changes with a change in the angle of attack.With measured vane dimensions, a relationship was derived between the measured vane dimensions and motion constants.It was shown that with a fin attached to the vane, the motion of the vane is independent of the fin area.In a quest to improve the responsiveness of wind vane direction measurements, Johann et al. [17] developed a mathematical model describing the dynamic behavior of a wind vane.This model was then used to determine the form factor that would have the best response to the disturbances the vane would encounter.Nevertheless, this model was not embodied.
In a related design, Hsiao et al. [18] proposed a power harvester mechanism integrating solar radiation and wind power harvesting.The pyroelectric effect was used in harvesting the thermal energy from solar radiation, while a disk generator was used to harness wind energy.This demonstrated a novel integrated energy harvester design that is complementary and useful in energy fluctuation management.

3D Printing
3D printing has been embraced by every sector involved in manufacturing.As recorded, 3D printing lowers the cost of manufacturing, improves efficiency, and brings about high flexibility [19].It has been predicted that the 3D-printed parts market will grow to an 8.4 billion dollar industry by 2025 [20].At an advanced level, 3D-printing technology is being used to print electronic devices, as well as their casings.Yuanyuan et al. [21] showed a significant growth and advancement in 3D printing technology for the manufacturing of sensors.An exact sensor is printed with the exact specifications as needed in its application.
For small batches, 3D printing introduces fabrication freedom by making products with exact specifications as required [22].In the 2016 Global Congress on Manufacturing and Management, Phani et al. [23] explained how mass customization of products and services is becoming preferred over mass production.The current global diversification and existence of unpredictable market trends is pushing manufacturing to its limits.Unlike the traditional manufacturing technologies, digital manufacturing is a promising technology that fits the current dynamic market trends.
As discussed by Octavio et al. [24], when designing, it is important to achieve a cost-effective and environmentally-efficient process.With the aim of reducing oil emulsion-type coolants used during machining of aeronautical engine components, they designed two nozzle adaptors and tested various geometries using computational fluid dynamics (CFD).Finally, they tested it as a CryoMQL demonstrator in comparison with other techniques.Their method was able to balance the technical and environmental issues.

Cost-Effective Data Acquisition Systems
Amar Adane et al. [25] presented a microcontroller-based data acquisition system that was able to automatically get sensor data from the station.The acquired data were transferred to a computer through a serial connection and then analyzed.For large-scale wind farm applications, Neha and Kumar [26] worked on a wireless Supervisory Control and Data Acquisition (SCADA) system that monitored and collected the required data parameters remotely.General Packet Radio Service (GPRS) was utilized in sending data packets from the remote location.Eftichiof and Kostas [27] described a similar system, but more cost-effective in the sense that it was based on a simple microcontroller.This microcontroller was interfaced with sensors to collect data and deliver them to the computer via RS-232 connection.However, these methods did not offer the required wireless networking capabilities.
Chin and Tan [28] discussed a wireless sensor network method.A star node network of six sensors based on XBee was used to collect data from different remote locations.The data were then sent to a data logger through a gateway from each node.These data were then processed and uploaded to the Internet via the Global System for Mobile communications (GSM) network for further processing.Nisha and Versha [29] discussed a notably similar method, built around a cost-effective microcontroller.SriLakshmi et al. [30] discussed a wireless data collection method based on the ESP8266 module that uses the IEEE 802.11 protocol.The collected data were sent wirelessly from up to a distance of 30 m.This method was however not sufficient for wind resource assessment, given that the wind data measurement mast could go up to 100 m.In an attempt to close the discussed gaps, this study presents the design and calibration of a 3D-printed cup-vane wireless sensor node that facilitate big wind data collection for the ease of Internet of Things integration.

Cup-Vane Design
The first criteria for the design of the cup-vane instrument was its geometry.Calibration of the cup anemometer depends on its rotor geometry.To maximize the air flow separation, it is desirable that the cups of the cup-vane instrument be conical.Light cup anemometers are least prone to the over-speeding problem.They are also more sensitive to the moving wind.This formed the basis for the second criteria for designing the cups.The design criteria for the vane of the cup-vane instrument were to make the tail blade light and shaped to respond to wind speeds from around 1 m/s to reduce the feathery flipping effect caused by over-sensitivity.
The cup-vane instrument used in this study was designed with the help of Autodesk R Inventor R software, as shown in Figure 1.This design captured the main parts of the cup-vane instrument.However, a body had to be designed to hold together the cup-vane design, as well as the temperature, humidity, pressure and altitude sensors.The cup-vane body was hence designed in consideration of the sensors and the supportive embedded systems that were to be installed.The design presented in Figure 2 shows the virtual assembly of the complete cup-vane instrument.

Embedded Systems Design
The criterion for the embedded system design was to come up with a cost-effective wireless data transmitter in a small form factor.The second criterion was the power consumption.For effective wind data collection from the field, the system needed to be able to operate on available solar power-banks for around one year.The embedded system used in this study was built around the Atmega328P-AU microcontroller.This implementation also had an XBee radio capable of transmitting data via the ZigBee IEEE 802.15.4 protocol, to a central station located up to 100 m away.A simplified representation of the schematic used is shown in Figure 3.The final implementation was a compact PCB enclosed in a 3D-printed case.This system was flashed with a program that facilitated effective sensors data acquisition and transmission.This program is the algorithm discussed in the next subsection.

Wireless Sensor Node Algorithm
In this study, the main task for the pre-processing algorithm was to prepare the station's embedded systems to collect the data from sensors and send those data to the main post-processing station located far from it.As sampled in Appendix B, this algorithm was prepared in an ANSI C/C++ development environment.To start with, the sensors pins and addresses were defined.Some sensors such as HMC5883L needed to communicate via the Inter-Integrated Circuit (I 2 C) protocol.Their addresses were defined, and the required sensor libraries were included in the program.
The necessary setups were prepared inside a function that was only called once.This preparation included specification of the involved sensor interrupt, pulling up the internal resistors and starting up the sensors, as well as the serial communication.The iteration required was done in a one loop function.During the entire iteration, time elapsing was noted by the program.Sensors were configured to collect data samples after every second and transmit the average data samples after five seconds.The sensors' calibration details were considered in this iteration, as well.As illustrated in Algorithm A1 of Appendix B, the speed sensor was prepared to provide current revolutions-per-minute (RPM).
As illustrated in Algorithm A2 of Appendix B, the compass sensor was configured to capture the changes in the direction of the wind vane tail.The declination angle was also taken care of.Similarly, a request to the sensors responsible for reading the temperature, pressure and altitude was made.All the collected sensor data were transmitted in a comma separated format.This is as illustrated in Algorithm A3 of Appendix B. The test IEEE 802.15.4 sink node located 100 m away was able to receive the comma separated data after every five seconds.These data are as presented in Table A6.

3D Printing and Assembly
After the Computer-Aided Design (CAD), all the 3D parts were converted to .stlfile format ready for 3D printing through Fused Deposition Modeling (FDM).The 3D printing task was performed using the MakerBot TM 3D printer.The individual parts were printed separately, one at a time, waiting to be assembled.The physical setup for the 3D printing exercise was as shown in Figures A1 and A3 in Appendix A. After printing all the cup-vane instrument parts, all the internal sensors were installed as shown in Figure 4. Other sensors such as temperature and altitude sensors were installed in a similar way.This installation exercise included all the wiring needed for every sensor to get power and deliver the data signals.The complete installation of the sensors into the cup-vane body is shown in Figure 5a.From this point, the anemometer cups and the wind vane tail blade were installed.The whole assembly was then painted and polished to make a finished cup-vane instrument (see Figure 5b).For this cup-vane instrument to work, it was required that it be interfaced with the developed embedded system.

Cup Calibration Setup
The cup anemometer used in this study was built around the Omron incremental rotary encoder.Its datasheet [31] was used during the construction of the cup anemometer.The setup for cup anemometer calibration was as shown in Figure 6.

Cup Calibration Results and Analysis
During this calibration process, the calibration guidelines [11,32,33] were utilized.To compare the designed cup-vane revolutions-per-minute data with the wind speed data from the reference anemometer, the experiment was setup as seen in Figure 6.The results of these measurements' datasets Run (1) and Run (2) seen in Table A1 were plotted as shown in Figure 7.The wind source used (Armfield TM C15 wind tunnel) expressed wind speed in terms of percentage.The comparison of Figure 7 is important in the sense that it shows that the data collected from the designed cup-vane instrument were linear and consistent.This made the calibration process much easier.Still, the relationship between the designed cup-vane instrument and the reference anemometer could be found easily.The next step was to perform the calibration.A graph of the designed cup-vane instrument RPM versus the reference anemometer tunnel wind speed was plotted.A polynomial function that best fits within the scatter plotted data was calculated and the results plotted using a Python program.This is shown in Figure 8.
To plot the trend line, the polyfit points were calculated.These data points are presented in Table A7.The correlation coefficient between the plotted points and the polynomial of best fit was also calculated.As seen in the plot of Figure 8, this relationship is linear.Most points fit within the trend line with an r-value of 0.9999999999999999 (approximately one).This means that the points fit within the calculated polynomial of best fit, and they are well above the recommended least r-value of 0.99995 [11].This trend line is hence reliable.
To check further, the null hypothesis was used.In this case, the null hypothesis was that 'the scatter points had no relationship with the fitting polynomial'.After the calculation, the p-value returned 1.0597294907859924 × 10 −220 , a value close to zero.This implied high confidence in rejecting the null hypothesis.The slope standard error was 1.8243130833413156 × 10 −9 , also close to zero.This means that the calibration exercise returned positive results.The resulting speed transfer function for the designed cup-vane wireless sensor node instrument is as presented in Equation (1).
where V[m/s] is the wind speed and CA[RPM] is the designed cup RPM.Equation ( 1) is similar to the cup anemometer Equation ( 2).
where A is the slope constant and B is the offset.Hence, the speed slope constant for the designed cup-vane instrument is 0.6478, while the offset is 1.0164.
Page 1 of 1

Cup Calibration Uncertainty
The calculated uncertainty data output is shown in Table A2.The residual wind speed was plotted against the designed cup-vane RPM as shown in Figure 9.This plot illustrates that the developed cup-vane instrument had a maximum positive residual value (fitting deviation) of +0.204084 m/s, while the minimum was +0.001048 m/s.The maximum negative fitting deviation was −0.174730 m/s, while the minimum was −0.009122 m/s.The mean fitting deviation for positive and negative residuals was ±0.063398 m/s.
After calibration, the calibrated cup-vane instrument and the reference anemometer were both exposed to wind from the wind tunnel at the same time, as seen in the setup of Figure 6.A comparison graph of the acquired calibrated data versus the data collected by the reference anemometer was then plotted as shown in Figure 10.It was observed that the designed cup-vane instrument presented reliable data after calibration.These data reflected the true wind speed.

Cup Hysteresis Losses
As recommended by the IEC61400-12-1(2005) standards [11], the designed cup-vane instrument was checked for hysteresis losses.Wind data from the tunnel were collected as the wind source was varied from minimum to maximum (rising) and back from maximum to minimum (falling).The hysteresis data output is presented in Table A3.A graph for the rising and falling data was plotted on the same axis as illustrated in Figure 11.The results in this graph presented negligible levels of hysteresis loss.

Vane Calibration Setup
Before the vane compass sensor was put to work, it needed to be calibrated.The setup that was used for this exercise is shown in Figure A2 in Appendix A. This sensor uses the I 2 C communication protocol.Python running on a Raspberry Pi 3 was used for this calibration exercise.As seen in the same Figure A2 , the HMC5883L sensor was mounted on a 360 • slip ring connector to enable a free 360 • rotation.In reference to the sensor datasheet [34] and other sources [35,36], a Python program was used for further sensor setup.

Vane Calibration Results and Analysis
To perform vane calibration, clockwise and counterclockwise vane sensor (HMC5883L) data were required.To gather clockwise data, the vane of the designed cup-vane instrument was rotated clockwise.Similarly, to collect counterclockwise data, the vane of the designed cup-vane instrument was rotated counterclockwise.The output plot for clockwise and counterclockwise data sets is shown in Figure 12.The counterclockwise data are presented in Table A4 From this plot, it can be seen that the data collected from the sensor was well represented throughout 360 • .There was only one stray data point, which was negligible.However, this representation clearly showed that the sensor data for both clockwise and counterclockwise were similar and offset.To correct the offset error, the offset amount was calculated using a Python program that captured the maximum and minimum data as the sensor was being rotated back and forth through 360 degrees.The program output presented the offsets as shown in Table 1.For offset compensation, the offset values were incorporated into the Python program formula, and data were collected again, as the vane sensor was rotated back and forth throughout 360 • .Around 250 sets of data were collected and saved in a file.This is as presented in Table A5 Data collected before and after calibration were plotted on the same axes as before.The graphical results are shown in Figure 13.The final results show that after calibration, the HMC5883L offset was taken care of and data did fit well at the center, throughout 360 • rotation.The last thing to factor in was the varying magnetic declination [37].This was factored in the working algorithm.

Conclusions
This research gave rise to a wireless 3D-printed cup-vane instrument capable of transmitting wind data wirelessly via the IEEE 802.15.4 protocol into a central station located up to 100 m away.This implementation represents a sensor node capable of transmitting wind speed, wind direction, air temperature, air humidity, air pressure and altitude.More such instrument nodes can be installed at different points and made to transmit to the same central station via a wireless sensor network.This implementation makes wind data collection easy and cost-effective as compared to most commercial options.
The developed cup-vane was found to be governed by a specific speed calibration function presented by Equation (1).The designed cup-vane instrument mean fitting deviation for positive and negative residuals was ±0.063398 m/s.This is as illustrated by the residuals results of Figure 9.The wind vane developed recorded an x-offset of 81 and a y-offset of −76.These offsets were corrected after calibration.This instrument has the potential to facilitate massive wind data collection, which is the grounds for rapid wind energy investment.

Figure 1 .
Figure 1.Cup-vane instrument design: (a) cup design and its section view (A-A); and (b) vane design and its section view (B-B).

Table A1 .
Designed Cup-Vane Wireless Sensor Node vs. Reference Anemometer Wind Speed Data.

Table A2 .
Cup-Vane Wireless Sensor Node Wind Speed Uncertainty Data.

Table A3 .
Cup-Vane Wireless Sensor Node Hysteresis Data.

Table A6 .
Cup-Vane Wireless Sensor Node Collected Data Sample.