Problem shooting analog reference with atto pilot 13v6 45a current sensor

Hello all,

I am trying to use the atto pilot 13v6 current sensor with my arduino mega 2560 and am consistently getting wrong readings. I’ve gone through all the math and everything checks out but did catch one thing that may have something to do with it.
In the data sheet it gives the respective analog voltage outputs, but states that they are scaled for a 3.3v reference. Whereas i am under the impression that the arduino mega is default to reference 5v. I can’t dial in any other variable that could be causing my problems.

I’ve attached a screen shot of the data sheet I’ve been referencing and my .ino file.

Any ideas or thoughts on how to scale these values for a 5v reference? or perhaps I am thinking about this in the wrong way completely.

Cheers
Zack

VoltageSensor.ino (1.47 KB)

Why not use the 3v3 ref ??
read the warning https://www.arduino.cc/en/Reference/AnalogReference

So I am a novice with the arduino mega. As i have it set up now, i have connected to my board the ground pin, V to A0 and I to A1. I see on my board the 3.3v pin, but am unsure how to use it as reference. Would I simply pin out from the 3.3v to the AREF pin? i've attached a photo of what i have right now.

Yep.. 3v3 -> Aref Your code has : analogReference(EXTERNAL);

But read the warning from the webpage to avoid damage