How to Implement PID Control on STM32F4 to Maintain 1500 RPM for an ECU?

Hey guys, working on a project in which I have used STM32F4 to control an old ECU (which intended to be maintained at 1500 RPM) I'm planning to use PID control to maintain the fuel actuator so that it will maintain 1500 RPM, can anyone guide me in this?? @MCU, MPU & Firmware
Solution:
Yes I have, in a few context as well. You are likely controlling your actuator with something like a pwm and you have some sort of sensor telling you how many RPM you are doing maybe some encoder setup. Once you habe those you can implment your PID control loop in your main loop or the thread that's doing this.
Jump to solution
9 Replies
ZacckOsiemo
ZacckOsiemo2mo ago
this should be fun you basically need to implement a control system with some feedback. In it
Mr_UJ 🔋
Mr_UJ 🔋2mo ago
Yes, have you done something similar to this??
Solution
ZacckOsiemo
ZacckOsiemo2mo ago
Yes I have, in a few context as well. You are likely controlling your actuator with something like a pwm and you have some sort of sensor telling you how many RPM you are doing maybe some encoder setup. Once you habe those you can implment your PID control loop in your main loop or the thread that's doing this.
ZacckOsiemo
ZacckOsiemo2mo ago
Do you need more of a hand in this?
techielew
techielew2mo ago
@Mr_UJ 🔋 FYI your thread continues here
Mr_UJ 🔋
Mr_UJ 🔋2mo ago
Thanks Yes, what i have done till now: 1- interfaced Hall effect RPM sensor to measure rpm. 2- interfaced actuator position potentiometer I want to know is this approach to use PID to control engine RPM is feasible or any other technique can be more useful in this The main issue with PID is to tune the gains as the engine model is unknown
ZacckOsiemo
ZacckOsiemo2mo ago
If you have the measured_rpm then you can now build out your PID algorithm. Have you implmented that before?
Mr_UJ 🔋
Mr_UJ 🔋2mo ago
Yes, but only with simulation on Matlab How the tuning part is done on actual system? that will make system fairly stable in presence of disturbance.
ZacckOsiemo
ZacckOsiemo2mo ago
By software, meaning by you You would just need to implement the PID control loop and run it at an interval that works for you?
Want results from more Discord servers?
Add your server
More Posts
how are local variables declared within the ISR handled?Hi @Middleware & OS , When using FreeRTOS each thread has its own stack space it is dedicated to. Show can I connect a PIR motion sensor running on a RPi with Ubuntu Core to AWS IoT Greengrass?@Middleware & OS Hey guys, how can I connect a PIR motion sensor running on a Raspberry Pi with UbuCan anyone recommend recent resources for understanding TPM on ARM-based embedded Linux?Hey guys @Middleware & OS I want to learn about using TPM in embedded Linux on ARM for secure boot, FreeRTOS vs. Zephyr: Which is Better for ARM Cortex-M in Terms of Performance, Memory, and Support?Good PM guys, I'm building an embedded system with an ARM Cortex-M processor and considering open-sAre there any known issues with FreeRTOS+Sockets API and the latest STM32CubeMX HAL for the H7 serie@Middleware & OS I'm encountering random lockups, while using the FreeRTOS+Sockets API with the laHow different is programming with an RTOS compared to traditional bare-metal coding on an AVR?Hey guys, I'm getting comfortable with basic AVR projects using I/O pins. I recently came across thHow can I create a binary file that can run in an empty VM?Good day guys, I wrote a simple program for FreeRTOS that implements a timer. I want to run this proAny guides on what exactly I can try to retain my ip?@Middleware & OS Hey guys, am trying to retain and Configure a static IP address on Embedded Linux what is the most accurate way in FreeRTOS to convert tick counts to milliseconds?hey guys, I'm working on an embedded system running FreeRTOS on an ARM Cortex-M4 microcontroller cloI would like a guide or documentation on how can i install the flipper zero project into Rpi 3Hey guys am trying to install the flipper zero project into an embedded Linux system (Raspberry pi 3