Noisy ADC Channels and UART issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-04-24 3:43 AM
Hello,
I have a Nucleo STM32L476RG board. I am using it to read time varying ADC values from 3 channels of ADC1 (PC_0,PC_1,PC_2) and print them as a single comma separated string. Eg. 100,134,130.
Here are a few details:
- STM Cube was used to initialize system clock, ADC and UART.
- The System Clock runs on HCI crystal at 16MHz.
- The ADC also runs on HCI Crystal at 16MHz.
- The USART2 is used which has a baud rate of 115200bps.
(STM32_ValuesIssues.png)
The issue is that while printing the ADC values on UART, the data gets disorganized/shabby.
- The waveforms have a lot of noise on them.
2. The noise reduces at higher voltages.
The ADC uses interrupts to add data into the UART. => Specifications given below. (Query_Docs.docx)
I have attached the ADC,UART and System clock settings along with the HAL_ADC_ConvCplt() function.
Arduino UNO on the other hand provides very smooth waveforms of the same time varying signals
PS. I have tried introducing delays as well as tried to store the ADC Values first and then send the data seperately.
#stm32l476 #stm32-adc #stm32-uart
- Labels:
-
ADC
-
STM32L4 series
-
UART-USART
