Notifications
Clear all

Extra pins on mk3  

  RSS
Bo Herrmannsen
(@bo-herrmannsen)
Active Member
Extra pins on mk3

Hi, 

are there any spare pins that could be activated with Gcode?

i'm thinking of build a device where i need to signal when print is done, and i dont want to have octoprint as the middle man
a simple high/low signal would do fine

Posted : 11/05/2020 2:28 pm
Mate and KVos4 liked
Bo Herrmannsen
(@bo-herrmannsen)
Active Member
Topic starter answered:
RE: Extra pins on mk3

or my idea could in fact be anything, it could be a huge fan to speed up the cooling of the bed once print is done

or it could be a high res DSLR camera to take better pictures

Posted : 11/05/2020 2:43 pm
Mate liked
KVos4
(@kvos4)
New Member
RE: Extra pins on mk3

It would be super useful if there were a way to use a GCode command to output an analog or even digital hi/lo signal on an extra pin on the main board.

 

If anyone happens to know how this could work please share!

Posted : 19/02/2021 2:03 am
Mate liked
Neophyl
(@neophyl)
Illustrious Member
RE: Extra pins on mk3

I can think of a way to do it that doesnt require any pins from the einsy board, or any board really.

Fit 2 microswitches to the printer frame.  One that is activated when the bed is fully forward, and the second that is activated when the extruder/x axis is at max height.  Wire them both in series.  When both are closed at the same time then that can be used to activate your external circuitry.

Then all you need to do is edit your end gcode in the slicer you use to move the bed fully forward (which is pretty much the prusa default anyway) and also move the extruder up to the top to activate the second switch.  Done.

You would need to design/modify and print a couple of brackets to hold the switches but there are hundreds on thingiverse designed to mount them to the slotted aluminium already.  Maybe a bit more difficult to do the one for the top but Id think a slight modification to one of the z screws holders would be possible.  Or a modification of the spool holder bracket so it can just be clipped over the top.

Posted : 19/02/2021 10:45 am
Mate
 Mate
(@mate)
Active Member
I would love to know the answer to the original question.

I would love to know the answer to the original question, so if anyone knows the answer that would be truly fantastic. 

Posted : 26/07/2021 6:59 pm
bobstro
(@bobstro)
Illustrious Member
M42 is supported according to the Prusa Knowledgebase

The Prusa documentation on supported gcode commands does list M42 with a link to the RepRap command description. I have not tested this myself.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 26/07/2021 7:44 pm
Mate liked
Mate
 Mate
(@mate)
Active Member
pin to connect the relay

Thanks for the tip! Do you know how can I locate a free i/o pin so I could control the relay with 5V?  
Could I use one of the pins for the end stops? Well I am quite clueless so any help would be highly appreciated for a novice. 

 

Posted : 27/07/2021 12:19 pm
Peter M
(@peter-m)
Noble Member
1

" huge fan to speed up the cooling of the bed once print is done"

Could work, but this will help warping of the print.

Posted : 29/07/2021 5:18 pm
towlerg
(@towlerg)
Noble Member
OctoPrint?

Rather than burden your mainboard with additional works, there are many OctoPrint plugins that do that sort of thing.

Posted : 30/07/2021 1:13 pm
Mate
 Mate
(@mate)
Active Member
Burden?

Well the additional burden is a 5v signal at the end of the print, I don’t see any problem with that. 

I don’t use a pi but a mini pc with linux, that’s where the octoprint is running. Anything happens with Octoprint or the pi/ minimpc and this functionality is gone. I would not think for a second about “burdening” the board and directly control the safety relay without placing additional hardware and software just to implement this dead simple solution. The only problem is my limited knowledge, that is the only reason why I bought a Sonoff smart plug and will control it with an octoprint plugin. This option is easy to implement and i gave up my initial plan after wasting  5-6 hours just trying to find out which pin I could connect the relay to on the board.  What I do not like about this is the fact that the relay is controlled wirelessly and it requires a network. 

Posted : 30/07/2021 1:47 pm
Nikolai
(@nikolai)
Noble Member
.

You can take this example and use it for other purposes:

https://blog.prusaprinters.org/how-to-create-beautiful-3d-print-timelapse-videos_29743/

Often linked posts:
Going small with MMU2
Real Multi Material
My prints on Instagram

Posted : 30/07/2021 2:14 pm
Mate liked
Mate
 Mate
(@mate)
Active Member
RE: Perfect!

Awesome thank you so much! 

This post was modified 3 years ago by Mate
Posted : 30/07/2021 2:19 pm
Nikolai liked
towlerg
(@towlerg)
Noble Member
Sorry

Sorry Bo I didn't read your original post. I take your points but if I may, using printer mainboard means that you need to recompile for every new revision from Prusa. I accept that it's a matter of opinion but I would not run OctoPrint on any hardware that was not running a RTOS, but thats just me

Posted : 30/07/2021 3:50 pm
Mate
 Mate
(@mate)
Active Member
no need to tweak the firmware.

No worries mate! But I don't understand your point because m42 is supported by the original Prusa firmware as @bobstro pointed it out. So I don't really see any issue there, I don't think you would have to tweak the firmware. 

Posted : 30/07/2021 4:44 pm
bobstro
(@bobstro)
Illustrious Member
Posted by: @mate

No worries mate! But I don't understand your point because m42 is supported by the original Prusa firmware as @bobstro pointed it out. So I don't really see any issue there, I don't think you would have to tweak the firmware. 

That's my understanding as well. You can use M42 in gcode without any changes to the current firmware. However:

  • I haven't actually tested this.
  • Finding a free pin to use is a challenge.

My inclination would be to do this sort of thing with OctoPrint because of the ready availability of pins and no need to keep slicer profiles updated. I don't think there's anything wrong with using M42 though.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Posted : 30/07/2021 5:36 pm
Mate
 Mate
(@mate)
Active Member
RE: the answer again.

@bobstro, I think you have missed @nikolai's answer:  https://blog.prusaprinters.org/how-to-create-beautiful-3d-print-timelapse-videos_29743/  

Posted : 30/07/2021 8:42 pm
towlerg
(@towlerg)
Noble Member
RE: no change to firmware

@Mate your correct, no need to change firmware, I didn't realise you set the GPIO pin in M42 I thought you'd need to define it.

This post was modified 3 years ago by towlerg
Posted : 31/07/2021 3:37 pm
Mate liked
Share: