Skip to main content

Questions tagged [analogread]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

AD8232 Sensor output problem

I'm using the AD8232 ECG sensor with Adafruit ESP32 Feather V2. I'm following this Sparkfun guide https://learn.sparkfun.com/tutorials/ad8232-heart-rate-monitor-hookup-guide/all to use the sensor ...
2 votes
3 answers
2k 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 ...
2 votes
0 answers
68 views

Non-blocking analogRead for Arduino Nano 33 BLE sense

I need an alternative to analogRead() that doesn't block the processor. I've managed to find a lot of solutions for this for other boards, but not something that's compatible with nrf5240 like the one ...
-1 votes
1 answer
152 views

Playing Audio from SD - Get VU, or audio waveform

I am using the library SimpleSDAudio to play a song from my SD card to an op-amp later in the circuit. I would like to take a sample from the audio pin (possibly with a Analog read) to power some ...
-1 votes
2 answers
8k 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 ...
0 votes
1 answer
99 views

Arduino Uno, does a lower Aref voltage work well for measuring current? without increasing ADC integral non-linearity

I want to measure current using a Arduino Uno and use a very low resistance of 0.1Ohm or lower for the shunt resistor to measure the current(to reduce power waste and heat generation), as a result ...
8 votes
6 answers
21k 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);...
1 vote
1 answer
119 views

Inconsistent results when reading input looking for spike patterns

I'm writing a library that will interface with a control unit on a refrigerator compressor pump (QDZH35G). One of the features of the control unit is that it can detect what problems it's encountering ...
-2 votes
1 answer
241 views

Using 1.1Vf to read stable battery voltage and sensor voltage

After several tries, i was successful with reading stable battery voltage using internal voltage reference of 1.1v, now the issue i face is that i cannot read stable sensor voltage, could you please ...
1 vote
0 answers
218 views

ESP32 Shows Incorrect Input Voltage From Analog Pin

I have an esp32 WROOM-32 connected to a MQ9 gas sensor to GPIO35. Both are powered separately. measuring the output from the sensor directly using a multi-meter shows a constant reading of 0.145 V but ...
0 votes
2 answers
97 views

How does actually arduino measure voltage?

I am not interested into the AnalogRead() part, but rather on how he converts 5 or 2 V into a number between 0 and 1023. How does it practically do it to convert the voltage level into a number or ...
3 votes
2 answers
236 views

How to turn LEDs based on voltage readings?

I am trying to turn LEDs in an LED bridge based on the voltage reading from a power source. when the Voltage is zero nothing is ON and then the LEDs gradually turn ON as increase the voltage connected ...
1 vote
1 answer
1k views

Not getting any output from ECG sensor AD8232

I am trying for the beginning to run a simple Arduino code in order to test the functionality of the ECG sensor. What I am getting on the output are some random values around 600 or around 200. I ...
4 votes
1 answer
51 views

Issues using mini microphone module off AliExpress

I have been trying to get a mini microphone module with an inbuilt microphone module I got from AliExpress to my Arduino to confirm if it is working. It was a four pin microphone with pins labeled V, ...
0 votes
2 answers
56 views

Why does analogRead(A0) deliver different Values when called in a library file vs calling it in the sketch directly

I wanted to write a library representing a sensor to later on have an array of sensors. I generated a file MoistureSensor.h: #ifndef MoistureSensor_h #define MoistureSensor_h #include <Arduino.h&...
0 votes
1 answer
52 views

Copy Uno Analog Input Configuration To ESP32

I started a project using the arduino uno and as a challenge I'm attempting to make it work with the esp32 but I've run into a roadblock. I may not describe it in proper terms, but I noticed that the ...
4 votes
1 answer
134 views

Analogue input spikes

i have a project where i read two analogue inputs from two sensors and a pro Mini. I have some spikes in my readings that are present when i'm powering the system using a powerbank step-up module. ...
1 vote
1 answer
398 views

