Questions tagged [adc]

An analog-to-digital converter (ADC) is a device that converts a continuous signal to a series of digital numbers. Prefer tag [audio-aliasing], if appropriate.

An ADC samples a continuously variable physical quantity (eg light, sound, position, voltage, etc) and periodically outputs a digital value for it.

601 questions
3
votes
3 answers

How to read multiple Analog sensor

I am using Arduino UNO board. I have 24 analog channel which gives me 0~5v analog out put. Now my problem is I have only 5 analog channel. I wanted to read value from each channel for every 2 min and then switch to other channel. Can anyone suggest…
AMPS
  • 319
  • 3
  • 11
3
votes
4 answers

STM32 ADC values reading too high

I am using an STM3240G-EVAL board to read in values from the ADC. I print the values from the ADC to the LCD on my board using the print function below. I physically connected the temperature sensor to 3.3V, ADC3, and GND on the eval board. The…
rayray
  • 301
  • 2
  • 3
  • 8
2
votes
4 answers

Where to put calculations? Inside interrupt handler or main loop? (embedded realtime application)

I'm developing an embedded application for motor control and I have doubts on what to to with some calculations that transform ADC numeric values into signed physical values (Amps). Should I make the calculations in the interrupt handler or should I…
Hungi Mahar
  • 89
  • 1
  • 6
2
votes
0 answers

How to stop and restart ADC with DMA in STM32L4

How to correctly and repetitively stop and restart ADC with DMA in STM32L476RG? I need to measure signal a number of samples before the trigger and a number of samples after the trigger. I set: DMA in circular mode, ADC in continuous conversion…
hooboe
  • 133
  • 8
2
votes
0 answers

How can I send ADC value to Serial Port

I want to able to send my ADC values to a Nodemcu to put them a Web UI but I even could not send any UART value to a serial port and I did not catch the problem. I set my variables and libs like: #include "stdio.h" #include "string.h" uint8_t…
2
votes
2 answers

STM32WL55JC1 - HAL ADC wont change channels

What I want to accomplish So I want to accomplish the following: I have 3 FreeRTOS-Threads which all shall read one of 3 (5) channels of my ADC. I want to poll the ADC. The Threads then enter the read value into a FreeRTOS-queue. My code so far I…
Vandrey
  • 531
  • 1
  • 8
  • 23
2
votes
1 answer

Algorithm to mimic analog device

Analog device provides instant result as you can see at this simplified picture. Is there known algorithm that solves the same problem when I have similar situation in digital world, with arrays of ranges? Or at least something fast, with least…
Ibiza
  • 149
  • 4
2
votes
0 answers

Using python to read 8-bit ADC outputs into a Raspberry Pi 4?

I'm using python to read in values from a high-speed 8-bit ADC (the ADS7885 linked here) and convert them into voltages using the SPI0 ports on a Raspberry Pi 4. At this point, I do receive values from the ADC on the Raspberry Pi, but the values I…
mchammer58
  • 21
  • 1
2
votes
1 answer

Sampling analog signals on the ESP32 at different rates using I2S

I need to read high freq. analog signal data from one ADC1 channel and read low freq. data from other ADC1 pins. I use I2S for the high freq. data read, which runs perfectly, but as soon as I2S is configured all other ADC1 pins read 4095 only. What…
Chris
  • 31
  • 4
2
votes
1 answer

Serial monitor showing unexpected input from Arduino Mega

I'm using an Arduino Mega to control a CS1237 ADC. I'm sending a signal to the clock pin and after each clock pulse, waiting 1ms and then reading the response, according to the datasheet I found (via…
2
votes
0 answers

Using STM32L4 ADC with DMA for imaging sensor reading

I was reading a lot how to do the multichannel ADC readings. My first success was with poll for conversion. Then I managed to switch to ADC with DMA but I got stuck with my new goal. I have analog output from image sensor I want to read. I will not…
D. K.
  • 63
  • 1
  • 5
2
votes
2 answers

STM32 ADC DMA. When MCU is informed about end of ADC?

I use ADC with DMA (STM32F4, ide STM32CubeIDE) and I think that I understand how it works but still have one dilema. From my understanding MCU is called only when DMA transfer is completed, basically MCU go into this function when DMA ADC is…
subavet995
  • 139
  • 14
2
votes
0 answers

fflush of named pipe (fifo) blocks system for greater than 1 second in C code on raspberry pi

I am using a raspberry pi (either 3b+ or even the 4GB model 4 running either Stretch Lite or Buster Lite) to read an ADC and report the values to a named pipe (fifo). When I open the pipe I use the O_NONBLOCK parameter. The code is written in C. …
cuxcrider
  • 125
  • 3
  • 9
2
votes
2 answers

adc frequency vs accuracy

I was reading about AVR's ADC, and I came across this sentence Now, the major question is… which frequency to select? Out of the 50kHz-200kHz range of frequencies, which one do we need? Well, the answer lies in your need. There is a trade-off…
Ahmad Anwar
  • 123
  • 1
  • 8
2
votes
2 answers

Averaging ADC readings have strange steps in plot

Im reading ADC values for measuring temperatures and i average them. But the plot from it shows "steps", but not from actual steps of the values increasing. Does anyone know why this happens? #include "arduino.h" #define AVG_COUNT 1300 #define…
Tobey66
  • 73
  • 9
1 2
3
40 41