UMO / UMO+ Firmware

Topics related to printer firmware
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: UMO / UMO+ Firmware

Post by Amedee »

I just released a fun one today: Support for Filament Runout Sensor!

Available from the builder as well ;)

Credits go to the Marlin team, I just backported to the UMO version and amended my builder.

Should work with the tunell.us sensor or any home-made sensor.
You just need to choose a free pin, decide if you trigger on low or high and if you want to use the internal pullup or not.

For the UMO (1.5.x boards), take one of Exp3 pins (8-13); for the UMO+ (2.x boards) I would recommend the Exp3 connector as it gives you Pin/5v/Gnd side by side. Alternatively there are 2 other pins available on Ext/IO.

Note that it only works if you print from SD -- I still need to figure out how to reliably detect USB print (We cannot trigger a runout when we are not printing!)
User avatar
Neotko
Reactions:
Posts: 1142
Joined: February 7th, 2016, 7:02 pm
Location: Madrid
3D Printer(s): UMO+ x2.5
Contact:

Re: UMO / UMO+ Firmware

Post by Neotko »

@Amedee maybe you could know when the print starts and finishes just like the time counter does. I mean, the time starts when something gets a M104 to turn bed or M10xx the hotend. And if you do a M (can't remember now) the gcode that turns all off, then the clocks stops. I know this because if you set a temp after that to mimic an atomics, the time starts again and stops after the all off gcode.

So by using the same principle (hot starts the clock, heat off stops the clock) you could know when something goes and finish even if it's usb?

Just an idea
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: UMO / UMO+ Firmware

Post by Amedee »

Yes, starting is relatively easy -- the M109 is a good candidate, it already starts a timer. Stop is more guesswork -- we can assume that the slicer will turn the heater off (M104 S0) and release the steppers (M84).

Ideally issuing an M31 at the end of the GCode would be perfect, but it is not in the default Cura End code... I can add it there, on in my case in the OctoPrint profile, but it is not guaranteed to be there...

My thoughts so for now would be to mandate the M31:
  • If it is used for timing the prints, it won't just time if you do USB and don't add the M31 (I'll check the UM2 code, but I don't think they time USB prints either)
  • If it is for the filament check, you should be an 'advanced user' and you should understand the requirement :roll:
(And I think I am the only one anyway who does USB printing)
User avatar
Neotko
Reactions:
Posts: 1142
Joined: February 7th, 2016, 7:02 pm
Location: Madrid
3D Printer(s): UMO+ x2.5
Contact:

Re: UMO / UMO+ Firmware

Post by Neotko »

Sounds very good! M31 it's easy to add on cura/s3d for any print. I don't use usb I walk the stairs to my print room with sd. More than once I forget them and I have to rewalk. My iPhone stairs stimates 12 stairs walk up a day for this month/each day. I suppose UMO cares about my health :D!!
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: UMO / UMO+ Firmware

Post by drayson »

Keep walking... :-)
User avatar
martin-bienz
Reactions:
Posts: 172
Joined: February 22nd, 2016, 2:42 am
Location: Switzerland
3D Printer(s): Ultimaker Original, prusa i3 mk2

Re: UMO / UMO+ Firmware

Post by martin-bienz »

Amedee wrote: (And I think I am the only one anyway who does USB printing)
hehe, yeah ... and everybody else that is using octoprint, right? :)
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: UMO / UMO+ Firmware

Post by drayson »

Guys, short question:
I ported amedees backport of the "Support for Filament Runout Sensor" to my UMO FW and came across the KillPin definition.
How could I use this to address the "lcd_sdcard_stop" - function via a simple switch related to e.g. Pin9 at Exp3 ?

Is it "just define the Pin" or is there something else needed/to consider - as I don´t want to fry my UMO board :-)
I read somewhere that e.g. the kill button from saintsmart displays are not supported for UMO as it shorts something...
Hope I have not mixed up the facts...


b.t.w.: my "lcd_sdcard_stop" moves the head aside (thanks to alexborro's development)
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: UMO / UMO+ Firmware

Post by Amedee »

The kill pin is initialized with the Atmega internal pull-up resistor. You activate it by grounding the pin.

So if you want to assign it to Pin9 at Exp3 with a swithch, the other side to the switch need to go to ground and be open in normal operation (NO switch).

Note that Pin9 at Exp3 is Atmega Pin 18 ;)
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: UMO / UMO+ Firmware

Post by drayson »

So assigning Pin 18 to Killpin in pins.h and putting a switch between pin 18 and Ground may do the job like an emergency stop.
ok, understood so far for using the killpin functionallity

BUT:
if i´d like to assign the pin signal at Pin9 (digital 17) to the behavior of "lcd_sdcard_stop" function? Could you please give me a heling hand here too?
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: UMO / UMO+ Firmware

Post by Amedee »

I think I confused everybody including myself for the pin numbers, as Arduino maps its pins to the processor pins automatically, so if you want Pin 9, it is 9, not 17.
(The reverse mapping needs to be done for the UMO+/Ultiboard V2 as the schematics gives the ATmega port).

To answer you question, the check is done here, so you have to replace the kill() routine by your stuff.
User avatar
Neotko
Reactions:
Posts: 1142
Joined: February 7th, 2016, 7:02 pm
Location: Madrid
3D Printer(s): UMO+ x2.5
Contact:

Re: UMO / UMO+ Firmware

Post by Neotko »

@Amedee could I make a (in theory easy) request?

I'll like to have on your fantastic builder an option to enable the option called
//#define FAN_KICKSTART_TIME 100
it's on Configuration_adv
This makes the fan 'kicks' on at full for 100milliseconds. I'll like also if posible to change the number of milliseconds that it's full. Like 200-300-400

I'm asking for this because for my fan cap, for Cura users might be hard to use the same fans model I use because they only start to move at 40% and they need a kickin. I do this with S3D so for me it isn't a problem at all, but Cura doesn't have that option.
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: UMO / UMO+ Firmware

Post by drayson »

Sorry for begging but I´m not so good in reading code...

When selecting the Pins - there is a pre-definition for Pin 12 for #define PS_ON_PIN - I assume that this Pin12 is the one at EXP3 - isn`t?
Or is a different Pin12 ment? (are there more than one Pins with the same pin numbering?)

I would appreciate your assistance because otherwhise I cant´t learn from this :-)
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: UMO / UMO+ Firmware

Post by Amedee »

I am pretty sure it is a bug in the UMO config that was never fixed -- it looks to me an heritage from Reprap.

Pin 12 is not connected to anything on the 1.5.x boards, and in the HBK firmware it is set to -1.

You can see that you have a 'power off' menu item in your controller which just does nothing!
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: UMO / UMO+ Firmware

Post by drayson »

Thanks for clarification. So I will use PIN12 for something else.
My Plan: provide 3 Servo outputs, a laser output, filamant sensor and estop with the available pins.

First servo is already in at PIN13, Laser at PIN10 and the rest is silence...
We will see what will happen during the next (wife-free) days :-)
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: UMO / UMO+ Firmware

Post by Amedee »

I committed a couple of changes over the week-end
  • @Neotko request to have the fan kickstart in the builder
  • Removed PS_ON_PIN assignment for naked UMO (as reported by @drayson) -- as side effect it will remove the 'power off' option which does nothing in the controller menu!
  • Fixed a Marlin bug related to auto.g files (for the ones still printing with SD-Cards :roll: )
Details in the commit log ;-)
Post Reply

Return to “Firmware”