Тёмный
No video :(

16. STM32CubeIDE Potentiometer ADC with STM32F103C8T6 

MicroPeta by Nizar Mohideen
Подписаться 7 тыс.
Просмотров 34 тыс.
50% 1

STM32 Blue Pill for beginners
Code and diagram are at www.micropeta....

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

 

23 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 50   
@comandernehal8567
@comandernehal8567 2 года назад
Following all the example. Please keep updating it. Very helpful for begonners.
@NizarMohideen
@NizarMohideen 2 года назад
Sure 👍
@julianricardo5458
@julianricardo5458 Год назад
MicroPeta ERES MI HEROE!!!!!! ❤❤❤❤
@hideakipage8151
@hideakipage8151 11 месяцев назад
Excellent video. I've been trying to work through the STM documentation. You really cut to the chase.
@newsogn5148
@newsogn5148 Год назад
Yes thank you! Exactly what I was looking for
@josephulrichmbodengombe1853
@josephulrichmbodengombe1853 5 месяцев назад
merci
@vladimirastrelin1719
@vladimirastrelin1719 Год назад
EXCELLENT ! THANK YOU !
@itsQuilow
@itsQuilow 6 месяцев назад
Everything seem to be working but the value is all the time around 500 and changing a little bit all the time but not connected to potentiometer at all. Any ideas?
@user-nk6ly8er2d
@user-nk6ly8er2d 3 года назад
Nice class thank you sir
@NizarMohideen
@NizarMohideen 3 года назад
Welcome
@ahmedahmed-yg5fl
@ahmedahmed-yg5fl Год назад
I can't read voltage less than 80mv the adc value 0x0000 at 50mv 😢
@Darieee
@Darieee 11 месяцев назад
thanks 🔥
@ajibsm2640
@ajibsm2640 2 месяца назад
Anyone knows why i need to click reset button to update value? My program just same as the video
@NizarMohideen
@NizarMohideen 2 месяца назад
It may be due to non-original STM32 chip If you use ADC stop and start for each reading, it will work as shown below. Thanks HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,1000); readValue = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1);
@idslab.nitrklec3284
@idslab.nitrklec3284 Год назад
How to get equivalent voltage of potentiometer in the cube IDE instead of 4093 or 1024 ?
@emreceylan9979
@emreceylan9979 2 года назад
Hello, i did the same as you but instead of showing the pot value i recieve this error : Polling target STM32F103C8Tx.cpu failed, trying to reexamine Examination failed, GDB will be halted. Polling again in 6300ms
@shambhusingh5094
@shambhusingh5094 2 года назад
I am using micro USB to program, but adc values not coming after debugging, please help
@NizarMohideen
@NizarMohideen 2 года назад
If you want to get data in “Live Expression”, you need to use a “ST Link” in debug mode as I have shown in video-no-11 in my channel. Thanks
@shambhusingh5094
@shambhusingh5094 2 года назад
@@NizarMohideen thanks 😊 🙏
@yunusemreciftli5193
@yunusemreciftli5193 Год назад
Hello, is there any content about the MQ-7 Carbon Monoxide sensor reading?
@miladfaramarzzadeh9018
@miladfaramarzzadeh9018 Год назад
Thanks for the video! just I have a question why the console is red ? and why don't we need to set RCC ?
@MuhammadAlamulhuda
@MuhammadAlamulhuda 2 года назад
Sir nice video i like it so much. One question. The value that displayed ini live expression, what kind of value is that? Is the same with PWM? Or it is actual analog? Can we use it to control PWM for any motors? Thankyou
@m-jt7cd
@m-jt7cd 5 месяцев назад
Hey, if you dont mind, id have a question concerning this topic. Currently i am working on a project using stm32 and an ADS131 ADC (TexasInst). After developing and designing a pcb for this project i have to code the communication between ADC and MCU. I have basic C knowledge and very very basic (barely no xd) knowledge in programming MCUs. if you generate code from cubeMX, many files (main.c, stmxy.c, main.h, etc.) are created. It is pretty hard for me to see through this. I have some specific expectations for the communication (e.g. 10Hz, i want a timestamp (if possible?)). So, maybe you have any suggestions or help for me to get the software done.
@NizarMohideen
@NizarMohideen 5 месяцев назад
You can create a timer interrupt every 100 milli seconds. It is very simple I have created a video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OSVffISU7DQ.html In that video I created three interrupts every 200, 300 and 700 ms As I understand you may need only one interrupts similar to that
@teekiansek
@teekiansek Год назад
Good day. Nice demo. I am new to STM32. why adc value maximum is 4033?
@shamanthks7218
@shamanthks7218 Год назад
Hello sir. I'm trying to interface an twist throttle with this microcontroller. It gives output values from 0.8V to 4.3V. Also, I want to generate a PWM signal of 10kHz and change the duty cycle through twist throttle. How should I proceed with this one? Can you please guide me with this?
@ezekielmuhumuza8194
@ezekielmuhumuza8194 Год назад
Thanks for this.. Unfortunately, I only get one static figure in live expressions after following this step by step and double checking everything. continuous mode is enabled but my figures don't change with adjustment of the potentiometer. I've also checked that the potentiometer is working fine What could be the problem?
@NizarMohideen
@NizarMohideen Год назад
Some microcontrollers don't allow auto conversions. You may need to stop and start ADC every time HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,1000); readValue = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1);
@ezekielmuhumuza8194
@ezekielmuhumuza8194 Год назад
@@NizarMohideen Thanks for such a prompt response. I am using the waveshare Xnucleo-411re board, it has an stm32411ret6 chip. If this board does not allow auto conversion, how can I execute the stop/start to generate readings, also is it possible to Transmit them to the serial. I had similar challenges when I followed your other tutorial that monitors potentiometer readings through SWV. I got no results at all in the graph Thanks again
@ezekielmuhumuza8194
@ezekielmuhumuza8194 Год назад
@@NizarMohideen I updated the code as above, it worked perfectly. Kind regards to you
@Bravo_L
@Bravo_L 11 месяцев назад
mine doesnt give me continuous readings?
@franciscogouveia1516
@franciscogouveia1516 2 месяца назад
Hi Nizar I'm tried to implement this code potentiometer ADC on blackpill f401 and so far the readings are static, only change by push reset button. I put clock on 8 MHz just like on BluePill but the results are the same. I noticied that appears on IDE a file 0x0 that says on context 'source not found'? Can you help me? Thank you
@NizarMohideen
@NizarMohideen 2 месяца назад
If the board has clone STM32 chip on it, the ADC does not continuously converts. We can stop and start ADC for each conversion as shown below Thanks HAL_ADC_Start(&hadc1); HAL_ADC_PollForConversion(&hadc1,1000); readValue = HAL_ADC_GetValue(&hadc1); HAL_ADC_Stop(&hadc1);
@franciscogouveia1516
@franciscogouveia1516 2 месяца назад
Hi Nizar thanks for responding. I'me on your academy. Now i understand that can be an f401 clone who dont work as expected. Thank you
@meruguakhil
@meruguakhil Год назад
Thank you very much sir, but if i want to see the same output on oscilloscope, is it possible?
@NizarMohideen
@NizarMohideen Год назад
Yes, of course
@meruguakhil
@meruguakhil Год назад
@@NizarMohideen sir i am a beginner, can you please say how to show it on oscilloscope. it would be a great help to me.
@valeriavl87
@valeriavl87 2 года назад
Easy peasy. Thank for that. I have a question, do you know why i cannot read the potenciometer in real time?
@NizarMohideen
@NizarMohideen 2 года назад
Did you get the value in live expression
@NizarMohideen
@NizarMohideen 2 года назад
STM32CubeIDE Settings ADC1 - IN9 (tick) Parameter Settings --> ADC Settings --> Continuous Conversion Mode (Enabled)
@mingshiuansun9670
@mingshiuansun9670 Год назад
@@NizarMohideen I also have the same problem, My problem is that the value displayed in live expression is the breakpoint value,and the above two possible problems have been confirmed, is there any other problem? Thanks
@embedyourself7664
@embedyourself7664 2 года назад
Thanks for the good tutorials! Beginner here. Is "readValue" already a variable or if not, how could you make it one?
@NizarMohideen
@NizarMohideen 2 года назад
Yes. readValue is a variable. I have already declared /* USER CODE BEGIN 0 */ uint16_t readValue; /* USER CODE END 0 */
@embedyourself7664
@embedyourself7664 2 года назад
@@NizarMohideen thank you! So I could now take this variable and do calculations for example, right?
@NizarMohideen
@NizarMohideen 2 года назад
Yes. That is correct. You can use this variable as you would do with any integers
@krissutikno2136
@krissutikno2136 2 года назад
how to identify data come from pin A0,A1 or A2? if we chose A0? please help
@NizarMohideen
@NizarMohideen 2 года назад
Pin B1 is connected to IN9. So I ticked IN9. If you want different pins tick IN1, IN2, IN3 …… and see which pin is highlighted.
@user-nk6ly8er2d
@user-nk6ly8er2d 3 года назад
Sir.. Y u not set RCC
@NizarMohideen
@NizarMohideen 3 года назад
I like this question. Short answer. This is a beginner video, I wanted to make it as simple as possible. Long Answer. STM32F103C8T6 has an internal clock which run at 8MHz. If we enable RCC, we can set the speed to different value up to maximum of 72MHz. The best part of STM32 and CubeIDE at least for me is very simple to learn an get started with many projects easily using HAL ( Hardware abstraction layer) and minimum settings. When the project uses more resources with many devices connected to it, we may need to optimise clock speed, interrupt, direct memory access. Also we can use low layer codes and direct register manipulation.
@daniel-lb4bh
@daniel-lb4bh Год назад
why you dont explain you just show some code
Далее
ADC in STM32 || Single Channel || Keil
16:08
Просмотров 33 тыс.
STM32 Bluepill parte 10: ADC DMA varios canales
15:15
Просмотров 4,8 тыс.
STM32 Guide #1: Your first STM32 dev board
12:12
Просмотров 205 тыс.
54. STM32CubeIDE Voltage Sensor with STM32F103C8T6
8:03