Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [analogread]

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

0
votes
1answer
68 views

Unstable analog sensor readout

I have the Arduino Uno (non-original replica) board, general SPI lcd, and GUVA-S12SD analog UV sensor module. The board (powered via USB) reads the data from the analog pin 0, converts it to voltage (...
1
vote
4answers
131 views

How to boil down analog input to just three cases?

I am investigating the use of a 3-position-switch for one of my projects to switch between different settings using just one analog input pin. For the three positions I am using ground/0V, ~2.5V (via ...
0
votes
2answers
45 views

Can a 150 PSI Pressure Transducer accurately measure up to 30 - 40 PSI? [closed]

I have an Arduino project which requires reading pressure data from a pipe. The best pressure transducer I have been able to find is this one. Seeing as though its max pressure is 150/200 PSI, will ...
0
votes
0answers
26 views

Correct Thermistor readings on battery-powered Arduino Pro Mini?

How to read proper value of thermistor on battery-powered Arduino Pro Mini 8Mhz/3.3V? Do I need some "reference" voltage? The value changes when voltage changes, like: battery voltage drop ...
1
vote
2answers
44 views

How would I go about measuring an analog signal on my arduino mega that has both positive and negative voltages

I have a signal that fluctuates between -70mV and 50mV. How would I get the arduino to read this.. Ultimately I am trying to graph the data in real time so it looks like this. https://imgur.com/a/...
1
vote
1answer
46 views

Differing Serial Values Between Arduino Uno and TTGO ESP32 SX1276

I'm wanting to analogRead the value off a MQ-135 gas sensor. I have tired this with both an Arduino Uno and an TTGO ESP32 SX1276. When reading the value of the sensor off the Uno, I get values ...
0
votes
1answer
34 views

Arduino Due ADC negative voltage

I’m trying to sample an AC signal on the Arduino Due. The AC signal will never exceed +-80mv across a frequency range of 6-833Hz. Current is negligible. I believe there are clamping diodes to protect ...
1
vote
2answers
84 views

arduino firmware

Hi I was wondering if there is any way to/ how I might go about solving the following. I am designing my own arduino board based on a mega32u4 chip and I want my arduino board to light up an ...
0
votes
1answer
84 views

Read frequency of input in digital pins

This is a somewhat theoretical question: Let's say I have some sensor that sends digital signals to one of Arduino's digital ports. Now, I don't know the frequency it sends those signals in. For ...
6
votes
2answers
75 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 (...
3
votes
1answer
384 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 ...
1
vote
1answer
40 views

Why does reading an analog pin give a different results when interfacing with Processing?

I am interested in measuring the voltage over an analog pin (A6). When I use the Arduino IDE to print the results through the serial I get values around 300. Here's the code void setup(){ Serial....
1
vote
1answer
110 views

Analog inputs showing value even there is nothing connected to it [duplicate]

After watching something weird on the serial monitor I wrote a simple code to monitor the analog pin input values. There was nothing connected to the analog pins still they where showing decimal ...
0
votes
1answer
28 views

If I use a biasing circuit for a signal going into an analog input pin, will it affect the ADC operation?

If I have a single 100Hz AC signal biased by two 1 M-ohm resistors (as per schematic below), and then output to an Arduino UNO analog input pin, with the UNO sampling at around 1 kHz using delays, ...
0
votes
0answers
179 views

avrdude Programmer is not responding Mac

I'm VERY new to Arduino programs. I'm trying to upload the AnalogInOutSerial example to my Arduino, however, I keep getting an error saying that there is a problem uploading to the board. Thank you ...
0
votes
1answer
418 views

Read both battery voltage and analog sensor value with NodeMCU ESP8266

I have a soil sensor that reports value once every 5 minutes, deepsleep in between. Is there a way to also report battery voltage (with ESP.getVcc())? To get the battery voltage reading to work I ...
0
votes
1answer
20 views

Arduino Micro interference between analog inputs

I'm building a MIDI controller with the Arduino Micro, hooking a bunch of knobs up to the analog inputs. Currently, I'm getting analog in 9 being influenced by analog in 10: analogRead(9) returns a ...
1
vote
1answer
54 views

Strange behavior on bitwise operation

i am trying to write a simple program that writes the outputs of an accelerometer (which comes down to 3 analog inputs) onto an SD-Card. I got the hole thing working fine (sending the values as ...
1
vote
1answer
83 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
133 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
170 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
164 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 ...
1
vote
4answers
261 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
39 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 ...
1
vote
2answers
531 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
194 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
89 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
78 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, ...
0
votes
1answer
52 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 ...
0
votes
0answers
41 views

Can I both drive a DC Motor and then read if its generating power (spinning),

This is what I am trying to do : I want a DC Motor to pull a string by rewind it, and then if I unwind the string by pulling it, it will generate power that will be read by the arduino, to trigger ( ...
1
vote
1answer
148 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
52 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
72 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
94 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.
1
vote
4answers
922 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
29 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 ...
1
vote
2answers
200 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
1answer
505 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
76 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
283 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 (...
1
vote
1answer
3k 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 ...
5
votes
2answers
815 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
161 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
128 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....
0
votes
0answers
63 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
991 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 ...
0
votes
3answers
494 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
85 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
515 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
155 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....