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
0answers
41 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, ...
2
votes
1answer
65 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
1answer
38 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 ...
3
votes
1answer
122 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....
0
votes
1answer
64 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 ...
0
votes
3answers
90 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
0answers
30 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
0answers
110 views

Potentiometer only display analog voltage value of 1023 in proteus

I connected arduino uno with lcd and potentiometer to display the analog value (this is the basic of my project). However the value displayed on the lcd remain 1023 eventhough i have vary the ...
1
vote
0answers
51 views

Problem with floating of AnalogRead

For a university Lab course i have to realize a UPS unit with a internal LiPo battery . The unit uses as battery charger a buck converter I have only a problem with the battery charger (buck converter)...
1
vote
0answers
25 views

Math on analog read wrong result

I'm trying to execute a math of analog read but I get some weird result.. I searched about int and floats but didn't understand.. My code is : #include <SevSeg.h> SevSeg sevSeg; int bitsChange ...
0
votes
3answers
74 views

Inaccurate voltage readings on an esp32 as opposed to multimeter

I am working on detecting the amplitude of a signal coming from a guitar pickup. I am using an esp32 and an LM386 module for amplifying the signal. I get quite stable readings with a multimeter, but ...
0
votes
0answers
39 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 ...
0
votes
2answers
37 views

Is defining a function improves speed rather computing average for each analog input separately

My Arduino controller reads data coming from four different sensors. After the data is read, I individually compute four input average values. I understood that I am having the same lines of code ...
2
votes
1answer
47 views

Why AnalogRead shows value (395) when its on HIGH State ? why not shows 1023 when its high State

I Took a output from ESP8266 and Connected it with Arduino Nano Analog input A0 i use BLYNK app to on/off D0 pin in ESP8266 , and i connected ESP8266 D0 pin with Arduino Nano A0 analogPin. when ...
2
votes
0answers
20 views

ESP32 reading analog 2.4Ghz

Is there a possibility to analog read on the 2.4Ghz band to just read how much activity is in the presence of your device? Not parsing the messages but just listening to how strong of a signal you are ...
-1
votes
1answer
26 views

SEN0114 moisture sensor low max reading?

I am using the following SEN0114 moisture sensor with an ESP32: https://datasheetspdf.com/datasheet/SEN0114.html How come when submerged in water I only get a reading of ~2500? Should this not read ~...
2
votes
1answer
99 views

analogRead() doesn't read more than 500Hz

I connected a wave generator to the analog pins to read the frequencies of the waves generated. I used different frequencies of sine waves with a minimum of 0V and maximum of 5V. Whenever the voltage ...
2
votes
2answers
182 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 ...
1
vote
1answer
119 views

Time signal. Determine the presence of pulses and their duration [closed]

I want to detect the exact time signal from an FM radio station. The signal is transmitted in the form of 5 short pulses and one long one. My task is to determine the presence of a pulse in the audio ...
0
votes
1answer
42 views

Attiny : Is it possible to analog read on PB1?

I'm trying to read an analog input on the Attiny85 physical pin 6 (PB1, PWM), but analogRead(PB1) always returns 1023. Is it even possible to use analogRead on this pin? I'm fairly new to this so ...
1
vote
0answers
46 views

Phantom reading

my project is to control led diode and dc motor, test shield buttons, and check system run time. Testing buttons and run time i have done. Deal is with led and dc motor control. I'm getting phantom ...
0
votes
0answers
83 views

Extremely bad analog read on ESP32 while using 433MHz module

I'm currently trying to transmit data from one ESP32 to another with 433MHz modules. I also need to read some sensor readings from an Hall sensor. When the ESP32 that sends is not connected the values ...
2
votes
1answer
411 views

How to read an analog value on ESP32-CAM with the SD card reader enabled?

I use an ESP32-Cam module for a project for which I need both the SD card and the cam. According to this page, the only pins that are not in use by either the camera or the SD card reader are GPIO0, ...
1
vote
1answer
27 views

always detects same pin as HIGH even when its not connected

