Arduino Nano doesn't seem to give enough power

Hi, i've recently picked up an arduino nano por a project of a friend of mine, she wanted to make a humidity sensor with a buzzer alarm and an 16x2 lcd that shows a message when a plant needs to be watered.
I've done the project and everything, but when I connect all the components to the arduino nano, only the buzzer and the humidity sensor seem to work.
I tried the project in a regular Arduino uno, and it works perfectly.
I'm powering the Arduino Nano via the USB cable, I don't know if I should power it with a 9v-12v battery for it to work or if it's something else.
The components connected are:
1.- FC-28
2.- Active Buzzer
3.- 16x2 LCD Display
4.- A 10K potentiometer for the contrast of the LCD.
Thanks in advance

Obviously you are connecting the Nano wrongly, but we can't see it so how could we possibly know what you are doing wrong?

It would not be advisable to connect 9 or 12 V to the Nano. It requires 5 V to operate.

Hint: There is a common error in tutorials. Do not connect the contrast potentiometer to 5 V - VCC.

Paul__B:
Obviously you are connecting the Nano wrongly, but we can’t see it so how could we possibly know what you are doing wrong?

It would not be advisable to connect 9 or 12 V to the Nano. It requires 5 V to operate.

Hint: There is a common error in tutorials. Do not connect the contrast potentiometer to 5 V - VCC.

Oh,sorry,forgot to post an image.
Well, in a basic diagram, it would look like this the way I have it connected.
I’m using a smaller breadboard,and it looks awful with a lot of cables going everywhere, but this diagram shows basically how everything is connected.
In short, everything is powered by the nano, and via the USB cable, so I don’t know if something is wrong here.
I’ve done things like this a lot and never experienced anything like this, and as I said, in my Arduino UNO it works without problems.
Thanks.

arduino.png

OK, well that diagram looks OK if it matches the code which you did not post. The Nano is functionally identical to the UNO so it should work if you used the same connections.

The common "gotchas" here are faulty breadboards and even more common, faulty Chinese-made jumper wires, so you need to test all your jumper wires as you re-wire it. "Lose" the potentiometer connection to the 5 V rail while you are at it - it will be easier to set the contrast (and save half a milliamp! :astonished: ).

Right,the code too,sorry, I’m new to posting to forums.

#include <LiquidCrystal.h>
// Definimos las constantes
#define COLS 16 // Columnas del LCD
#define ROWS 2 // Filas del LCD
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
const int sensorPin = A0;
int zumbador=8;
int humeval = 0;

void setup() {
Serial.begin(9600);
pinMode(zumbador,OUTPUT);
lcd.begin(COLS, ROWS);
lcd.setCursor(0,0);
lcd.print(“Alarma de humedad”);
delay(2000);
}

void loop() {
int humedad = analogRead(sensorPin);
Serial.print(humedad);
humeval = (100.0 * humedad) / 1024;
if(humeval >= 50)
{
lcd.setCursor(0,0);
lcd.print(“Regar la planta”);
lcd.setCursor ( 0, 1 );
lcd.print(“REGAR AHORA”);
delay(500);
digitalWrite(zumbador,HIGH);
delay (1000);
digitalWrite(zumbador,LOW);
}

if(humeval <= 50)
{
lcd.setCursor(0,0);
lcd.print(“No requiere riego”);
lcd.setCursor ( 0, 1 );
lcd.print(“ESTADO: BUENO”);
delay(500);
digitalWrite(zumbador,LOW);
delay (50);
digitalWrite(zumbador,LOW);
}
delay(500);
}

The code uses spanish language, but it’s the basics of it.
And thanks for all the help.

I have checked, and it seems that only the LCD is not working with the nano, i've checked the lcd with the UNO and it works without a problem, but it seems to only fail with the nano.
I'm checking the solderings of the nano and the lcd to check for anything but there doesn't seem to be any problem.

OK, well, given that you have checked all the jumper wires, and the power rails on a MB102 breadboard do not have a gap in the middle, then we go to the standard LCD fault-finding cascade. What is showing on it as you adjust the contrast control?

Paul__B:
OK, well, given that you have checked all the jumper wires, and the power rails on a MB102 breadboard do not have a gap in the middle, then we go to the standard LCD fault-finding cascade. What is showing on it as you adjust the contrast control?

Well,now I have re checked all the solderings, and it seem's that it was the nano fault, because I justr resoldered the pins and now it works, altough, the LCD only shows black squares when I try to adjust the contrast, and I just checked with another LCD and it reacted the same, so I'm thinking that the pins number 11-12 or the pins 2-5 have some problem in their soldering again, because the program of the arduino works in the uno configuration.
Either way, I'm going to keep trying to see what happens.
Thanks for the help up to this point, and if you have an idea or a guess about the black square thing in the LCD, it would be much appreciated.

One row of black squares indicates contrast setting approximately correct but not responding to initialisation codes.

Paul__B:
One row of black squares indicates contrast setting approximately correct but not responding to initialisation codes.

All right, thanks a lot, I will keep checking it, maybe there's something wrong also in the soldering, but at least, now I know.
Thanks for all the help.