Notifications
Clear all

[Solved] Prusa i3 MK3S change pin states  

  RSS
The3Designer
(@the3designer)
New Member
Prusa i3 MK3S change pin states

Hello everyone!

For an assignment, I want to have my Prusa i3 MK3S trigger a certain function (in code) that is running on an ESP32 development board. At the moment, I'm using pin 73 in combination with the M42 command to set this pin to either HIGH (5V) or LOW (0V) to send a signal to the ESP32 (pin 73 is connected to an input pin of the ESP32, with a logic converter to reduce the 5V to 3.3V).

However, when starting/booting up the printer, pin 73 has a default value of ±2.6 volts (according to my multimeter), which interferes with my signal processing. So I would like to know why the "default state" of pin 73 is this ±2.6 volts and if this default state can be changed to be either HIGH or LOW.

If this is not possible, then I'd like to know if it is possible to use the same M42 command to set the positive pin of the endstop connector to HIGH or LOW. The X and Y endstop connectors (that are not used) have a default value of +5V, which would work great with my code... at least, if I can switch the state of this pin using G-code commands. So, is this possible? And if so, what are the pin numbers of these connectors that I must use in the G-code?

I'd really appreciate it if someone can help me, as I haven't been able to find anything about either two of these questions online.

Best Answer by Nikolai:

Hi,

Welcome to the world of electronics :). A quick look into the schematics reveals a direct connection for this pin from the ATMEGA to the connector:

https://github.com/ultimachine/Einsy-Rambo/blob/1.1a/board/Project%20Outputs/Schematic%20Prints_Einsy%20Rambo_1.1a.PDF

That means you have in the initialization procedure a floating signal. It can be any value. Your "default state" you can set by adding a pull up or pull down resistor (something between 10k-50k). Pull up means you will have 5V if nothing set, pull down means 0V.

Posted : 30/04/2020 2:21 pm
Nikolai
(@nikolai)
Noble Member
RE: Prusa i3 MK3S change pin states

Hi,

Welcome to the world of electronics :). A quick look into the schematics reveals a direct connection for this pin from the ATMEGA to the connector:

https://github.com/ultimachine/Einsy-Rambo/blob/1.1a/board/Project%20Outputs/Schematic%20Prints_Einsy%20Rambo_1.1a.PDF

That means you have in the initialization procedure a floating signal. It can be any value. Your "default state" you can set by adding a pull up or pull down resistor (something between 10k-50k). Pull up means you will have 5V if nothing set, pull down means 0V.

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

Posted : 30/04/2020 4:50 pm
The3Designer
(@the3designer)
New Member
Topic starter answered:
RE: Prusa i3 MK3S change pin states

@nikolai-r

Thanks for the tip, I would've never thought of that!

Adding a 10k ohm resistor to ground (pull down) works like a charm 🙂
Now the voltage is steady and no longer messes up the signal going to the ESP32.

Thanks again for helping!

Posted : 30/04/2020 6:51 pm
Nikolai liked
Share: