i get analog port value but without to connect sensor

Dear support team.

I bought an arduino nano, i've installed drivers and software IDE and Works fine. Using the function analogRead(x) on any analog ports i get a value int equal to 300 (or nearby), but without to connect it any sensor or voltaje input. (input=0v).

This is a hardware problem??? I must to buy another. All analog input ports (A0,A1, etc.) Works at same.

P.D. When i put a 5v signal in analog port input...function analogRead(x) returns 1024 value int, but if i reduce to 4 volts, 3v or 2v it returns almost 0 value int...never i get intermediate values.

Thanks for any information.

Can you post your code and schematic?

Nano has a Schottky blocking diode which drops VUSB to around 4.7 - 4.8 volts, check your AREF voltage with a DMM and don't put a higher voltage than AREF + 0.5 volts on a pin without a current limiting resistor.

harveyrueda: I bought an arduino nano, i've installed drivers and software IDE and Works fine. Using the function analogRead(x) on any analog ports i get a value int equal to 300 (or nearby), but without to connect it any sensor or voltaje input. (input=0v).

You've made a bad assumption here. When nothing is connected to the pin, you CANNOT say that the pin is at 0V. The pin at that point is picking up whatever interference may be around and is reading whatever voltage that happens to create. Google "Floating Pin" for a further explanation. Either way, you simply cannot say that the pin is at 0V unless you have connected the pin to something at 0V.