iDRY Vacuum Kilns

Sponsors:

Kiln temp and humidity logger using the Raspberry Pi platform

Started by btulloh, December 31, 2017, 02:05:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

btulloh

Well, I've gotten started on this thing.  Got the stuff in yesterday.   I can blame ChugiakTinkerer for stirring up trouble.  I hope he gets started on his so we can compare notes.  The weather here is cold and nasty and expected to be like that for at least a week, so this is a good time to work on it.

It looks like the RPi is a good platform to build this around, since the new version already has WiFi and Bluetooth built in.  It does not do A/D conversion, but there are plenty of sensors around with digital I/O.  This thing is more capable than I knew before I got into it a little bit.  It's a lot more than a microcontroller such as the Arduino.  The processor is similar to (or the same as) what's used in some tablets.  Hook a display and a keyboard up to it and it's pretty functional right out of the box once you create a bootable SD card for it.

To start with, I'm using four RTH22 temp and humidity sensors.  They are cheap, but they are not going to be robust enough for long-term duty in a kiln environment.  There are more appropriate sensors available, but these will work for now.

So far the RPi is connected to my wifi and running the GUI that is designed for it.  I also have an app called Cayenne running on my cell phone that is designed as a remote desktop for the Pi and this is working.  (It took some fiddling since my primary wifi network is running a second router set for bridge mode.)

So far I've been able to get one of the sensors wired up and some simple code done to read the temp and humidity on command, so that's a step in the right direction.

My objective is to use three t & h sensors - two inside the kiln and one outside - to log data on a regular interval.  These can also be checked at any time to see what's going on at that moment.  Just for fun I think I'll add a sensor to monitor the intensity of the sunlight and log that as well.  All this could lead to adding fan control somewhere down the road. 

This could all get even more complicated as it proceeds, but that would be normal I guess.

Not a lot of specifics to report at this point, but if someone is interested I'll be glad to share anything I've used or learned as I go.  I'm looking forward to ChugialTinkerer getting started and see what he comes up with.

HM126

ChugiakTinkerer

It's on, like Donkey Kong!

Okay, I'm running a little behind you.  I was hoping to find an RPi in my stocking but I got coal instead.  I'm probably going to use a Raspberry Pi Zero W for the controller.  It only costs $10 and has the wifi onboard like the Pi 3.

My interest is in a remote monitoring situation, where I'll need a GSM module to connect to the wireless network.  I suspect ultimately I'll be looking at an Arduino (or similar, such as Photon, etc) as a controller because I can dial back power consumption in a big way.  But the Pi will be a handy platform for prototyping, and depending on my final design it could serve as the interface for uploading data to an Internet of Things data service.

Alrighty then, time to shut up and start ordering components!
Woodland Mills HM130

Don P

Good deal, if y'all can document this here and teach at a kindergarten level I'd sure appreciate learning more about how these things work.

WLC

Yea, I saw Raspberry pie and got hungry.  Yall talking waaaay over my head.
Woodmizer LT28
Branson 4wd tractor
Stihl chainsaws
Elbow grease.

btulloh

GSM is interesting.  I looked around and found that GSM service for low-bandwidth data is pretty cheap.  I always wondered about  the cost for those game cams that had GSM capability.  For me, my kiln is close enough to the house (for now) that it's in wifi range, so that makes thing a little simpler.

One of the big challenges for this will be the humidity sensors.  The ones I've looked at will not like living in the kiln environment.  That's going to be especially true when drying white oak, etc.  Not only a sensor problem, but connectors and everything else.  Conformal coating may help with corrosion issues, but the sensor itself may be a consumable item.  It may even require some way of sampling kiln air using a pipe or tube and limiting the long-term exposure of the sensing element.  I don't mind eating a few sensors to find out how it's going to work, but degradation may (or will) affect accuracy.
HM126

btulloh

Except for the  wifi and/or gsm side of this, the Arduino would be the perfect tool to run the show.  There's really not much overhead in collecting measurements or even storing a few days worth of readings on board.  It would be interesting to see what the power consumption is for both ways.  Probably using the Pi-0 headless is still pretty low on power consumption.  GSM or wifi is going to require more power, but that can be short-term and intermittent.  A very small solar panel/battery should be adequate, but that starts to make the total cost go up pretty fast.  But hey, all in the name of science.  This project could probably qualify for a grant from somebody.  :D

HM126

btulloh

I hope you get your parts and get started quickly so we can commiserate on the learning curve.  I got out of the gate pretty fast, but now I'm bogged down on development process issues.  Using open-source tools has it's challenges when it comes to documentation, etc.

