cancel
Showing results for 
Search instead for 
Did you mean: 

PID regulation for DC motor using STM32F4

chayma hajjem
Associate II
Posted on July 02, 2018 at 00:39

Hello ST community ,

I am Chayma a student of electrical engineering in national school of engineering of tunis . I am doing currently my Internship about DC motor PID regulation using STM32F407VG

The project of the internship is about PID regulation of the acceleration (position or velocity) of a DC motor using the accelerometer sensor (LIS302DL) existing in the STM32F407VG

Actuallay i stuck in how can i developpe a code that can do it especially the link between duty cycle and the regulated value of acceleration.

I really need a quick help.

thank you ,

Best regards.

#duty-cycle #dc-motor #accelerometer-lis302dl #stm32f4 #acceleration #stm32f407vg #pid
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on July 04, 2018 at 10:36

hello Imen ,

thank you for your response but actually i am using Coocox CoIDE and i should code with it .

I want to know how can i link between PWM PID and accelerometer.

Thank you ,

 best regards.

View solution in original post

2 REPLIES 2
Imen.D
ST Employee
Posted on July 02, 2018 at 17:17

Hello

chayma.hajjem

 ,

Inside

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fweb%2Fen%2Fcatalog%2Ftools%2FPF259243%23

firmware package, there is an example using the

LIS302DL 

MEMS accelerometer.

T

he 

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fweb%2Fen%2Fcatalog%2Ftools%2FPF259243%23

offers the BSP appropriate drivers and the

LIS302DL 

accelerometer component that can help you to develop your application:
  • STM32Cube_FW_F4_V1.21.0\Drivers\BSP\Components\lis302dl\lis302dl.c (.h)
  • STM32Cube_FW_F4_V1.21.0

    \Drivers\BSP\STM32F4-Discovery\stm32f4_discovery_accelerometer.c (.h)

Its a good starting point to learn about programming and using functions and make your project with STM32CubeF4.

With Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on July 04, 2018 at 10:36

hello Imen ,

thank you for your response but actually i am using Coocox CoIDE and i should code with it .

I want to know how can i link between PWM PID and accelerometer.

Thank you ,

 best regards.