Questions tagged [analogread]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
459 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
11k 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!
0
votes
0answers
44 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
565 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 ...
0
votes
1answer
138 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 (...
3
votes
1answer
9k 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
3k 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
351 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
483 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....
1
vote
0answers
102 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....
0
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
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. ...
1
vote
2answers
149 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). ...
2
votes
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
362 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
424 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
902 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
4k 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
329 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
54 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
67 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
387 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
317 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
157 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
205 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
5k 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
548 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
512 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
6k 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, ...
5
votes
6answers
2k 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 ...
0
votes
1answer
1k views

Analog reading via bluetooth

I am making a project in which I am trying to communicate the LDR values collected by one arduino(slave) to another arduino(master) via bluetooth. The readings of the LDR is displayed on the serial ...
-2
votes
1answer
177 views

What is the definition of these arduino commands, and how do they affect the circuit? [closed]

I don't know if I am allowed to ask this question because really I could just look this up on google. The reason I'm asking here is because in google when you look up the definitions for the following ...
2
votes
2answers
765 views

What would be the best way to sense the tank level of a 1000L water tank?

I want to read in the values to an arduino analog input. The approaches I have been looking at are: 1.) A ultrasonic distance sensor; my concerns are that tehse are not usually waterproof. 2.) A ...
1
vote
2answers
122 views

Virtual analog inputs? Possible? [closed]

Just wondering whether it is possible to create 'virtual analog' signals, I am designign a system that uses a tank level sensor (pressure transducer); the component has not yet arrived and I am ...
2
votes
4answers
649 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, ...
0
votes
2answers
413 views

analogRead returning 0 constantly when connected to joystick

What reasons could there be for a joystick to return 0 when using analogRead? X-pin is connected to AO and y-pin is connected to A1. VCC is connected to 5V and GRND is connected to GRND. By ...
1
vote
1answer
324 views

Why does my code or Serial Monitor hang with analogRead?

I have the following code in loop() to collect values from an electret microphone for(int i=0; i<sampleSize; i++){ analogVal[i]= analogRead(ADC_Pin); sumOfSquares= sumOfSquares+sq(analogVal[i])...
1
vote
2answers
123 views

Serialprint and analogRead time

How much time takes to print each sample using Serial.print and analogRead in each iteration? #include <SoftwareSerial.h> #define Sensor A0 void setup() { Serial.begin(250000); pinMode(...
2
votes
4answers
12k views

Using analog in to read a push button

I'm working on a project in which I use a lot of the pins on the Arduino; I have run out of most of the pins and and I need to read the value of a push button. Is it possible to read the value of ...
0
votes
3answers
373 views

How can I see if volume buttons of Apple earphones are pressed?

I need to be able to see if the volume controls and the middle button of Apple earphones are pressed. I am using an Arduino Uno. I was thinking about using the analogRead function. I tried ...
2
votes
2answers
752 views

Arduino audio frequency reader

I have a simple project for my arduino : light some leds when i send a certain frequency from my smartphone through the jack output . For example , I play a simple audio file generated with a ...
0
votes
1answer
131 views

Can I hook up an Analog multiplexer to Arduino Nano?

I want to increase the analogue inputs for the Nano. So is it possible to hook up a CD74HC4067 analog multiplexer to it? Thanks.
1
vote
3answers
915 views

Arduino analog input protection

I've been trying to find a way to protect my analog input pins (for my Leonardo and Pro micro). I'm basically using them to read an amplified piezo sensor output. The output is amplified because I'm ...