Right now I'm hung up on making the ide/compiler/linker/assembler happy now that I've gotten past the rudimentary phase.   I do not have any experience in a Linux environment, so that doesn't help.  The RPi has a GUI that makes things a little easier since I can look around and find files and directories.  It also comes with Chromium (a small version of Chrome) and it's nice to be able to do research right on the development platform.  A lot of the examples and documentation I find are references to older versions of hardware/op system/etc.  Things evolve quickly on this RPi platform and there's no real form of document or version control of anything. 

So there we are for the moment.  I better get to work on this before the football games call me away.

Get that stuff ordered!!
HM126

pineywoods

You guys be sure and keep this thread going. I'll be checking daily. Already have a Rpie and most of the tools. My mill already has a hand-held remote, but it's IR. Suggestion on the humidity sensor. They will be rather delicate and short lived. Why not use 2 temp sensors, one dry, the other with a wet wick. Temp sensors are plenty robust. Send the 2 temp readings to the Rpi and do a table lookup to get a very accurate humidity calculation..
1995 Wood Mizer LT 40, Liquid cooled kawasaki,homebuilt hydraulics. Homebuilt solar dry kiln.  Woodmaster 718 planner, Kubota M4700 with homemade forks and winch, stihl  028, 029, Ms390
100k bd ft club.Charter member of The Grumpy old Men

ChugiakTinkerer

Stuff is ordered!  The big river will be sending me a Raspberry Pi Zero W starter kit with official case.  It's official, man.  Next thing you know this will go down on my permanent record.

I've been on a Linux desktop for about a decade, been running servers for more like two.  Hopefully some of that experience will carry over to the Pi.  The Raspbian version of Linux is derived from a Debian distribution.  That's become the most widely used distro for desktop systems, and it's what all of my recent Linux use has been based on.  So I'm optimistic I can get up and running quickly.

I ordered some potted Dallas thermistors to play with temperature monitoring.  They look to be well suited for putting in the wood stack and I'm hoping will have some durability.  It's essentially this one, but I ordered from a different vendor that has 3 meter leads.

I got a DHT22 on order as well to do the temp and humidity measurements.  Just one mounted on a PCB, for prototyping.  But it is pretty small so maybe it will fit in protective housing.  AdaFruit sells an encased version, the AM2315.  That runs $30 but looks like it could withstand the mechanical rigors of a kiln environment.  It's durability to corrosion would remain to be seen.  I'm traditionally a cheap SOB and if I can find a DIY way to do it that would be my preferred.  So I'm keeping my eyes out for an old stage microphone that I can get for almost free then drop a sensor into.
Woodland Mills HM130

btulloh

pineywoods:  Good suggestion on wb thermo.  Should be more accurate and solve deterioration issues.
What language are you coding in?  I'm using the Geany IDE with GCC compiler that came with the Raspbian distro.  That's all fine, but I'm not getting my environment set up correctly or something when I start using some functions and headers that came from outside sources. ??  Fighting with that for the last 24 hours now, with a little time off for bad behavior.

CT:  Good going!  Can't wait till you get started.  I think your familiarity with Linux will be a big help.  My lack of experience with Linux is one more obstacle.  Not too bad though.  I find myself blindly following instructions without understanding the whole picture.  Uncomfortable.

I would stay away from the DTH22 if I was doing it again.  It's not a very good device, except for being cheap.  It doesn't hurt to use one for testing, but it's a bit more of a pia than something that's I2C based communication.
HM126

ChugiakTinkerer

@ pineywoods,

That might be a more robust means to measure relative humidity.  It's definitely something to look into.  Just some quick internet searching shows folks are looking at ways to simplify that calculation for an embedded device application.
Woodland Mills HM130

btulloh

By the way, the fancy housing and screen on that Adafruit sensor will not keep the corrosive stuff away from the sensor.  From what I've read so far, most (or maybe all) of those humidity sensors seem to be alergic to long-term exposure to extreme heat and humidity.  I think pinewoods wet-bulb suggestion could be the ticket.
HM126

btulloh

Regarding Linux, I have to say that I'm warming up to it.  Even at this early stage I'm starting to appreciate its benefits.  I'm just not sure how many more things I have time to learn from the ground up.
HM126

pineywoods

Quote from: ChugiakTinkerer on January 01, 2018, 01:23:29 PM
@ pineywoods,

That might be a more robust means to measure relative humidity.  It's definitely something to look into.  Just some quick internet searching shows folks are looking at ways to simplify that calculation for an embedded device application.
No need to do calculations. Table lookups are easy to code, and I'd bet WoodDoc could quote you a table right off the top of his head.
1995 Wood Mizer LT 40, Liquid cooled kawasaki,homebuilt hydraulics. Homebuilt solar dry kiln.  Woodmaster 718 planner, Kubota M4700 with homemade forks and winch, stihl  028, 029, Ms390
100k bd ft club.Charter member of The Grumpy old Men

