So I included the alterations you mentioned and here is my output with no load:

```
A0 = 512 V = 2319.765 Amps = 0.07
A0 = 510 V = 2310.704 Amps = -0.00
A0 = 510 V = 2310.704 Amps = -0.00
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 510 V = 2301.232 Amps = -0.08
A0 = 509 V = 2306.173 Amps = -0.04
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 509 V = 2306.173 Amps = -0.04
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 510 V = 2310.704 Amps = -0.00
A0 = 510 V = 2310.704 Amps = -0.00
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 511 V = 2315.235 Amps = 0.03
A0 = 510 V = 2310.704 Amps = -0.00
```

At a 1 ampere load with arduino MCU:

```
A0 = 474 V = 2165.202 Amps = -1.23
A0 = 474 V = 2156.399 Amps = -1.36
A0 = 471 V = 2142.751 Amps = -1.40
A0 = 474 V = 2165.202 Amps = -1.23
A0 = 475 V = 2160.948 Amps = -1.26
A0 = 471 V = 2142.751 Amps = -1.40
A0 = 474 V = 2156.399 Amps = -1.30
A0 = 476 V = 2165.498 Amps = -1.22
A0 = 476 V = 2174.338 Amps = -1.22
A0 = 475 V = 2160.948 Amps = -1.26
A0 = 474 V = 2147.595 Amps = -1.36
A0 = 473 V = 2160.635 Amps = -1.26
A0 = 475 V = 2160.948 Amps = -1.26
A0 = 471 V = 2142.751 Amps = -1.40
A0 = 474 V = 2156.399 Amps = -1.30
A0 = 474 V = 2165.202 Amps = -1.23
A0 = 475 V = 2160.948 Amps = -1.33
A0 = 474 V = 2156.399 Amps = -1.30
A0 = 475 V = 2160.948 Amps = -1.26
A0 = 474 V = 2156.399 Amps = -1.30
A0 = 474 V = 2156.399 Amps = -1.30
A0 = 473 V = 2151.850 Amps = -1.33
A0 = 476 V = 2174.338 Amps = -1.22
A0 = 474 V = 2156.399 Amps = -1.30
A0 = 473 V = 2151.850 Amps = -1.33
A0 = 475 V = 2160.948 Amps = -1.26
```

Here is my updated code:

```
#include <SD.h>
long readVcc()
{ long result;
// Read 1.1V reference against AVcc
ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
delay(2); // Wait for Vref to settle
ADCSRA |= _BV(ADSC); // Convert
while (bit_is_set(ADCSRA,ADSC));
result = ADCL;
result |= ADCH<<8;
result = 1126400L / result; // Back-calculate AVcc in mV
return result;
}
File myFile;
const int analogIn = A1;
int mVperAmp = 136; // from datasheet
int RawValue= 0;
double Voltage = 0;
float Vcc;
double Amps = 0;
void setup()
{
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
delay(2000); //afer reset Arduino, 2s to take out SD
Serial.print("Initializing SD card...");
if (!SD.begin(10)) {
Serial.println("initialization failed!");
}
else
{
Serial.println("initialization done.");
}
}
void loop()
{
// Serial.println( readVcc(), DEC );
RawValue = analogRead(analogIn);
Voltage = (((RawValue / 1023.0) * readVcc())) ; // Gets you mV
Amps = (( Voltage/ readVcc()) * 36.7) -18.3 ;
Serial.print("A0 = " ); // shows pre-scaled value
Serial.print(RawValue);
Serial.print("\t V = "); // shows the voltage measured
Serial.print(Voltage,3); // the '3' after voltage allows you to display 3 digits after decimal point
Serial.print("\t Amps = "); // shows the voltage measured
Serial.println(Amps,2); // the '3' after voltage allows you to display 3 digits after decimal point
delay(1000);
write_data(Amps); //write data
}
void write_data(double amperage_input)
{
myFile = SD.open("amp.csv", FILE_WRITE);
// if the file opened okay, write to it:
if (myFile) {
myFile.print("The current is: ");
myFile.println(amperage_input);
myFile.close();
//Serial.println("Write file successful!"); //print out COM Port
} else {
//Serial.println("error opening test.txt");
}
}
```

Can I get more accuracy from the sensor and eliminate the noise seen in my values???