Quantcast
Channel: Sensors - Arduino Forum
Viewing all articles
Browse latest Browse all 1078

LoRa32 (V2) voltage drop issue

$
0
0

I’m developing a simple project with a Lora32 (V2), but I’m identifying a 0.3V drop on both Vext pins.

I’m using the Vext pins to power two CSG-1 magnetic sensors with an external pull up (10k resistors for each). I connected the sensor’s positive terminal to the Vext output, and it’s output is connected to pins 12 (SENSOR_ESQ) and 27 (SENSOR_DIR).

I also have a switch (represented by the CONTROLE variable) that is connected to the ESP’s internal pull up, and it’s working as expected: 3.3V on a OFF state for the switch, and 0V from a ON state. If the switch is OFF, there’ll be a voltage drop from 3.3V to 3.0V on the Vext pins.

This is the program’s code:

#define SENSOR_ESQ 12
#define SENSOR_DIR 27
#define CONTROLE 21
//#define ENTRADA 18

void setup() {
  Serial.begin(115200);
  
  // put your setup code here, to run once
  pinMode(CONTROLE, INPUT_PULLUP);
  pinMode(SENSOR_ESQ, INPUT);
  pinMode(SENSOR_DIR, INPUT);
  //pinMode(ENTRADA, INPUT);
  digitalWrite(3, HIGH);
  digitalWrite(4, HIGH);
  
  Serial.println("Working");
}

void loop() {
  // put your main code here, to run repeatedly:
  delay(1000);
  
  Serial.printf("CONTROLE = %d, ", digitalRead(CONTROLE));
  Serial.printf("SENSOR_ESQ = (Analog: %.3fV, Digital: %d), ", 3.3*((float)analogRead(SENSOR_ESQ))/4095, digitalRead(SENSOR_ESQ));
  Serial.printf("SENSOR_DIR = (Analog: %.3fV, Digital: %d)\n", 3.3*((float)analogRead(SENSOR_DIR))/4095, digitalRead(SENSOR_DIR));  
}

This is the program's output:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1078

Trending Articles