Hello everybody, I'm new to this form.
I'm building a large cnc that i want to controle with arduino due and grblhal.
What i'd like to know, is there anay wiring diagram available on how to connect my stepper driver directly to the due, (without using any kind of shield)
I know that, i won't be powering the drivers from the due, all i want to know is, in which pins i need to plug my axis, limit switches and so on.
Thank you for your reply
I didn't talk about powering the driver ( the DM542T needs much more than 5V as power source ). I talked about the connections to the step/dir/enable inputs of the DM542T. You cannot connect them directly to the Due - no matter what pin you use.
Which pin is used for step/dir/enable depends on the sketch, not the driver you use.
These level shifters are designed for bidirectional I2C bus connections. I don't think they are a proper solution to drive the optocoupler at the DM542 input. The OP needs a 5V buffer IC with TTL compatible inputs.
P.S. A guess: the grblhal pins for the due maybe the same as for the MEGA, as both have the same pin layout.
This is the schematic (Fig-1) of one section of the level shifter. If you provide the part number or link of the opto-coupler, I can check if the level shifter can drive the device.
Well, it's the input circuit of the DM542T stepper driver. It's the optocoupler LED in series with a 270Ohm resistance, and needs 5V for reliable operation.
[EDIT]That's about 13mA ( depending on the saturation voltage of the LED ). Even if you use it as LOW activ, the shifter cannot provide any current - the current must be provided by the MCU. The max sink current depends on the pin and is 6mA or 9mA max - depending on the pin.
Datasheet says control input current is 7 ~ 16mA, I would use an NPN transistor to pull the - input to ground (2N3904 or equivalent) as in datasheet page 4, figure 2. With 3.3V a 680 ~ 820Ω base resistor should work.
I have found the 2501 opto-coupler in my drawer at the very first look; but, I am late to report the test result owing to my engagement in the kitchen to prepare dinner for my two sons (35, 25) as my wife has gone for pleasure trip with my daughter and two grandsons (37, 31/2, 11/2). They will come back tomorrow inshallah.
Here is the static test setup using the isolated 2501 opto-coupler, and the result is positive -- I mean the device responds as I chnage the input logic to 3.3V and then to GND. (I could not series connect the 270 R resisitor due its unavailability; however, it's value is low compare to 10 k pull-up at the HV1' side of the level shifter.)