Arduino as Z-Probe questions
-
Sure you can.
There are are couple of ways you can do it to keep the Duet safe:
- Configure the Arduino output as an Open-Collector output and add a pullup resistor to 3.3 Volts.
- Place a diode between the Arduino and Duet (Cathode towards Arduino) and add a pullup resistor to 3.3 Volts on the Duet side.
It would probably be a good idea to add a series resistor between the two parts just to add more safety. I don't know, maybe 1,000 Ohms?
The Z_PROBE_MOD pin is an output from the DUet tht can control a servo to deploy a BLTough for example.
-
@alankilian said in Arduino as Z-Probe questions:
The Z_PROBE_MOD pin is an output from the DUet tht can control a servo to deploy a BLTough for example.
Does that mean, I can use that pin, to ouput a servo pwm signal from the duet using the following configuration?
M950 S0 C"zprobe.mod" ; assign GPIO port 0 to heater3 on expansion connector, servo mode ... M280 P0 S80 ; set 80deg servo position on GPIO port 0
Can I hook that pin up to the Arduino to read the signal issued by the M280 command?
-
You can do that.
Also, and maybe easier, you can just make it a PWM output and change the duty cycle of the pulses instead of reading a 1-2 millisecond high-going pulse every 20 milliseconds which is what a Servo pin will produce.
PWM and servo functions described HERE.
-
@AdrAs said in Arduino as Z-Probe questions:
I'm currently working on a project which involves an Arduino microcontroller as probe interface. Arduino is generally running on 5V. Is it possible to use it to trigger the Z_PROBE_IN pin using the Arduino? How would I go about it? And what is the Z_PROBE_MOD pin for?
Unless it's an old Duet, the Z probe input pin can tolerate up to 30V so you can connect the Arduino output to it directly.
Whether you can use Z_PROBE_MOD to control a servo depends on which Duet you have.
-
@dc42 I've got a Duet 2 Wifi
Unless it's an old Duet, the Z probe input pin can tolerate up to 30V so you can connect the Arduino output to it directly.
What do you consider as an old Duet?
-
Duet WiFi version 1.04 has 30V tolerance on the Z probe pin. Older Duet WiFis are not.
On Duet WiFi the Z Mod pin is not PWM capable, so it cannot be used to drive a servo.
-
Many thanks for that clarification! I've got a 1.02 wifi, so I guess I need to work with resistors
-
@dc42 said in Arduino as Z-Probe questions:
Duet WiFi version 1.04 has 30V tolerance on the Z probe pin. Older Duet WiFis are not.
I've got a 1.02 WIFI, so I guess this means the Z probe pin can only handle 3.3V, right?
-
@AdrAs said in Arduino as Z-Probe questions:
I've got a 1.02 WIFI, so I guess this means the Z probe pin can only handle 3.3V, right?
Yes.
-
I learned some new stuff about the Duet series boards today!
I love days like this.
-
That's great. And I learned, that I skip all the arduino 5V conversion stuff, and just go for an ESP module for my project More Mhz, more memory, and free WIFI I'll never use
-
They also make 3.3 Volt Arduino-compatible boards if you want to stick with that.
(And a Trinket USB-attached Arduino, although I've had problems with trinkets before.)
-
@alankilian Thanks, they are a bit too slow though. I need at least 16 Mhz
-
@AdrAs said in Arduino as Z-Probe questions:
@alankilian Thanks, they are a bit too slow though. I need at least 16 Mhz
There are several Arduino boards that use 3.3 volts and have 16 MHz or better clock speeds.
I was looking at one the other day that had 1M of program memory, 256KB of ram and a clock speed of 64MHz.
Frederick
-
@AdrAs said in Arduino as Z-Probe questions:
@alankilian Thanks, they are a bit too slow though. I need at least 16 Mhz
There are SOME of Arduino-compatible 3.3 Volt boards that run fast available.
-
@alankilian Thanks for the list. However I couldn't find anything which is small, running on 3.3v and has >16 mhz. Nevermind though, The ESP should arrive today and suits all my needs for now.
-
@AdrAs said in Arduino as Z-Probe questions:
@alankilian Thanks for the list. However I couldn't find anything which is small, running on 3.3v and has >16 mhz. Nevermind though, The ESP should arrive today and suits all my needs for now.
Did you see this one:
No WiFi but even smaller than the ESP and runs at a respectable 64 MHz.
Frederick
-
For 3.3v Arcuino the SMT32 blue/blackpill are a good choice. Inexpensive, good documentation, support hardware debugger, support the Arduino framework, have USB C connector (e.g. for serial output), have a builtin DFU bootloader (for dongle-less field programming), and are compatible with platformio (great dev experience).
E.g.
https://www.amazon.com/Aideepen-Programming-Emulator-Downloader-STM32F103C8T6/dp/B07WRL3DF8 -
-
@dc42 I've got another question I hope you can help me.
- When are the deployprobe and retractprobe macros executed? Only when a BLTouch is connected, or for the other probe types as well?