Hi, i have a MKR NB 1500 arduino board, my supply voltage to the board is 5V (with USB)
i know that the analog input pins on this board could have a 0 - 3.3 voltage input.
i would like to put 0 - 5v input on these pins.
i read something about the Aref pin but want to be sure.
if i put the 5V output pin from the Arduino MKR NB 1500 board onto the Aref pin, could my analog inputs then read 0-5v instead of 0-3.3 volt?
i don't want to break something or test something without being sure i will not break it.
hope somebody understands my question and coul help, thank you!
NO. The MKR board limits all input and output pins to 3.3V. You can google the datasheet for an "Arm® Cortex®-M0 32-bit SAMD21" and read the limits of each pin.
You will have to use a voltage divider to reduce the output of your sensor to some value below 3.3v. I don't recall the details of the SAMD21 processor but you can look at the data sheet to see what they are. Hint, some input pins are limited to a voltage below 3.3v.
Aref is there to let you change the reference voltage to the ADC's. The reference voltage cannot be higher than Vcc. In this case, Vcc is +3V3.
FYI, the USB port is 5V, but then Vbus (the USB voltage) goes through a voltage regulator, to reduce the voltage to +3V3. Your board does give you access to Vbus (+5V), but that is just for external reference.
To have only a fixed voltage of 3.3 Volts, you could actually incorporate a simple regulator, but if you want to apply a variable voltage of 0-5 Volts, you should instead interpose a variable regulator of the type LM317, with a feedback loop at the assembly level to ensure that the control of the output voltage is linear... as a reminder, the A/D conversion is sampled in 255 logarithmic values of 0 to 5 Volts.
unless I am mistaken, correct me if I'm wrong, it seems to me that the 8 bit sampling of the analog inputs is broken down into 255 equal values.
For Log implementation, my point was referring to improve linearity... during measurement by converting the voltage from 0-5 volts via a logarithmic amplifier, example AD8307 in signal strength indication, and applicable to analog input.
This is a simple method that I use for precision measurements. The AD8307 is only an example among other log amps, the principle to which I was referring consists of applying at the input of the CPU, not a simple voltage continuous, but steps resulting from a log conversion. This is particularly useful in terms of linearity for measuring voltages of a few millivolts.
For 8-bit sampling, you're absolutely right.
Not particularly familiar with these digital sampling methods.