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
5answers
8k views

Arduino unstable analog reading when using power supply

As soon as I unplug my Arduino from USB and only use the VIN pin with my 9 V power supply, the analog readings from my Arduino start to get unstable, which means the value fluctuates much more ...
0
votes
1answer
62 views

Do I need to worry about voltage, coming from ground, and effecting an analog input?

I am building a project that includes an analog Input and several digital Inputs and Outputs. All of them connect to ground in some way. Do I need to worry about voltage, coming from the digital ...
5
votes
4answers
21k views

How to add hysteresis to threshold values?

This code compares the analog input value against two thresholds, having three voltage regions. Then it will turn on an LED according to what region the read voltage is in. The problem is that when ...
2
votes
2answers
1k views

SainSmart CO2 sensor module use?

I purchased this CO2 sensor a while back: SainSmart MG811 Gas CO2 Carbon Dioxide Sensor Module Sensor Module for Arduino UNO R3 Raspberry Pi The module has four pins, Vin, GND, Dout and Aout. I ...
0
votes
1answer
549 views

Stabilizing output values of conductive sheet(Velostat) connected to analog pin A0 of Arduino

I am trying to do some experiments with conductive sheet (velostat). When I apply a force on the sheet it should change the value of resistance(output). I taking the output of the sheet by connecting ...
2
votes
1answer
398 views

Arduino ADC read bad value

I have an Arduino device and I'm trying to read two voltages. The first one is the Arduino Vcc by using the bandgap value 1.1V (this requires raw access to registers since it's not implemented in ...
1
vote
1answer
61 views

Plugged in shield off by one, now all analogues read high

I have a prototyping shield for an Arduino Uno. I accidentally plugged the shield into my arduino so that the pins were all "off by one". I didn't think this was possible, but it turns out that the ...
1
vote
1answer
441 views

Is it possible to use FrSky D8R-II Plus 8ch 2.4Ghz ACCST Receiver with an arduino Uno?

I'm in the process of buying a receiver and transmitter for my quad copter project. Would it be possible to use this receiver or a similar one to control the quad. I'm trying to read the signals using ...
5
votes
2answers
3k views

Is it wise to use analog input pins to read digital buttons?

I am thinking about building a circuit that is literally going to take 11 of the 14 digital pins of an UNO to communicate with an SD card and an external EEPROM chip (EEPROM programmer). Using 4 ...
1
vote
2answers
7k views

Increasing analogread speed on the Arduino Uno

