【E2292】STM32F746用于PID控制的嵌入式图形界面

2021-11-18 13:07:29      索炜达电子      850     

项目编号:E2292

文件大小:22M

源码说明:带中文注释

开发环境:C编译器

简要概述:

用于PID控制的嵌入式图形界面

该项目实现了一个用于PID控制的嵌入式图形界面。


介绍

该项目背后的想法是允许用户从一个简单的图形界面使用PID(比例-积分-微分)控制系统控制速度电机。

本项目使用微控制器平台(STM32)实现直流电机控制的实际PID控制。使用意法半导体公司的STM32F746g发现板进行开发


图形界面

第一个屏幕包含更新/清除PID变量和设定点的按钮和控件

【E2292】STM32F746用于PID控制的嵌入式图形界面

第二个屏幕包含两个小部件,用于监控输入和输出系统值、mosfet驱动器的PWM占空比和RPM

【E2292】STM32F746用于PID控制的嵌入式图形界面

第三个屏幕包含显示数据的图形

【E2292】STM32F746用于PID控制的嵌入式图形界面

依赖关系

Software

To build this project you need:

-A PC host runing GNU/Linux

-Toolchain arm-none-gnueabi-gcc for arm cortex M microcontrollers

-Make tool to use Makefile

-Library LVGL (up to 7.0)

-OpenOCD tool for build/debug firmware

-STM32CubeMX to change peripheral

-CMSIS DSP to PID control


Hardware

To run this project you need

-Devboard STM32F746g-Discovery

-DC motor 200RPM 3-6V,

-Driver Mosfet Irf 520

-RPM sensor (based on LM393)

-Encoder disc 20 steps

-Low pass filter


电路图

【E2292】STM32F746用于PID控制的嵌入式图形界面

