Home

Awesome

STM32 PLC

a

This project is a PCB bord that has the following measurement and control input/output:

Protection

Documentation

The documentation for the pin map can be found in the Documentation folder. Also all the article numbers for each component can be found in at the DAC ADC PWM IO.sch file in the PCB folder. Just double click on a PCB symbol and see the Mouser Electronics article number of the electrical component.

Calibration

Yes, it's possible to set the calibration to each input in this project. You need to have the ILI9341 touch LCD with SPI bus. Open the STM32 PLC Pinouts.pdf and see the connection for the LCD. You can also set the PWM frequency and analog input gain for the ADC and Differential ADC at 16-bit.

SAE J1939

The STM32 PLC has internal SAE J1939 protocol. Made from Open-SAE-J1939 repository.

OpenSourceLogger

This is a QT C++ software that you can connect to your STM32 PLC board via the USB and then you can send signals from OpenSourceLogger and recieve signals. OpenSourceLogger is a very easy to use logging and controlling software and it stores data at a SQL server.

GoobySoft

This is a ImGui C++ project that do the same as OpenSourceLogger, but it's much better and have more features. The reason why I moved away from QT C++ to ImGui C++ is because it's much easier to write a GUI application in C++ by using ImGui instead of QT. With QT, you are stuck with object oriented programming. Everything is a class. But for ImGui, you can choose which type of lever you want to code, I prefer C-style C++ code with a small dose of object oriented programming (if needed).

Consider that I will work on GoobySoft instead of OpenSourceLogger.

Program

The STM32 PLC has a lot of functions you can select by touching the LCD.

How to build this STM32 PLC

  1. Download this repository
  2. Download & Install KiCad
  3. Open the PCB folder and open the .pro file with KiCAD and greate a gerber file of your own choice
  4. Go to your PCB manufacturer and give them the gerber file and let them produce the board for you
  5. Order the eletrical components from Mouser Electronics
  6. Once you have the eletrical components and your PCB board, it's time to solder them.
  7. Once the PCB board is finished, then install STM32CubeIDE
  8. Open the Code project and import the .ioc project file using STM32CubeIDE
  9. Flash the board with the C code by using ST-Link V2 connection
  10. Connect the ILI9431 touch LCD and then you are done!

Software used

Status of the project

It's done. I don't plan to update this project. Everything is working and it will remain that way.