Custom MCU-module for UP! Mini...

Post improvements made for UP, and share ideas.
yoyo42_cetus3d
Posts: 3
Joined: Sun Sep 02, 2018 9:33 pm

Re: Custom MCU-module for UP! Mini...

Post by yoyo42_cetus3d » Fri Sep 14, 2018 9:42 pm

I don't have easy access to a super accurate multimeter or a 100 turn pot now I'm a softie not an electronics guy, but I do have a reasonably accurate -50 to 1100C K-type thermocouple meter (thanks to £10 spent on Amazon!) and klipper has a debug console I can use to control the heater then watch the returned adc values as well as the thermocouple measurements to get a calibration curve that way. I just have to be sure not to let the heater run away ;-)

Or I could be boring and use my temp controlled soldering iron instead, as a less worrying heater element. But it's getting closer.

I could also use all sorts of alternative methods by adding an SPI thermistor amp or using the tinyfab heatbed NTC port, but I really want this to be a drop in replacement firmware option without hardware mods.

arhi
Posts: 232
Joined: Sun Mar 08, 2015 10:51 pm

Re: Custom MCU-module for UP! Mini...

Post by arhi » Sun Sep 16, 2018 9:39 pm

yoyo42_cetus3d wrote:
Fri Sep 14, 2018 9:42 pm
I don't have easy access to a super accurate multimeter or a 100 turn pot now I'm a softie not an electronics guy, but I do have a reasonably accurate -50 to 1100C K-type thermocouple meter (thanks to £10 spent on Amazon!) and klipper has a debug console I can use to control the heater then watch the returned adc values as well as the thermocouple measurements to get a calibration curve that way. I just have to be sure not to let the heater run away ;-)
there's always a huge error in temp transfer between a probe and a measured spot, adding a second probe is doubling the error (actually way more then double as you cannot position probe properly) so it's not advisable method.

you don't need super accurate anything, any decent dmm is accurate enough at these values, and if you have any electronics knowledge and will to play with it you can make yourself a great precision ohm meter :D .. you need to create a 1mA (or 5mA or ..) constant current source. This you can do for few bucks, check vast internet knowledge for schematic or ping me I'll draw one for you :) .. you push 1mA trough resistor and you measure voltage across resistor and you get super accurate resistance value :) ... anyhow, any dmm that will show you 100.00 is good enough, even 100.0 is acceptable. You don't need super accurate resistors, get a bunch of them between 100 and 250R, you measure resistance, you use the table (or online calculator like: http://www.isotech.info/software/web-prt.html ) you enter the resistance you measure, you check the temperature it represents and then you see what your ADC is reading :D .. so it will not be table 10 by 10C but with bunch of random points on the curve but same thing..
yoyo42_cetus3d wrote:
Fri Sep 14, 2018 9:42 pm
Or I could be boring and use my temp controlled soldering iron instead, as a less worrying heater element. But it's getting closer.


I have some experience with soldering irons (like mine design is used in thousands of PRC clones of HAKKO being sold all over the world) .. temp of the sensor can be over 80C different from the tip temperature
yoyo42_cetus3d wrote:
Fri Sep 14, 2018 9:42 pm
I could also use all sorts of alternative methods by adding an SPI thermistor amp or using the tinyfab heatbed NTC port, but I really want this to be a drop in replacement firmware option without hardware mods.
well, if I understand correctly you have exactly the same electronics I have, probbly not the same tinyfab board (I have version 1 I think) but voltage comes straight to ADC port so should be irrelevant.. so if our boards are same that means our values on the input of the ADC of the tinyfab's cpu are same :D so basically you don't need to do nothing but just use the data I already gathered :D ... lemme try to find and attach it

arhi
Posts: 232
Joined: Sun Mar 08, 2015 10:51 pm

Re: Custom MCU-module for UP! Mini...

Post by arhi » Sun Sep 16, 2018 10:00 pm

here ya go, copied from another document but this is what you need..

