Updated code: https://github.com/truglodite/Dehydrator
I decided to hack my Presto 6302 food dehydrator to control it with an Arduino 328p. The result is a smart dehydrator that uses a table of drying profiles (temperature and time) based on suggestions at printdry.com. The heater and fan are separately relay controlled, so the fan can run a little longer in holding mode after the heater turns off to prevent overheating of the appliance. In dry mode the temperature is controlled to the recommended drying temperature +- a hysterisis value, for the time recommended for the selected filament, and the fan is always on. After drying time has elapsed, it enters a holding mode, where humidity is controlled by hysterisis within +-1%, and the fan turns off when not needed. During holding mode the controller also makes sure the temperature does not exceed the holding temperature for the selected filament. The code makes use of #defines so you can customize almost every aspect of operation (max/min temps, hysterisis, edit the filament table...). There is also a hidden bootup mode (hold the select button until the splash screen shows) that allows the user to adjust temperature hysterisis to a value other than the one configured at compile time. This may be useful once in a while if you are doing something that requires tighter or looser tolerances on temperature. The LCD displays humidity, temperature, setpoints, and heater duty cycle % as appropriate depending on the mode it's in. The duty cycle in the code is just a factor used to calculate the timing of on/off events. That's the basics of the Arduino program ... the code has more details and comments (please at least read my wiring notes in the code... there for your safety).
I'll assume builders of this project meet the minimum requirements of being comfortable working with high voltage, as well as knowing how to get around designing and building a typical arduino based project (ie soldering, protoboards, wiring sensors/buttons/lcds, strain relief, separation from high voltage, 5V supply w/ filtering...).
The project makes use of the Presto 6302 dehydrator, however based on photos I suspect it will also fit other Presto models you typically find on Amazon (6300 & 6301). I chose the 6302 because it has a 600W heater and is similarly sized to the more expensive 6301. The 6300 has a significantly smaller heater that I thought might struggle to reach 70C (for Nylon). In my testing, the 6302 proved easily capable of holding 80C in a room of 18C ambient. It also has a thermal fuse near the heating element for safety.
The relay box is designed to accomodate 2 DAOKI brand relay boards I got from Amazon:
These have optoisolators and high voltage notching for safety, and work perfectly with the 5V output on the Arduino pro mini I used. I didn't take enough pictures probably, but the relay box lid is such a tight fit so I didn't need screws to secure it. In fact I had to cut off one of the outer tabs to get it to snap in. You will have to drill your dehydrator to pass wires the relay box. The box has a notch in front to fit a 1" grommet on the hole... may want to print first so you can line that hole up with the notch. The relay box is secured underneath the dehydrator using 2 of the original screws for the motor cover.
The controller box is designed to fit a standard 1602 lcd display and 6x6x5mm momentary NO tactile buttons like these:
I used an LCD with an i2c backpack, but you can use whatever else if you can edit the code. There is also plenty of room left for a pro-mini and a 5V bus board to distribute 5V to everything. I didn't provide mounts for these because with all the wiring the pro-mini can be securely tucked in on top of the buttons, and my diy bus board (with 1000uF and 0.1uF caps... trust me you will want these to filter motor & relay noise). I just heatshrinked the bus board and stuffed it over the LCD. Note that I'm not 100% pleased with the button mounts; the supports (from Cura) were placed between the button and switch, which made them sorta hard to remove for proper movement. I used pliers and an xacto blade to work them out to where I had enough movement to operate the switches. The controller box is held to the Dehydrator using 8-32 screws I had lying around. I just drilled/tapped the Dehydrator to match the control box, and cut the screws short enough so they wouldn't cause problems with the high voltage wiring on the other side of that plastic. As you can see in the pics, I also drilled a hole in the control box and glued in my 3mm indicator led (super glue).
I used a DHT11 sensor for humidity, and a Dallas sensor for temperature. The DHT11 can certainly be improved upon. Just edit the code to make use of whatever you like. I suggest placing the sensors near the middle of the drying enclosure. Placing them near the bottom you will get latent heat from the heating element after things turn off in holding mode. The sensors are basically on a small protoboard at the end of a piece of shielded 90C rated USB cable. The sensor wire passes through a grommet I installed on the grey bottom of the dehydrator base (you'll see how to route it near the original thermostat once it's open).
For a 5V supply, I just used an old bluetooth wallwart type headset charger I had lying around. You can use a USB supply or whatever as long as it has enough juice for the relays (~400mA for both). On the Presto 6302 there was a perfect spot next to the side hole in the relay box to mount my wallwart (ziptied to vent slots behind the original thermostat). To connect the wallwart to line voltage, I solder/heatshrinked some THHN 14awg wiring to the wallwart's outlet prongs, and fed it through the hole in the relay box. The 5V line passes through the relay box and in to the controller box, where I soldered it to my 5V bus board.
Have a look at the stock wiring in the dehydrator and determine what needs to be wired to where. I made notes on how I wired my relays in the code to help (14awg THHN is great for this). I used wire nuts to secure the THHN near the plug cord strain relief. I used electrical tape and zipties for additional security.
I hope someone finds this project fun and doable... please do share photos or comments here if you pull it off.
I uploaded a version 2 ino file, with the button delay shortened from 4sec to 1sec. Also the fan now stays on the whole time it is in drying mode. The continuous fan should get filaments dryer faster. I also haven't had any LCD corruption with the shorter delay (adding a bigger 5V line ripple capacitor helped a lot).
Uploaded version 3, which removes the button delay and adds an off mode. Tests without the delay worked fine now that my 5V supply has decent ripple capacitors. Boot up goes to off mode. Modes now follow the cycle: OFF - Filament Select - Dry - Holding - OFF...
So the phantom button presses persisted despite the strong input ripple capacitors I added. I noticed it mainly happened in holding mode when the motor turns off. So I figured it was a bad induced spike that was too much for the internal pullups to handle (about 30-50kOhm on arduinos). So instead of bringing back the code delays, I installed a set of 4k7 pullup resistors. This is a proper solution I put off due to the labor involved. Glad I got to it because there have been no problems since adding them.
The weather is starting to warm up where I live, and it is time for me to toss the PLA relay box and lid in the bin and replace them with ABS parts. Before doing so, I wanted to fix up some things. I uploaded version 2 stl files for the relay box and lid, with correct printing orientations, and no rectangular window where fingers could pry in to the relays.
Update 5-30-2019: Version 2!
I didn't like how the original buttons were designed on this thing. So I redesigned the control part with a 2 piece button mount design that have worked great on my more recent things. The part is much easier to print now, with only build plate supports required on the control box and no supports on the button mount. It's also easier to get a good gap for smooth button operation using the newer mount. Once you have the button gap set, melt down the posts to lock them in place... no hardware required! :D
Update 6-2-2019: RC Snubber
I had a few more "phantom button press" events, and decided to check it out on my oscope. Turns out the real problem was inductive transients when the fan relay turns off. The resulting voltage spike was more than enough to upset the uC. So I added an rc snubber in parallel to the motor lines (0.1uF+120ohm), which absorbs the transients and cures the problem reliably. Here is a good safe snubber for this purpose: