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

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

0
votes
1answer
25 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
votes
0answers
54 views

Dealing with floating of analog pins

I have pulled down the analog pins to ground with different resistor values to stop the floating of the analog pins when they are unused but still failed to get a proper 0 at the output. My serial ...
1
vote
2answers
81 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
39 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
74 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
278 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
38 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....
0
votes
1answer
64 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
23 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
113 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
236 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
19 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
49 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
74 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
106 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
121 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
121 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
143 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
34 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
321 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
141 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
60 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
76 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
50 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
39 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
116 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
49 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
67 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
75 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
444 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
146 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
400 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
69 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
232 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 ...
4
votes
2answers
644 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 ...
0
votes
0answers
32 views

How to debug a flag getting set in error

I'm building a project that uses an Arduino NANO that connects to a larger PCB with a socket. It uses ALL 8 analog pins for input. My first version of the PCB had some very minor errors (2 pins were ...
2
votes
2answers
145 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
104 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
60 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
861 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
416 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
81 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
442 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
139 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
196 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
479 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
1answer
426 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
2k 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 ...