694 questions
0
votes
0
answers
52
views
Using an ADC with PIC24 and storing the data in an SD card
I'm just an engineer student and I have such a project. But I didn't find enough resources to read except the datasheets it seems like the PIC24 is not being used a lost in the industry and there is a ...
0
votes
0
answers
260
views
ESP32 running I2C in ISR (non-negotiable) keeps breaking
I've been writing writing C code on AVR for years (no arduino, just a makefile). However I need to do something bigger, so I chose an ESP32 Feather S3 board and interfaced it with my own board.
I'm ...
1
vote
0
answers
179
views
C++ ESP32 adc2_get_raw speed improvement
I try to do some measurements of the speed of sound with an esp32 and two microphones. I placed the microphones a meter away from each other and try to detect bang on them.
I would love to get at leas ...
1
vote
1
answer
230
views
ADC with DMA on the STM32F411 is not working
I want to read 4 ADC channels (PA0,PA1,PA2 and PA3) in scan-continuous mode using DMA, the problem is that once the uC runs the program it just perform one ADC read sequence and then it gets "...
0
votes
1
answer
61
views
Philips 80C552 microcontroller ADC interrupt
I want to create an interrupt service routine for the ADC interrupt that is caused by the ADCI flag when a conversion is finished. However, I can't find the interrupt vector to answer to said ...
0
votes
0
answers
522
views
STM32 DMA on ADC breaks FreeRTOS scheduling
I'm trying to set up my STM32 to read signals from both ADC 1 and 2 through DMA, while keeping the rest of my program running through FreeRTOS tasks scheduling.
At this moment, my tasks only manage ...
1
vote
0
answers
579
views
STM32 Scan Conversion gets only channel in last rank
I'm trying to read multiple ADC channels on a STM32F302VC. I wanted to exploit the scan conversion mode, in order to have a fast sequence of reading. After I set every channel with the .ioc file, by ...
0
votes
0
answers
599
views
How to correctly read the ADC values on STM32
I want to read the ADC values from the pins of the STM32F072C8U6 MCU. But the values I read are not consistent with the ones I measure with an oscilloscope, and sometimes I can read them, sometimes I ...
0
votes
1
answer
309
views
Creating an Array and filling it with ADC values - STM32L476G
I was wondering how to create an array on STM32cubeIDE. I like to fill this array with values from an independent LDR.
Below is the set-up code for the ADC:
/*User Begin PV*/
uint16_t value_DAC = 0;...
-1
votes
1
answer
424
views
Read out Sigma Delta ADC ADS1282 with STM32F767
i want to read out an 32 bit Sigma Delata ADC per DMA over the SPI Interface with an STM32F767. There is an Data Ready Signal which indicates that there is new Data available.
My current idea is to ...
1
vote
2
answers
176
views
Servo Motor and ADC Synchronization Issue in AVR C Code
I'm working on an AVR ATMega32a microcontroller-based project where I'm using a servo motor to rotate from 0 to 90 degrees while capturing ADC values at each degree of rotation. I aim to synchronize ...
1
vote
1
answer
267
views
Is there a more reasonable way for reading adc values from serial?
I have written a program to read adc values from an atmega2560 in two modes, a single sample mode that prints a sample for each channel selected by user, and a bulk mode that works by filling a buffer ...
-1
votes
1
answer
192
views
Why do I need to add a huge delay to switch channels in ADC on atmega2560?
I have this code that takes multiple adc conversions and send them on serial, if I don't add a 3 ms delay after set_ADMUX() the ADC sample is not the correct one for the channel, but I think it's a ...
0
votes
1
answer
383
views
ADC and DAC synchronizing
I have an array of 256 elements that I want to set the DAC to:
HAL_DAC_Start_DMA(&hdac, DAC_CHANNEL_2, (uint32_t *)array, 256, DAC_ALIGN_12B_R);
DMA is triggered by TIM2, 256 timer cycles take ...
0
votes
0
answers
99
views
How to map absolute values on either side of zero to a linear 0->100% value?
I've got a bit of a unique problem with a raspberry pi pico (or maybe I just don't know the right terms to search). I have an analog sensor on an accelerator pedal for a simulator I'm putting together....
2
votes
1
answer
294
views
How to build up a C code for avr atmega32 microcontroller to capture light intensity through photodiode and transmit data through serial communication
I am planning to construct a spectrometer. My aim is to rotate the grating and capture light intensity using a 3pin photodiode(S9055 series) and to plot a graph of Intensity Vs rotation angle using ...
0
votes
1
answer
376
views
MCP3208 reading wrong and very unstable values - Raspberry Pi 4
In a nutshell, I am using this ADC to read the output of a sensor via an amplifier. I verified that the output of the Op-Amp was what I expected, and it is. The voltage is correct when measured right ...
1
vote
1
answer
485
views
Sampling Time for ADC on STM32L432
I'm looking for guidance on how to select the Sampling Time for the ADC on my STM32L432KCU6. I found some tables in AN2834, but they are for the STM32H7 Series. I'm interested in getting ±0.5 LSB ...
0
votes
0
answers
289
views
Multichannel adc with dma values are not exact
I use multichannel(7 channels) adc1 in circular an scan mode with dma.i use ll functions and read adc values in dma_stream_IRQHandler function.the values are not exact and stable.adc sample clock is ...
1
vote
1
answer
178
views
Why do I read 512 characters written in 0.5/0.4 seconds on cutecom when I set it to be around 19 000 per second?
I want to output some adc conversions on cutecom using atmega2560, set 16 bit clock with 64 prescale at 16 Mhz to trigger adc conversion (each takes 13 clock cycles) and that should be around 19000 ...
1
vote
1
answer
1k
views
STM32 ADC Offset voltage problem. ADC starts from 0.05V instead of 0V
I am working with STM32H743ZI for GPIO, I2C, SPI, ADC. I want to read analog voltage from 8 different channel of ADC1. My code works properly, but there is offset voltage that i dont want to.
I am ...
0
votes
0
answers
414
views
How can I sample data using ESP32 ADC and send over Bluetooth Classic to Android device?
sorry if this question is worded poorly -- I am really new to the ESP32 and embedded programming in general and I'm struggling to understand how to do this effectively. I will try my best to organize ...
1
vote
1
answer
714
views
STM32F030 ADC Sequence Conversion
I need to setup the internal adc of my stm32f030 in order to make it working in single conversion and scan mode. Because I can't use HAL library I need to implement the code at the register level.
I ...
1
vote
1
answer
5k
views
STM32 ADC Multi channel using DMA
I want to use ADC1 scan mode to read three channels of the ADC1 using DMA.
I defined a buffer for ADC as shown below:
uint16_t adc_buffer[3];
Then I started DMA using the following function:
...
0
votes
1
answer
539
views
Read ADC using DMA in STM32
I want to read ADC1 and ADC2 on an STM32 using DMA.
I use ADC callback as shown below:
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
}
How can I make a decision between ADC1 and ADC2?
For ...
1
vote
0
answers
113
views
How to play a turtle graphics game using joystick on a raspberry pi?
I am trying to use a joystick as a controller for my snake game using a Raspberry Pi. The problem is that my analog signal reader is blocking the code for the game itself. When I load in the game the ...
-2
votes
1
answer
137
views
Timing diagram of convst. signal of ADC (ads8556) [closed]
I want to work on ADC (ads8556). In Figure 3 In the Parallel Read Access Timing Diagram, when the conversion time (tconv) finishes, and during the acquisition time (tACQ), there are multiple ...
0
votes
0
answers
218
views
Not getting the correct readings from any read(adc) except for adc3 after enabling the reset disable on an attiny85 in proteus and real hardware
Please be patient with me. I am only a beginner and I am still learning proper code formatting.
I have broken my program down to the very basics. Here's the issue.
I've enabled adc0 as an input ...
2
votes
0
answers
2k
views
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 ...
0
votes
1
answer
87
views
Python array elements append from ADS1115
I wanted to measure voltage with command chan = and write the voltage value to array which has dimensions 128x128 and contains 16384 voltage values. I set ADS1115 sample rate to 128 samples per second....
0
votes
1
answer
3k
views
STM32 - What is sampling frequency of ADC
I use ADC3 on STM32H7, I need to know (and set) what is sampling frequency.
I use 3 channels in 16 bits.
What I tried to calculate?
From this image I should have Fadc_ker_ck = 30 MHz, becase my ...
1
vote
0
answers
133
views
How to use DMA in Application
I am using stm32wl55JC1. I am making FFT project with ADC mic. I manage to get this work with my workspace but now I need to implement this on Application here github . So I try to implement my ...
1
vote
0
answers
82
views
Calculate multivariable equation with python
I am trying to calculate the voltage of a circuit with an ADC, the problem is that I am seeing that the voltage reading has to be done from a function and that it depends on the current of the circuit,...
2
votes
0
answers
751
views
Embedded Rust & Embassy | Analog measurement - ADC & DMA | STM32F7
My setup:
The signal is connected to the analog input of the STM32F767.
ADC sampling rate should be at least 192kHz because input signal frequency is between 1Hz and 40kHz.
Also STM32 connected to ...
0
votes
0
answers
293
views
Rust stm32f7 | ADC & DMA at 192 kHz sample rate
I’m trying to implement ADC conversion from gpio analog input at the sample rate of 192 kHz. Then I want to send the array of samples over tcp to the client.
My question:
How to implement ADC ...
1
vote
0
answers
633
views
Rust no_std ESP32 hal | ADC & DMA at 192 kHz sample rate
I’m trying to implement ADC conversion in a non blocking mode using DMA from gpio analog input at the sample rates: 192kHz.
My questions:
How to be implemented ADC in non-blocking mode (DMA). ...
0
votes
0
answers
28
views
The proper way to get a value from a sensor
I'm coding a device that works with a pressure sensor (with a RPi and via a MCP3008 ADC).
When looking for its value MCP3008(0).value the program may freeze.
I'm looking for a way to overcome that.
I ...
1
vote
1
answer
635
views
how to turn raw audio output from analog microphone into mp3 file?
I am working with a RPI Pico w, I have an analog microphone connected correctly and outputting raw audio data, how do I convert it into a file I can listen to?? I am using the micro python language.
1
vote
1
answer
140
views
What does File "/usr/lib/python3.9/enum.py", line 405, in __getattr__ raise AttributeError(name) from None mean?
I have connected an analog joystick to my Raspberry Pi 3B, and I'm trying to get the up down left right movement to map to W A S D. The code looks like this:
#!/usr/bin/env python3
import RPi.GPIO as ...
1
vote
1
answer
6k
views
How to use external voltage reference on RPi Pico VREF pin
I want to use ADAFRUIT LM4040 module as External Voltage Reference with Pico VREF pin
With Arduino boards I have to use 'analogReference' command to specify that I'm using an EXTERNAL voltage ...
0
votes
0
answers
263
views
STM32H723ZG ADC on Nucleo board behaves not as expected
I am using a Nucleo H723ZG and my ADC(s) behave weirdly.
I need only one ADC, from the datasheet the ADC3 supports 5 MSPS.
Since I needed the highest possible sampling rate, I've chosen this one.
The ...
0
votes
0
answers
457
views
uPython on Pico W match case statement
Trying to code a function to read the ADCs on my PICO W using the latest uPython version and also the latest Thonny IDE version.
this is the code for the function:
def getADCvalue(ADCchannel):
value = ...
0
votes
1
answer
98
views
How to use and configure ADC of STM32F407G-Discovery with nanoFramework?
I try to use ChibiOS presetted ADCs. Available channels following the specification:
PC1, ADC1 IN11
PC2 ADC1 IN12
PA6 ADC2 IN6
PA7 ADC2 IN7
PB0 ADC2 IN8
Temp Sensor ADC1
VrefInt ADC1
Vbatt ADC1
...
-1
votes
1
answer
178
views
How can i use the analog pin to assign a variable a binary value?
I'm using an arduino uno and some 7 segment displays to count from 0000 to 9999, i'm using the decoder cd4511 to save some ports, but in order to have the thousands in my counter, i needed to use the ...
1
vote
0
answers
187
views
Problem of transmitting ADC values using DMA to UART
The data that I am getting on Putty
I am currently working on a personnal project and I would like at the moment to understand the basics of ADC using DMA and transmitting values using UART to my ...
1
vote
1
answer
2k
views
STM32: how does the DMA save values of an ADC with 3 channels as half word into a buffer?
I have a STM32L151RBT6 with 1 ADC and 2 channels configured. The ADC is configured in "scan mode" and "continuous mode". The ADC has a resolution of 12 bits. The ADC values are ...
1
vote
0
answers
440
views
32bit SPI communication from ADC to Raspberry PI
I am trying to get an ADC and external oscillator (ADS131M02-q1 and SG531p respectively) to read a 1Vpp@60Hz signal from a function generator to print to a Raspberry Pi my issue is that the ADC ...
2
votes
0
answers
230
views
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:
#...
-2
votes
1
answer
178
views
WHy is this code not executing (ADC BATTERY VOLTAGE MEASURE)
EDIT NEW PICTURE
void setup() {
Serial.begin(9600);
Serial.println("Setup completed.");
}
void loop() {
// Read external battery VCC voltage
Serial.print("Bat: ");
...
0
votes
0
answers
547
views
The elegant way to handle ADCs with DMA in a RTOS
I'm currently setting up an AZURE RTOS (ThreadX on STM32), with Ethernet, SPI and ADCs activated.
This STM32 has to pass-through configuration information from time to time, coming from my PC over the ...