Temperature plotting with a raspberry pi

fubar

Ancient and opiniated inhaler
tl;dr People's opinions about the importance of conduction vs convection in various vaporisers tend to be strongly held although I know of almost no empirical data. I've set up my own simple test bed for measuring temperature in my air/solo stems to help figure out what is really going on as best I can in an empirical, reproducible and scientific way.

Starting with an older model Solo with a power adapter to minimise variation between runs from battery state, running at heat setting #4. Plan to test my Air and EQ as time permits.

Sensors are a cheap thermocouple in the middle of a stem packed with ABV to measure load temperature as best I can, and a photoresistor to record heater light activity in real time interfaced to the GPIO of a raspberry pi where data are plotted and saved. Program is python interfaced through the adafruit_gpio library and setup as shown in the examples if you look at the photoresistor and k3 thermocouple in the shop on the adafruit site. (no, I'm not affiliated - just a happy customer)

Goal is to empirically distinguish the effects of convection from radiation/conduction without convection by recording temperatures in some ABV over time, using inhalation to add convection to the heat flow to see how the temperature changes...


W40t5OX.jpg


The pi is at the bottom with the GPIO bus connected to the breadboard where the photoresistor and thermocouple are set up. The Solo (or air) is mounted UPSIDE DOWN to minimise convection so unless someone's inhaling on the silicone tube, heat gets to the thermocouple in the ABV inside the stem mostly via radiation and conduction. The stem is about half way in - see below for the effect stem depth appears to have.

A photoresistor is mounted over the heater light using blu-tac (!) which works pretty well. The thermocouple is up in the stem packed with ABV and the delicate cable runs down the inside of the stem to a loop at the bottom held in place with a silicon sleeve so the cable doesn't wiggle - the sleeve is just above the whip and the cable is looped from inside the stem out and up behind.

Here's a sample output temperature strip chart.

FzYoxca.png


For the record, I've tested three stem insertion depths and it seems to make a huge difference to the steady state (radiation/conduction heat in vs heat loss) temperature in the load when you are "heat soaking". It's *much* hotter at steady state when pushed right in close to the oven (about 150C) and much cooler when almost out (60-65).

In the above run, the stem was about half way between falling out and pushed in as far as it will go and steady state temperature had more or less already been reached earlier before I restarted a run - it was about 75C.

Heater cycling is illustrated crudely in the bottom blue lines - where it's 20, that means no blinking. You can see how the heater seems to be relaxed and cycling without the temperature moving much at the start when as a result of a previous run, the setup was pretty much heat soaked and at a reasonably steady state, probably well below the Solo oven set point temperature.

It's easy to see where the 2 inhalations happened. The temperature immediately starts rising rapidly and the heater starts cycling as expected to try to keep up.

Interesting to see how fast and how much the temperature rises above "heat soak" conduction/radiation vs heat loss steady state immediately the inhalation starts and convection (heat transfer in hot air from the oven) kicks in.

Aside from Solo temperature setting (4 above) it seems that the effect of heat soaking (ie the steady state temperature achieved when you leave a loaded stem in while the solo is running) depends largely on stem insertion depth.

Mid insertion will reach a more or less steady state around 80C so very little material will vaporise when only radiation and conduction can heat the load. Once convection kicks in, the temperature rises quickly to more effective levels to help release volatiles.

Pushing the stem right down and backing off a fraction of a mm to avoid blocking the oven holes) results in much higher temperatures than shallow or mid insertion as shown in the plot below with the stem right in which settles at nearly 140C at the same Solo setting of 4 as above! Looks like much less heat loss at steady state probably because much more of the load and the thermocouple itself is down inside the Solo, so not losing as much heat to room air as when the stem is raised half way out like above.

vDmhUIj.png


More to come! Meanwhile, feel free to draw your own conclusion about whether it makes sense to call the solo a mostly conduction or convection vaporiser - clearly both happen but without convection, the load doesn't seem to get hot enough to vaporise much without inhalation (convection) unless the stem has been pushed deep in so the load is right near the oven so radiation from hot stainless steel will be an effective heat transfer mechanism. More to follow - I'll post other experiments as I go.
 
Last edited:

The Beagle

Bubbles & Bags
Woah that's great, thank you for sharing your experiments! Very interested to see how this unfolds, I'm an Air owner and I guess your findings could be relevant to how I use it.
 
The Beagle,

fubar

Ancient and opiniated inhaler
I'm an Air owner and I guess your findings could be relevant to how I use it.
Me too so I'll put it in the test harness and (eg) run every session on a freshly charged battery. Starting with the solo because I have an old one and a PA which removes the battery as an annoying source of variation in the experiments.
 
fubar,

ReggieB

