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
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
375 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
688 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
383 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
852 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
221 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
267 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
882 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
673 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
760 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
258 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
340 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
937 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)...
8
votes
2answers
813 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
13k 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
420 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^...