50% duty cycle PWM signal with calculated frequency

#include <PWM.h> int led = 9; void setup() { InitTimersSafe(); Serial.begin(115200); Serial.println(); variable_freq(); pinMode(A0,INPUT); } void variable_freq() { while(true) { ...
-3 votes
1 answer
211 views

Reading constant battery voltage and using the obtained value in sensor formula

there i am working on a project in which my system is connected to 3.7v~4.2V lithium battery, I have to read constant battery voltage irrespective of the current battery voltage and to do that I am ...
1 vote
2 answers
765 views

Analog output gives a close range of values

I try to get a good range of values from VMA309 sound sensor. However, when I connect it properly it gives me a range of values +/-5 like below. The documentation says it should give numbers ...
4 votes
1 answer
16k 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 ...
-1 votes
1 answer
579 views

Carbon dioxide sensor MG 811

I am using MG811 carbon dioxide sensor with ESP8266 module. CO2 values is being read inside closed room. The value comes around 400 ppm. Using CO2 generator does not make increase in reading. Checked ...
0 votes
1 answer
277 views

NodeMCU dev board shows 13 for ADC when grounded - why?

I have a NodeMCU 1.0 ESP-12E development board. Trying to hook up a LM35 to measure temperature. For that I need to use the analog pin A0. However it seems my sensor is out by about 4C. I traced ...
1 vote
2 answers
463 views

Regarding PGA bypass in ADS1262

I want to bypass the PGA to change the input signal range from +/-2.5 to 0/5 V range. I have taken the reference of example given in this library. I have interfaced protocentral-ads1262-32-bit-...
-2 votes
1 answer
184 views

600VDC measurement with Arduino (voltage divider)

I need to detect quick (~200ms) voltage drop, so I am thinking of making an oscilloscope with Arduino. Problem is - can I reliably read 600V DC voltage and what resistor values should I choose for ...
0 votes
0 answers
158 views

How to work with a pulled high input pin where it needs to read a value from an analog sensor?

I have a small ESP32 module, that has some in-built features, like a TFT, and has few available pins for general use. It has some input only pins (GPIO36 to 39) that are used by buttons soldered in ...
1 vote
0 answers
58 views

Code not checking for updated sensor values after connecting to firebase?

I am using a project with an MQ138 sensor and want to push the real time sensor reads to firebase. Currently, the wifi/firebase part and sensor part work fine separately. The code connects to wifi and ...
0 votes
1 answer
144 views

Arduino Mega, 6 push buttons for each analog input (A0-A9) - closing one results in reading by other

On day to day basis I'm more of a high level programmer, with little electronics knowledge, apologies in advance if I lack some nomenclature or basics. I communicate with my Arduino Mega via firmata, ...
1 vote
1 answer
69 views

IF statement to run even if the requirement isn't met anymore

I have built a flasher for the headlamps on my race car. Whilst it works when I hold the switch down, if I release the switch and the circuit is closed my IF statements requirements are no longer met ...
1 vote
2 answers
3k 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 ...
3 votes
2 answers
689 views

Arduino measuring high-voltage electric fence

I would like to know if someone has experience with measuring high voltages using an Arduino. I know you can use resistors to lower the voltage, however. I want to be able to measure the pulses of an ...
2 votes
1 answer
226 views

The analog read is not giving the correct waveform as that of an oscilloscope

I have code that fetches analog input values from terminals A0, A1 and A2 of an Arduino Mega 2560. When I plot the data, it does not give the desired waveform. The desired waveform is also measured ...
0 votes
1 answer
175 views

Arduino Uno Analog pot values are not smooth

I have tired Arduino smoothing example but mine analog value are not staying constant even when I don't rotate the potentiometer. I am mapping the values from 0 -> 1024 to 0-> 100. I have tried ...
2 votes
1 answer
148 views

Measured voltage higher than AREF

