Week 11 (24 – 30 August)

This week, Zhen Xuan planned out the logic trees for Codesys.

We agreed that we would have an on/off switch for the water pump and Peltier modules, with the fan control being independent. This was to allow for the model to start running and for the air inside the set-up to cool before the cooled air was dispelled through the cold side fans. As such, the temperature logic tree required the switch and a set temperature range when starting. He connected the DS18B20 temperature sensor to obtain a variable for measuring real-time temperature and created a global variable Temp_set to allow the user to set their desired temperature. Controlling the fan requires a separate logic tree, which is split into 3 settings that can vary the voltage and current supplied to the fans.

Fig. 1: Circuitry components needed for preliminary testing of Codesys code

With the bulk of the coding out of the way, Zhen Xuan set up the visualisation page using the Raspberry Pi, which is connected to one of the monitors at the workstation. The visualisation page includes a temperature dial, temperature meter display, an on/off switch, fan speed dial and a light to indicate whether the Peltiers are functioning. We conducted a dry run to test if the basic visualisation works. To our great joy (and relief), the basic visualisation was functioning.

While coding, Zhen Xuan ran into multiple problems due the lack of familiarity with the programming language and platform, but over time became more adept at Codesys through the research done. He found that programming was difficult and often frustrating, but with the lab seniors’ encouragement and advice, our code finally works!

Leave a Reply

Your email address will not be published. Required fields are marked *