Тёмный

How to use ADC in STM32 Microcontroller- Read Analog Sensor Value 

BINARYUPDATES
Подписаться 38 тыс.
Просмотров 28 тыс.
50% 1

Learn how to use ADC in STM32 Microcontroller. The ADC (analog to digital converter) is 12-bit in STM32 MCU. We’ll program ADC to read analog sensor. This example project uses a single channel ADC in polling method. We’ll use LDR (Light Dependent Resistor) to measure the light intensity.
[SUPPORT]
►► Try the world's most trusted PCB design software, Altium Designer with 365, for free and 25% off your purchase: www.altium.com/yt/binaryupdates
►► Free search engine for the best quality components from Octopart: octopart.com/
►► Learn about Altium 365, the electronics product design platform that unites PCB design, MCAD, data management, and teamwork: www.altium.com/altium-365
[RESOURCES]
►► Need Help? To Learn Embedded Systems: courses.binaryupdates.com
►► Multi-Channel ADC Tutorial: • Multi-Channel ADC with...
[TIMESTAMPS]
00:00 Introduction
00:22 Altium Free Trial
00:54 Create STM32 Project
01:48 Configure ADC1 of STM32
04:20 Configure UART in stm32
05:42 Generate code
07:36 Program to read ADC Pin
11:45 Connect Sensor and STM32
13:02 Read Analog Sensor Data
16:20 Control LED using LDR Sensor
16:56 outro

Наука

Опубликовано:

 

