Hi friends, I have a little query regarding arduino nano. I have 4 analog sensors which have two analog outputs each, they are connected from pins A0 to A7, all sensors work correctly, except the one connected to pins A6 and A7, I connect the same sensor to other pins in the line A0-A5 and it works perfectly, that is to say that the problem is in pins A6 and A7 of the arduino nano, with 2 arduinos nano the same thing happens to me.
Anyone know what can it be?
Do you read them with analogRead()?
A6 and A7 are only ADC inputs, they are not outputs, no digital hardware behind them, and don’t have pull-ups.
(Post your test code)
Please post the code that you are using to test the analogue inputs
What sensors are you using ?
What results do you get if you connect A6 or A7 directly to GND or 5V ?
Have the Nanos been altered to use the Uno bootloader by any chance ?
yes sorry, I do not know why I did not clarify that I am using load cells and HX711 modules are connected to the analog ports.
If I'm using analogRead (), sorry I don't have the code available now, I'll upload it as soon as I can.
The code probably does not matter much at this stage / double check the boot loader and which board was selected as hinted by the other posters
Using the UNO bootloader should make no difference, it is the same bootloader as the newer nano bootloader. Compiling for an UNO should have no effect either, A6 and A7 are routinely used on an UNO in connection with randomSeed() .
My NANO works fine for analog channels A6 and A7 with IDE-1.8.13 and ATmega328P (Old Bootloader).
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(analogRead(A7), HEX);
delay(1000);
}
What is your IDE version?
david_2018:
Using the UNO bootloader should make no difference, it is the same bootloader as the newer nano bootloader. Compiling for an UNO should have no effect either, A6 and A7 are routinely used on an UNO in connection with randomSeed() .
good to know !
chelo46:
yes sorry, I do not know why I did not clarify that I am using load cells and HX711 modules are connected to the analog ports.
The HX711 has digital outputs.
Some HX711 examples use the analogue inputs of the Arduino, but that is not a requirement.
Any pin can be used for the HX711, except 0, 1, A6, A7. And try to avoid pin13 on a Nano, because it has a LED attached.
Multiple HX711 modules can share the CLK pin. See HX711-multi.
Leo..