using expansion pins directly
-
Hello everyone.
I've got my CNC electronics all wired up but I'm having some issues that hopefully someone can help me with.
I'm using the duet2 wifi with the external driver expansion board. I bought a longer ribbon cable so that I could utilize the e2_stop - e6_stop pins from the expansion header. I'm having a tough time finding any documentation on how to utilize those pins correctly.
I was able to find some forum posts that call them for endstops using the exp. prefix for the pins when used directly off the board, and duex. prefix if they are using a duex board. I'm not using a duex board so I assume that I should be using the exp. prefix. so I have
; Endstops M574 X1 S1 P"exp.e2stop" ; configure active-high endstop for low end on X via pin xstop M574 Y2 S1 P"exp.e3stop+exp.e4stop" ; configure active-high endstop for high end on Y via pin ystop and on e0stop M574 Z2 S1 P"exp.e5stop" ; configure active-high endstop for high end on Z via pin zstop
for my endstops. I have noticed that there is not voltage potential between the e2_stop pin and ground, so to actually use those pins do I have to apply 3.3V, or 0V to make that work?
My hardware is currently using a mechanical relay which closes between e2_stop and ground. If I just replace then ground with the 3.3V line would that work correctly? Would I need a 1k resistor to limit the current draw on the 3.3V line?
Here is my config.g it is not complete but I'm just getting started.
Thanks for your help.
; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.0 on Thu Aug 19 2021 13:14:05 GMT-0600 (Central Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"CNC Router" ; set printer name ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; External Drives M569 P6 S1 R1 T5:2.5:5:7.5 ; external drive 6 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time M569 P7 S1 R1 T5:2.5:5:7.5 ; external drive 7 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time M569 P8 S1 R1 T5:2.5:5:7.5 ; external drive 8 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time M569 P9 S1 R1 T5:2.5:5:7.5 ; external drive 9 goes forwards requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time M569 P10 S1 R1 T5:2.5:5:7.5 ; external drive 10 goes forward requires an active high enable, 5us minimum step pulse, 2.5us minimum step interval, 5us DIR setup, and 7.5us hold time ; Disable internal drives M569 P1 R-1 ; disable physical drive M569 P2 R-1 ; disable physical drive 2 M569 P3 R-1 ; disable physical drive 3 M569 P4 R-1 ; disable physical drive 4 M569 P5 R-1 ; disable physical drive 5 ; Map axis drives M584 X6 Y7:8 Z9 A10 ; set drive mapping ;M350 X64 Y64 Z16 E16 I0 ; configure microstepping with interpolation ; Set drive speeds M92 X104.47 Y104.47 Z640.00 A420.00 ; set steps per mm M566 X100.00 Y100.00 Z60.00 A120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 A1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 A250.00 ; set accelerations (mm/s^2) ;M906 X800 Y800 Z800 A800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X1250 Y2480 Z330 S0 ; set axis maxima ; Endstops M574 X1 S1 P"exp.e2stop" ; configure active-high endstop for low end on X via pin xstop M574 Y2 S1 P"exp.e3stop+exp.e4stop" ; configure active-high endstop for high end on Y via pin ystop and on e0stop M574 Z2 S1 P"exp.e5stop" ; configure active-high endstop for high end on Z via pin zstop ; Z-Probe ;M558 P1 C"zprobe.in" H5 F120 T15000 ; set Z probe type to unmodulated and the dive height + speeds ;G31 P500 X0 Y0 Z2.5 ; set Z probe trigger value, offset and trigger height ;M557 X15:215 Y15:195 S20 ; define mesh grid ; Heaters ;M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp ;M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0 ;M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit ;M140 H0 ; map heated bed to heater 0 ;M143 H0 S120 ; set temperature limit for heater 0 to 120C ;M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp ;M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1 ;M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit ;M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Temperature sensors M308 S0 Y"mcu-temp" A"MCU" ; create mcu temperature M308 S1 Y"drivers" A"Stepper driver" ; create driver temperature ;M308 S2 P"TC0" Y"thermocouple-max31856" A"box" ; create enclosure temperature type K sensor ; Fans ;M950 F0 C"bedheat" Q500 ; create fan 0 on pin bedheat and set its frequency M106 P0 L50 T30:45 H4 ; set fan 0 to minimum of 50 value. Thermostatic control is turned on based on MCU temp ;M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency ;M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 S"Spindle" R0 ; define tool 0 as Spindle 0 M950 R0 C"bedheat+e0heat+e1heat" Q500 L0:18000 ; spindle 0 uses bedheat for RPM pwm, e1heat for forward, fan2 for reverse G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined M453 ; Make CNC board
-
After looking at the documentation for the arm chip it looks like I need to enable the pull up resistor. I’ve done that and now the inputs work. I’ve also named them with the exp. prefix and that seems to work.