Code: Select all

R (resistance of the PT100),C (Temperature from the table),Smoothieware ADC value (value is read 4 times and this is the summ of those 4 readings),,pure ADC
100,0,94,,23
104.95,12.67,644,,161
109.93,25.48,1210,,302
115.02,38.63,1777,,444
120.02,51.6,2342,,585
129.9,77.37,3440,,860
140.27,104.65,4592,,1148
150.61,132.07,5728,,1432
160.37,158.16,6796,,1699
170.09,184.36,7853,,1963
180.04,211.4,8926,,2231
190.17,239.17,10012,,2503
199.95,266.21,11052,,2763
210.01,294.28,12120,,3030
220.04,322.51,13177,,3294
230.1,351.09,14220,,3555
239.9,379.2,15236,,3809
Attachments
PT100 - UP-amp.zip
(10.18 KiB) Downloaded 41 times

catfish
Posts: 8
Joined: Wed Mar 25, 2015 2:33 pm

Re: Custom MCU-module for UP! Mini...

Post by catfish » Mon Feb 11, 2019 7:02 pm

hi Arhi,

You have a fair amount of experience with the smoothiware MCU and I was hoping you might still be around these forums. I have a third party hotend I've adapted to the up mini but it has a 100K RTD instead of the PT100 element. Any thoughts on how to use the new sensor since it's not compatible with the signal conditioning for the PT100?

Thanks

catfish
Posts: 8
Joined: Wed Mar 25, 2015 2:33 pm

Re: Custom MCU-module for UP! Mini...

Post by catfish » Thu Feb 14, 2019 8:43 pm

I managed to get the up mini to print PLA reliably with the custom MCU running smoothieware. It required replacing the extruder assembly with a generic one purchased off of Ebay that uses a PTFE liner in the throat between the stepper feed and the heater.

https://www.ebay.com/itm/3D-Printer-MK8 ... 2KV4mVBA0Q



I previously tried far too many mods thinking the PLA printing issues were a result of the stepper running too hot or the feed gear being too aggressive for the filament but in the end the true issue was heat traveling up the tube from the heater to the throat causing too much pressure for the stepper feed assembly to overcome.

The stepper/heater assembly purchased was a simple swap except that the new temperature sensor is a 100K type PTC thermistor versus the PT100 NTC sensor on the stock up mini. This required cutting the ribbon from the extruder to the main board in order to break out the non-grounded wire for the temperature sensor (orange wire in the ribbon). Then the pin on the tinyfab MCU for the extruder sensor (P1.9) had to be cut to isolate the pin from the up mini circuitry. Then a simple 4.7Kohm pullup resistor was added that connected to a 3.3 Volt source on the MCU to the orange wire from the ribbon and this was connected to the connection at P1.9 on the MCU header. A 10uF capacitor was also connected to the junction and ground to stabilize the reading. After that, the config.txt was modified to inform Smoothieware that the sensor was now a thermistor with a Beta of 3950 and from that point on PLA prints perfectly.

Thanks to Arhi and tinyfab for their contributions. The Up mini now prints PLA without issue and the up mini is useful again :)

arhi
Posts: 232
Joined: Sun Mar 08, 2015 10:51 pm

Re: Custom MCU-module for UP! Mini...

Post by arhi » Fri Feb 15, 2019 9:54 pm

catfish wrote:
Mon Feb 11, 2019 7:02 pm
You have a fair amount of experience with the smoothiware MCU and I was hoping you might still be around these forums. I have a third party hotend I've adapted to the up mini but it has a 100K RTD instead of the PT100 element. Any thoughts on how to use the new sensor since it's not compatible with the signal conditioning for the PT100?
well easiest way would be to change the 100k RTD to PT100 and use my fork of smoothieware where it works :D

second easy way would be to attach a 200k pot instead of the RTD, tweak smoothieware a bit to display "raw" data instead of "temperature" and then make your own curve by comparing temp from the table for 100k rtd and data you get from the smoothieware

