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
2answers
119 views

How to analogRead() 2 separate pins simultanously?

I am trying to create a simple piano playback using a flex sensor, a proximity sensor and a piezo buzzer. I want to have it so that when the flex sensor is triggered, a sound is played on the piezo ...
2
votes
2answers
7k views

Problem with simple sound detection circuit using a microphone

I am very new to this community. My first project with Arduino was using a LDR (light dependent resistor) in a circuit like this: The input I got was as expected between 0 - 1023. I then tried a ...
1
vote
3answers
368 views

AC meter By ADC timer interrupt from Nick Gammon

I want to read ADC from the pin A0 and A1. I have written in this code, however. I took this code came from Nick Gammon Thank You ///////////////////////////////////////////////////////////////////...
0
votes
1answer
3k views

arduino pro mini analog pins read different values

i need to read a voltage with an arduino pro mini using the analog pins. I created this simple test code: int sensorValue; float voltage; void setup() { Serial.begin(9600); } void loop() { ...
1
vote
1answer
619 views

Get an additional analog pin?

I have the following board: As far as I can tell, there's only a single analog pin (A0). But I need at least 2 additional (for 3 total). Is there some way to fake analog input on GPIO pins?
1
vote
1answer
5k views

Getting the highest value from analog reading?

I am doing a project using an FSR (Force Sensitive Resistor), I'm currently reading values with no problem every 100milis. I want to output via Serial.print the highest value, I've read. I am having ...
0
votes
3answers
2k views

Advanced ADC setup on Due (SAM3X8E) to increase precision

I want to make some precise measurements with Arduino Due. Although I'm using very good external voltage reference (LTC6655) measured data is still jumping around, especially significant when I'm ...
0
votes
2answers
2k views

Cheapest and easiest Arduino board for 12 bit ADC, thinking of M0

I need an Arduino board for simple ADC, but 10 bits of resolution is sadly not enough. I am going to buy a board with 12 bits of resolution, but really couldnt decide on the exact model. It needs to ...
1
vote
2answers
1k views

AnalogRead(0) always returns 0 on RFduino

I'm using RFduino to do analogRead at pin 2 and pin 0. Pin 2 works perfectly, and I got the result. However, for pin 0 it returns all zero. #include <RFduinoBLE.h> static const int topPin = 2; ...
1
vote
1answer
376 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
6k 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
159 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
5k 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
866 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
82 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
295 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
708 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
288 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
202 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
360 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
413 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
929 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
145 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
520 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
887 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
71 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
167 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
222 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
419 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
19k 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
613 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
311 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
118 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
3k 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 ...