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
1 answer

Control LED brightness by using MCP3002 Analog to Digital Converter

I'm trying to control a list of PWMLED brightness by using MCP3002 ADC and Potentiometer. My issue is when I run my script everything is functioning as expected, except the potentiometer that is connected to MCP3002 ADC, it won't adjust the…
MrYosuko
  • 47
  • 7
3
votes
1 answer

I cannot configure my STM32F411RE DMA with ADC correctly

I am attempting to use the STM32F411RE DMA with ADC to obtain 2048 samples each for 3 input channels / pins. The A0, A1 and A2 pins are connected to a sensor for which image processing (Fourier Transform) is to be used. I thus use the DMA / ADC to…
Nanne118
  • 125
  • 1
  • 13
3
votes
1 answer

How do I record audio with MicroPython on the ESP32?

I'm an experienced Python developer, and a complete newbie at electronics. I got an ESP32 board with MicroPython installed, and a microphone connected to it. I'm able to get a reading off the microphone, like this: MicroPython v1.9.4 on 2018-05-11;…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
3
votes
1 answer

My Pressure Sensor Wont Output the Full Range of Values, Using a Raspberry Pi 3 and Python3

I have devised a circuit in which I am getting a pressure reading from a Dwyer 616kd-11-v Transducer with a Range of 0-500Pa, I am powering this with a 5v Power Supply and it shares a common ground to the Raspberry Pi. My ADC converter is a 16 Bit…
Almaas Shah
  • 125
  • 2
  • 14
3
votes
1 answer

Trying to understand ADC of STM32L4

I have difficulties understanding how STM32 ADC works. I want to do something simple ie. sample and convert regularly ( @ 250Hz ) on 2 GPIOs. For now I did it in a "dummy" way: setup ADC in basic single mode, then launch a timer @250Hz and at each…
Guillaume Petitjean
  • 2,408
  • 1
  • 21
  • 47
3
votes
1 answer

Sampling in RasPi3 and ADS1115 using Sample count or time.time()

I'm using Raspberry Pi 3 and ADS1115, my project requires me to get evenly spaced samples so as to plot and analyse. The other posts were about achieving 10k and 50k sps but I only require 500SPS and that isn't working either. Is there a way to run…
3
votes
2 answers

Individually read distinct inputs with STM32F0 ADC

STM32F072CBU microcontroller. I have multiple inputs to the ADC and would like to read them individually and separately. STMcubeMX produces boilerplate code which assumes I wish to read all of the inputs sequentially, and I have not been able to…
ctag
  • 574
  • 2
  • 4
  • 15
3
votes
1 answer

How to read multichannels ADC Value?

I can read ADC value from ADC1_IN1 channel with this code ADCValue = HAL_ADC_GetValue(&hadc1); but ADC1 port (you can see on picture) has many channels. How can I read values from ADC1_IN2 ? How can I describe channel 2 in code ?
coollime
  • 147
  • 1
  • 3
  • 11
3
votes
4 answers

How to convert reading ADC Value to Float?

I want to convert ADC Values to float numbers. This is my code: uint32_t ADCValue; char str[15]; ADCValue = HAL_ADC_GetValue(&hadc1); ADCValue=ADCValue*3.3/4095; sprintf(str, "%d", Voltage); …
coollime
  • 147
  • 1
  • 3
  • 11
3
votes
2 answers

Lookup Table in C with Ranges

I have a table to calculate temperature based on a range of ADC (analogue-digital converter) counts that I need to implement in C. I'm not sure how to go about doing so since it won't be an exact value, it will be in an overlapping range. The code…
smd
  • 55
  • 1
  • 3
  • 9
3
votes
2 answers

AVR ATMega328P ADC channel selection issue

I'm tinkering around with an ATMega328P right now and wanted to read an analogue value from a pin through the ADC and simply output the value to 4 LEDs. Really simple #define F_CPU 20000000UL #include #include #include…
rfreytag
  • 1,203
  • 11
  • 18
3
votes
1 answer

How do I read a differential signal using the Arduino Due ADC?

I'm having some difficulty configuring the Arduino Due ADC to read a differential signal. I have connected the positive terminal to pin A1 (CH6), and the negative terminal to pin A0 (CH7). The common mode voltage is 3.3V / 2. The initialization code…
MarkUK
  • 31
  • 1
  • 3
3
votes
0 answers

STM32F103 DAC and ADC won't run concurrently

I have a thread set up to constantly read 18 ADCs across ADC1 and ADC3 and fill them into arrays. void TSK_AdcSensor(void const *argument){ ADC1_Configuration(); ADC3_Configuration(); //Clear the ADC value registers for (i=0; i
propro
  • 31
  • 1
  • 4
3
votes
0 answers

Raspberry Pi 2 with Windows 10 IOT reading TLC2578 ADC

I've been trying to read data from a TI TLC2578 ADC. I am using it in default mode. I modified the Microsoft IOT Pot Sensor sample code. I am able to read data but it seems like maybe the timing is off. I have the input wired through a 10k pot with…
BigSquirmy
  • 80
  • 1
  • 8
3
votes
2 answers

STM32f4 SPI DMA receive

I have STM32F4407VGT6 controller on board STM32F4 Discovery. I try to read data from the AD7683 ADC using SPI + DMA, but the DMA receive buffer is always empty (all zeroes). In polled mode, everything works fine, but i must read one 16-bit sample…
Tomas Stejskal
  • 31
  • 1
  • 1
  • 3
1
2
3
40 41