best, but not easy, way would be to read the schematic (I have posted it already on the forum, if you can't find I Can post it again) of the amplifier UP motherboard is using and calculate exactly the transformation between RTD value and ADC value you get on the smoothie cpu .. IMO I don't care about that much precision as RTD's themselves are very inprecise so first or second way are imo best

if you want I can help you make the "hacked" smoothieware to display the raw data and help you get the curve and formula to plug in

arhi
Posts: 232
Joined: Sun Mar 08, 2015 10:51 pm

Re: Custom MCU-module for UP! Mini...

Post by arhi » Fri Feb 15, 2019 10:07 pm

catfish wrote:
Thu Feb 14, 2019 8:43 pm
I managed to get the up mini to print PLA reliably with the custom MCU running smoothieware. It required replacing the extruder assembly with a generic one purchased off of Ebay that uses a PTFE liner in the throat between the stepper feed and the heater.

https://www.ebay.com/itm/3D-Printer-MK8 ... 2KV4mVBA0Q
mk8 is crappy extruder :( .. mk10 with microswiss upgrade is decent but mk8 is crap :( original up extruder is million times better then that mk8 thingy ..

also PTFE lined extruder is ok for PLA and PLA only
catfish wrote:
Thu Feb 14, 2019 8:43 pm
I previously tried far too many mods thinking the PLA printing issues were a result of the stepper running too hot or the feed gear being too aggressive for the filament but in the end the true issue was heat traveling up the tube from the heater to the throat causing too much pressure for the stepper feed assembly to overcome.
stepper is not running too hot, stepper is used as a part of a heatsink to cool the throat of the extruder that's why stepper is getting that hot.

UP's extruder is really not ideal for PLA but you can easily print PLA with UP's extruder with small modifications
1. replace that shitty fun duct with a lip and that puny fan they have there for cooling the throat with a good fun duct and a powerful blower and you can forget about filament jams :D
the duct: https://www.thingiverse.com/thing:2509563

2. additionally cool the extruder motor (it will help cool the throat too), there's a simple assembly I made that implements also a part cooling fan so you properly cool your PLA part and you connect it to the top pcb and you can easily control it from smoothieware as part fan :D (there's the smoothieware config on that thingi page that will show you how to configure part cooling fan):
https://www.thingiverse.com/thing:2529826

the configuration is made so that part cooling fan sucks the air over the stepper motor cooling it and then shoots that air onto part cooling it so it's very efficient
catfish wrote:
Thu Feb 14, 2019 8:43 pm
The stepper/heater assembly purchased was a simple swap except that the new temperature sensor is a 100K type PTC thermistor versus the PT100 NTC sensor on the stock up mini.
PT100 (on mini or anywhere else) is PTC, not NTC, the 100k thermistors regularly used for 3d printing are NTC
catfish wrote:
Thu Feb 14, 2019 8:43 pm
This required cutting the ribbon from the extruder to the main board in order to break out the non-grounded wire for the temperature sensor (orange wire in the ribbon). Then the pin on the tinyfab MCU for the extruder sensor (P1.9) had to be cut to isolate the pin from the up mini circuitry. Then a simple 4.7Kohm pullup resistor was added that connected to a 3.3 Volt source on the MCU to the orange wire from the ribbon and this was connected to the connection at P1.9 on the MCU header. A 10uF capacitor was also connected to the junction and ground to stabilize the reading. After that, the config.txt was modified to inform Smoothieware that the sensor was now a thermistor with a Beta of 3950 and from that point on PLA prints perfectly.
uh, that's a pretty ugly hack but yes, that way you bypass the whole UP's RTD amplifier circuit that allows you to use stadard NTC setup in the smoothieware... that's one of the mistakes tinyfab made with that board... it would make much more sense to have 2 direct ADC inputs for NTC, also USB tracing on the motherboard is terrible, having usb port directly on the board and not passing the signals down to motherboard would be much much better idea.. exposing serial port too and also SPI for lcd :D .. but .. what's done is done .. for me it's easier to replace the both boards then to make new cpu board so I keep it as is on the upplus2.. I purchased one mini2box recently waiting for it to arrive (won't for another few months) .. we'll see what I'll do there.. maybe put klipper, maybe even let it run original stuff.. we'll see :)
catfish wrote:
Thu Feb 14, 2019 8:43 pm
Thanks to Arhi and tinyfab for their contributions. The Up mini now prints PLA without issue and the up mini is useful again :)
you are velcome... I'm not daily here but I come from time to time, if you send me private message I think I get email notification so I can come here faster :D

