"hi,i purchase this item last month ago, i have difficulty in gaining its output voltage. Because the result of output voltage is proportional with the voltage source. We follow the circuit diagram correctly in the datasheet and we supply a voltage of 5V but the output voltage is 5V too. The Vout did NOT varry if we changed the input current, it stays on 5V. Even we change the input current to 4.5A to 2A the Vout stays in 5V. So we repeat the procedure but we change the Vsource to 4.5V and 6V, but still the Vout reads 4.5 and 6V respectively. pls pls pls help us because it is our requirements for graduation. "
"hi.i purchased this item few months ago.but when i measure the voltage,it is 2.4v with no load.but with load,the measured voltage is still 2.4v.what does it mean?is the device broken or is there any other reason? the voltage is suppose to increase with increasing load because of increasing current,am i right? "
I need to measure current from my 18Volt 2W solar panel. Tested the current sensor with 5V power supply but when i adjust the voltage or current supply the reading does not vary.
Please help me thank you
Here is my sample code attach to the arduino and also my circuit connection.
/* This sketch describes how to connect a ACS712 Current Sense Carrier (http://www.pololu.com/catalog/product/1186) to the Arduino, and read current flowing through the sensor.
Vcc on carrier board to Arduino +5v
GND on carrier board to Arduino GND
OUT on carrier board to Arduino A0
Insert the power lugs into the loads positive lead circuit, arrow on carrier board points to load, other lug connects to power supply positive */
- CODE: SELECT_ALL_CODE
// include the library code:
#include <LiquidCrystal.h>
int batMonPin = A4; // input pin for the voltage divider
int batVal = 0; // variable for the A/D value
float pinVoltage = 0; // variable to hold the calculated voltage
float batteryVoltage = 0;
float ratio = 2.1; // Change this to match the MEASURED ration of the circuit, 10k R1 and 5.1k R2
int analogInPin = A0; // Analog input pin that the carrier board OUT is connected to
int sensorValue = 0; // value read from the carrier board
int outputValue = 0; // output in milliamps
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() { // initialize serial communications at 9600 bps:
// set up the LCD's number of columns and rows:
// initialize the serial communications:
Serial.begin(9600);
lcd.begin(16, 2);}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// convert to milli amps
outputValue = (((long)sensorValue * 5000 / 1024) - 500 )/ 133;
batVal = analogRead(batMonPin); // read the voltage on the divider
pinVoltage = batVal * 0.00488; // Calculate the voltage on the A/D pin
// A reading of 1 for the A/D = 0.0048mV
// if we multiply the A/D reading by 0.00488 then
// we get the voltage on the pin.
batteryVoltage = pinVoltage * ratio*10; // Use the ratio calculated for the voltage divider
// to calculate the battery voltage
//* sensor outputs about 100 at rest. Analog read produces a value of 0-1023, equating to 0v to 5v. "((long)sensorValue * 5000 / 1024)" is the voltage on the sensor's output in millivolts. There's a 500mv offset to subtract. The unit produces 133mv per amp of current.*/
// when characters arrive over the serial port...
Serial.print("sensor = " );
Serial.print(sensorValue);
Serial.print("\t Current (ma) = ");
Serial.println(outputValue);
lcd.setCursor(0,0);
lcd.print(batteryVoltage);
lcd.print(" V ");
lcd.print(outputValue);
lcd.print(" mA ");
// wait 10 milliseconds before the next loop
// for the analog-to-digital converter to settle // after the last reading:
delay(1000); }
// initialize the library with the numbers of the interface pins