Questions tagged [adc]
Analog Digital converter
187
questions
1
vote
1
answer
135
views
Microcontroller freezes when triggering the gate of an N-channel MOSFET
Disclaimer: I have asked questions about this project before but this is yet another issue I'm facing.
What I really want to do: Build a battery powered device with 6 colored buttons. When you press ...
0
votes
1
answer
329
views
How to properly read ADC on an ATtiny85? [closed]
What I want to do: attach six buttons to a single input. Each button triggers a different action.
How I want to do it: Use an AD conversion and add a resistor with different values to each button so ...
2
votes
1
answer
94
views
Hysteresis and scaling range
Here I asked about how to add an hysteresis on ADC readings. The answer received was very good and it worked out of the box.
Still I'm having troubles trying to generalize the resample function in ...
1
vote
1
answer
102
views
Avoid 1-LSB noise on ADC readings
I have a potentiometer connected to an ADC input of an Arduino Leonardo.
The ADC resolution is 10-bit (0..1024), while I need just 7-bit (0..127).
I use a simple filter to reduce the noise and then a ...
-1
votes
1
answer
135
views
If I reduce ADC sample rate, do I get an average over the time period?
I am working with a ESP32-C3 devkit. I am using the internal ADC on that chip to read from an analog microphone. I initialize the ADC like this:
adc_continuous_config_t dig_cfg = {
.sample_freq_hz ...
-2
votes
1
answer
158
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
1
answer
262
views
AD7768-1 library " Arduino "
I am working on a project and I need an AD7768-1 library to make this analog-digital-converter talk to my Arduino using SPI.
" The AD7768-1" doesn't exist in Arduino's library.
Thanks in ...
0
votes
0
answers
106
views
Capacitance from AD7746 always "saturated"
I'm trying to use AD7746 with an arduino board to continuously measure capacitance (I'm currently using a 2pF capacitor for testing).
Datasheet here.
I managed to correctly write and read the ...
2
votes
0
answers
147
views
ESP32DevkitC-V4 interfacing ADS8698 (18 bit ADC)
I am currently working on an SPI interface to measure the voltage of an amplified sensor bridge signal. I am using an ESP32 module to control the device. Since I am logging the data to an SD card, I ...
2
votes
1
answer
170
views
Mildly accurate oscilloscope using Arduino Uno R3
I'm trying to make a mildly accurate oscilloscope using Arduino Uno R3 and I've done some research on the best method to do so. First of all I need to measure the voltage with a rather high sampling ...
0
votes
1
answer
137
views
ESP32 Potentiometer issue: Resolution mismatch of the potentiometer with unlimited resolution and reading the values with Wire.h
I have the problem, that the potentiometer goes from the range of 0 Volts to 3,3 volts. But within this range the measured value goes from about 0 to 65535 multiple times (over 10 cycles).
When I ...
-1
votes
1
answer
197
views
What is the minimum sampling rate in ADC in Arduino due?
I am looking for a very low frequency application like below 300Hz. What is the minimum sampling rate in Arduino due? I am very new to this. I see in the datasheet that max sampling rate is 20MHz.
1
vote
0
answers
582
views
ESP32 WROOM32E w/ Arduino IDE 2axis joystick - how do I get a good reading?
How do I get the full range of motion from an analog joystick and the ESP32 WROOM32E using the arduino IDE with esp-idf installed?
Using a 2 axis analog joystick, the 5v/3.3v pin, ground pin and the ...
1
vote
0
answers
112
views
how to set the arduino due adc automatic trigger
How do I trigger automatic conversion on the ADC on the DUE? If this was the uno, I could just do
sbi(ADCSRA,ADATE); sbi(ADCSRA,ADSC);
but for the due, I seem to have to use
adc_configure_trigger(ADC,...
2
votes
1
answer
1k
views
ESP32 ADC <-> WIFI Issue
I'm using the ESP32's ADC1 (not ADC2, which conflicts with Wi-Fi functionality) to capture some analog data received @IO36 (an ADC1 port). As soon as I uncomment the WiFi.mode(WIFI_AP_STA) line (even ...
1
vote
1
answer
85
views
Arduino pro mini sampling rate
what are the possible sampling rate the user can set in Arduino pro mini using ADCSRA registers.
I want to set my desired sampling rate through registers, is it possible?
0
votes
1
answer
204
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 ...
0
votes
1
answer
176
views
How many ADS1115 ADCs can I connect to a single Arduino Mega 2560
I know we can connect 4 ADS1115s to an Arduino Mega 2560.
Is there any limit on the number of ADS1115s we can connect to the Mega giving each a different address? I have to connect at least 36 ...
0
votes
1
answer
636
views
Arduino fast ADC sampling--which burst control is best?
If one wants to do quick bursts of free-running ADC conversions, should one pause and restart using:
The ADC enable bit: bitClear(ADCSRA,ADEN) & bitSet(ADCSRA,ADEN),
The interrupt enable bit ...
1
vote
1
answer
370
views
How to send data from one Arduino to another isolated?
I have no experience about serial communications, with that being said; I have two circuits isolated from each other and each have a ATMEGA8 reading a voltage on their ADC.
I want one of them to send ...
1
vote
0
answers
251
views
ADC stops working at small delays (MCP3464)
I have tried debugging for a couple days with no luck, so this question is a cry for help.
I am trying to configure an external ADC (MCP3464 datasheet). The ADC uses SPI communication and I am getting ...
1
vote
0
answers
1k
views
Fastest external High Speed ADC?
I am in a situation close to:
Hi-speed external ADC
But with 100,000 ~ 500,000 samples per second, I don't need more.
I only want to detect changes in 2 sensors, so each loop is only an "...
1
vote
2
answers
489
views
how to config the Arduino ADC'S input on A0 instead of use default?
I am try to build this AC-DC meter, the code original used default A3 as input, how can change the input on A0?
the link:
https://simple-circuit.com/arduino-autoranging-ac-dc-voltmeter-with-trms/
...
1
vote
1
answer
2k
views
DC Motor Acceleration with PWM
I'm not sure why this has been so difficult for me, but I'm trying to control the acceleration of a 10v DC motor with an Arduino UNO and an L298n H-Bridge. Using a 12v regulated power supply to power ...
1
vote
1
answer
332
views
Arduino , python , pyfirmata , standard firmata
Is there a way to change arduino analog reference to EXTERNAL IN PYTHON using pyfirmata or any other library ?
Necessary Links : https://www.arduino.cc/reference/en/language/functions/analog-io/...
1
vote
1
answer
66
views
Arduino ADC converter calculation
I am trying to choose a wire encoder for my project. So far, I found this wire encoder (see link). Assuming the measurement range of my cylinder is 1 m. Then, with a 10 bit ADC converter of my Arduino ...
1
vote
1
answer
129
views
Interfacing SPI (MCP3903)
I'm trying to interface MCP3903. I haven't really don't any SPI interfacing before and I can't seem to find clear enough answer for newbs. Please bare with me.
I'm trying to use this library. http://...
3
votes
1
answer
241
views
micros() resolution for Portenta H7
Is there any way to know the resolution of micros() for the Arduino Portenta H7. I have checked for other boards e.g. Nano which is mentioned as 4 uS. However, I couldn't find one for Portenta H7.
Is ...
0
votes
1
answer
245
views
I have a problem trying to limit motor speed to a certain RPM using a MOSFET trigger switch module
I am using the potentiometer to control the duty cycle of a PWM signal to the MOSFET trigger switch module, thus controlling the motor speed.
In my code, I have used the map function to utilize the ...
0
votes
2
answers
1k
views
Portenta pinouts for ADC
I wanted to have your comments about one of my questions.
I am currently working on the sketch for the Arduino Portenta H7. However, due to my poor electrical background, I would like to ask your ...
1
vote
0
answers
248
views
Arduino Master SPI MISO Receive Data
I'm trying to interface an Arduino Mega with an AD7714 ADC. This ADC requires a command to be sent to the communications register (in my case 0x5C) in order to begin a read from the data register.
My ...
2
votes
1
answer
1k
views
Storing data in Arduino Portenta H7's SDRAM
I am working on storing data from Portenta H7's ADC through a high sample rate (>100kSa/sec) per channel. I am using 2 ADC channel for my work. Through the forum, I learned that the serial. print ...
1
vote
1
answer
149
views
Storing data from Arduino without Serial print- High Sample rate
For my work, I need to acquire data at a high sample rate (>100kSa/sec) using Arduino Portenta H7, which has 3 X 16-bit ADCs. Portenta H7 has STM32H747XI microcontroller. I don't want to use Serial....
0
votes
1
answer
382
views
Library ADC MCP33121
I'm looking for the Library of the ADC MCP33121 for Arduino UNO or functional code, I don't have enough tools for testing so I'd like to get some code already tested.
I appreciate any help.
Thanks... ...
1
vote
0
answers
103
views
How to implementing timer interrupt with a sensor device using A0 and A1 pins
I was wondering if there is a way to program a timer interrupt to collect sensor data at a specific sampling rate?
I want to attach two strain gauge sensors to A0 and A1 pins and collect the data at a ...
1
vote
1
answer
233
views
Why do I get different results when compiling the same code with different ide?
I have a basic code about reading true rms.I compiled the same code with arduino ide and atmel studio, then ran it in a proteus simulation.I'm trying to measure how long the read_rms() function takes.
...
1
vote
0
answers
521
views
Max. external ADC speed with ESP32 (SPI or I2C)?
What is the maximum speed for external ADC I can expect to get with ESP32? I'm planning to have 16-bit ADC connected to I2C or SPI whichever gives more speed.
How that information is calculated from ...
2
votes
1
answer
1k
views
Any way to use DMA to transfer data to SD Card in ESP8266
I'm using ESP8266 at speed of 160 MHz to record ADC results into SD card, I need to do this at rate of 8 KHz. Means that i should save it on the SD Card or i'll run out of memory before 4 Sec passes.
...
1
vote
0
answers
80
views
Receiving half the value of Reference Voltage in AD7705?
I have a doubt in the AD7705 library AD7705 Library Link when I am declaring a reference voltage of 5 V and giving a reference voltage of 5 V to IN1+. On the serial monitor, I can see ADC conversion ...
2
votes
1
answer
1k
views
Inaccurate and non-precise voltage reading from Arduino Analog pin
float get_volt() {
rawVolt = analogRead(voltageSensor);
vOUT = (rawVolt * 4.6) / 1024.0;
vIN = vOUT / (R2/(R1+R2));
//if(vIN>12.0){vIN=12;}
//if(vIN<11.12){vIN=11.12;}
//return (vIN -...
2
votes
1
answer
738
views
Measure Vcc on ATtiny13a?
I am trying to figure out if I can measure the Vcc of attiny13a, but the code I use for arduino's and attiny85 does not work. This is where I got the code from. I know that it works by using the 1.1v ...
2
votes
2
answers
899
views
Arduino binary LED 10 bit display
I'm working on a simple ADC project, the goal is to adjust the on/off of the LEDs according to the binary reading (1-on,0-off). I've tried this with 8 bit, and it works as intended. But on 10 bit, two ...
1
vote
0
answers
168
views
Dual Channel Reading with 16 bit AD7705(SPI)
I want to read 2 separate voltage readings by AD7705 ADC and send the data to Arduino(Master). What is the correct program flow should I implement to get dual-channel operation working. How data will ...
2
votes
1
answer
2k
views
How to find out if HX711(amplifier and 24-bit ADC) is damaged or not?
I'm using this ADC with a load cell for weight measurement, I had 4 strain gauges and mounted them on a cantilever structure that I made out of acrylic sheet, used calibration program from here: https:...
2
votes
3
answers
1k
views
How to use ADC interrupt on STM32 blue pill
I'm currently using the STM32F1xx boards from http://dan.drown.org/stm32duino/package_STM32duino_index.json
To program my blue pill but I can’t find how to write the interrupt for the ADC. I’ve set ...
2
votes
1
answer
1k
views
8266 analogRead(A0) always 1024
dear member.
I have 4 ESP-12 averything OK but one chip behave weird.
always return 1024 on analogRead(A0);
once use ADC_MODE(ADC_VCC) and reflash using ADC_MODE(ADC_TOUT); and never back to normal, ...
1
vote
0
answers
352
views
ESP32 SPI communication with MCP3903 not working
I am trying to read out the Microchip MCP3903 six channel ADC using an ESP32 via SPI communication. The MCP3903 is powered with 5V and 3,3V and is connected with an external 3,57 MHz crystal. The ...
0
votes
0
answers
2k
views
Reading TCD1304 linear CCD Sensor
I want to read the TCD1304 linear CCD sensor with an ESP32 and I'm facing some problems. As a first "warm-up" and to get familiar with this sensor I tried to generate the sensors input ...
2
votes
2
answers
237
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 ...
0
votes
1
answer
87
views
TI ADS7250 Read From SPI and SPI1 Simultaneously
I'm so confused by the ADS2750 datasheet here, I can't seem to figure the proper bit shift to read data from bits 15-27 properly. I'm not even sure what some of the acronyms mean on page 23 table 1. I ...