目录│文件列表:

 └ pid-stm32f746-main

    │ .cproject

    │ .mxproject

    │ .project

    │ compile.conf

    │ Makefile

    │ pid-gui-screen-graph.png

    │ pid-gui-screen-monitor.png

    │ pid-gui-screen-param.png

    │ pid-stm32f746.ioc

    │ startup_stm32f746xx.s

    │ stm32-pid-diagram.png

    │ STM32F746NGHx_FLASH.ld

    │ STM32F7x6.svd

    ├ app

    │  │ app.c

    │  │ app.h

    │  ├ drivers

    │  │  ├ analog

    │  │  │  │ analog.c

    │  │  │  └ analog.h

    │  │  ├ tft

    │  │  │  │ tft.c

    │  │  │  └ tft.h

    │  │  └ touchpad

    │  │     │ touchpad.c

    │  │     └ touchpad.h

    │  ├ gui

    │  │  │ gui_app.c

    │  │  │ gui_app.h

    │  │  │ gui_widgets.c

    │  │  │ gui_widgets.h

    │  │  ├ components

    │  │  │  │ gui_chart.c

    │  │  │  │ gui_chart.h

    │  │  │  │ gui_gauge.c

    │  │  │  │ gui_gauge.h

    │  │  │  │ gui_param.c

    │  │  │  │ gui_param.h

    │  │  │  │ gui_slider.c

    │  │  │  │ gui_spinbox.c

    │  │  │  └ gui_spinbox.h

    │  │  └ lvgl

    │  │     │ CHANGELOG.md

    │  │     │ library.json

    │  │     │ LICENCE.txt

    │  │     │ lvgl.h

    │  │     │ lvgl.mk

    │  │     │ lv_conf.h

    │  │     │ lv_conf_template.h

    │  │     │ lv_ex_conf.h

    │  │     │ README.md

    │  │     ├ docs

    │  │     │  │ CODE_OF_CONDUCT.md

    │  │     │  │ CODING_STYLE.md

    │  │     │  └ CONTRIBUTING.md

    │  │     ├ porting

    │  │     │  │ lv_port_disp_template.c

    │  │     │  │ lv_port_disp_template.h

    │  │     │  │ lv_port_fs_template.c

    │  │     │  │ lv_port_fs_template.h

    │  │     │  │ lv_port_indev_template.c

    │  │     │  └ lv_port_indev_template.h

    │  │     ├ scripts

    │  │     │  │ code-format.cfg

    │  │     │  │ code-format.sh

    │  │     │  │ cppcheck_run.sh

    │  │     │  │ Doxyfile

    │  │     │  │ infer_run.sh

    │  │     │  │ lv_conf_checker.py

    │  │     │  │ release.py

    │  │     │  └ built_in_font

    │  │     │     │ built_in_font_gen.py

    │  │     │     │ DejaVuSans.ttf

    │  │     │     │ FontAwesome5-Solid+Brands+Regular.woff

    │  │     │     │ generate_all.py

    │  │     │     │ Montserrat-Medium.ttf

    │  │     │     └ SimSun.woff

    │  │     ├ src

    │  │     │  │ lv_api_map.h

    │  │     │  │ lv_conf_internal.h

    │  │     │  ├ lv_core

    │  │     │  │  │ lv_core.mk

    │  │     │  │  │ lv_disp.c

    │  │     │  │  │ lv_disp.h

    │  │     │  │  │ lv_group.c

    │  │     │  │  │ lv_group.h

    │  │     │  │  │ lv_indev.c

    │  │     │  │  │ lv_indev.h

    │  │     │  │  │ lv_obj.c

    │  │     │  │  │ lv_obj.h

    │  │     │  │  │ lv_obj_style_dec.h

    │  │     │  │  │ lv_refr.c

    │  │     │  │  │ lv_refr.h

    │  │     │  │  │ lv_style.c

    │  │     │  │  └ lv_style.h

    │  │     │  ├ lv_draw

    │  │     │  │  │ lv_draw.h

    │  │     │  │  │ lv_draw.mk

    │  │     │  │  │ lv_draw_arc.c

    │  │     │  │  │ lv_draw_arc.h

    │  │     │  │  │ lv_draw_blend.c

    │  │     │  │  │ lv_draw_blend.h

    │  │     │  │  │ lv_draw_img.c

    │  │     │  │  │ lv_draw_img.h

    │  │     │  │  │ lv_draw_label.c

    │  │     │  │  │ lv_draw_label.h

    │  │     │  │  │ lv_draw_line.c

    │  │     │  │  │ lv_draw_line.h

    │  │     │  │  │ lv_draw_mask.c

    │  │     │  │  │ lv_draw_mask.h

    │  │     │  │  │ lv_draw_rect.c

    │  │     │  │  │ lv_draw_rect.h

    │  │     │  │  │ lv_draw_triangle.c

    │  │     │  │  │ lv_draw_triangle.h

    │  │     │  │  │ lv_img_buf.c

    │  │     │  │  │ lv_img_buf.h

    │  │     │  │  │ lv_img_cache.c

    │  │     │  │  │ lv_img_cache.h

    │  │     │  │  │ lv_img_decoder.c

    │  │     │  │  └ lv_img_decoder.h

    │  │     │  ├ lv_font

    │  │     │  │  │ lv_font.c

    │  │     │  │  │ lv_font.h

    │  │     │  │  │ lv_font.mk

    │  │     │  │  │ lv_font_dejavu_16_persian_hebrew.c

    │  │     │  │  │ lv_font_fmt_txt.c

    │  │     │  │  │ lv_font_fmt_txt.h

    │  │     │  │  │ lv_font_montserrat_12.c

    │  │     │  │  │ lv_font_montserrat_12_subpx.c

    │  │     │  │  │ lv_font_montserrat_14.c

    │  │     │  │  │ lv_font_montserrat_16.c

    │  │     │  │  │ lv_font_montserrat_18.c

    │  │     │  │  │ lv_font_montserrat_20.c

    │  │     │  │  │ lv_font_montserrat_22.c

    │  │     │  │  │ lv_font_montserrat_24.c

    │  │     │  │  │ lv_font_montserrat_26.c

    │  │     │  │  │ lv_font_montserrat_28.c

    │  │     │  │  │ lv_font_montserrat_28_compressed.c

    │  │     │  │  │ lv_font_montserrat_30.c

    │  │     │  │  │ lv_font_montserrat_32.c

    │  │     │  │  │ lv_font_montserrat_34.c

    │  │     │  │  │ lv_font_montserrat_36.c

    │  │     │  │  │ lv_font_montserrat_38.c

    │  │     │  │  │ lv_font_montserrat_40.c

    │  │     │  │  │ lv_font_montserrat_42.c

    │  │     │  │  │ lv_font_montserrat_44.c

    │  │     │  │  │ lv_font_montserrat_46.c

    │  │     │  │  │ lv_font_montserrat_48.c

    │  │     │  │  │ lv_font_simsun_16_cjk.c

    │  │     │  │  │ lv_font_unscii_8.c

    │  │     │  │  └ lv_symbol_def.h

    │  │     │  ├ lv_gpu

    │  │     │  │  │ lv_gpu.mk

    │  │     │  │  │ lv_gpu_stm32_dma2d.c

    │  │     │  │  └ lv_gpu_stm32_dma2d.h

    │  │     │  ├ lv_hal

    │  │     │  │  │ lv_hal.h

    │  │     │  │  │ lv_hal.mk

    │  │     │  │  │ lv_hal_disp.c

    │  │     │  │  │ lv_hal_disp.h

    │  │     │  │  │ lv_hal_indev.c

    │  │     │  │  │ lv_hal_indev.h

    │  │     │  │  │ lv_hal_tick.c

    │  │     │  │  └ lv_hal_tick.h

    │  │     │  ├ lv_misc

    │  │     │  │  │ lv_anim.c

    │  │     │  │  │ lv_anim.h

    │  │     │  │  │ lv_area.c

    │  │     │  │  │ lv_area.h

    │  │     │  │  │ lv_async.c

    │  │     │  │  │ lv_async.h

    │  │     │  │  │ lv_bidi.c

    │  │     │  │  │ lv_bidi.h

    │  │     │  │  │ lv_color.c

    │  │     │  │  │ lv_color.h

    │  │     │  │  │ lv_debug.c

    │  │     │  │  │ lv_debug.h

    │  │     │  │  │ lv_fs.c

    │  │     │  │  │ lv_fs.h

    │  │     │  │  │ lv_gc.c

    │  │     │  │  │ lv_gc.h

    │  │     │  │  │ lv_ll.c

    │  │     │  │  │ lv_ll.h

    │  │     │  │  │ lv_log.c

    │  │     │  │  │ lv_log.h

    │  │     │  │  │ lv_math.c

    │  │     │  │  │ lv_math.h

    │  │     │  │  │ lv_mem.c

    │  │     │  │  │ lv_mem.h

    │  │     │  │  │ lv_misc.mk

    │  │     │  │  │ lv_printf.c

    │  │     │  │  │ lv_printf.h

    │  │     │  │  │ lv_task.c

    │  │     │  │  │ lv_task.h

    │  │     │  │  │ lv_templ.c

    │  │     │  │  │ lv_templ.h

    │  │     │  │  │ lv_txt.c

    │  │     │  │  │ lv_txt.h

    │  │     │  │  │ lv_txt_ap.c

    │  │     │  │  │ lv_txt_ap.h

    │  │     │  │  │ lv_types.h

    │  │     │  │  │ lv_utils.c

    │  │     │  │  └ lv_utils.h

    │  │     │  ├ lv_themes

    │  │     │  │  │ lv_theme.c

    │  │     │  │  │ lv_theme.h

    │  │     │  │  │ lv_themes.mk

    │  │     │  │  │ lv_theme_empty.c

    │  │     │  │  │ lv_theme_empty.h

    │  │     │  │  │ lv_theme_material.c

    │  │     │  │  │ lv_theme_material.h

    │  │     │  │  │ lv_theme_mono.c

    │  │     │  │  │ lv_theme_mono.h

    │  │     │  │  │ lv_theme_template.c

    │  │     │  │  └ lv_theme_template.h

    │  │     │  └ lv_widgets

    │  │     │     │ lv_arc.c

    │  │     │     │ lv_arc.h

    │  │     │     │ lv_bar.c

    │  │     │     │ lv_bar.h

    │  │     │     │ lv_btn.c

    │  │     │     │ lv_btn.h

    │  │     │     │ lv_btnmatrix.c

    │  │     │     │ lv_btnmatrix.h

    │  │     │     │ lv_calendar.c

    │  │     │     │ lv_calendar.h

    │  │     │     │ lv_canvas.c

    │  │     │     │ lv_canvas.h

    │  │     │     │ lv_chart.c

    │  │     │     │ lv_chart.h

    │  │     │     │ lv_checkbox.c

    │  │     │     │ lv_checkbox.h

    │  │     │     │ lv_cont.c

    │  │     │     │ lv_cont.h

    │  │     │     │ lv_cpicker.c

    │  │     │     │ lv_cpicker.h

    │  │     │     │ lv_dropdown.c

    │  │     │     │ lv_dropdown.h

    │  │     │     │ lv_gauge.c

    │  │     │     │ lv_gauge.h

    │  │     │     │ lv_img.c

    │  │     │     │ lv_img.h

    │  │     │     │ lv_imgbtn.c

    │  │     │     │ lv_imgbtn.h

    │  │     │     │ lv_keyboard.c

    │  │     │     │ lv_keyboard.h

    │  │     │     │ lv_label.c

    │  │     │     │ lv_label.h

    │  │     │     │ lv_led.c

    │  │     │     │ lv_led.h

    │  │     │     │ lv_line.c

    │  │     │     │ lv_line.h

    │  │     │     │ lv_linemeter.c

    │  │     │     │ lv_linemeter.h

    │  │     │     │ lv_list.c

    │  │     │     │ lv_list.h

    │  │     │     │ lv_msgbox.c

    │  │     │     │ lv_msgbox.h

    │  │     │     │ lv_objmask.c

    │  │     │     │ lv_objmask.h

    │  │     │     │ lv_objx_templ.c

    │  │     │     │ lv_objx_templ.h

    │  │     │     │ lv_page.c

    │  │     │     │ lv_page.h

    │  │     │     │ lv_roller.c

    │  │     │     │ lv_roller.h

    │  │     │     │ lv_slider.c

    │  │     │     │ lv_slider.h

    │  │     │     │ lv_spinbox.c

    │  │     │     │ lv_spinbox.h

    │  │     │     │ lv_spinner.c

    │  │     │     │ lv_spinner.h

    │  │     │     │ lv_switch.c

    │  │     │     │ lv_switch.h

    │  │     │     │ lv_table.c

    │  │     │     │ lv_table.h

    │  │     │     │ lv_tabview.c

    │  │     │     │ lv_tabview.h

    │  │     │     │ lv_textarea.c

    │  │     │     │ lv_textarea.h

    │  │     │     │ lv_tileview.c

    │  │     │     │ lv_tileview.h

    │  │     │     │ lv_widgets.mk

    │  │     │     │ lv_win.c

TAGPID
  • 2 次
  • 5 分