What happen when a voltage measured by analogRead() is higher than AREF voltage? Example: AREF = 2.5V AO = 3.2V What is the maximum voltage ?
3 votes
4 answers
3k 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 ...
1 vote
2 answers
309 views

Why analogRead's value decreases when I decrease the value of resistor?(I use digitalWrite(high) to positive terminal of resistor)

Basically, my circuit contains only 1 resistor(like the basic LED circuit). I tried to know what is the actual voltage of digitalWrite(High). I don't understand why the value of analogRead does not ...
2 votes
2 answers
866 views

Decode VGA port by Arduino

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
1 answer
125 views

Why do I get different times when using analogRead() inside while loop?

I have the following code which checks the latency of another board. int triggerPin = 13; int dataPin = 9; int ejectorPin = A0; unsigned long t_start = 0; unsigned long t_end = 0; ...
1 vote
0 answers
352 views

Analog UV sensor displaying incorrect values in serial monitor (GUVA-S12SD)

Using Arduino Uno and a GUVA-S12SD sensor (https://www.adafruit.com/product/1918). Here's my circuit. 5V into sensor+, GND into sensor-, A0 to sensor out. Here's my code: void setup() { Serial....
1 vote
2 answers
143 views

LCD TFT 2.4"" changes the values of analog read of Arduino Mega

I have a Arduino Mega with LCD TFT 2.4"" with reading 5v signal on A8 pin (Arduino mega pin) from a raspberry pi (just to test). They are grounded together. When the Arduino is without the ...
0 votes
1 answer
91 views

Check pin capabilities at compile time

Are there board-independent functions to check pin capabilities at compile time? I.e. Can the pin be used as output, as in digitalWrite()? Does the pin support PWM, as in analogWrite()? Does the pin ...
1 vote
0 answers
213 views

I'm getting really unstable analog values with my B103348 joystick

I'm trying to make my B103348 joystick control a DC motor but I'm getting very unstable values from it specifically when the y axis is at 0. This is what my Serial monitor shows... 0, 21, 21, 21, 0, ...
3 votes
1 answer
803 views

How to reduce AnalogRead noise?

Currently trying to read off values from a photodiode through analogread. It's constantly so noisy and I thought it might be something wrong with my low-pass filter, but I decided to just connect a 1....
2 votes
1 answer
196 views

consecutive analogRead()

Has anyone noticed that if calling analogRead() in a consecutive way that the value drops by a bit as opposed to just doing a single read? And is this to be expected? I am using a Seeeduino XIAO.
2 votes
1 answer
56 views

Arduino Multiplexer Input voltage per pin not decoupled

I am very new to electronics (software engineer background). I want to send an analog signal (5V) to one/many input wires. The input wires are connected to a 16 channel mutiplexer. My arduino then ...
0 votes
1 answer
6k views

Analog read not working while using WiFi

I have an ESP32, the current program running on it uses WiFi but, if I use WiFi and Analog read at the same time, Analog read does not work. Why does this happen and what's the way around it? Hardware ...
1 vote
1 answer
290 views

Cannot get esp8266 - 12 wifi module to always read analogRead incoming voltage accurately

So I have and arduino uno that is firing an output on pin 8. This code is not in this file just to be clear. From there Im taking that output and using it to fire pin 0 on the wifi module. Im using ...
0 votes
3 answers
1k views

Can I test if something is connected to analog pin?

In my sketch I have a potentiometer connected to A0. The value of the pot is used to adjust the speed of a connected item. I have set the speed to have a default value, but doing analogRead() on a ...
1 vote
0 answers
550 views

Pyfirmata util.Iterator causes serial communications issues with more than one Arduino

I'm using two Arduino Megas in a project to read data from a bunch of analog sensors and then output PWMs on digital pins according to their value. These analog signals are also being plotted on a ...
1 vote
1 answer
200 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
2 3 4 5
7