i will give you mine humble opinion,
In the future use the VCC, 5V , or 3.3V for Vref instead of Internal ref.
You will gain resolution in the measured value, and don´t need voltage dividers.
The ACS712 only accept 5v of supply, not even 3.3v.
Assuming you are using the bidirectional version at 0 amp , according to the datasheet you will have vcc x 0.5 wich means 2.5V, wich is already more the twice the voltage of the internal ref (1.1V)
The ACS712 5A version gives an output of 185mV / A, wich means that at 5A you will have 2.5V + (0.185 V/A x 5A ) = 3.425V
You put 2 resistors in series in the output of the current sensor:
The first one 20K Ohm resistor and the second one 8K Ohm.
The end of the 8K Ohm resistor connect to ground, and in the connection between the end of the 20K and the start of the the 8K you connect to the analog Pin of the arduino.
With this, at 5A you will get a voltage output of 1V, wich is below the voltage ref (1.1V).
If you use a 47K and a 10K you will loose even more resolution.
But if you want to use it you need to switch the order (BUT PLEASE DON`T FORGET TO DO THE SAME IN REALITY ), but you can use 2 ways:
#define RESISTOR_TO_GROUND_FOR_CURRENT 10000 // put as comment or set to 0 if no divider is used
#define RESISTOR_TO_CURRENT_SENSOR 47000 // put as comment or set to 0 if no divider is used
47000/10000 = 4.7
or
#define RESISTOR_TO_GROUND_FOR_CURRENT 10 // put as comment or set to 0 if no divider is used
#define RESISTOR_TO_CURRENT_SENSOR 47 // put as comment or set to 0 if no divider is used
47/10 = 4.7
The divided value is what matters for the software...In a voltage divider the Highest resistor value is 98% of times for the output, and the smaller one to the ground...and the middle point of connection to the input of the MCU
https://www.allaboutcircuits.com/tools/ ... alculator/
If you didn´t understood , please say.
Regards