Using M42 Command to Engage/Disengage a Ground Pin
-
I need to have a single pin change from no signal to a grounded signal using the M42 command.
Questions:
- Which physical pin should I use?
- Are there any pull down pins, or do I need to install my own pull down circuit?
- Where is this pin physically located on the board?
- What is this pin called in software? Meaning what pin do I call with the M42 command?
-
I've answered my own question.
- Fan pin 2
- Yes the negative pin on the PWM controlled fan pins has a pull down resistor circuit.
- FAN2 is at the end of the row of fan plugs. See schematic
- No, you cannot access it with M42. It is accessed with M106. eg. M106 P2 S0
My fundamental misunderstanding was thinking that M42 would control any pin. It does not. Now that I understand what is going on, the "Logical pin numbers" table on this page makes more sense: https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins
Basically, look in the far right column first. There you will see the Gcode command which will address the pin in the second column from the left. Using the heater pins you can control Servos, and using the fan pins you can control many other types of PWM devices. The pinout diagram will tell you where the fan and heater pins are physically located: https://d17kynu4zpq5hy.cloudfront.net/igi/duet3d/YN2oahyGpcPNN1Pw.huge For example, pin8 on the Expansion header corresponds with heater pin 3 in the following servo G-Code command: M280 P3 S10 I1
I have not figured out how to address all the other pins in the expansion header using M42.
-
@punamenon said in Using M42 Command to Engage/Disengage a Ground Pin:
My fundamental misunderstanding was thinking that M42 would control any pin. It does not. Now that I understand what is going on, the "Logical pin numbers" table on this page makes more sense: https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins
Yes you can control a fan pin using M42. That page says how.