Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [analogread]

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

Filter by
Sorted by
Tagged with
13
votes
4answers
5k views

Does ADC conversion to a voltage rely on the actual value of the +5 V pin?

Questions: Does the conversion of the ADC count to voltage depend on the actual voltage of the +5 V pin? If yes, what is the accepted method of getting that voltage from the board? Background/...
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 ...
8
votes
2answers
2k views

Why analogue pins affect each other?

I have a sensor and it generates an analogue signal. I am reading all analogue data and sending it to my computer. uint8_t sensors[] = { A0,A1,A2,A3,A4,A5,A6 }; const int len = sizeof(sensors) / ...
8
votes
2answers
814 views

Arduino ADC Reference Voltage if it is Battery Powered

I am looking to possibly monitor battery power to the Arduino using its ADC. This is fairly straight forward and simple (especially if using the Arduino API); however, if the battery is powering the ...
7
votes
5answers
13k views

How to loop over analog pins?

I want to do something along the lines of for (int i = 0; i < 4; i++) { analogRead(i); } Which appears to work, but the following does not: for (int i = 0; i < 4; i++) { pinMode(i, INPUT);...
7
votes
2answers
91 views

How can I differentiate between multiple circuits?

I'm building a puzzle for an escape room. I want to give the user 6 wires and 6 terminals, then confirm that they've connected the correct wires to the correct terminals (one-to-one). My first (...
7
votes
6answers
2k views

Fluctuating readings of LM35 temperature sensor (+- 5°C) with Arduino UNO

I am trying to read a LM35 temperature sensor with Arduino UNO which I got as a gift. The issue is the fact, that my readings of sensor are, well, suspicious at least - they jump with each reading ...
6
votes
1answer
340 views

Analog Reference and Power Voltage

On the Arduino website it states that the analog pins read voltages from 0 to 5 volts (default) and return a value from 0 to 1023. One can also set the range with analogReference(). However, this is ...
6
votes
1answer
7k views

References (e.g, libraries and tutorials) for connecting the 24-bit ADS1256 ADC to arduino

The ADS1256 chip is a high precision 24bit, 8 channel, analog digital converter based on SPI communication that is suitable for biomedical applications and perfect for sensing ECG and EEG signals. I ...
5
votes
4answers
13k views

Can I connect a PWM pin on one Arduino to an analog input on another?

I was considering several different ways to send simple data from one Arduino to another when I though, why not connect a PWN pin of one Arduino to the analog pin on another? I could send simple ...
5
votes
1answer
8k views

Can I use analogRead to read a digital pin?

analogRead(nGPIO_max + lockerVal) were nGPIO_max(maximum digital pins in Arduino Uno is 13) and lockerval is 2. Which pin is it reading?
5
votes
4answers
20k views

How to add hysteresis to threshold values?

This code compares the analog input value against two thresholds, having three voltage regions. Then it will turn on an LED according to what region the read voltage is in. The problem is that when ...
5
votes
3answers
2k views

Does any board provide more than 1024 analog input values?

The Arduino boards provide an analog input range of 0V to 5V which translates to 0 to 1023 integer values. The range is determined by the on-board ADC, which in the case of the Uno is a 10 bit ADC (2^...
5
votes
2answers
3k views

Is it wise to use analog input pins to read digital buttons?

I am thinking about building a circuit that is literally going to take 11 of the 14 digital pins of an UNO to communicate with an SD card and an external EEPROM chip (EEPROM programmer). Using 4 ...
5
votes
6answers
1k views

Logging small capacitance

I'm measuring capacitance of a system using a multimeter, and found that the value is very small (fluctuate from 50pF to 100 pF). The system is dynamic so the capacitance changes over time. Now I ...
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 ...
5
votes
2answers
6k views

UNO analog input voltage reading not accurate

My loop code is this: // read the input on analog pin 0: int sensorValue = analogRead(A0); // print out the value you read: Serial.println(float(sensorValue*5000.0/1023)); delay(1); // delay ...
5
votes
2answers
8k views

What's the most accurate way to time-stamp analogRead data?

I want to sample an Analog sensor as fast as possible, and time-stamp each sample that I take as accurately as possible. Currently, I'm doing the following: val = analogRead(SENSOR_PIN); clocktime =...
5
votes
3answers
19k views

Sending a value from one arduino to another

I wonder if it is possible to send a value from one arduino to another. Basically, I have one arduino measuring let's say weight, but I want to display that value using an lcd in another arduino. ...
5
votes
3answers
413 views

Not getting proper readings on Arduino from MAP Sensor

In recent project, I have to take reading from MAP sensor. So basically, we used analog pin for this. But in my case, I don't get proper result which actually I want. When I'm taking readings through ...
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 ...
5
votes
1answer
148 views

Why is my Analog Input channel adding voltage to my signal?

EDIT: Here are the links to the sensor spec sheet (http://www.omega.com/temperature/pdf/HX71.pdf) and manual (http://www.omega.com/Manuals/manualpdf/M4543.pdf) for your reference. I'm using a ...
4
votes
2answers
4k views

How to increment and decrement an output voltage by using two buttons?

I'm trying to create a code using an Arduino Uno board to increment and decrement the output voltage of the Arduino Uno which is 5 volts and I need to step it up to 10 volts which I have done below. ...
4
votes
2answers
142 views

Usefulness of measuring 0v using ADC

I'm looking at the datasheet of the ATMega328, and I see the different channels you can select for AD conversion. ADC0..7, ADC8 (temperature), 1.1V (VBG), and lastly 0V (GND). What would be the use ...
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 ...
4
votes
4answers
256 views

How exactly is voltage measured on an Arduino?

How do the analog pins on an Arduino measure voltage? Do they either measure current and calculate the voltage with Ohm's law? (If so, why can we only read voltage and not current directly?) Or do ...
3
votes
4answers
4k views

Increasing ADC resolution

At this moment I am using oversampling to increase my analogread resolution. This in combination with increasing the frequency of the ADC. Is someone able to take a look at it? #define FASTADC 1 // ...
3
votes
1answer
936 views

How can I create a battery level circuit

Im trying to create a circuit so that I can monitor the voltage drop on my battery and send an message when the voltage drop reaches the drop out. But I'm having some problems with my voltage ...
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 ...
3
votes
1answer
419 views

Measuring voltage from -12 to +12 VDC

I'm making a -12 to +12V DC regulated power supply, on which I want to measure voltage and current with Arduino (through a voltage divider, of course). I'm not sure, how to either detect nor measure ...
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 ...
3
votes
2answers
8k views

Reading many analog signals in arduino

I need to measure around 50 - 100 analog sensors (resistors). This poses two challenges: Arduino has fewer analog pins. I'm targeting something small like arduino Mini or Nano, which can have up to 8 ...
3
votes
1answer
420 views

Setting time frame in Arduino Uno

I have built the circuit below using mux ICs. In a particular interval the respective selector pins get selected and analog signal from hall sensors are read and give a particular analog value out. ...
3
votes
1answer
389 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 (...
3
votes
1answer
499 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 ...
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. ...
2
votes
4answers
7k views

what is arduino adc reference?

I'm using arduino for the first time and don't really understand what am I suppose to plug to the ADC refernce PIN... or if I even have to use it while plugging analog sensor to the arduino, thanks!
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 ...
2
votes
3answers
1k views

Analog thermistor readings are wrong

There are some discrepancies between what is read by the analog channel for a thermistor, ohms values directly obtained on the thermistor using an ohmmeter, and another digital temperature sensor. ...
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 ...
2
votes
2answers
285 views

ignoring potentiometer value variations

I've got a 50k potentiometer connected to an Arduino Uno. The user should adjust the hue of an Adafruit NeoPixelStrip. I've got the following code inside the loop function: int hue = analogRead(...
2
votes
2answers
433 views

Lowest voltage applicable on AREF pin on Uno and Mega

I need to measure an Analog signal in the range of 5-30 mV. Naturally, using the internal default 5V reference leads to very poor measurement resolution. I would like to use the capability to use an ...
2
votes
2answers
94 views

Are there any Analog pins on the mega that can not be used as Digital?

I am using both Arduino nano and Arduino mega boards in my projects. I got a nasty surprise the other day when I learned that, on the nano, Analog pins 6 and 7 can not be used as digital pins. Are ...
2
votes
4answers
286 views

Build a timer that starts and stops timing when 2 wires are broken

I need to build a timer that uses the breaking of copper strips to trigger its starting and stopping. The intention is to measure the speed of a rocket with this - it will break the first wire, ...
2
votes
2answers
280 views

Mixing analog reads with raw port reads

I'm reading two digital inputs and one analog input. For [reasons] I must use A0 and A1 as digital ins, and A2 as an analog in. I'm uncertain about how the Arduino hardware deals with mixing analog ...
2
votes
4answers
569 views

unexpected change of ADC value with multiple voltage dividers (thermistors and pot)

So this is my basic circuit. Three voltage dividers: one 10k pot, 2 thermistors. Fan driver circuit using TIP120 (currently just driving an LED from the 3.3v source). Board is a Leonardo clone, ...
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 ...
2
votes
1answer
390 views

Arduino ADC read bad value

I have an Arduino device and I'm trying to read two voltages. The first one is the Arduino Vcc by using the bandgap value 1.1V (this requires raw access to registers since it's not implemented in ...
2
votes
4answers
2k views

Reading a 10 pin 7 segment (2 digits) sing Arduino 1. Please Help!

thanks for taking the time to read this, I really appreciate it. I am very new to Arduino and the Micro controller world so please forgive my ignorance. So I have an old 7 segment display that ...
2
votes
1answer
118 views

Ardunio Mega/ATmega2560: Using Port F or K for both analog inputs and digital outputs

On an ATmega2560, can ports have some pins used for analog inputs but others as digtial i/o? Specifically, I only need to use 3-5 analog inputs but have many digital inputs. I would like to use the ...