Help with DC motor configure
-
I've tried the install a small DC gearmotor on heater E1 with no success. I wish to turn it on and off using a macro. No joy - can anyone suggest the config.sys entries and associated on and off commands. Thanks.
-
@Ethelred I don't know what firmware you are running but I control my LED lighting with this -
in config.g
; Lighting M950 P3 C"io1.out" Q500 ; create fan 0 on pin io1.out and set its frequency (LED1) M42 P3 S0 C"LED" ; set LED 0 value. Thermostatic control is turned off
simple on/off Macro
; Light switch If state.gpOut[3].pwm = 0 M42 P3 S255 else M42 P3 S0
you should be able to change the pin to match your setup.
-
@Ethelred said in Help with DC motor configure:
I've tried the install a small DC gearmotor on heater E1 with no success. I wish to turn it on and off using a macro. No joy - can anyone suggest the config.sys entries and associated on and off commands. Thanks.
Which Duet are you using?
-
@dc42 Duet2 /Ether running RRF 3.4.1.
I'm electronically clueless and cooked one of the fan ports. The gearmotor wants 5v at about 100ma. On/off only.
The documentation refers to Port0 but the expansion connectors range from 1 to 50 - I'm also not clear on the port naming issue in RFF3.
A sample config and where the wire connect (1 to 50) whould be greatly appreciated. Thanks for your help, both of you. -
@dc42 David - Still struggling - see photo connected to pin1 5v and pin 13. Stays high dispite my efforts with M42 ......
The config entries are
; Purge Tool
M950 P13 C"HEATER4" Q250
M42 P13 C"PURGE" S0
Note the printer starts with the voltage at 4.91 volts as pictured
-
@Ethelred Can you explain again what you are trying to do and what you are actually connecting to where.
The thread says you want to connect a motor to E1, but your latest photo apparently shows you connecting a multimeter to the expansion port - possibly between the +5V pin and HEATER_4 pin. A pin in the expansion port won't be able to drive a motor.
I'm not sure what voltage the expansion header runs at - I'd guess 3.3V signals is most likely, but it might be 5V signals, but if you've got 5V across the +5V and the signal pins, that just means the signal pin is at 0V.
M42 doesn't take a C parameter, I believe.
Heater 4 on the the expansion header is named exp.heater4, according to https://docs.duet3d.com/Duet3D_hardware/Duet_2_family/Duet_2_WiFi_Ethernet_Hardware_Overview#inputoutput and that's what should be in you M950.
You've set a PWM frequency at 250Hz. I doubt the multimeter will be accurate with a 250V signal, but as long as you're setting the pin full on or full off that's probably not an issue.
-
@Ethelred it should be possible to use the E1 heater output to drive a small DC motor, however you will need to connect a flyback diode in parallel with the motor because Duet 2 does not have flyback diodes on the heater outputs. Without the flyback diode, the back emf from the motor will burn the mosfet out. Connecting the flyback diode the wrong way round will also burn the mosfet out.
The heater pins on the expansion header provide 3.3V at low current, so not suitable for driving a motor directly.