Well-Known Member
I don't own an arizer unit but it's interesting to see any information like this coming from the community. I think it Highlights how easily simple use cases can drastically alter the experience the user might have.
 
Last edited:
ReggieB,

Hippie Dickie

The Herbal Cube
Manufacturer
@fubar - nice experiment. your charts show what i found, that the temp in the herb rises 50°F at the start of the inhale.

can you put a second k-thermocouple directly on the hottest part of the heater? and plot that against the ABV temp ... i'd like to see how much the heater drops during the inhale.
 

fubar

Ancient and opiniated inhaler
@fubar
can you put a second k-thermocouple directly on the hottest part of the heater? and plot that against the ABV temp ... i'd like to see how much the heater drops during the inhale.

Great idea - but I only purchased one and it takes weeks to get parts to Sydney from Adafruit. I'm using hardware SPI conversion and the pi has 2 of those Broadcom hardware DAC ports so it would be technically feasible but I think I have plenty to get on with trying to figure out what's going on with what I have set up. It would be worth adding if anyone does this in a properly resourced (ie funded!) project.

I've found that reliably/reproducibly positioning a thermocouple inside the ABV is hard - it will shift if the cable is tugged while the stem is being adjusted. A separate oven thermocouple would probably need to be fixed to the stainless steel with furnace cement to keep it in place because the fine wire lead will have to come up through the stem to get to the breadboard and it's critical that adjusting the stem doesn't make it move adding more unwanted variation to the experimental results. Not sure I want to do that to my trusty old Solo or newer Air.

Anyone wanting access to the code for reading the sensors and plotting please PM me - it should be fairly portable assuming you're using the same sensors wired as described in the relevant sensor tutorials, on a recent pi.

That said, I think the results I'm seeing on the effect of stem insertion depth on steady state load temperatures have important effects on real vaping. My stems are slightly variable but there's generally about 12mm from barely inserted to deeply inserted. About half way works well for me but if you want more radiation/conduction and higher heat soak and vape temps, near full insertion might be a better choice.
 
Last edited:

fubar

Ancient and opiniated inhaler
okay ... i was just curious how the PID algorithm for the heater responds.
fair enough - the pattern of heater light activity gives some clues but measurement beats guesswork every time in my experience
:)

Is there a proportional integral derivative (PID) in the Solo rather than a simple set point threshold for the heater circuit to be activated?

I've been recording the heater light over time and it does not seem to be doing what the PID I fitted to my Rancilio Sylvia espresso machine does. The light flashes become shorter as well as further apart in time as the temperature approaches the set point using an Auberins PID which I wired that myself so I know the light is on whenever the heater circuit is active.

Of course, looking at the Solo heating light doesn't necessarily tell me much - it might be a simple flash timer that runs the LED when the heater is cycling.
 
Last edited by a moderator:

Hippie Dickie

The Herbal Cube
Manufacturer
well, i don't know if the Solo has a PID, i used to have a big temp drop before i went PID.

i have a red LED triggered by the MOSFET (controls current to the heater coil) so it dims and brightens as the duty cycle changes. a green LED lights when at or above setpoint temperature.

does the espresso machine have a temperature vs. time profile it runs?

Also, do you see a difference when using herb rather than ABV? i wonder if a temperature drop from the heat of vaporization of the THC goo is noticeable. i guess not, although sometimes it seems to be there ... but my system isn't all that accurate (+/- 5F), but it is consistent/stable (+/- 1F).
 

fubar

Ancient and opiniated inhaler
does the espresso machine have a temperature vs. time profile it runs?
.
I agree that espresso is definitely worth getting obsessed about :) and the adjustable PID temperature controller allows the Rancilio Sylvia to churn out fantastic shots reliably - compared to the hit and miss of temperature surfing with the default thermocouple which has a huge deadband. However, that's straying off topic? The manufacturer's page at http://www.auberins.com/index.php?main_page=product_info&products_id=36 has some curves. It's got a "learning mode" where you fire it up cold and let it work out how best to get to the setpoint.
Also, do you see a difference when using herb rather than ABV? .
I doubt that I could measure the effects of latent heat of evaporation for THC. I'm seeing (for example) changes in the heat soak stable point after an inhalation - something changes but I've no idea what.
I'm finding it's a real pain to unload/reload the stem once the thermocouple is in place so I'm just leaving the same packed ABV.
Given the relatively poor accuracy of the thermocouple, variability in an "inhalation" and effects of variability in insertion depth, I'm not sure if it would be possible to reliably detect any real difference between runs.
I can think of some upgrades to my test bed that might help - eg a more accurate temperature probe; glue or something to make sure the temperature probe doesn't move during or between runs (I'm reluctant to sacrifice my stems!); a vacuum pump to simulate the inhalation in a reproducible way;....
 