25 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 43   
@abelashenafi6291
@abelashenafi6291 5 месяцев назад
Thanks this was really helpful
@UserName-cb6jz
@UserName-cb6jz 6 месяцев назад
Thank you for so much explanation, I saw 2 other videos that looked similar but one of them had no explanation and the other one had textual explanation.
@BINARYUPDATES
@BINARYUPDATES 6 месяцев назад
Thank you! I'm glad you like ADC with STM32 tutorial. There will be more videos coming on STM32F4 MCU in days to come. Thanks again for support. Have a good day!
@CadPixel-why-not2455
@CadPixel-why-not2455 8 месяцев назад
Thanks for demo
@mortenlund1418
@mortenlund1418 Месяц назад
What a great tutorial. Thank you for sharing. Really like your style!
@BINARYUPDATES
@BINARYUPDATES 28 дней назад
Thanks so much! I'm glad that you find this ADC with STM32 tutorial helpful.
@user-jt5xt1tg1w
@user-jt5xt1tg1w 5 месяцев назад
Hey bro thanks so much for your wonderful lession. please make a using sychronus type UART communication protocol
@Pk-sw8ip
@Pk-sw8ip 10 месяцев назад
Thanks for the wonderful explanation. And please upload the multiple channels ADC video quick 😊. I'm waiting for that.
@BINARYUPDATES
@BINARYUPDATES 10 месяцев назад
Thank you! I'll be uploading STM32 Multi Channel ADC video lesson by end of this week or early next week. I'm presently working on that STM32 video lesson. It will take sometime to complete editing. Thanks for your support and patience. Best wishes!
@keroroex4660
@keroroex4660 Месяц назад
Thank you so much for making this video; it has been incredibly helpful to me. I really appreciate it.😭
@BINARYUPDATES
@BINARYUPDATES 28 дней назад
Glad it was helpful!
@yashaskumargb3827
@yashaskumargb3827 8 месяцев назад
Nice explanation and working fine
@BINARYUPDATES
@BINARYUPDATES 7 месяцев назад
Glad to hear that you enjoyed this ADC with STM32 lesson. Best wishes!
@VedantNaik1
@VedantNaik1 5 месяцев назад
Can you explain the relation between the resolution ADC cycles and sampling cycle time more explicitly with an example??
@user-yo9jx7kt8y
@user-yo9jx7kt8y 7 месяцев назад
Sir please provide video on how to develop drivers 92c deover for sensors.
@manishkumarpatel2127
@manishkumarpatel2127 3 месяца назад
Can you explain enternal process to how to sensor are take your data in your stm32cubic id and communicate that process..
@MohammedAltowayti
@MohammedAltowayti 4 месяца назад
I'm using STM32 NUCLEO-F411RE chip... Can you help me write a code to make it capture an image using OV2640 and store it in pc folder?
@stavroulasifaki7394
@stavroulasifaki7394 5 месяцев назад
I have done the same steps as you but there is no output in putty. I have the NUCLEO-U575ZI-Q and i have used the equivalent pins as you did. Can you help me?
@tmuralikrishna908
@tmuralikrishna908 3 месяца назад
thanks for the video. how to print this in terms of value (0-3.3v to 0-4095)..
@patilmm123
@patilmm123 2 месяца назад
Why LED connected without resistor didn't get damage?
@sugiyartosugiyarto1587
@sugiyartosugiyarto1587 8 месяцев назад
Sir make videio using input adc lookuptable...
@BINARYUPDATES
@BINARYUPDATES 8 месяцев назад
Hi, Sugiyarto, I'll consider making video on ADC Lookup table in future videos. Thanks for your input. Best wishes!
@therealg4197
@therealg4197 2 месяца назад
Good video, but always use a current limiting resistor with an LED
@BINARYUPDATES
@BINARYUPDATES 2 месяца назад
Yes, thank you I agree with you!
@navkaranhanda
@navkaranhanda 9 месяцев назад
Hi, i followed your tutorial for my capacitive pressure sensor, however i need the sampling speed to be much higher than what this code is giving. I have tried changing the values in HAL_DELAY, the timeout for pollfoconversion but none of them are changing the speed at which the sensor is sending values into the putty serial monitor. Any idea if there is a setting i needed to change or maybe i am doing something wrong?
@BINARYUPDATES
@BINARYUPDATES 9 месяцев назад
Hi @navkaranhanda It may possible when you change ADC sampling rate in STM32Cube IDE especially IOC file. Just make sure the changes also be seen in code generated in "ADC init" function. Sometimes, it fails to update code with changed parameters from ioc file. Good luck and best wishes!
@navkaranhanda
@navkaranhanda 9 месяцев назад
@@BINARYUPDATES oh thanks for the idea. I changed the sampling rate from 15 cycles to 480 cycles but nothing changed, is 480 maybe just too much or could there be something else?
@galalmohammed8623
@galalmohammed8623 9 месяцев назад
why didn't we put a driver for ldr , how does it work ?? i don't if it's on the STM itself or what u've done on this video, waiitng for your explenation , i have a projectt please
@BINARYUPDATES
@BINARYUPDATES 8 месяцев назад
Hi, if you mean external driver chip to measure light intensity. If so then, in this project I've used ADC peripheral of STM32 MCU to develop our own software drivers in code to read analog sensor LDR in this case. This code basically convert the analog value coming from sensor to equivalent lux value of LDR. I hope this might help you. Good luck and best wishes!
@yosrakaroui9672
@yosrakaroui9672 2 месяца назад
hello, how did you know that the usart2 is associated with the usb port on the STM32?
@therealg4197
@therealg4197 2 месяца назад
By looking at the schematics or reading the ref manual
@minenwerfer3566
@minenwerfer3566 5 месяцев назад
what if you use an extra ADC (seperate from the stm32 MCU)? i think the communication between the ADC and the MCU is similar to this but it turns out to be quite difficult. Do you have any video or blog suggestions for such a task?
@BINARYUPDATES
@BINARYUPDATES 5 месяцев назад
Yes we can do so. I'll consider making such video in future to show how to connect external ADC to STM32.
@minenwerfer3566
@minenwerfer3566 5 месяцев назад
@@BINARYUPDATES nice !!
@vse_vo9097
@vse_vo9097 5 месяцев назад
Hi, I don't know why, but the text doesn't want to be output to PuTTY in any way. Help please
@BINARYUPDATES
@BINARYUPDATES 5 месяцев назад
Hi I'd suggest to check the serial baud rate settings in PuTTY and sensor connections
@User66242
@User66242 6 месяцев назад
listening to indian or pakistan bloggers blows my mind
@SaiKumar-hv3qd
@SaiKumar-hv3qd 10 месяцев назад
Please provide the virtual com port driver link for windows 11 .. 😢
@BINARYUPDATES
@BINARYUPDATES 10 месяцев назад
Hi SaiKumar, I hope you're using STM32 Nucleo Board. Because when you install STM32CubeIDE it install drivers for ST Link so no need to install manually. If you want to update drivers then. Connect STM32F4 Nucleo Board to computer. And then Click on HELP in the top menu bar, and then select ST LINK Upgrade --> select your ST device in link and click on Upgrade. NOTE: If you're using other board then process may vary especially, in case of STM32 Blue pills and Black pills. In that case, you must ask your suppliers about that particular boards I hope this will help you resolve issue. Good luck and best wishes!
@SaiKumar-hv3qd
@SaiKumar-hv3qd 10 месяцев назад
Can't we install virtual com port driver if we are using stm32f407
@BINARYUPDATES
@BINARYUPDATES 10 месяцев назад
It depends on which STM32 board you have. Usually, with some low cost boards in market doesn't support ST Link as they prefer method to use on board boot loader to upload code on STM32 MCU. So please check your product manual and description to ensure, if your board has ST Link support. Good luck and best wishes!
@radman999
@radman999 8 месяцев назад
Could you speak a little more slowly
@Disillusioned_one
@Disillusioned_one 7 месяцев назад
I watched it at half speed, still faster than I talk but better.
Далее
СОБАКИ ГОЛОДАЮТ ИЗ-ЗА ЛЕРЫ 🥲
01:00
STM32 Multi ADC DMA method
29:42
Просмотров 4,8 тыс.
STM32 Guide #4: Generated Code, HAL, and Bare Metal
26:20
Altium Tutorial 2- Routing the Printed Circuit Board
41:55
How to use an ADC (embedded example in C)
14:56
Просмотров 29 тыс.
ОШИБКИ НА ANDROID 2
5:13
Просмотров 34 тыс.
APPLE дают это нам БЕСПЛАТНО!
1:01
Просмотров 748 тыс.
Новодельный ноутбук Pocket386
1:16:17