To test some of the logic in the process code, I am building a testing module that will allow me to simulate temperature changes and pressure changes. I have already confirmed the transducers are all working as planned. But now I need to run through scenarios on the bench.
Blog about the science, calculations, design and build of a freeze dryer from commonly available components.
Featured Post
Wednesday, September 22, 2021
Quad Relay Library improvements
I redesigned the QR library to be easier to manage. I converted the relay control portion into its own class that is wrapped in the QR class. This allows one piece of code to be instantiated for all 4 relays. If modifications or features are added, this will allow them to be deployed in one location instead of 4. It also allows the library to be easily expanded in the event the Quad Relay module is expanded to 8 relays in the future.
In addition to all of this, it makes a large portion of the code re-usable in memory. This makes the program smaller.
Tuesday, September 14, 2021
Added Logging Improvements
Added temp and pressure units to the data log. This was necessary in order to track changes to temperature and pressure options. Otherwise changes in pressure units would appear to be anomalies in the data log.
I also improved the Log Library by adding the ability to write custom log headers to the log file at run-time.
Monday, September 13, 2021
HDI Updated to Include Dynamic Temperature Unit Conversion
I added the ability for the HDI to dynamically switch between temperature units.
I updated my MCP9600 library to deal with temperature unit symbology, too.
The library now supports C, F, K, and R temperature scales.
HDI Updated to Include Dynamic Pressure Unit Conversion
I have added the ability to dynamically convert the display between different pressure units. The HDI currently uses Pa, kPa, and psi. But my MPR library supports several other pressure units, including Pa, kPa, psi, atmospheres (both standard and technical) Torr, Bar, Bayre, inHg, mmHg, inH2O, mmH2O and others.
I added a Temperature unit symbology to the library, too. This allows you to fetch the symbol for the the pressure you are using by function call.
Since I am using an absolute pressure transducer, I can easily convert between pressure units by a simple calculation using the conversion factors of the source unit and the target unit.
Sunday, September 5, 2021
24 Hours with no Error
Both pressure and temperature errata appears to be fixed. Data collected every second for 24 hours has no sign of errata.
Saturday, September 4, 2021
Long-term Testing on Temperature and Pressure Errata
Testing has began to see if temperature and pressure errata is resolved.
Pressure Errata Resolved
The pressure transducer had an issue similar to the temperature transducer. Once again, the errata was a specific number being returned, so it could be easily filtered out.
Pressure Accuracy Confirmation
I was able to confirm the accuracy of the MPR pressure transducer.
I had a concern that it was not matching official barometric pressure readings for this area. I found that the official measurements are always adjusted for temperature and altitude. Effectively, official measurements are what the barometric pressure would be if the measurement was taken at 32F (0C) at sea level.
Once I discovered this, I found the official "station" measurements and found the MPR device is reading accurate to 100 Pa, or about 0.1%. That is pretty good for a $20 pressure transducer.
Pressure Errata Realized
While troubleshooting the temperature errata, I discovered a similar issue with the pressure readings. Once in a while, I will get a bogus pressure reading. I have began a logging operation in an attempt to locate the issue.
Temperature Errata Resolved
I believe the temperature errata has been resolved. The MCP9600 apparently has a glitch that causes it to return a full-scale reading once in a while. I checked the data-ready flag processing etc. and found no issues. Finally (using the new LogFile library) I was able to isolate the problem. The raw data was coming from the MCP9600 incorrectly.
I was able to confirm that others were having this same issue. So, I had to resolve the issue in software. Fortunately, the errant data was uniform and I was able to filter out that particular value. If that particular value is returned from the MCP9600, I simply poll it again for new data.
This will need to be monitored in a long-term test, but I am confident it is resolved.
Friday, August 27, 2021
Constructed Log File Management Library (C++)
To track progress of the required metrics of the freezedrying process,I needed a logging library.
Initially it was made to track events and times, but I decided to expand it to use the high-precision clock in the crono library. This adds the ability to not only perform event logging functions, but also high-precision scientific data logging
The library will record elapsed time accurate to the nano-second, if your hardware is capable of such precision. If your hardware is not capable of nanosecond precision, the library will automatically adjust to the highest precision the hardware is capable of.
Friday, August 20, 2021
Wednesday, August 18, 2021
Trying to Resolve Temperature Errata
Occasionally, temperature readings will spike. This is most likely due to reading the Hot Junction register before ADC is completed. The native library does not have a means to handle this, so I am collaborating with the designer of the thermocouple amplifier to develop or repair the native library to prevent the errata.
Tuesday, August 17, 2021
Duty Cycle Programming Complete
The duty-cycle routines have been written and tested.
Now, the relay library includes functions to turn the relays on and off as well as functions to control the duty cycle of the device controlled by the relay.
For instance, I do not want to have to constantly check and see if the compressor is being ran too much. With the duty cycle routines, I can program the duty cycle for 90 seconds on and 90 seconds off. All the main routine needs to do is call for service. The relay will immediately turn on for 90 seconds, then turn off for 90 seconds. If the main program is still calling for service, the relay will turn on for 90 more seconds.
The duty cycle is completely driven by event handlers and timers. So the main loop does not need to check the duty cycle times or anything like that.
Monday, July 19, 2021
Duty Cycle Library Development Started
I have begun writing a library that allows me to regulate parts of the freezedryer according to a programmable duty cycle.
Several aspects of the freezeDryer need a duty-cycle for achieving its goal. For instance, the compressor cannot run continuously as it tries to reach the extreme temperatures required for the trap. For instance, the compressor will run for a period of time, then it will need to stop for a period of time in order to cool down.
This library will allow me to "call" for cooling. The library will then cycle the compressor on its own until I stop calling for cooling.
Sunday, June 27, 2021
Second Relay Array Ordered
I have ordered a second relay array. I decided to order it because it will help facilitate a second stage cooling unit to be added without having to wait for it to arrive.
There are several aspects of the Freeze Dryer that needs to be controlled by relays.
The compressor needs to be cycled in order to keep it from overheating.
The compressor fan needs to be cycled independent of the compressor. If the compressor is off, the fan may still need to be on in order to continue removing heat from the condenser coil.
The fan in the trap needs to be cycled.
The fan in the chamber needs to be cycled
The compressor needs to be cycled
The second stage cooling system may not be needed, but if it is, it will need a relay.
Wednesday, June 9, 2021
Process Control Logic Framework Constructed
Framework for processing logic has been created.
Process indicators are updating based on sensor feedback.
Monday, May 24, 2021
Sunday, May 23, 2021
Log Graphing Added
Added the ability to scale the graph to logarithmic functions. This allows extremely large scales to be plotted in smaller areas.
This can be expanded to create log-linear and log-log graphs.