fubar

Ancient and opiniated inhaler
Me too so I'll put it in the test harness and (eg) run every session on a freshly charged battery. Starting with the solo because I have an old one and a PA which removes the battery as an annoying source of variation in the experiments.
Well. It looks like the air is going to be more of a challenge to get heater light blinking recorded reliably because the control panel is so small that I lose access to the buttons by the time the blu-tac has done it's thing.
I don't want anything permanent to ruin my nice Air. Whatever holds the photoresistor over the little light shaft has to be very unobtrusive because the buttons become even more annoyingly hard to operate when the device is held in a lab clamp. This is over at least 6 runs and battery changes where I'm struggling to keep everything fixed except the depth.....
I'm working on it but can't see any easy way. Suggestions welcomed - but might have to abandon reliable heater recording for the Air.
 
fubar,

OF

Well-Known Member
Very interesting. I really do need to run down the rig I made and try this again.

I definitely didn't try not inserting the stem fully, for sure that will clobber conduction. I'm also concerned a bit with the setup. The temperatures seem low, and I would have expected the temperature to rapidly rise to vaping temperature and hold that ('the magic temperature') through the hit? I wonder if there may be significant heat sinking by the TC leads? One thing sure, it's not making a lot of vapor at 170C (330F) let alone 140C (290F).

In addition to reconfirming my prior experiment showing cooling below vaping temperature by lots of draw air, I think I want to poke at this with a load at say 390F? With the stem inserted as it normally is vaping.

Fun stuff. Good topic.

well, i don't know if the Solo has a PID, i used to have a big temp drop before i went PID.

No, it's a setpoint controller with about 15F hysteresis IIRC. It's easy to see with the current in PA mode. There's a fixed offset but the current jumps in the two Amp range as the heater cycles on and off. And that heater current goes up with increases in PA Voltage. I think we have a simple switch and load that's on when the light is flashing.

PID is better of course if done right. Ascent seems to do this for instance. But there's also some thermal damping going on which masks that somewhat?

OF
 

jojo monkey

Well-Known Member
Manufacturer
Very cool!

Looks like it fires in bursts when you take a hit or when it detects a certain size temp drop. Where does it take the temps, inside the heater?

It's got a "learning mode" where you fire it up cold and let it work out how best to get to the setpoint.

The arduino PID library has an live auto-adjustment. If you want an auto-calibration, the $30 lightobject jld512 can do that, but that finds the pid settings once and does not change them on-the-fly.

Nice pid reading: http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/
 
Last edited:

fubar

Ancient and opiniated inhaler
The temperatures seem low, and I would have expected the temperature to rapidly rise to vaping temperature and hold that ('the magic temperature') through the hit? I wonder if there may be significant heat sinking by the TC leads? One thing sure, it's not making a lot of vapor at 170C (330F) let alone 140C (290F).

The temperatures are what they are! The thermocouple was inexpensive and probably not as reliable as I'd like but that's what it's recording in the middle of a stem packed with ABV and the changes are reliable (at least, I can replicate the pattern of change by repeating the setup although the actual peak and steady state temperatures recorded seem to change between replications) even if the actual individual values may not be so reliable.

With the stem halfway (first set of plots - and as shown in the setup photo), the peak temperature at the end of inspiration (when the temp stops rising) suggests that convection has done a lot compared to heat soak steady state, but still seems low. Oddly enough I've used the test harness solo at that setting for years and got plenty of medication so maybe I've always been pushing the stem in - those temps in the second plot look more useful.

Here's what I think those graphs show is going on in terms of heat soaking/steady state and convection during an inhalation in the Solo:

The steady state temperature in the load is a product of heat gain from radiation/conduction and heat loss to the atmosphere (from radiation, conduction and convection since air can be wafting around outside). A greater proportion of the load is outside the Solo body, so radiation/convection/conduction heat loss rate is increased when the stem is mostly out. That's probably something of a new discovery - I haven't seen it discussed anywhere else.

At rest upside down with the stem in, I think load heat gain is driven largely by radiation from the SS oven - the stem isn't touching the oven so conduction can only be via the rubbery grommets gripping the stem which are probably not good heat conductors. Once the stem glass gets heated by radiation (no inhalation in an upside down solo means minimal convection), conduction will take place in the glass of the stem, but I suspect dry ABV which is mostly cellulose, is a poor heat conductor like wood.

The effect of heat transfer by convection (during inhalation) when the stem is in deep is a smaller proportion of total heat transfer compared to when the stem is less deep, because the steady state temp is higher to start with - but convection still pushes the temp up beyond the steady state effect of conduction/radiation so convection must be doing something. It sure doesn't seem to be cooling the load !?

