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
236 views

Why do you need to shift bits when reading from an analog sensor? [closed]

I was playing around with some analog grove sensors and looking at examples (https://github.com/DexterInd/GrovePi/blob/master/Software/Go/grovepi/grovepi.go - this specific example is in go and for ...
0
votes
1answer
489 views

Interaction between Analog Pins when measuring a DC voltage- a common issue? [duplicate]

Just set up a replacement "Piduino" - a RPi3 connected by USB to an Arduino Uno. The previous one was the victim of a Diet Big Gulp - spilled on the voltage divider breadboard. Whoops. The tiny ...
1
vote
1answer
1k views

analogRead() inside a loop always returns 0

I wrote Arduino code to receive analog input from different voltage dividers connected to four pins (A0 to A4) and analog input from a temperature sensor (LM35) to A5. analogRead inside the for loop ...
0
votes
1answer
683 views

Non-blocking analogRead

In my recent project, I'm working with the motor. I have to drive the motor for the specific time like for 2 minutes, 3 minutes, 4 minutes and 5 minutes. I already created functions for that. And ...
2
votes
4answers
2k views

What is the lowest resistance pot that is useful with an analog input?

Background I've dabbled in electronics since my parents gave me a 150-in-1 kit in the 1970's but never had formal training. My dad repaired Honeywell mainframes so taught me to solder when I was 8. I ...
1
vote
2answers
276 views

analog read only once a time

I was working on a school project in where i need to analog read form A0 and test if my value is bigger than some boundary (500 for example) to return 0 or 1 well with a simple code in an infinity ...
3
votes
2answers
6k views

How to measure the supply voltage of Arduino without using an analog pin

I'm using Arduino Nano to measure temperature with a 10 kohm thermistor and a voltage divider. My problem is I'm getting only 4.2V on the 5V pin. The power is supplied via a USB cable from a desktop ...
1
vote
1answer
517 views

Getting the voltage of an 18650 battery with an Arduino

I'm using a Arduino Pro Mini (5v) to sense the voltage of an 18650 battery. The battery (that is being sensed)is also used to power the Pro Mini but the MCU is behind a boost-converter which outputs 5....
0
votes
1answer
514 views

Two-wire Conductivity Sensor and Arduino Hook-up?

For the conductivity meter shown in the photo below, it is a non-NPN sensor for measuring conductivity / impedance. I am trying to figure out the best method for measuring the output of the sensor ...
3
votes
4answers
915 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, ...
1
vote
1answer
64 views

UNO: AnalogRead results not as expected

I'm new to Arduino, and trying to build a project that will measure the voltage and current from two, unconnected, 12v batteries. The present test environment comprises:- a 13.8v power supply (run ...
1
vote
1answer
922 views

bit_is_clear(ACSR, ACO) Instead of digital_read(1)==LOW

I am attempting to create a program for the atmega328P which will enable the aux input of a Toyota Corolla stereo. In order to do this, I'm bitbanging AVC LAN. Nearly all of my research comes from ...
0
votes
2answers
125 views

Arduino Voltage Divider

So am doing a project which involves the reading of voltage and current generated by Solar Panel. Now I learnt that Arduino cant Read Voltage directly above 5V. To read above that you need to add a ...
0
votes
1answer
111 views

Arduino UNO - analogRead() returning mixed results

I have created a small circuit with a 220 Ohm resistor and a LED connected to PIN9 for power. I want to measure the Voltage of the current flowing through the circuit. In order to do that I connected ...
0
votes
1answer
574 views

Connecting two analog multiplexers (CD4051b)

Is it possible to connect two CD4051b analog multiplexers together so that I can receive 14 analog inputs through them? Just by using one analog pin and three digital pins on the Arduino UNO.
2
votes
4answers
12k 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!
1
vote
0answers
48 views

Analog Read gives Erratic behaviour in Struct

I'm getting some very strange behaviour from a Haptic feedback system I'm trying to make. The test code works fine as a Multiple-In One-Out in the main loop, but once I moved the code to the Struct, I ...
2
votes
2answers
614 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 ...
1
vote
2answers
2k views

Problem opening multiple text files simultaneously/in-order using <SD.h>

I am looking to log analog sensor data using 3 pins, A1, A2, A3. My project requires continuous mapping of data, and hence an SD card shield was necessary. However, I need to log the incoming data ...
-1
votes
1answer
141 views

External ADC reference when using MATLAB support package for Arduino

I am using the MATLAB support package for Arduino. However, I need to configure the ADC reference to external. MATLAB documentation doesn't really explain how to do this? Is there any way I can use ...
1
vote
3answers
1k views

Analog input draws current when Arduino is turned off

I am using a Arduino Pro Micro from SparkFun (similar to Arduino Leonardo, cpu: Atmega 32u4). It has a analog input: A0, which I use to keep track of the battery voltage in my battery powered project (...
5
votes
1answer
10k views

Arduino continuously reading ADC value using interrupt

I have a mono jack audio act as analog input for arduino UNO. The microphone outputs voltage that varies in terms of amplitude (volume) and frequency. In order to get the high sampling rate, I use ...
7
votes
7answers
4k 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 ...
2
votes
2answers
376 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 ...
1
vote
2answers
525 views

Decode VGA port by Arduino [closed]

Is it possible to read somehow VGA port of graphics card by Arduino? Even with some minimal 320 x 240 resolution and minimal frame rate per second, to convert pixels into numbers (for example) somehow....
2
votes
0answers
112 views

Serial.println cuts off first digit

I'm trying to perform a simple analogRead() and print out the result, as below: void getVoltMeter() { readValue = analogRead(A2); readByte = readValue/4; Serial.println(readValue); Serial....
2
votes
3answers
2k views

Reading an output analog pin with an input analog pin

I am having a hard time understanding why I can't read one analog pin's output with another analog pin. The docs state to put a delay in between, which I've done (I've tried up to one second with the ...
2
votes
3answers
2k 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
172 views

for loop reads pots, passes value to PWM pins, can this be in the same for loop?

In the code below I am using a for loop to iterate over analog pins (potentiometers) and pass their value, after being mapped, to PWM enabled analog output pins (currently controlling LED brightness). ...
1
vote
2answers
1k views

Read Audio Data in Real-time over 3.5mm Stereo Cable

My Goal Have Arduino read audio output from a TRS stereo audio cable (coming from a computer, smartphone, etc.). As motivation for this use-case, once some audio data (depending on the sample rate) ...
0
votes
1answer
433 views

Oscillating Analog Readings

I am using a JIC 139 UV Sensor (datasheet) with an Arduino Mega 2560 and should be reading smooth curves as I bring a UV source to towards the sensor. Instead, my curves are increasing and oscillating....
0
votes
1answer
459 views

External ADC reading zero while input is zero

Using ADS1115 (or any other external ADC), how its possible to read zero instead of random floating values while no any signal at the ADC's input pin? The ADS1115 is driven by an op-amp buffer as ...
2
votes
2answers
1k views

Sending Analog Input Data from Serial Port to Google Sheets

So I'm trying to make use of my Arduino Uno while I purchase the components for my next project. I've made use of the Digital Hourglass project from the Starter Kit to make sure I get up and move ...
1
vote
1answer
992 views

Problems with ACS758 Hall Effect Current Sensors - Calibration and no Signal

I purchased 3 ACS758 Hall Effect Current Sensors datasheet on ebay. A 50,100 and 200A, all three are bi-directional. They look like this. With no current the 50A outputs 477 on the analogue input (2....
1
vote
3answers
5k views

Differential voltage measurement with Arduino UNO

EDITED: I bought a very sensitive (and expensive) pressure sensor which requires differential analog measurement. I am an amateur hobbyst and a total beginner in Arduino so I would like to ask some ...
0
votes
1answer
344 views

Reading pulse train with DC offset

One of the analog inputs to Arduino is a pulse train with DC something like 1.5V to 3.9V pulse. This of course changes by time and Im only interested in the difference voltage (peak-to-valley). Like I ...
0
votes
1answer
55 views

In the AnalogRead example, would the thing work if I remove or short the A0 and the ground pin?

What I want to know is that how exactly does analogRead work because I have want to use it with a flex sensor and it has only two pins.I tried to find other examples on the internet, but this is the ...
0
votes
2answers
74 views

Pass changing analog value from void loop to library .h file

How would I go about passing a void loop analog read value to a library .h file? I've tried it but it only reads the pot position as soon as I plug the arduino in and does not change once booted up. ...
0
votes
2answers
452 views

analogRead over a certain time

I would like to read an analog value using analogRead, save this value and compare it to an analogRead value 5 ms later. How would this code look? Because giving a variable the value of analogRead(A0);...
0
votes
1answer
348 views

analogRead seems to freeze some seconds the program

I have the following code that reads a RFID reader, it was working perfect without any dealy and then I try to an analog read from a potentiometer using analogRead. The analog read works fine but ...
5
votes
1answer
163 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 ...
0
votes
2answers
232 views

How to Read Voltage Level? [closed]

I want to read voltage level by my Arduino board please help in this regard. I am using this syntax. volts = analogRead(A3); // read the input pin Serial.println(volts)
2
votes
2answers
1k views

Uno - measure the voltage, NOT connecting GND

I'm trying to use an Arduino Uno, to measure the Voltage over a Resistor in a circuit. I guess the usual way would be to connect GND to one side of the Resistor and the AD0 Pin to the other end, and ...
2
votes
1answer
6k views

error: 'analogRead' was not declared in this scope

I am using Codeblocks with arduino IDE to simulate the control of a stepper motor, and the errors "'analogRead' was not declared in this scope" and "'A0' was not declared in this scope" keep popping. ...
1
vote
1answer
572 views

Using voltage divider to read voltage from sensor

Good morning, I would like to use an Arduino Duemilanove to read the voltage signal generated from a current sensor (CSLA2CD). The datasheet for this sensor can be found here. The problem is that ...
3
votes
1answer
610 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 ...
8
votes
2answers
3k 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) / ...
0
votes
2answers
2k views

Interfacing TRRS headphone to Arduino Uno

I have been working in a Arduino project lately which requires human voice input to Arduino with some processing Arduino need to perform specific task. Simple sampling of incoming signal and ...
13
votes
4answers
7k 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/...
-1
votes
2answers
4k views

Analog pins for 4x4 matrix keypad

I am working on a project on nano and want to use analog pins for 4x4 matrix keypad input. My connections are for keypad are as follows: Digital pins are D10-D13 and Analog pins are A0-A3. A0->14, ...

1 2
3
4 5
7