Im practicing with an arduino UNO board (I'm a begginer) and I'm trying to turn some LED's on depending on which analog pin is connected to 5V. Here's my code: int statusLed = 11; int out1 = 2; int ...
0
votes
0answers
32 views

Does anybodyknow how to program Muscle Sensors v3?

#include <Servo.h> const int x = 200 //Naming the servosServo Servo servo1; Servo servo2; Servo servo3; Servo servo4; Servo servo5; Servo servo6; void setup() { Serial.begin(9600); ...
4
votes
6answers
1k views

What is the most efficient voltage divider for Arduino?

I need to make voltage divider, so I could read a battery voltage up to 14.4 V. Could I use very high resistance resistors for that, so the current would be very low (to not to discharge battery)? On ...
1
vote
1answer
40 views

Analog Read dummy file

Can we use just a analog Read without storing it i hear it it a good practice to take two reads for better accuracy example: // Read extra analog inputs for (int i = 0; i < 8; i++) { // ...
1
vote
1answer
82 views

Noise in Analog Read Serial from an instrumentation amplifier(ina122p)

I am trying to read the values from a simple EMG circuit (with an INA122P) using the analogRead() and plotting in the plotter using an Arduino nano v3. I am powering the ina1222p from the 5v pin of ...
2
votes
0answers
70 views

Reliably using analogRead as a compact digitalRead

My goal is to reduce pins being used for micro-controllers with limited pins, or projects requiring a few different digital input values. How I intend to do so is by using ADC pins to gather four ...
2
votes
1answer
111 views

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

I have this code that fetches analog input values from terminals A0, A1 and A2 of Arduino mega 2560. But, when I plot the data, it does not give the desired waveform. The desired waveform is parallel ...
1
vote
0answers
34 views

Connect k-type termocouple using o-amp

first of all I have to say that this is my first Arduino thing. I'm trying to connect a k-type termocouple to my Arduino using an LM2904 Oamp, Yes I know that this is not the best solution but is the ...
2
votes
2answers
93 views

printing the analogRead() functions result crashes Arduino

I have created a curcuit which reads the analog pin 3 auf the arduino nano and does other things dependant on the returned value. However I have problems regarding the analogRead() function. Whenever ...
1
vote
1answer
106 views

Extremely unstable analogRead() on Arduino Nano when powered from an external source

I'm doing a really simple project with an Arduino Nano and found a problem. The circuit is a simple temperature sensor and a tension read from an analog pin everything showed on a Nokia 5110 LCD. When ...
1
vote
1answer
144 views

Nano: All digital pins do not output anything

New user here. Using the examples provided on the Arduino IDE software I could produce melodies with a piezo buzzer, or have a blinking LED. Not anymore. No digital pin is giving anything. I can see ...
0
votes
1answer
88 views

How does supply voltage affect `analogRead()` on AVR-based microcontrollers?

I'm using an ATmega328P based Arduino to prototype reading a TMP36 temperature sensor. I will eventually move this to an ATtiny85 based board with a battery supply. Both the TMP36 and ATtiny85 have a ...
0
votes
0answers
177 views

eps32 bad adc even with external adc (ADS1115)

Im trying to read an analog value with my esp32 and send it over wifi to another esp32. The wifi part works flawless, however when i try to read an analog value form the esp32 its not useable. It ...
1
vote
1answer
91 views

ADC value changing after changing Timer1 value in program

I'm writing a code where analogRead() reads ADC value from load. After reading ADC value, if it is not in range, I need to manipulate Timer1 value. Which is also getting changed. But, after changing ...
0
votes
2answers
574 views

Using SDA and SCL with analog inputs at the same time

I'm trying to build a robot arm based on Arduino UNO and PCA9685 controlled by few potentiometers. The easiest way that I figure out and find on internet is using two Arduino's, one as master and ...
1
vote
1answer
36 views

Data type explanation regarding analogRead of a photoresistor

This is a fundamental question - very new (1st post) and trying to learn. I have a photocell connected in series with a 10kOhm resistor between 5v & Gnd (to make a voltage divider) and the ...
1
vote
2answers
146 views

Why does the LEDs affect Analog Input?

So I'm working for a project to control RGB Led Strip using microphone or sound sensor with Arduino Nano. I'm using 5050 RGB Led Strip around 120 LEDs, and I control them using simple transistor ...
1
vote
0answers
65 views

How to calibrate Arduino DUE analog readings?

I am having a problem with the analog readings on my Due. On pin A4 and A5 I am measuring voltages: double vcc = 3.288 // taken on pin 75 (ADVREF) ; analogReadResolution(12); result = analogRead(A4) ...
1
vote
1answer
1k views

DHT11 analog or digital?

I saw some projects with DHT11, some connect it with analog pin, others connect with digital pin. Is there any difference / advantage connecting to the analog?
0
votes
2answers
2k views

Binary to decimal using bitwise operators

I am trying to convert some binary data to decimal numbers. I succeeded to convert binary to hex, but now I want to do the same with binary to decimal. I want to use bitwise operators and NO array. ...
0
votes
2answers
191 views

Substitute multiple potentiometers for push buttons and single potentiometers

this is my first post here. For some time I have been struggling with a problem and would like to know if anyone has a solution to share. I am building a 4 tone sequencer, where I use 4 ...
0
votes
1answer
96 views

Is it possible to measure analog output?

I'm using PWM to control LED brightness using MOSFET, using analogWrite(pwmPin,val), while val is a 12 bit bit value. pwmPin is defined as- pinMode(pwmPin, OUTPUT); Since val changes in time due to ...
0
votes
1answer
105 views

How to Read ADC value without Common GND ? (Possible or not !)

I want to Read external signal with the microcontroller. But the problem is that ADC does not work because the signal GND and the microcontroller are not Common, My question is, have you ...
1
vote
0answers
2k views

Using ESP32 to measure vbat

I'm using ESP32 to read an analog value of a liPo battery (3.7v-4.2v). Since ESP32 DAC's is 3.3v I'm using a voltage divider ( 2x10K resistors ), to split bat's voltage into ESP's GPIO36. So far ...
2
votes
3answers
208 views

What is the correct way to interpret the built-in Analog-to-Digital Converter output?

When using the built-in analog to digital converter of the Arduino Uno Rev 3's Atmega328P with a reference voltage of 5V, what is the appropriate function to interpret the output? There is conflicting ...
1
vote
0answers
49 views

Problem with Reading Multiple Analog Values From ESP8266 NodeMCU

I am using ESP8266 nodemcu with ADS1115, but values are totally wrong. Why this happened? Is there any solution to extends the Node MCU 8266 pins with accurate sensor values ?
1
vote
0answers
111 views

Need help in the problem with analog input readings and RTC DS3231

I have 3 analog input(0-1024). I want two outputs based on levels of analog inputs. Eg. inputs have 2 levels. for A0 at 300,digital output pin3 turns ON; and A0 at 500, digital output pin 4 turns ON. ...

1
2 3 4 5
7