Skip to main content
Visitor II
July 1, 2018
Solved

PID regulation for DC motor using STM32F4

  • July 1, 2018
  • 1 reply
  • 1179 views
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
    This topic has been closed for replies.
    Best answer by chayma hajjem
    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.

    1 reply

    Technical Moderator
    July 2, 2018
    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

    chayma hajjemAuthorAnswer
    Visitor II
    July 4, 2018
    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.