Hobbyservo controlled part cooling fan (compressor+valve)
-
@Visionary said in Hobbyservo controlled part cooling fan (compressor+valve):
I switched to attempting to get working the smaller (MS-1.3-9) servo.
I've connected it following way on 6HC:- Orange wire || Out9 (5V PWM)
- Red wire || +5V (external DC-DC converter)
- Brown wire || GND (external DC-DC converter, which is not directly connected atm to main 24V PSU GND)
I agree with that colour scheme and wiring layout. As previously, I would expect the DC-DC converter to have the 0V in and 0V out connected together internally (if you have a multimeter you could check there's no voltage across them, but I doubt this is the problem).
I've also noticed that at start up the servo moves (after I removed fan assigments), but I still can't move it with G-code commands like M280 P5 S50. Instead the servo makes noise that indicates its trying to hold its position. The servo also makes random twiches and overheats the servo.
That's slightly positive. Twitching servo sounds like it's at least trying to do something.
Current config:
; Servo for compressor fan valve M950 S5 C"out9" ; assign GPIO port 1 to out9 (Servo header), servo mode M280 P5 S30 ; Move servo with
Looks OK to me.
I don't see anything wrong. At this point I'm grasping at straws, but:
- try some different S values in M280 (as @droftarts suggests)
- I see the fan is now commented out of the config file, but is anything still physically connected on OUT9? (I don't think it will matter actually, but worth a try disconnecting it if it is?)
- try connecting the orange wire to io7.out and changing the config line to
M950 S1 C"io7.out"
andM280 P1 S<whatever>
(this is just in case something is up with your out9 on the board, from config it doesn't look like you're using io7 yet)
-
@droftarts said in Hobbyservo controlled part cooling fan (compressor+valve):
@Visionary try
M98 P”/sys/config.g”
This didn't work either, got the same error.
Almost all servos accept a pulse width range of at least 1us to 2us, which corresponds to an S parameter range of 44.2 to 141.2 degrees. So for many servos, values in the range 44.2 to 141.2 or alternatively 1000 to 2000 will cover the full operating range of the servo.
I didn't realize to check allowed servo angles. I thought they all started at 0 Degrees.
I checked the correct allowed pulse widths for both servos.
I changed to using microseconds in the command, but that didn't work and I got the same result. -
@achrn said in Hobbyservo controlled part cooling fan (compressor+valve):
I agree with that colour scheme and wiring layout. As previously, I would expect the DC-DC converter to have the 0V in and 0V out connected together internally (if you have a multimeter you could check there's no voltage across them, but I doubt this is the problem).
Tested the difference in voltage and it was 0V.
- try some different S values in M280 (as @droftarts suggests)
- I see the fan is now commented out of the config file, but is anything still physically connected on OUT9? (I don't think it will matter actually, but worth a try disconnecting it if it is?)
- try connecting the orange wire to io7.out and changing the config line to
M950 S1 C"io7.out"
andM280 P1 S<whatever>
(this is just in case something is up with your out9 on the board, from config it doesn't look like you're using io7 yet)
Switching S value didn't work (that were on the product page of the servo), but I might keep trying other values anyways. Nothing is connected to out9 (fan) pin. I changed to io7.out in config and rewired the servo and it behaves the same as before.
Btw how do you differentiate between fan pin out9 and 5V PWM pin out9 in config?
The green arrow points to the pin I've been using as out9. -
@Visionary said in Hobbyservo controlled part cooling fan (compressor+valve):
Btw how do you differentiate between fan pin out9 and 5V PWM pin out9 in config?
You don't need to. Both pins are driven in parallel - the pin you've arrowed and the OUT9 fan (or whatever) connector next to it are both driven together - the arrowed pin is the control signal (at 5V) and the OUT9 connector next to it is the drain of a MOSFET that has that control signal applied to the gate.
That is, if you have a fan on OUT9 and control that as normal for a fan, the VFD/Laser/Servo pin will also be switching between 0V and 5V but you just leave the pin unconnected and that's not a problem. Alternatively, with the servo connected, the MOSFET is switching on and off in sync, but with nothing on that OUT9 connector that doesn't matter either.
-
@Visionary said in Hobbyservo controlled part cooling fan (compressor+valve):
M98 P”/sys/config.g”
Ugh, sorry, didn't notice on my phone that it was putting in curly quotes rather than straight quotes. Any of these should work to run the config.g and generate any report messages (and possibly errors) from the config:
M98 P"config.g" M98 P"/sys/config.g" M98 P"0:/sys/config.g"
For example, I get:
02/01/2023, 19:41:36 M98 P"config.g" HTTP is enabled on port 80 FTP is enabled on port 21 TELNET is disabled 02/01/2023, 19:41:54 M98 P"/sys/config.g" HTTP is enabled on port 80 FTP is enabled on port 21 TELNET is disabled 02/01/2023, 19:41:59 M98 P"0:/sys/config.g" HTTP is enabled on port 80 FTP is enabled on port 21 TELNET is disabled
Ian
-
I get:
HTTP is enabled on port 80 FTP is disabled TELNET is disabled
Is it possible that the servo is broken?
Can incorrect wiring to right pins cause damage to Duet or the servos?
The servos that I have can rotate by hand more than they can by when they are controlled electronically. Do they have to be in certain starting position to work?M122
M122 === Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.4.5 (2022-11-30 19:35:23) running on Duet 3 MB6HC v1.01 (standalone mode) Board ID: 08DJM-956BA-NA3TJ-6J9D2-3S06T-9V8GT Used output buffers: 3 of 40 (14 max) === RTOS === Static ram: 152760 Dynamic ram: 98776 of which 400 recycled Never used RAM 98736, free system stack 206 words Tasks: NETWORK(ready,35.1%,252) ETHERNET(notifyWait,0.2%,561) ACCEL(notifyWait,0.0%,348) HEAT(notifyWait,0.0%,322) Move(notifyWait,0.0%,351) CanReceiv(notifyWait,0.0%,944) CanSender(notifyWait,0.0%,336) CanClock(delaying,0.0%,333) TMC(notifyWait,7.8%,91) MAIN(running,56.6%,925) IDLE(ready,0.2%,30), total 100.0% Owned mutexes: === Platform === Last reset 00:00:55 ago, cause: power up Last software reset at 2023-01-02 16:44, reason: User, GCodes spinning, available RAM 98736, slot 1 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Step timer max interval 127 MCU temperature: min 28.9, current 39.7, max 39.9 Supply voltage: min 24.3, current 24.4, max 24.4, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.1, current 12.1, max 12.2, under voltage events: 0 Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Events: 0 queued, 0 completed Driver 0: standstill, SG min 0, mspos 8, reads 46633, writes 14 timeouts 0 Driver 1: standstill, SG min 0, mspos 8, reads 46633, writes 14 timeouts 0 Driver 2: standstill, SG min 0, mspos 8, reads 46634, writes 14 timeouts 0 Driver 3: standstill, SG min 0, mspos 8, reads 46634, writes 14 timeouts 0 Driver 4: standstill, SG min 0, mspos 8, reads 46634, writes 14 timeouts 0 Driver 5: standstill, SG min 0, mspos 8, reads 46634, writes 14 timeouts 0 Date/time: 2023-01-03 11:35:39 Slowest loop: 4.43ms; fastest: 0.05ms === Storage === Free file entries: 10 SD card 0 detected, interface speed: 25.0MBytes/sec SD card longest read time 2.4ms, write time 0.0ms, max retries 0 === Move === DMs created 125, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty === CAN === Messages queued 500, received 0, lost 0, boc 0 Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 50 (min 50), ts 279/0/0 Tx timeouts 0,0,278,0,0,220 last cancelled message type 30 dest 127 === Network === Slowest loop: 4.33ms; fastest: 0.03ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0) HTTP sessions: 1 of 8 = Ethernet = State: active Error counts: 0 0 0 1 0 0 Socket states: 5 2 2 2 2 0 0 0 === Multicast handler === Responder is inactive, messages received 0, responses 0