btulloh

HM126

btulloh

Got my issues sorted out.  15 years of rust plus assumptions plus open-source tools make for a bad combo.

Makefile issue resolved and I'm back on track now. 

Quote from: pineywoods on January 01, 2018, 02:03:57 PM
No need to do calculations. Table lookups are easy to code, and I'd bet WoodDoc could quote you a table right off the top of his head.

Excellent point. 
HM126

Crusarius

So what pushed you guys towards the rasberry pie vs the arduino? I was thinking about arduino for my sawmill setworks. The solar kiln will come later but still looking at everything trying to learn and figure out how I can integrate everything.

btulloh

The RPi has a lot more horsepower than the Arduino.  The arduino is a microcontroller and well suited for embedded systems.  The RPi has enough juice to host it's own development process.  With a display and keyboard, it's basically a computer. 

The Arduino would certainly be able to do all the temp and humidity logging and display it.  The RPi has ethernet, wifi, bluetooth, and hdmi ports built in, so it will connect up to your network right out of the box and can be used to report data, etc over your local network or to the cloud or to North Korean hackers.

Your project may fit either one, it may be more well suited to one or the other.  The setworks project will have more i/o to deal with than the kiln logger, but it will also benefit from a real-time oriented platform (which I think describes the Arduino.)

I'm not familiar enough with the Arduino to fully answer the question beyond that.  I think C-Tink has more experience with them and can elaborate.  (In fact, I jumped on the RPi because of his post.)


HM126

ChugiakTinkerer

I have no experience with either Arduino or Rpi, but I've been eyeing both for a while now and this project gave me an excuse to try it out.  I like the onboard wifi in the latest RPi boards and the fact that I can put an entire OS on one.  It will give me much flexibility as I explore how to upload data to an IoT service and at the same time host a local web server for showing temp data, etc, on my home wifi.

To be honest it's probably because the Raspberry Pi is essentially a computer so it will likely be an easier transition from the programming I've done on a desktop system.  The Arduino seems more like working without a net.  I'll likely end up there with the weather monitoring system I want to put together, but I gotta learn to crawl first.

Plus everything btulloh said.  8)
Woodland Mills HM130

Crusarius

Thanks for taking the time to do this. I am really excited for the continued updates. Speaking of that I need to do the updates on my build.

btulloh

This RPi3 is indeed a little computer and quite a thing for it's price and size.  It starts up with a windows-like desktop and enough applications to do some real work.  It comes with a light version of Chrome and some MS Office style applications for docs and databases and what not.  Plus it has a lot of the development tools on the distro and is ready to rock right out of the little box.

I am also running an application call VNC Server on it that allows me to use a remote desktop on another PC to do the work remotely, or in my case from a more comfortable chair.  VNC works pretty well and is pretty fast so it feels like you're on the native machine.

It is kind of nice to do the development work right in the environment that's going to be used for the finished product.  Here's a screen shot of the RPi desktop with a browser, and IDE, a file manager, and a terminal window open:



 


If you know Linux it's a breeze.  If you don't know Linux, it's still a zephyr.  Linux is quite nice and I wish I had gotten familiar with it earlier.  All in all, the little 35$ Raspberry Pi is a nice little platform.  If you use the Pi 0, it's only ten bucks and has almost as much capability.
HM126

Crusarius

Friend of mine just said the 8622 I think the model was is only $2

btulloh

That may be.  I'm not in a position to provide much help on that.  I probably have a total of about seventeen minutes studying Arduino capabilities, and not much more than that on the RPi.  You may end up with both.  The cost of that part of a setworks-type project will be trivial compared to sensors and actuators and switches and displays and stuff.

From what I've seen, the Arduino seems better suited to real-time, embedded systems type work.  Hopefully it has better ways to handle things like PWM and the PID libraries needed for controlling something like a sawmill head.

I think pineywoods has been there, done that.  He was replacing the replacing the brain I think,  with all the control and feedback in place already.  You'll be  starting from scratch, so it will be challenging.  It will be interesting to follow your progress and see how it all shakes out.  Hey - winter is a good time for this kind of thing.  You don't really need to have your mill finished to get started!!  Go for it!!!
HM126

Crusarius

I already have random stuff here at work to play with. I should start doing that.

btulloh

Chipping away at it.  Got all three t/h sensors hooked up and reading.  Working on setting up SQL database and time management.  Then it's just a matter of uploading data on periodic basis to one of the free db servers.  I also want to be able to check current data with cell phone.  All of these things are pretty straightforward but take a little time to get done.

I also have to get some real sensors to use inside the kiln and work on the wet-bulb thing.

At some point I'll need to figure out enclosures and wiring plan.  Right now it's just a science project.



 
HM126

Thank You Sponsors!