• aditya mehrotra.

filament labs updates: getting the glass door on castor fixed [updates]

Yes so we have actually name the printer not Phobos and Demios now, but Castor and Pollux. Because they have a nice and friendlier ring to them. But today we're planning to fix the door, glue on the top box, and get castor back in shape so we can do some printing.



So of course, first we laid out all the parts on the table, took the 3D printer out, removed the injectors and then laid the printer down on its side.



After doing some fiddling we realized the best orientation to glue these panels in is the one above where the printer is on its side on a stand with the hinges facing the table as the glass panel can rest a lot of its weight against the table with this method.


So our technique for glueing these panels in is - properly - which is different from last time. We've gotten a form of gorilla glue that says it explicitly works on glass surface that are smooth and metal surface too. The glue instructs us to clamp for 2h and cure for 24h so that's what we're going to do. It also asks us to dampen the glass and the metal.



So after we did all of that, here's how the glue-job is looking. We fully covered the surface in-between the glass and the hinge and we're gluing it on the inside because we couldn't make the outside of the hinge as flat as we needed to. We're going to let this sit for more than 2h clamped, honestly clamping it for the full 24 could be a good thing to do. In the meantime we're going to work on some stuff for pollux while castor's enclosure is getting ready.

Let's first record that the current air temperature is 78F or 25.56 deg C. And the voltage we're reading is of a 10K resistor in series with the thermistor. The thermistor is a 25°C=100K and has a temperature coefficient of -2-5% / ° C. Those values are going to be really really important.



This is us putting together the thermistor circuit itself. And now it's time to actually do some math and write the code. All we're planning to do right now is calibrate the thermistor such that we can output the current temperature in degC to the terminal. Now it's time for some math:


R0 = 100,000; alpha = -2-5%; T0 = 25C

r_thermistor = 100000*(1-alpha)^(t_curret-T0) right? 

so log(r_thermistor/100000)/log(1-alpha)+T0 = t_current

And we'll tune alpha to get the right current temperature right? We're going to turn alpha right next to the thermostat because that know what temperature it is in that area. But first, let's write the code.



Now let's see what happens if we just turn it on. We're expecting like 25.56C at the moment.


Yea I'm basically the nan king over here what is this? Who knows let's check the code and the ln function. Let's print r_thermistor for now and see what that value is.



Okay wait I found the issue: https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/ let's try to understand the library next time. We need to map the input to a voltage.



Okay so this voltage seems more reasonable. Let's see 100K and 10K at room temperature that leaves us with an estimate of around 5/11 = 0.4545... yea that checks out with what we should be seeing now let's print things like the resistance of the resistor.



Those values seem about right too, it's a little warmer than room temperature the resistance should have decreased slightly. And we also noticed we forgot to add in the 100K in the formula so let's do that and output the current room temperature with alpha = 0 .02!



That's roughly 26.5-27 deg C! We're expecting like 25.56 deg C near the thermostat so let's go by the thermostat and see what we are seeing. Then we can tune alpha to see what we are seeing. But first I'm going to check if breathing on the glass increases the temp. And it does so I think we are okay. It goes up to about 40C. Then comes back really quick. So let's try tuning alpha near the thermostat. So it's reading roughly the same thing near the thermostat let's change alpha until it reads around 25.5C! Let's make alpha 0.03 but we need to tune it really precisely so when we might want to precisely tune alpha with something hot that we know the temperature of. Like the hot-end of our printer! Or the bed!


Yea so increasing alpha caused the estimated temperature to increase. What we're really going to do is stick this to the heat bed of our printer and see how well it tracks the temperature as it is heating with alpha = 0.02 and then make adjustments accordingly.



So we taped the thermistor to our printer BED which will usually go to 70C which is a good baseline above room temp to actually test the thermistor and turn alpha. The thing is we can't really tape the thing to the nozzle so we won't for now. The plan is as follows:

  • First, we'll take the print bed up to 70C and adjust alpha until the temperature matches unless it does match.

  • Second, we'll allow the print bed to cool and then monitor how well the thermistor tracks the temperature outputted by our printer's LCD on the way down.

So here we go! Preheating the print-bed to 70C! If we're really close to 70C we'll leave it because we're measuring from outside the insulation whereas the thermistor on the printer is under the insulation so here we go! The bed is currently at 22C and the thermistor is reading:



So far really good actually let's pre-heat! We're pre-heating to 70C and we'll watch what the thermistor is reading at 70C itself. For tracking later we'll use the serial plotter. It is also entirely possible that the alpha changes as we increase in temperature which means we really would want to tune this at 220C but we shall see as we get closer to the temperature of 70C. At the moment the thermistor is like 10deg off from the printer itself. So the other thing we're going to do is:

  • Adding a step, we'll actually tape this thing to our nozzle and bring it up to 220 C when after we've tuned alpha for 70C!

