** Need Help Using QNDBK1-40 Hall Effect Current Sensor with Arduino Uno and ESP8266**

Hello Arduino Community,

I hope you're all doing well. I'm currently working on a project that involves interfacing the QNDBK1-40 Hall Effect current sensor with both an Arduino Uno and an ESP8266 microcontroller. However, I've encountered some challenges and would greatly appreciate your expertise and advice.

Issue Summary: I am attempting to integrate the QNDBK1-40 Hall Effect current sensor, which is rated for DC 1500A, with both Arduino Uno and ESP8266 platforms. My goal is to accurately measure and interpret current readings using these microcontrollers.

Specific Problems:

  • Arduino Uno: I'm having trouble configuring the sensor with the Arduino Uno and reading accurate current values.
  • ESP8266: Similarly, integrating the sensor with ESP8266 and ensuring reliable readings is proving to be challenging.

Request for Assistance: If anyone has experience with the QNDBK1-40 sensor or has successfully interfaced it with Arduino Uno and ESP8266, I would greatly appreciate your guidance. Specifically, I'm looking for:

  • Sample code or example projects that demonstrate the integration of the QNDBK1-40 sensor with Arduino Uno and ESP8266.
  • Tips on wiring, power considerations, and any specific libraries or functions that might be useful.
  • (This was the code the seller gave me:(The sensor has no code
    The code you said may be on the microcontroller, you can confirm with the microcontroller manufacturer.
    03:02

To convert DC 0~5V voltage into digital display, you can use the analog input pin to read the voltage value and convert it into digital. Here is a simple example code that shows how to implement this function when using the ESP8266 module with Arduino:

#include <ESP8266WiFi.h>

const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";

const int analogPin = A0; // 模拟输入引脚接在A0
int sensorValue = 0; // 保存读取到的模拟值

void setup() {
Serial.begin(115200);

// 连接到Wi-Fi网络
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}

Serial.println("Connected to WiFi");
}

void loop() {
// 读取模拟输入引脚的电压值
sensorValue = analogRead(analogPin);

// 将0~1023的模拟值映射为0~5V的电压值
float voltage = sensorValue * (5.0 / 1023.0);

Serial.print("Analog Value: ");
Serial.print(sensorValue);
Serial.print("\t Voltage: ");
Serial.print(voltage);
Serial.println(" V");

delay(1000); // 等待1秒
}

In this example, we use analog input pin A0 to read the voltage value of 0~5V. After reading the analog value through the analogRead() function, we map it to the actual voltage value and output it through the serial port. You can view the output results through the serial monitor.

Remember to select the correct board and port in the Arduino IDE, and install the ESP8266 support library, then you can compile, upload and run this code. )

Your insights and advice would be immensely helpful in overcoming these challenges and progressing with my project. Thank you in advance for your assistance!

Best regards,

Please post a schematic diagram of how you have the sensor wired up. Please also include a clear photograph of the actual circuit as built.

What kind of currents are you trying to measure?

What does that mean, specifically? What kind of errors or unanticipated behavior do you encounter?

Here's the link to there website (https://www.njqnet.com/productinfo/1218171.html)

I just wired it up directly with the connections as given to the arduino and ESP8266 too
the problem i faced was that it wasnt't giving me any value
thanks

Please show a photograph that clearly shows all connections you've made.

Also specify the test signals/currents you're working with.

The Serial output of the sketch you posted is always something. Do you mean you only got zero as output? Or do you not get any Serial monitor text at all?

hope you're all doing well. I'm currently working on a project that involves interfacing the QNDBK1-40 Hall Effect current sensor with both an Arduino Uno and an ESP8266 microcontroller. However, I've encountered some challenges and would greatly appreciate your expertise and advice.

Issue Summary: I am attempting to integrate the QNDBK1-40 Hall Effect current sensor, which is rated for DC 1500A, with both Arduino Uno and ESP8266 platforms. My goal is to accurately measure and interpret current readings using these microcontrollers.

Specific Problems:

  • Arduino Uno: I'm having trouble configuring the sensor with the Arduino Uno and reading accurate current values.
  • ESP8266: Similarly, integrating the sensor with ESP8266 and ensuring reliable readings is proving to be challenging.

Request for Assistance: If anyone has experience with the QNDBK1-40 sensor or has successfully interfaced it with Arduino Uno and ESP8266, I would greatly appreciate your guidance. Specifically, I'm looking for:

  • Sample code or example projects that demonstrate the integration of the QNDBK1-40 sensor with Arduino Uno and ESP8266.
  • Tips on wiring, power considerations, and any specific libraries or functions that might be useful.
  • (This was the code the seller gave me:(The sensor has no code
    The code you said may be on the microcontroller, you can confirm with the microcontroller manufacturer.
    03:02

To convert DC 0~5V voltage into digital display, you can use the analog input pin to read the voltage value and convert it into digital. Here is a simple example code that shows how to implement this function when using the ESP8266 module with Arduino:

#include <ESP8266WiFi.h>

const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";

const int analogPin = A0; // 模拟输入引脚接在A0
int sensorValue = 0; // 保存读取到的模拟值

void setup() {
Serial.begin(115200);

// 连接到Wi-Fi网络
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}

Serial.println("Connected to WiFi");
}

void loop() {
// 读取模拟输入引脚的电压值
sensorValue = analogRead(analogPin);

// 将0~1023的模拟值映射为0~5V的电压值
float voltage = sensorValue * (5.0 / 1023.0);

Serial.print("Analog Value: ");
Serial.print(sensorValue);
Serial.print("\t Voltage: ");
Serial.print(voltage);
Serial.println(" V");

delay(1000); // 等待1秒
}

In this example, we use analog input pin A0 to read the voltage value of 0~5V. After reading the analog value through the analogRead() function, we map it to the actual voltage value and output it through the serial port. You can view the output results through the serial monitor.

Remember to select the correct board and port in the Arduino IDE, and install the ESP8266 support library, then you can compile, upload and run this code. )

Your insights and advice would be immensely helpful in overcoming these challenges and progressing with my project. Thank you in advance for your assistance!

Best regards,

And what's your problem?

i'm not getting values from the sensor

Please show your wiring a link to the datasheet.


i wired it up with esp8266

here's it

Hi, @abdullyoo
Is this post associated with this?

Please post your code in code tags as described in the following link.

Can you please post a copy of your circuit for each controller, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

And your wiring?

@abdullyoo ,

Your two or more topics on the same or similar subject have been merged.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

#include <ESP8266WiFi.h>

const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";

const int analogPin = A0; // 模拟输入引脚接在A0
int sensorValue = 0; // 保存读取到的模拟值

void setup() {
Serial.begin(115200);

// 连接到Wi-Fi网络
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}

Serial.println("Connected to WiFi");
}

void loop() {
// 读取模拟输入引脚的电压值
sensorValue = analogRead(analogPin);

// 将0~1023的模拟值映射为0~5V的电压值
float voltage = sensorValue * (5.0 / 1023.0);

Serial.print("Analog Value: ");
Serial.print(sensorValue);
Serial.print("\t Voltage: ");
Serial.print(voltage);
Serial.println(" V");

delay(1000); // 等待1秒
}



thank you will do

1 Like

Which version of the sensor did you get? It is available with a 4-20mA, 5V, or 10V output signal.

it's 0-1500A and 0-5v output voltage

And what's the output on serial when you run the program?

it constantly gave me zero's

You probably damaged the ESP8266. The maximum voltage on any pin is only 3.3V, 5V will damage it.

Use the Uno.