lambi
Posts: 4
Joined: Tue Jan 27, 2015 12:01 pm

Re: Custom MCU-module for UP! Mini...

Post by lambi » Wed Mar 20, 2019 9:45 pm

Hi arhi,

i was hoping you could give me a hint on 2 issues i seem to have...
current setup: Up! mini with the custom CPU provided by tinyfab (the one with wifi enabled, using esp3d), using his version of smoothieware (which I suspect to be your fork with the pt100 support enabled). I got two issues (which I suspect to be a configuration problem):
1. sometimes, when I turn on the printer, it just starts beeping and does not stop. I assume this has to do with access to the sd card (when I open the webinterface in these cases, the interface just opens fine but the sd card cannot be accessed). I suspected a faulty sd card, but testing it on a pc has shown no errors so far...
2. the stock extruder worked fine with the new CPU, I then decided to replace the stock extruder with the titan aero from e3d. To ensure compatibility, I also ordered their version of a PT100 to replace the standard Semitec thermistor they ship with the Aero. I managed to get the new PT100 running with the configuration you posted some while ago, and added the alpha and beta values I found for the e3d PT100. However, currently I suspect the theristor to report values slightly below the actual temperature. For example, in a room at ~25°, the output from the PT100 reads 17-18°. I am not entirely sure these values are wrong, but they do seem a little bit to low; I cannot verify them atm however as my thermometer broke... What do you think, do these readings look fishy to you?

For reference, the part of my config reads as follows:

Code: Select all

# First hotend configuration
temperature_control.hotend.enable              true
temperature_control.hotend.sensor              pt100
temperature_control.hotend.pt100_a             0.0039083    # PT100 ALPHA value
temperature_control.hotend.pt100_b             0.0000005775 # PT100 BETA value
temperature_control.hotend.pt100_r0            100          # resistance at 0C
temperature_control.hotend.thermistor_pin      0.23
temperature_control.hotend.ampmod1_pin         1.20           # UP! printer uses this to "energize" the RTD
temperature_control.hotend.ampmod2_pin         1.21           # set as nc if you don't need to energize RTD
temperature_control.hotend.slope               0.0257604875
temperature_control.hotend.yintercept         -18.54
temperature_control.hotend.heater_pin          2.7
temperature_control.hotend.set_m_code          104
temperature_control.hotend.set_and_wait_m_code 109
temperature_control.hotend.designator          T
temperature_control.hotend.max_temp            500
temperature_control.hotend.min_temp            0
Any idea or input is appreciated, thanks!

lambi
Posts: 4
Joined: Tue Jan 27, 2015 12:01 pm

Re: Custom MCU-module for UP! Mini...

Post by lambi » Tue Mar 26, 2019 9:36 pm

Update: after some tinkering, I think the pt100 is working as intended. The low temperature seems to be actually correct, the whole heater block seems to cools down pretty efficient.
Now I got another issue however: I can't seem to get the motor to do what I want, specifically calibrating the "e steps per mm" setting. I started with the default "837" as suggested by E3D, however with that setting the hotend only consumes only about 10-20mm of filament, not the 100mm it should... I'll try around with different values tomorrow, however, if anybody got an idea on what might be wrong...

Post Reply