I want to transfer data from my smartphon to the Arduino by using the audio jack of my smartphone. For this I need verry high reading frequencys. I have used bitClear(ADCSRA,ADPS0); bitSet(ADCSRA,...
1
vote
1answer
378 views

Speeding up Girino gives strange readouts

I was reproducing the Girino (the Instructable by Caffeinomane) bundled with the Girinoscope (the Java GUI by Chatanga). The results worked well and I went on to see if the oscilloscope can go up to ...
1
vote
1answer
66 views

5 Switches 1 AI pin

Im starting to get into Arduino a little. Ive got a Small project to start me off, To keep it simple its: 5 level Switches, 1 flow switch and 3 solenoid valves. This question is for the Level ...
1
vote
1answer
201 views

How to avoid the code interrupting itself?

I have this code, which I am using with a potentiometer to control the speed of a automotive fuel injector. In it, I have specified how long the injector shall stay open by using the delay functions. ...
0
votes
1answer
2k views

4 channel relay module reversed? Or is it my code?

So I am designing a simple project where my Arduino reads analog values from a potentiometer, or rotation sensor, as it is called on EBay, and uses that value to determine how many relays to close. I ...
1
vote
2answers
701 views

analog serial read values are not equal

I have not used the Arduino in over 2 years and have forgotten a bunch of stuff I was wondering if someone could help me out. I have two analog sensors both the same connected to the appropriate ...
2
votes
1answer
390 views

Homemade soil moisture analog value reading jumping from 0 to max

I made a soil moisture sensor out of two metal poles, adjustable resistor, for a project I am making. The first run with the project the sensor worked amazing and gave clear and concise readings, 0-...
0
votes
2answers
887 views

AnalogRead too slow… Faster alternative?

For a program that I'm working on, I want to get an accurate reading from a noisy pressure sensor. So, the idea that I have is to do a thousand AnalogRead commands on the same port very quickly and ...
0
votes
1answer
244 views

Trouble reading from multiple analog ports

So I'm trying to read 4 different analog values and store each one to a variable. I imagine doing this by first initializing the ADC registers and each time it enters the ADC ISR checking which port ...
0
votes
1answer
270 views

MHz Sampling Rate for Arduino

How can we increase the Arduino's ADC sampling rate to 1 MHz while maintaining a 10 bit resolution? Can we change the prescaler to 16 to get 1 MHz ADC clock? If not, what alternatives are there? ...
6
votes
1answer
7k views

References (e.g, libraries and tutorials) for connecting the 24-bit ADS1256 ADC to arduino

The ADS1256 chip is a high precision 24bit, 8 channel, analog digital converter based on SPI communication that is suitable for biomedical applications and perfect for sensing ECG and EEG signals. I ...
1
vote
1answer
928 views

Problem with piezo readings and Arduino Due

I'm using 1mOhm resistor in parallel to a piezo that is connected to analog1 pin on the Due, and the following code to observe the readings in the serial monitor: int piezo = A0; int threshold = ...
1
vote
0answers
695 views

ICP Accelometer Arduino

I need to connect piezoelectric accelerometer to Arduino. Precisely, it's this one: http://www.pcb.com/Products.aspx?m=352C34 Specs show that it generates 100 mV/g, but when I connected it between ...
1
vote
1answer
767 views

How to wire QRB1114 IR sensor to an Arduino Uno

What's the best way to wire a QRB1114 IR sensor to an Arduino Uno? I'm attempting to use it as a white-line-on-black-background line detector. Google shows many different ways wire it to an Arduino, ...
0
votes
1answer
268 views

Attiny84A and IR Sensor

I have a GP2Y0A21YK0F Sharp IR Analog Distance Sensor 10-80cm + Cable, Arduino Compatible and its is connected to my Arduino. All works well and I can read the analog data with the following code: #...
6
votes
1answer
343 views

Analog Reference and Power Voltage

On the Arduino website it states that the analog pins read voltages from 0 to 5 volts (default) and return a value from 0 to 1023. One can also set the range with analogReference(). However, this is ...
3
votes
2answers
8k views

Reading many analog signals in arduino

I need to measure around 50 - 100 analog sensors (resistors). This poses two challenges: Arduino has fewer analog pins. I'm targeting something small like arduino Mini or Nano, which can have up to 8 ...
1
vote
0answers
955 views

Get a internal temperatura form ATMega328

I am making a circuit which takes three kinds of monitor temperature of the chip itself, in this case ATMega328 at room temperature, which is influenced by external thinks such as lasers, which will ...
2
votes
4answers
2k 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
2answers
69 views

How do I attach 4 input pots to arduino?

I am making an arduino game and the requirement is that my arduino reads 4 analog values from the pots. I dont know whether I should use an external battery supply or the 5V from the duino' itself. I ...
1
vote
1answer
103 views

Why voltage at AREF is given by Vin * R2 / Rtotal

In chapter 4 of Arduino Workshop on page 85 (or page 31 in the pdf) it says that the voltage at AREF in the schematic is given by: Vin * R2 / (R2 + R1) However, the voltage is flowing from 5V to ...
0
votes
5answers
9k views

AnalogRead always 1023 on Arduino Due?

Just using the Basic Example AnalogReadSerial. // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600)...
9
votes
2answers
832 views

Arduino ADC Reference Voltage if it is Battery Powered

I am looking to possibly monitor battery power to the Arduino using its ADC. This is fairly straight forward and simple (especially if using the Arduino API); however, if the battery is powering the ...
5
votes
2answers
8k views

What's the most accurate way to time-stamp analogRead data?

I want to sample an Analog sensor as fast as possible, and time-stamp each sample that I take as accurately as possible. Currently, I'm doing the following: val = analogRead(SENSOR_PIN); clocktime =...
7
votes
5answers
14k 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);...
3
votes
1answer
429 views

Setting time frame in Arduino Uno

I have built the circuit below using mux ICs. In a particular interval the respective selector pins get selected and analog signal from hall sensors are read and give a particular analog value out. ...
5
votes
3answers
2k views

Does any board provide more than 1024 analog input values?

The Arduino boards provide an analog input range of 0V to 5V which translates to 0 to 1023 integer values. The range is determined by the on-board ADC, which in the case of the Uno is a 10 bit ADC (2^...

1 2 3 4 5 6