Arduino Ek R4 Sensor and Controller Circuit
The Arduino Ek R4 is the exact same board as the Arduino UNO R4, except that the Ek board is Made in India. It is available in two versions, Minima (with no support for wireless connectivity) and WiFi (with WiFi and BLE connectivity supported). We will be using the WiFi version in this project.
This circuit built with an Arduino Ek R4 will have a collection of sensors that will read various environmental data. The circuit will also have a relay that will control a light and a servo motor that will be rotated by varying degrees. The circuit will have an LCD display to show various data and information and will be turned on when a person is detected to be close to the board else will be kept off.
The sensor data will be displayed on the STEMVentor IoT App and the relay and the servo motor will be trigged by sensor readings and can also be controlled from the IoT App.
The IoT App will communicate with the Arduino Ek R4 to receive sensor data and send control signals via two communication protocols:
- Via an MQTT Broker over the Internet using the Ek R4 WiFi capability if you are using the app when not around the circuit.
- Via Bluetooth Low Energy (BLE) using the Ek R4 BLE capability when you are using the app within BLE range of the circuit.
Since the WiFi and BLE functionality cannot be used at the same time due to them sharing one antenna, the RGB LED will be green if WiFi is connected, blue if BLE is connected, and eed if neither are connected.
The Arduino Ek R4 also has a built-in LED Matrix which we will use as an indicator (since it does not have sufficient space or clarity to display much data) and also a Real-Time Clock which we will use to maintain time for the circuit.
It is officially referred to as Arduino UNO Ek R4 but we are choosing to use only Ek and remove the UNO since it seems redundant.
Microcontroller Update
Previous versions of the Arduino UNO were based on the 8-bit ATMega328P microcontroller. The R4 is the first UNO to feature a 32-bit microcontroller, the RA4M1 from. This major change may introduce some challenges, mainly for the libraries developed over the years around the ATMega328P. You will need a compatible version of the library for any component you would like to connect to the R4 (or you won’t be able to use that component with the R4).
STEMVentor does not vouch for or guarantee the safety or reliability of any of the websites or softwares referenced in and/or linked to from our content. It is your sole responsibility to verify links before you click on them, verify the authenticity of websites you visit, and validate the safety of all software you may download and/or install on your computing devices. We strongly recommend that your computing devices have reliable antivirus and anti-malware protection.
This is a good reference for library compatibility but we cannot guarantee or vouch for its accuracy. You must do your own due diligence before using any library. https://github.com/arduino/uno-r4-library-compatibility