Notifications
Clear all

Custom 3D Lighting Enclosure - Using X and Y Endstop pins  

  RSS
dominic.casar
(@dominic-casar)
New Member
Custom 3D Lighting Enclosure - Using X and Y Endstop pins

In preparation for setting up my LEDs into my enclosure, I have been looking into which pins I can use off the MK3/S mainboard to control the lighting VIA GCode. I have been following the tutorial from Thomas Sanladerer ( ) and Chris Riley ( https://www.youtube.com/watch?time_continue=8&v=ONyxRprg-Ag ) but just need to sort out which pins I can use. In total I want to have 4 signal pins, 3 for the RGB and one for an LED ring around the extruder.

I dont want to inadvertently affect any other printer functions, so I've narrowed it down to a few possible pins using https://reprap.org/wiki/EinsyRambo_development :

On the J19 Extension Header (where a Raspberry Pi can be connected), I was looking at pins 5, 7, 9, 11 or 12. Those I can access from the back of the board easily instead of opening it up. As well, it would keep pins 2, 4, 6, 8, 13 and 14 free for a Raspberry Pi later on.

5, 11 and 12 have PWM capability, which would be handy to control the colors and intensity of the RGB LED strips. The LED Ring is white only so that can have a simple on/off functionality.

I've also looked at maybe using the X, Y and Probe endstop pins, but would that affect the printer's function at all? They aren't being used, and from what I understand the Trinamic TMC2130 motors take care of finding the endstops, but are these pins still connected to that function?

 

If anyone has some better knowledge of what pins are free to use or best for my application, please let me know!

Thanks!

 

 

 

Posted : 22/07/2019 9:44 pm
vintagepc
(@vintagepc)
Member
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins

Be prepared to have to change firmware  entirely or do some serious alterations. The PR firmware does not have handling code for PWM pin LED control.

There's disabled stuff for red/blue temp LEDs and i2c blinkm, but that's it. 

Posted : 23/07/2019 11:51 am
dominic.casar
(@dominic-casar)
New Member
Topic starter answered:
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins

Thanks! I understand a great deal of coding is going to be required, it didnt seem too bad from the first video from Thomas, using M42 codes to activate the pins. Do you know if any of the pins I'm looking at using are already being used for other functions on the MK3/S?

Posted : 23/07/2019 4:23 pm
vintagepc
(@vintagepc)
Member
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins

Huh, I was not aware of M42 and was assuming you'd like to use M150. You may not need to do any coding apart from inserting said M42 commands in the desired locations in your gcode.

I don't know the answer to your question off the top of my head, but the schematics are readily available and so it should not be difficult to see if the lines in question are tied to multiple items. But that seems unlikely for risk of having something else interfere with (e.g.) your endstops.

Posted : 23/07/2019 4:27 pm
Nikolai
(@nikolai)
Noble Member
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins

If you have Raspi connected, I would rather do the implementation on Raspi and connect the strip to the Raspi.

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

Posted : 23/07/2019 5:05 pm
vintagepc
(@vintagepc)
Member
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins
Posted by: nikolai.r

If you have Raspi connected, I would rather do the implementation on Raspi and connect the strip to the Raspi.

That may be the only legit use for a Pi zero XD

Posted : 23/07/2019 5:06 pm
Nikolai
(@nikolai)
Noble Member
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins

It's not that bad. It can be used but in very limited manner. Still a very inexpensive and easy upgrade.

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

Posted : 23/07/2019 5:07 pm
scott.b47
(@scott-b47)
Trusted Member
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins
Posted by: dominic.casar

On the J19 Extension Header (where a Raspberry Pi can be connected), I was looking at pins 5, 7, 9, 11 or 12. Those I can access from the back of the board easily instead of opening it up. As well, it would keep pins 2, 4, 6, 8, 13 and 14 free for a Raspberry Pi later on.

 

I have not looked at the schematic, but I would not be surprised if MISO, MOSI, and SCK have uses other than the connector. These pins comprise the SPI bus, and that could conceivably be shared between internal and external peripherals. It's worth a careful double-check.

Posted : 30/07/2019 2:02 pm
Viorel
(@viorel)
New Member
RE: Custom 3D Lighting Enclosure - Using X and Y Endstop pins
Posted by: @scott-b47
Posted by: dominic.casar

On the J19 Extension Header (where a Raspberry Pi can be connected), I was looking at pins 5, 7, 9, 11 or 12. Those I can access from the back of the board easily instead of opening it up. As well, it would keep pins 2, 4, 6, 8, 13 and 14 free for a Raspberry Pi later on.

 

I have not looked at the schematic, but I would not be surprised if MISO, MOSI, and SCK have uses other than the connector. These pins comprise the SPI bus, and that could conceivably be shared between internal and external peripherals. It's worth a careful double-check.

MISO, MOSI, and SCK are used for communication with the Trinamic drivers so we can't use them. I'm still looking into other pins but I'll probably also go the raspberry pi way.

Posted : 20/10/2019 11:22 am
Share: