There are over 870 million people in the world who are hungry right now. Of these 870 million people, it's been estimated by the World Food Programme that 98% live in developing countries, countries that perversely produce most of the world’s food stocks. Most of the world's poor and undernourished live in 82 countries that cannot produce enough food to feed their populations and lack the financial resources to make up the deficit through imports.With the world’s population nearing 8 billion – and global prosperity and the desire for more resource-intensive foods rising steeply too – it’s clear that farming needs to become more productive.
The report, which was supported by the Foreign and Commonwealth Office, stresses that extreme weather events such as floods or droughts are just as significant as rising average temperatures and rainfall.
Increased food production volatility will mostly affect developing countries experiencing high levels of poverty and political instability, such as countries in the Gulf or Sub-Saharan Africa.
Bailey said: “The most vulnerable countries, which will be the worst affected – whether at the macroeconomic level or at the household level – the poorest households spend upwards of 50% of their income on food. If you are in a situation where food prices are increasing by 50-100%, that leaves them in an almost untenable position.”
But while larger economies would be less directly impacted and more able to absorb rising food prices, he said “countries like the UK and the US are very much exposed to the indirect consequences”. Such consequences could include the likely increased instability of countries in North Africa, where the inflation of food prices was a factor in causing the Arab Spring and which relies heavily on food imports.
As climate change causes temperatures to rise even higher in the second half of the century, even more serious food shocks – where production drops by up to 10% – are also likely to occur much more often by 2070.
Extreme weather events in North and South America and north-east Asia – where production of the four major crops is concentrated – are likely to have the biggest impact on global food production. In 1988/89, droughts in the US and South America lead to drops in the production of maize and soybean by 12% and 8.5% respectively.
The UN issued a warning last year that global food production must rise by 60% by 2050 in order to avoid social unrest and civil wars caused by serious food shortages. Rising demand is caused by increased wealth and a growing world population that is expected to reach 9.7 billion by mid-century.
The report recommends that governments need to work together on the international level, with significant investments from the public and private sectors required to make the global food system more resilient to climate change. It follows a warning last month by a UK foreign minister that climate change poses a risk equivalent to nuclear weapons, in part because of its impact on food security.
Hardware BuildFirst of all, I would like to thank Hackster.io and NXP for supporting this project with the Amazing NXP Rapid Prototyping Kit, I really felt informative using this board and able to achieve some of the complex projects integrated within a PCB.
NXP Rapid IoT Kit: Rapid IoT integrates 11 NXP devices (microcontroller, low-power connectivity, sensors, NFC, secure element, power management, interface) in a small form-factor hardware design, and combines it with proven software enablement (drivers, RTOS, middleware, cloud connect) and a web IDE with GUI based programming.
- Kinetis® K64 MCU based on Arm® Cortex®-M4 Core
- KW41Z Wireless MCU (BLE, Thread, Zigbee)
- NT3H2211 NFC Forum Type 2 Tag
- A1006 Secure Authentication & anti-counterfeit IC
- Multiple sensors (Gyroscope, Acc/Mag., Barometer/Temp., Air Quality, Ambient light and capacitive touch)
- Rapid IoT Studio IDE
- Automatic source code & project generation for MCUXpresso IDE/SDK
- iOS/Android mobile apps and IoT Cloud connect platforms
- Expandable to most IoT end-node use cases with 400+ Click boards™
- Compatible with NXP IoT Modular Gateway
NodeMCU:
NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Espressif Systems, and hardware which is based on the ESP-12 module.The term "NodeMCU" by default refers to the firmware rather than the development kits. The firmware uses the Lua scripting language. It is based on the eLua project, and built on the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as lua-cjson and SPIFFS.
Features of the ESP8266 include the following:
- Can be programmed with the simple and powerful Lua programming language or Arduino IDE.
- USB-TTL included, plug & play.
- 10 GPIOs D0-D10, PWM functionality, IIC and SPI communication, 1-Wire and ADC A0 etc. all in one board.
- Wifi networking (can be used as access point and/or station, host a web server), connect to internet to fetch or upload data.
- Event-driven API for network applications.
- PCB antenna.
- Wireless connectivity: Wi-Fi: 802.11 b/g/n
- Peripheral interfaces
- Security
- Power management:
This board has an inbuilt Temperature sensor, Gyroscope, Accelerometer, Magnetometer, Barometer, Air Quality, Ambient light and capacitive touch which a preloaded firmware that publishes the data from the sensors to the LCD display.
There are two ways to add more circuits to this NXP kit.
- Using docking station
- Using Bluetooth Low Energy (BLE)
In addition to this, we use a few more sensors with ESP8266 that will be explained in the further part.
The Temperature, Humidity, Barometer, Air Quality, Ambient light, Heat level, Water flow sensor and the Motor control should be interfaced for this project.
NOTE: Most of the sensors are in-built in this NXP kit.
Connecting the Peripheral to the ESP8266:NXP in-built Sensors:
We have on-board temperature sensor, humidity sensor, pressure sensor, air quality sensor, light sensor on the NXP Rapid IoT Prototyping Kit.
With the NXP Rapid Studio, an online IDE, these data can be acquired and sent to the ESP8266 from which the data is sent to the NXP Cloud.
The Firmware for NXP kit is attached in the Github repository.
Interfacing Water flow sensor:
The Water flow meter works on the principle of the Hall effect. According to the Hall effect, a voltage difference is induced in a conductor transverse to the electric current and the magnetic field perpendicular to it. Here, the Hall effect is utilized in the flow meter using a small fan/propeller-shaped rotor, which is placed in the path of the liquid flowing.
The liquid pushes against the fins of the rotor, causing it to rotate. The shaft of the rotor is connected to a Hall effect sensor. It is an arrangement of a current flowing coil and a magnet connected to the shaft of the rotor, thus a voltage/pulse is induced as this rotor rotates. In this flow meter, for every liter of liquid passing through it per minute, it outputs about 4.5 pulses. This is due to the changing magnetic field caused by the magnet attached to the rotor shaft.
The Digital pin D2 of NodeMCU is used for the output signal.
Connections:
NodeMCU ------------------------------------- Waterflow Sensor
VCC -> Vcc
GND -> Ground
D2 -> Signal
By keeping track of the number of pulses from the output of the Water Flow Sensor, you can easily calculate the amount of water flowing through the sensor and as a result the Water Flow Rate.
Interfacing Motor control:
The L293D is a 16-pin Motor Driver IC which can control a set of two DC motors simultaneously in any direction. The L293D is designed to provide bidirectional drive currents of up to 600 mA (per channel) at voltages from 4.5 V to 36 V.
The Digital pin D6 and D7 of NodeMCU is used as input signal for the motor driver which will determine the direction of the motor.
The Motor + is connected to the pin 3 of the L293D and the Motor - is connected to the pin 6 of the L293D.
The PWM output is connected to D5 which will determine the ON and OFF condition of the motor.
A Variable resistor is connected to A0 to vary the speed by varying the input voltage of the motor.
Connections:
NodeMCU ------------------------------------- Motor
VCC -> Vcc
GND -> Ground
D5 -> PWM Signal (EN)
D6 -> Input Signal (1A)
D7 -> Input Signal (2A)
A Timer is introduced to open and close the roof sequentially and based on the Temperature output.
Step 3: Uploading the FirmwareBefore uploading the firmware, we have to create a bus to connect NXP Rapid IoT Board with the NodeMCU Board.
Connect the Tx and Rx pins of the Bluetooth Module to NodeMCU board's USART.
Bluetooth Module ----------------------> ESP8266 Module
Tx -> Rx
Rx -> Tx
5V -> 5V
GND -> GND
NodeMCU:
Once the connection is done upload the code for sensors using Arduino IDE.
The procedure for NodeMCU will be discussed in the upcoming session.
The code is added the GitHub Repository which can be found in the code section.
NXP Rapid IOT:
With the project compiled, your Rapid IoT can be programmed with the project’s embedded firmware.
Prior to programming a Rapid IoT, ensure you have the following setup configuration:
- The device is connected to the computer via USB.
- The project to be programmed has been compiled.
- The Rapid IoT is in programming mode.
To put the Rapid IoT into programming mode, perform the following steps:
- Connect the Rapid IoT to the computer via USB.
- Simultaneously hold the top-left and bottom-right side buttons for five seconds until the screen goes black. Continue holding the buttons while the screen goes black.
- The green LED will turn on and start blinking, indicating the device is now in programming mode. The side buttons can be released. While in programming mode, the Rapid IoT displays as a mass storage USB device on your computer.
You can find the data is being published on the NXP Cloud.
This data which is logged can be display on either a website or with a mobile application.
In my case, I made an Application to display the Temperature, Humidity, Pressure, Light and Air quality on the remote device.
Application to subscribe the cloud data
Give a thumbs up if it really helped you and do follow my channel for interesting projects. :)
Share this video if you like.
Happy to have you subscribed: https://www.youtube.com/channel/UCks-9JSnVb22dlqtMgPjrlg/videos
Thanks for reading!
Comments