At rest upside down with the stem mostly out, radiation again must be what drives the heat soak steady state temperature but the inverse square law on distance results in a much lower rate, and since so much of the load is outside the Solo exposed to the atmosphere, heat loss via radiation is probably happening at a much greater rate.

Steady state load temperature in the solo is higher (ceteris paribus) when the stem is in deeper. Convection during inhalation raises it even further. In terms of proportionality between radiation and convection, it's greater when the stem is inserted only to a shallow depth making it a primarily convection driven vaporiser. With the stem in deep, convection still makes an important difference but much of the heat gets to the load from the oven by radiation and less is lost by radiation to the atmosphere because the load is buried inside the device.

tl;dr The evidence seems to suggest that heat transfer in the solo is highly dependent on convection during inhalation although the proportionality is greater when the stem is mostly out than when it's in deep. Calling it a "mainly conduction vaporiser" makes little sense to me given the data and the physical design. If anything, it has to be radiation driving the steady state since the stem is held by rubbery grommets which are probably poor conductors of heat and it doesn't touch the oven unless you push it right down there - which I've avoided in my experiments by backing off a mm or so.....
 
Last edited:

OF

Well-Known Member
The temperatures are what they are! The thermocouple was inexpensive and probably not as reliable as I'd like but that's what it's recording in the middle of a stem packed with ABV and the changes are reliable (at least, I can replicate the pattern of change by repeating the setup although the actual peak and steady state temperatures recorded seem to change between replications) even if the actual individual values may not be so reliable.

Thanks much, lots to mull over.

I don't doubt the measured temperature a bit. It's not what one would expect, however. Since the cup is a fixed (say 200C?) temperature, thermodynamics has to explain all lesser numbers. Heat has to be flowing and there have to be cooler places in the system for it to flow to or we would not read less than 200C. I suspect a major 'low resistance' (high conductivity) path is the lead thermal conduction. A known/common issue in T/C rigs. Put in thicker leads and you'll get an even lower reading? The old 'observer is part of the experiment' issue in a fun way.

I suspect we might have an instrumentation error mixed in. Maybe.

What really matters is how does it work when making vapor. What might happen under different, non working conditions doesn't count in that context, interesting as they might be. Making vapor needs energy, heat (in calories). This has to flow from the cup to the herb somehow. To happen by radiation the source would have to be hotter than the load by a significant number of degrees. Likewise convection means the air entering the load has to have excess heat (past 200C) so it can give up heat (calories) and still not fall in temperature and start cooling the load instead. The measurements I made of the airflow showed as you hit it cool air is warmed some, but it doesn't get as hot as the cup (since not all the air contacts the cup, some goes right by, some even contacts cooler surfaces). The average temperature has to drop? I saw a cooling (at least I think I did). Mind, I was measuring air temperature at that point, not the load (there was none). And with the stem in the normal position. Heat soak would bring it to working temperature with no air flow, but drawing air though it cooled it down from there. It could not provide the additional heat to replace that 'used up' by the vaporization.

Thanks for more food for thought.

OF
 

fubar

Ancient and opiniated inhaler
I suspect a major 'low resistance' (high conductivity) path is the lead thermal conduction. A known/common issue in T/C rigs. Put in thicker leads and you'll get an even lower reading? The old 'observer is part of the experiment' issue in a fun way.
https://learn.adafruit.com/thermocouple/overview
It doesn't change during inhalation or insertion so non differential in terms of the experimental factors.
Wire is 24 gauge and it does not get at all warm during the experiment so cannot be conducting much heat.
Seems unlikely to change the conclusions much.

I suspect we might have an instrumentation error mixed in. Maybe.

Not maybe. All measurements have experimental and random error. Comes with the territory.
Despite that, the plots consistently show that convection is a major driver of temperature increase during inhalation with the setup I've described.
Try it. Code for the temperature plotting in real time is available if anyone wants it...

Latent heat of evaporation is an interesting wrinkle but I'm not sure adding it in would change the conclusions much. Taking out the stem to refill it will introduce the nasty problem of a shifting thermocouple making runs much less comparable, compared with leaving it alone between runs. I think experiments can be informative even if not "realistic". The perfect is always the enemy of the good when it comes to experimental science in my experience.

Most convincing for me is that as the plots suggest, a session with the stem half way out is noticably different from one with the stem most of the way in. I just tried it and the first was far more airy, requiring more work. The second more dense with less effort. Versatile beast, the Solo.

There's no substitute for experimental data when it comes to figuring out what's going on so if
anyone has results from other reproducible experiments, or specific, practicable suggestions to make the one I've described better, please share them.
 
Last edited:
Top Bottom