Yea so it's clear to me that this alpha is too high because at 58C on the printer the arduino is reading like 77C which is of corse wrong. Let's make alpha to like 3%? Top at 0.03 we seem to be tracking the temperature really well actually. Let's see how this goes. Yea much better. Now we're at 70C and the readout is...



Okay now let's use the serial plotter to plot how the temperature decreases as a function of time and see if that matches data points we can collect on our own by hand.


DATA FROM PRINTER SCREEN: 
time=s, temp=degC
0, 70
10, 70
20, 69
30, 68
40, 67
50, 66
1:30, 63
2:00, 62
2:30, 60
3:00, 58
3:30, 56
5:30, 51
26:45, 28
TOTAL COOLING TIME: 32min and counting. 

DATA FROM THE THERMISTOR:

The thermistor on the other hand seemed to track about 2degC higher than the plotter on the way down. In fact it is literally 2degC higher than the 3d printer readout on the way down. But what we want to do is wait for it to stabilize. Because this could have to do with the insulation that surrounds the thermistor vs not.

  • At some point for the printer I want to time the total time it takes for the printer to heat and cool with and without the case on.

Once this stabilizes what we want to do is strap the thermistor to the print head and run the same test (literally) at 220C. We're now at 30degC on the LCD and the thermistor is showing, well around 30 actually. It's cooling much slower now which is why it may be tracking better. We also noticed the serial plotter is a pretty garbage feature of Arduino it could be so so much better.


We can see that there is a good amount. of noise in the signal. We're going to try to find a way to reduce that. We'll only play with alpha after this if we get to 220C and it is way off. I have a feeling it'll be slightly off and we'll have to add some decimal points to the 3%! This is also an interesting link to look at: https://electronics.stackexchange.com/questions/454954/whats-the-simplest-way-to-calibrate-a-thermistor

But the real task here is to validate the thermistor and at 27C on the thermistor. the readout on the printer is 26C. The real test is if we now take the thermistor up to 220 C how well will it track temp? So now let's tape to to the nozzle!



Okay here we go let's take this puppy up to 220 deg C and see what the thermistor actually outputs at the top and on the way there. We start at 23C and the thermistor is reading 23-24 deg C! Now let's hit preheat. We might as well change the filament while we are at it hehe.


We are only going to look at the final temperatures because the thermistor we are reading is on the nozzle itself and the thermistor for the printer I think is much closer to the heating element so we will see how well it tracks at the end only. Like when the nozzle has been at 220C for like a few minutes see if the thermistor has stabilized there.



At the moment the nozzle is a 201 and we're at 149 so maybe we do need to tune a little bit. Yea so the nozzle is at 213 and we're stabilizing around 154. And at 216-220 we're stabilizing around 156. SO let's decrease alpha ever so slightly. Like 2.8%? Okay now we're at 166. Maybe 2.5%? Now we're at 183 C maybe 2.2%? Hey 223 C! Let's make it closer to like 2.25%? So we're going to settle with like 2.05% that seems to allow the thermistor to hover around 220C while we are doing this. Now we're going to turn this off and see how well the temperature stabilizes at the bottom. At the 25C mark? That's where it really matters right. At the endpoints for now. Also our thermistor has a much more stable temperature than the thermistor on the printer itself - maybe it's too close to the fan? If this doesn't work we'll probably implement some logic that allows alpha to scale linearly with temperature. We have the data points now.

Because so far this is what we have. We're going to take one more data point at 25degC and see how well the alpha is working. If we update it as a linear function with temperature. We're doing this literally just by matching and waiting for temperatures to stabilize. The other thing to note is what we really care about is matching temperatures in the 220C-300C range. Which means we probably just want to stick with a single alpha that is accurate there but if it's less accurate in other places we don't know nor do we necessarily care. We're now at 25C on the LCD and the thermistor is reading:



Which is honestly close enough if we are matching at 220 it looks like we aren't getting any exponential error. So I think we'll keep it at alpha = 0.0205 for now. Remember we can tune this thing as we go if we feel it's not reflecting the temperatures accurately so that means it's time to add it to the heating chamber of the actual device.



There we go! The thermistor is now all attached. Now we need to decide a few things such as what are our next steps. Do we want to wire this all up to the jetson? Do we want to get a 3d printer controller or is the best method a raspberry pi zero or regular? I think for now since we have a jetson, the LCD is working and the new (non-broken) wifi antennas are coming tomorrow it's worth just using the jetson for now. HOWEVER, we don't want to use it in the final product because it's really a pain and way too expensive.


#updates #omgrobots #filamentlabs

2 views0 comments
© copyright 2019 | aditya mehrotra