Getting Started With Norvi Devices
by NORVI Controllers in Circuits > Microcontrollers
5437 Views, 2 Favorites, 0 Comments
Getting Started With Norvi Devices
INTRODUCTION
Norvi devices are ESP32/ ESP8266/STM32 embedded industrial controllers. These devices come with variety of features with different models which make them ideal for industrial automation and IoT solutions.
From this instructable, begins a series on how to get started with Norvi Devices. Here, we’ll be looking at Norvi-IIOT-AE01-R, a USB programmable industrial ESP32 controller which is suitable for industrial IoT applications. This device falls under the Norvi IIOT - ESP32 WROOM series.
The features of this model are,
- 8 Digital Inputs 24V
- 6 Relay (220VAC - 5A)
- 2 Transistor outputs, PWM compatible (36VDC max with 360mW collector power dissipation)
- RS-485 Communication
- WIFI & Bluetooth
- Built-in OLED Display with 3 buttons
- Expansion port with I2C, UART and GPIO
This instructable begins with setting up the device and programming the device using Arduino IDE to see how the inputs and outputs are controlled.
So what do you need to get started?
- The Norvi IIOT-AE01-R Device Check more about the product
- 24V DC supply
- Wires for connection
- USB cable (Type A to Type B mini)
- PC/Laptop
Installing ESP32 Board in Arduino IDE and Uploading the Code to the Device.
- Install the ESP32 board in your Arduino IDE to start programming the device. ESP32 boards must be installed under board manager, it is recommended to use the latest version of the ESP32 board driver for Arduino.
- Connect the Norvi device with your PC/ laptop using the USB cable and upload the following sketch to the device.
// set pin numbers //const int I1=18; //const int I2=39; //const int I3=34; //const int I4=35; //const int I5=19; //const int I6=21; //const int I7=22; //const int I8=23; //const int O1=14; //const int O2=13; //const int O3=12; //const int O4=15; //const int O5=2; //const int O6=33; //const int TO1=26; //const int TO2=27; void setup() { Serial.begin(115200); pinMode(18, INPUT); // initialize the inputs and outputs pinMode(39, INPUT); pinMode(34, INPUT); pinMode(35, INPUT); pinMode(19, INPUT); pinMode(21, INPUT); pinMode(22, INPUT); pinMode(23, INPUT); pinMode(14, OUTPUT); pinMode(12, OUTPUT); pinMode(13, OUTPUT); pinMode(15, OUTPUT); pinMode(2, OUTPUT); pinMode(33, OUTPUT); pinMode(26, OUTPUT); pinMode(27, OUTPUT); } void loop() { // check the condition to make the output1 on when input 1 is connected if(digitalRead(18)== LOW && digitalRead(39)== HIGH && digitalRead(34)== HIGH && digitalRead(35)== HIGH && digitalRead(19)==HIGH && digitalRead(21)== HIGH && digitalRead(22)== HIGH && digitalRead(23)== HIGH) { digitalWrite(14, HIGH); digitalWrite(12, LOW); digitalWrite(13, LOW); digitalWrite(15, LOW); digitalWrite(2, LOW); digitalWrite(33, LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); } else { digitalWrite(14,LOW); digitalWrite(12, LOW); digitalWrite(13, LOW); digitalWrite(15, LOW); digitalWrite(2, LOW); digitalWrite(33,LOW); digitalWrite(26, LOW); digitalWrite(27, LOW); } }
Booting the Device
- Due to the installation of different drivers and older versions of libraries, Arduino fails to upload the program to the controller. In most cases, it is due to failure to enter the boot mode of the device. The device can be forced to boot mode by connecting the BOOT IO.0 of the expansion port to the GND pin with a jumper wire. Arduino can upload the program to the controller while the controller is in boot mode. After uploading the program, the connection between the BOOT IO.0 and GND must be removed to run the uploaded program.
Setting Up the Device and Testing
- Provide 24V DC Supply to the Norvi Device. (You will observe a red LED glowing inside the device.)
- Connect the COM pin to the (-) of the power supply.
** Common (COM) can be either connected to (+) or (-) of the power supply. If COM is connected to (-) of the power supply, digital inputs should be connected to the (+) of the power supply to complete the connection and vice versa.
GPIO Pins of Digital Inputs
- GPIO pins detail of Digital Inputs are as follows,
I.0 = 18 I.1 = 39 I.2 = 34 I.3 = 35
I.4 = 19 I.5 = 21 I.6 = 22 I.7 = 23
- Here the digital inputs are normally kept on/high (digital logic state "1") by using pull-up resistors inside the device. So when the connection is made the state changes to off/low (digital logic state "0").
Wiring the Digital Inputs
- Connect one end of the wire to the (+) of the power supply.
- Connect the other end of the wire to any inputs (from I.0-I.7) and complete the connection.
(Once the connection is made you can observe the respective LED glowing in the inputs column inside the device. This verifies the input that is connected.)
GPIO Pins of Relay and Transistor Outputs
- GPIO pins detail of Relay and Transistor Outputs as follows,
Q.0 = 14 Q.1 = 12 Q.2 = 13 Q.3 = 15
Q.4 = 02 Q.5 = 33 T.0 = 26 T.1 = 27
- Relay Output Ratings
1/8 HP 125 VAC/250 VAC
5 A, 30 VDC/250 VAC resistive
Pilot duty C 300
- Transistor Output Ratings
360mW collector power dissipation, 36VDC Max
Wiring the Relay Outputs
- Connect the phase/neutral of the AC supply (to + in the case of DC supply) to the output side's COM and the relay output with the load.
( As per our program, by controlling the digital inputs we can control the relay inputs which operate the relay outputs. The state of the relay can be identified from the respective LED indicators in the output column inside the device.)
**Here the figure shows, Norvi device is programmed in such a way that when input 1(I.0) is on, the relay output 1 (Q.0) is activated.
Wiring the Transistor Outputs
- In the previous code change digitalWrite(14, HIGH) to digitalWrite(14, LOW) and digitalWrite(26, LOW) to digitalWrite(26, HIGH) in the if section and upload the sketch to the device to check the transistor output working.
digitalWrite(14, HIGH) ---> digitalWrite(14, LOW)
digitalWrite(26, LOW) ---> digitalWrite(26, HIGH)
- Connect the Transistor output with the load that you want to control and the other side of the load to the supply. (The LED indicator in the output column, inside the device, verifies whether the right Transistor output is selected.)
**Here the figure shows, Norvi device is programmed in such a way that when the input 1(I.0) is on, the Transistor output 1(T.0) is activated.
To check more about the Norvi lineup - www.norvi.lk