Search
Close this search box.

Como usar o sensor de corrente e tensão B43

Como usar o sensor de corrente B43

O B43 é um sensor de tensão e corrente, com capacidade de medir entre 0 e 25 Vdc e até 3A de corrente.

Pequeno e leve é perfeito para o uso em drones, robôs, fontes de bancada e outras aplicações onde o monitoramento da energia é necessário.

A conexão com o Arduino é muito simples, pois o sensor usa apenas duas portas analógicas do Arduino.

O código é bem pequeno e simples de entender:

/*  pinos:
Arduino          Sensor B43
A0                  VT
A1                  AT
+5V                 
+5V                 
GND                 GND
*/
#define AT_PIN A0 // connectar ao AT
#define VT_PIN A1 // connectar ao VT
#define ARDUINO_WORK_VOLTAGE 5.0
void setup()
{
  Serial.begin(9600);
  Serial.println("Tensao (V) / Corrente (A)");
}
void loop()
{
  int at_temp = analogRead(AT_PIN);
  int vt_temp = analogRead(VT_PIN);
  double tensao   = vt_temp * (ARDUINO_WORK_VOLTAGE / 1023.0) * 5;
  double corrente = at_temp * (ARDUINO_WORK_VOLTAGE / 1023.0);
  
  Serial.print("A0: "); 
  Serial.print(vt_temp); 
  Serial.print(" / "); 
  Serial.print("A1: "); 
  Serial.print(at_temp);  
  Serial.print(" ----- "); 
  Serial.print(tensao); 
  Serial.print(" / ");
  Serial.println(corrente);
  delay(1000);
}
Agora você já sabe que pode utilizá-lo em seus projetos. 
Mão na massa e até Mais!

Share this post

Recent Posts
About

Pellentesque id velit ut ligula maximus gravida venenatis in turpis. In eu lacinia libero. Aenean nec aliquet dui. Sed tristique convallis sapien, semper porttitor mauris scelerisque et. 

Newsletter
Subscribe for our monthly newsletter to stay updated

Related Posts