XStore
View Categories

NORVI AGENT 1-BM01 – USER GUIDE

1 min read

Programming  #

The NORVI AGENT 1-BM01-ES-SI has a mini USB Port for serial connection with the SoC for programming. Any ESP32-supported programming IDE can be used to program the controller. Follow this Guide to programming NORVI ESP32-based controllers with the Arduino IDE.

SoC: ESP32-WROVER-B           
Programming Port: USB UART

Digital Inputs #

Wiring Digital Inputs #

The digital inputs of NORVI AGENT 1-BM01-ES-SI can be configured as both Sink and Source connections. The inverse of the Digital Input polarity should be supplied to the common terminal.

NORVI AGENT 1-BM01-ES-SI Digital Input Wiring

Programming Digital Inputs #

Reading the relevant GPIO of the ESP32 gives the value of the Digital Input. When the inputs are in the OFF state, the GPIO goes HIGH, and when the input is in the ON state, the GPIO goes LOW.

Refer to the GPIO allocation table in the Datasheet for the digital input GPIO.

#define INPUT1 18

void setup() {
  Serial.begin(115200);
  Serial.println("Device Starting");
  pinMode(INPUT1, INPUT);
}

void loop() {
  Serial.print(digitalRead(INPUT1));
  Serial.println(""); 
  delay(500);
}

0 – 10V Analog Input #

Wiring Analog Inputs #

NORVI AGENT 1-BM01-ES-SI Analog Input Wiring

Reading Analog Input #

Reading the relevant I2C address of the ADC gives the value of the Analog Input.

Programming Analog Inputs  #

#include <Adafruit_ADS1X15.h> 
#include <Wire.h> 
Adafruit_ADS1115 ads1; 

void setup() { 
   Serial.begin(115200); 
   Serial.println("Device Starting"); 
   Wire.begin(16,17); 
   ads1.begin(0x48); 
   ads1.setGain(GAIN_ONE); 
} 

void loop() { 
  Serial.print("Analog 0 ");
  Serial.println(ads1.readADC_SingleEnded(0)); 
  delay(10); 
  Serial.print("Analog 1 ");
  Serial.println(ads1.readADC_SingleEnded(1)); 
  delay(10); 
  Serial.print("Analog 2 ");
  Serial.println(ads1.readADC_SingleEnded(2)); 
  delay(10); 
  Serial.println(""); 
  delay(500); 
}

RS-485 Communication #

DriverMAX485
UART RXGPIO23
UART TXGPIO13
Flow ControlGPIO32
GPIO Connections of RS-485

Programming RS-485 #

The RS-485 connection of the NORVI AGENT 1-BM series uses a half-duplex communication mode of the MAX485 transmitter.

#define RS485_FC 32 
void setup() { 
   Serial.begin(115200); 
   Serial.println("Device Starting"); 
   pinMode(RS485_FC, OUTPUT); 
} 

void loop() { 
  digitalWrite(RS485_FC, HIGH); // Turns on Transmitter Mode            
  Serial.println("RS-485 Sending");  
  delay(500); 
}

Built-in Buttons #

Button 1 Pin  Digital Input GPIO35
GPIO Connection of buttons

Programming Buttons #

#define buttonPin 35
int  buttonState = 0;

void setup() {
  Serial.begin(9600);                             
  pinMode(buttonPin,INPUT);
}

void loop() { 
  Serial.print("Button: ");
  buttonState = analogRead(buttonPin);
  delay(50);
  Serial.print(analogRead(buttonPin));
  Serial.print("\tAnalog: ");
  delay(1000);
}

USB and Reset #

USB, BOOT and Reset