Duet 2 Maestro wiring to Raspberry Pi Zero
-
So I’m looking at installing a Raspberry Pi Zero W on my Duet 2 Maestro. I’d like to be able to connect an unused GPIO from the Duet 2 Maestro directly to the Raspberry Pi Zero W GPIO. I know the older Duet boards were all 3.3V, and I thought I read somewhere the Duet Maestro pins were also 3.3V but also tolerated higher voltages on certain pins. Is it as simple as GPIO to GPIO?
I’m looking at having the Raspberry Pi Zero W take a picture with its camera when a GPIO pin goes high, and then have some sort of done GPIO pin back to the Duet Maestro. I know this is do-able over http or telnet, but I want more of a contained solution that doesn’t rely on WiFi or Ethernet working.
From what I’ve seen the Raspberry Pi pins are 3.3V
Voltages Two 5V pins and two 3V3 pins are present on the board, as well as a number of ground pins (0V), which are unconfigurable. The remaining pins are all general purpose 3V3 pins, meaning outputs are set to 3V3 and inputs are 3V3-tolerant. Outputs A GPIO pin designated as an output pin can be set to high (3V3) or low (0V). Inputs A GPIO pin designated as an input pin can be read as high (3V3) or low (0V). This is made easier with the use of internal pull-up or pull-down resistors. Pins GPIO2 and GPIO3 have fixed pull-up resistors, but for other pins this can be configured in software.
But is it really that simple and straightforward or should I be putting some sort of optocoupler circuit in between?
-
There is at least the 'zprobe_in' pin which is 30V tolerant, but AFAIK the endstops, too.
-
@pdbeal I think you are saying that you want to drive a pin as an output on the Duet Maestro and have the Pi read that pin.
I suggest you connect a resistor between the Maestro output pin and the Pi input pin, to limit the current that will flow if the Duet is powered but the Pi isn't, or vice versa. 10K should be a suitable value.
To choose a suitable pin, if you are using RRF3 then see https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names_for_Duet_2_Maestro for the list of pin names. Suitable pins to use as 3.3V outputs are zprobe.mod (if not already used for BLTouch or Smart Effector), exp.pa3, exp.pa4, exp.pa21 and exp.pa22.
The Duet and Pi must have a common ground.
-
@pdbeal said in Duet 2 Maestro wiring to Raspberry Pi Zero:
and then have some sort of done GPIO pin back to the Duet Maestro.
@dc42 it's a bidirectional thing with two IO pins.
-
Perfect. That was exactly what I wanted to know. Thanks!