It's not a matter of the libraries ... all the sensors work perfectly. It's a matter of implementing the PID algorithm correctly.@jojo monkey Now I feel stupid; I'll pick some up. Regarding the SSR, for now I'm trying to get as close as possible to the HexNail design for the sake of people who currently own the device. Making a better design is further down the road for me, but anyone else is welcome to pick it up. In regard to PCB mounts, pins are easy to add and dupont connectors are great. Right now I'm running almost everything through a breadboard; minimal wires. But yea, I agree that something with more integrity should be used once we're situated.
@JCat Did you try the official libraries from your controller manufacturer? One of the reasons I chose to get the Adafruit implementation of the 31856 is because they have a full and well-documented library for it. In regard to the in-between feature, that's exactly what hexnaild does. Additional factors are used to change interaction with the hardware. If that weren't the case, there would be no reason to have the SBC in the first place other than for graphical display and remote control. Not that that's a bad thing though; your suggestion to use a reputable controller such as from Omron and control it separately is definitely something to consider.
I'm very interested in what you have so far if you were willing to share with us. What were the shortcomings you noticed with the libraries you've used? Which have you used? Only official? Only community-lead? Considering how far SBCs have come as a separate platform from Arduino, I find it hard to believe that there still isn't a suitable solution. I will say that my HN-02 does a fantastic job of regulating temperature and doing programmed up/downtemps, regardless of the accuracy of the reported temperature.
I'm not sure if you have access to a HexNail image or not, but many python parts in /opt/enail/ are not compiled. The only reason I haven't uploaded them anywhere yet is because it is not licensed.
The basic PID algorithm (from a calculus textbook) is essentially what the ArduPID library is (I've ported it to typescript as I don't want to work in python or C++! lol). I've also gone through C++ PID implementations, and read some textbooks; to implement basic PID is simple, to implement high quality PID where you minimize overshoot and undershoot (especially if using something like a D-Nail Halo setup w/ low thermal mass) is not simple at all. The Omron E5CC algorithm's are where that magic lies. I don't think it's a matter of the hardware being unable to keep up (although it might be in which case you would want to interface with an Arduino board of some sort to do the real time PID and communicate to it using the Pi), I think it's the software/algorithm implementation.
If someone that has extensive experience implementing PID algorithms could lend a hand, then we might be able to get this library to a state where it is close to as good as the Omron ... however, my initial trials I didn't even get it quite as good as the cheap Chinese PIDs
This is inline with what other have said in the HexNail thread though ... it was never superb at PID control, just feature rich; so depending on the nail you are using, it could actually be really bad at PID control ...
There are other considerations as well ...
- if we use the Pi to do the PID, and anything goes wrong (ie. something freezes/crashes in the software), the relay could be left "stuck" in an "on" state which would lead to the temp climbing to unsafe levels and the heater never turning off (running your nail, possibly a fire hazard).
- the 1st backup to this is to have a 2nd service running on the Pi to manage this, so if the main service crashes, the 2nd is monitoring the temp and shuts off the heater coil
- that being said, even with this backup, if the whole OS crashes at the wrong time, this danger is still there (and significant)
- in other words, with just the Pi to control it, it is DEFINITELY not safe for unattended operation.
- having the actual hardware PID there in between the 2 solves this danger
So ... from a safety perspective, as well as from a quality/performance perspective, that's why I abandoned this and have instead gone down the other path (ie. enhanced Omron E5CC ... my first version is just an "in-between" box for proof of concept more than anything else .. however, my next version will be with the Omron E5CC w/ RS-485)
I don't mind releasing the code for this like I said, it's actually on GitHub, but is a mess now as I abandoned it half-way into the Bluetooth implementation for the actual enail controller. For the enail magic I actually implemented the mobile app w/ Bluetooth connectivity ... although you can just run/monitor the profiles so far from the app ... you can't create/edit them)
I'm not sure the exact direction I am heading with the overall project ... I know I can't use my enail without enail Magic any longer now that I have it to run "scripts" for up-temps etc ... I may make a full enail controller for resale, or I may just make kits with open source (for non-commercial) licensing.
Once I get to the point of having a working prototype that I've been using for a while of the whole product, then I might make some others available for testing depending on interest and where other similar products are at ....
If the MaxVapor enail has similar features, might not be worth the time I would invest ...
Edit: One other comment as well ... there are lots of PID libraries to implement brewing systems, where it has to keep a tank of liquid at a stable temp ... this is MUCH different then controlling the temp on an e-nail ... this has a large thermal mass and response time is slow ... much different than an enail ...
Last edited: