5a acs714

I’m trying to use an Arduino to read the current for 12V 1amp motor.

But before you can hook up the motor the readout I get from the analog pen is floating from 508 to 513 back-and-forth. I get the same response after hook up the motor. When I run the motor I get inconsistent readout.

I’m powering the motor for a bench power supply and I can watch the mill amps and they’re consistent.

Any advice would be amazing!!!

[code]int sensorPin = A0;
int sensorValue;

void setup() {
Serial.begin(9600);
}

void loop() {
sensorValue = analogRead(sensorPin);

Serial.println(sensorValue);
delay(500);
}[/code]


Hello.

Could you post a sample of the readings from the serial monitor when the motor is running and not running? How much current does your power supply say it is providing? Are you using a motor driver that uses PWM to change motor speed, or do you have the power leads that extend out of your picture connected directly to the benchtop supply?

A 2Hz sample rate seems kind of slow for reading the motor current. The sensor is responding to changing current at about 80kHz and motor current might be changing small amounts at several hundred Hz or more. I suspect the indicator on your benchtop supply might not be responding to quick current spikes.

-Nathan