We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [analogread]

A standard Arduino function for detecting the voltage on an analog pin via ADC.

Filter by
Sorted by
Tagged with
1
vote
1answer
363 views

AnalogRead from voltage divider ladder

I'm building a MIDI guitar, using an Arduino, sound synthesising and wood. To properly know which note I'm pressing, I built a voltage divider with 12 equal resistors (10K). One side is connected at +...
0
votes
1answer
17 views

Why so different not connected analog inputs?

I took just Arduino Uno board, connected Ethernet Shield to it and compiled Web Server example. And it works. But it outputs: analog input 0 is 1023 analog input 1 is 1023 analog input 2 is 789 ...
5
votes
2answers
5k views

A question about resistance measurement with arduino

Lately I was asking myself about the possibility of measuring a potentiometer resistance with Arduino. My questions are: Is it possible? If it's possible, what kind of restriction does the Arduino ...
0
votes
1answer
155 views

Uno R3's a4 and a5 not working after installing itead SD Shield 3.0

I'm working on a data logging project and would like to use all six analog inputs on my Arduino Uno R3. I've been able to get everything working, including writing to the SD card. However, with the ...
1
vote
1answer
2k views

analogRead() takes >400 us on Arduino Zero but ~100 us on Uno, why?

I've been trying to figure out why the analogRead() function takes about four times as long on an Arduino Zero than on an Uno, when the Zero has a faster clock than the Uno. Arduinos website says ...
0
votes
3answers
4k views

Change max and min read value of potentiometer

I'd like to know if there is a function or some way to define min and max value to potentiometer, for example: I'm using a mechanical part that only tour the potentiometer a little bit, what means the ...
0
votes
0answers
44 views

Arduino Robot motors disabled when AnalogInput is connected

I have attached a solar panel to the Arduino Robot, connecting the - to the TK3 Input GND, and the + to the TK3 Input Analog Pin. I want to turn the robot around and "scan" the voltage. But the motors ...
0
votes
2answers
801 views

Using micros() to measure analogRead() time varies based on Serial.print location?

I'm trying to use micros() to measure the time it takes to execute an analogRead() cycle, but am having some issues. Originally, I just printed out the measured time for the analogRead() right after ...
1
vote
1answer
73 views

How can I get analog-in reading from Digital-PWM-out on the same board?

I have a wire going from PWM4 to A0 but I don't dare turn on my Arduino Mega in case this is incorrect. PWM4 will eventually go to an analog device but I want to make sure the read value is what I ...
0
votes
1answer
287 views

PWM output voltage too high

I'm experimenting with PWM with the code below, but (according to my analog multimeter) the voltage on the output pins reach up to 5V whilst the largest analogRead(IN1) value is only around 700: ...
0
votes
1answer
674 views

Sharp GP2Y0A710K0F IR sensor behaving strangely

I have just purchased a new Sharp GP2Y0A710K0F IR sensor online. As a sanity check, I wrote this simple code to check if the sensor is working correctly. The code is expected to print output voltage ...
0
votes
1answer
48 views

Serial.println not outputting

I ran the following really simple code on my micro and the monitor is just blank, not displaying any zeroes or anything and the Tx light isn't lighting up. I haven't used analog inputs much so I don't ...
1
vote
1answer
264 views

how do you capture the top value in a fallen edge in analogs data (flex sensor)

Guys i'm working with a flex sensor and I'm trying to capture a specific value which is the moment before the user lets go of a flexed flex sensor and its represented as the top point of a falling ...
2
votes
2answers
4k views

What is the sampling-rate of the `analogRead()`?

I am about to Fourier analyse some data I've taken, but i need to know at which sampling rate the data was written to the serial monitor. I've found a lot of threads about how to increase it and such ...
0
votes
1answer
180 views

How to interpret analog values sent to Arduino from line scanner?

So I have a line scan camera attached to my Arduino Mega and I'm trying to send it a digital clock impulse and get an analog output back. The line scan camera is supposed to return 128 pixels. So far ...
-1
votes
2answers
2k views

IF, ELSE IF functions not working with analogRead

not sure what is going wrong in the code below, but it's a simplified code of a larger piece I'm trying to debug. I notice that the code seems to skip to the else statement even though the if ...
2
votes
2answers
3k views

Why is my potentiometer giving strange reading?

