Close

Python GUI

A project log for Solder Reflow Hot Plate

Reflow solder PCBs with a temperature controlled hot plate

matt-dombroskiMatt Dombroski 07/07/2017 at 01:400 Comments

I've temporarily put the µC coding on hold due to problems with the SPI coding which I will get back to - so more details on the µC side later. In the meantime I have started coding the Python GUI for controlling the heater - in reality this is the meat of the program as the Python program will be computing the PID outputs and really doing all the heavy lifting.

For the GUI itself I am using PyQt5. The planned layout will perhaps look like something below (apologies for hand written diagram...) :

I already have a super basic window ready to go:

While underwhelming visually underneath the hood I have most of the groundwork ready for the program. For kicks I am using the multiprocessing() library to branch my program into a few different processes running concurrently. One process talks to the µC over a serial port, putting messages from the µC to a Queue and taking messages the PID wants to send from another Queue and sending them over the serial port. The PID runs in another process, receiving messages from the serial process and processing them into a new PID duty cycle output. It will also generate any other messages and processing necessary to control the hotplate. I really shouldn't be calling this process 'PID', controller would be more apt. Maybe I will change that in the code soon. Finally the GUI runs in a process showing the data and commands being sent around and getting user input, along with controlling the overall state of the system.

Hopefully over the weekend I will get more time to develop the GUI into something more fleshed out.

In addition, I just received an ATEMEL-ICE debugger. Hopefully this will give me a more in-depth look into what is going on inside the SPI bus.

Discussions