I have a 10kOhm linear Potentiometer. I connected it to analog 0, as in https://www.arduino.cc/en/Tutorial/Potentiometer. The analogRead() gives a value between 0 and 1023, so I was expecting 0 if ...
0
votes
2answers
345 views

Driving numerous chips from 2 separate SPI connectors w/ Arduino Micro

I want to drive numerous chips (L9823, TLC5925, ADG1414, MCP23S08) from an Arduino Micro as well as read input from analog pins connected to momentary buttons, toggles, potentiometers and such. The ...
3
votes
1answer
387 views

Erratic readings on Analogread with low voltages

I am using Arduino Uno for measuring sensor voltages. I am using multiplexer to switch between different sensors. The readings measured in the range of 800-900 mv are accurate, but at low millivolts (...
1
vote
2answers
881 views

When should you worry about interference affecting the analog input?

I made something that uploads the measured current to Thingspeak. Everything works, but i did not place the DC to DC converter on the board because i was worried that it would interfere with the ...
5
votes
2answers
142 views

Practicality of recording speech

Is it practical to record speech with the Leonardo? I want to record speech via a MEMS microphone and stream it over a serial connection to a Raspberry Pi for speech-to-text processing. This article ...
2
votes
1answer
2k views

Maximum potentiometer resistance

I want to hook up a potentiometer to my arduino (Leonardo) as a voltage divider with the middle pin to an analog pin. I want to use the highest resistance to save power. I looked on the datasheet and ...
3
votes
1answer
497 views

LM335Z temperature sensor gives very varying values

I'm trying to get consistent values from the LM335Z temperature sensor. But it behaves very strange. I'm using an arduino nano and it's powered via USB from a Raspberry Pi. The circuit also has two ...
0
votes
3answers
1k views

Getting the average of sound in last minute

I am reading sound input every 60 seconds and I would like to calculate the average of sound during that period using non-blocking code; what should I do to change the way that I calculate it in ...
1
vote
2answers
872 views

Accelerometer axis inputs driving three RGB LED strips - Trinket Pro 5V

I am looking to take the analogRead Value of the x, y and z axis (at pins 0, 2 and 4) and if it's a motion state, perform a rainbow, cylone and cascade LED sequences using Adafruit Neopixel library. ...
1
vote
1answer
70 views

What will happen if I supply greater than 1.1V to analogue inputs if analogReference set to INTERNAL?

I am reading a 50Hz AC voltage using the analogue inputs. If I set the analogReference() to INTERNAL, meaning 1.1V on the Arduino Uno, what will happen if a voltage greater than 1.1V is supplied to ...
0
votes
1answer
162 views

Arduino Mimicking Voltage Dividing Keypad / Matrix

Still very new to Arduino, so bare with me. I've been all over Google looking for ways to hack my alarm keypad. This is my first time using the Arduino to hack something :smiley-confuse: The keypad ...
0
votes
1answer
210 views

Why does analog sensor “hum” when plugged into common ground?

I have the ground for an SD card module, LED, and piezo sensor all plugged into the same ground rail. When doing this I get a low "hum" in the piezo readings where instead of reading ground voltage (0)...
1
vote
1answer
406 views

How to wire and use a B10K linear LED potentiometer?

I've bought some nice looking LED potentiometers from Ebay. They look like this. I'm very new to low level electronics/hardware and I don't know how to wire it. It has 4+2 pins. Also, how to use it in ...
2
votes
2answers
18k views

Arduino: Read frequency of input from audio jack

I want to trigger an arduino from a sound from an audio jack from a mobile phone. The audio is a 1 Khz sound that the mobile will play. I want to avoid accidental triggering of the audio by testing ...
3
votes
2answers
4k views

Help Understanding FFT Analysis and analogRead()?

Here's the deal, I'm attempting to learn how to use an FFT (Fast Fourier Transformation) Library for sound analysis (link is here). My issue is that this comes with included C++ code to show users how ...
2
votes
1answer
543 views

Does lowering arduino analog reference increase precision in measuring low voltage?

The definition for Analog Reference is as follows: The reference voltage used for analog input (i.e. the value used as the top of the input range). By default you have analog reference of 5V. So the ...
1
vote
0answers
291 views

How to generate Analog Signal (Voice) to the microphone

I have question about microphone and generating sound signal. I have microphone in my intercom at home. It is simple analog microphone, not digital. What I want is to connect arduino analog ...
1
vote
2answers
1k views

Analog Pins are sensing Values

I used the example code AnalogReadSerial and tried it on all analog pins from A0 to A7. None of the analog pins were connected to anything so I expectedy to get 0 in the serial monitor. But as it ...
4
votes
1answer
3k views

Precision voltmeter using Arduino

I am newbie, I need to measure precise voltage in range 0.00-0.80V, two digits precision. The voltage will not be greater than 1V-1.2V. I wonder if I need divider or not, I am sure that voltage ...
2
votes
1answer
2k views

Arduino Uno ADC behavior in free running mode

I'm using my ATmega328P to sample an analog signal in free running mode. The ADC clock frequency is set to ÷128. I've read that a single analog conversion lasts 13 clock cycles. I would like to know ...
0
votes
1answer
117 views

Measuring voltage on an analog pin - What do I need to know about amperage?

I'd like to measure the voltage at a test point on a stepper motor driver chip with an arduino. The voltage at this point controls the amperages to the phase coils and is adjusted to trim the driver. ...
3
votes
2answers
2k views

How to wire an analog IR sensor for digital input?

How do you wire a phototransistor so that it outputs a clean digital signal in response to certain light levels? I've wired a QRD1114 to an Arduino analog pin to detect a white or black surface. ...
0
votes
1answer
2k views

Arduino Mega 2560 ADC sampling instant and other timings

Hello Everyone (I might be making some mistake in asking this "question", bear with me as I am new to these sites... I honestly think this is the best way to frame my inquiry because it's rather ...
0
votes
1answer
3k views

MQ135 output on Arduino Uno

I bought an FC-22 (MQ135) gas sensor module which I plugged into my Arduino Uno. I connected it to the A0 analog port. Then created a code that reads the raw data from A0 (code below). When I run the ...
10
votes
1answer
2k views

Update Dynamically Tkinter Widget Scale from Arduino Ports using python and firmata

I'm having trouble trying to get Arduino digital ports values and set these values into a Python Tkinter Widget Scale. I'm using Python and Arduino with Firmata. I'm able to access my arduino board ...
0
votes
1answer
469 views

Math with analog input values coming out wrong

Im getting stuck in a while loop because Im having trouble running a calculation on some sensor values. When I read my four sensors values and compare the ratio of the first two to the second two, I ...
1
vote
1answer
202 views

Using digital weighing scales with INA125p

Complete electronics beginner here. I'm attempting to build a weighing scale with an Arduino. I'm attempting to follow this tutorial, with the shield that they use. I've arranged my load cells on ...
2
votes
2answers
2k views

Safely enabling voltage divider on a 12V battery

I'm planning to monitor voltage of a 12V battery with an Arduino's ADC pin connected via a voltage divider. Since I don't want the circuit itself to drain the battery when not in use, I want to use a ...
0
votes
1answer
420 views

Why does my analogRead work on Teensy but not Arduino Uno?

I have successfully made a voltage measurement circuit on my Teensy 3.1 that reads a voltage coming out of digital pin 0 set high and coming back into an analog pin A0 to read voltage. Basically: ...
3
votes
2answers
2k views

Reading analog signal from digital pin #6

Is it possible to use digital pin 6 (PD6_PCINT22/AIN0) to read an analog voltage with analogRead()? According to the ATMega datasheet, this should be possible. If yes how is it done ? (pin ...
0
votes
1answer
1k views

Wrong analog reading

I am making a simple Li-Ion battery Tester. Basically its two 5R1 resistor in series and a relay (used to cut off the battery when it reaches cutoff voltage). Arduino is connected with ground to the ...
0
votes
1answer
273 views

Bluetooth distorts analog read?

I'm working to make a simple pedometer with Arduino, and after managing to find an algorithm that correctly finds the steps, I added a bluetooth extension (the overly popular and cheap JY-MCU) to ...
1
vote
1answer
5k views

Arduino Pro Micro Analog Pinouts

I have the Arduino Pro Micro and I would like to use all the analog pins that I can on it. It currently looks like it has a total of 9 Analog pins that can be used. A0, A1, A2, A3, A6, A7, A8, A9 ...
0
votes
2answers
79 views

Identical statements, different outcome

First a little background on me and my project. Most of my programming experience is with PHP and javascript. I have just recently started looking at C and C++ for this Arduino project. My project is ...