Duet 3: "Attempt to move motors when VIN is not in range" @ 30V



  • I've finally made it to testing out stepper motors with the new Duet 3 6HC. When I try to move one, I get Error: Attempt to move motors when VIN is not in range.

    Voltage is steady at 30V with a Mean Well power supply:

    duet-3-voltage.png

    My quick reading of the code in Platform.cpp:L98 and related sections is that voltages over 29V count as overvoltage and cause the drivers to shut down.

    Is this just a bug, or can the Duet 3 not run at 30V? Or am I doing something else wrong?

    Thanks in advance!


    Diagnostics in case they help:

    M122
    === Diagnostics ===
    RepRapFirmware for Duet 3 v0.6 version 3.0alpha running on Duet 3 version v0.6
    Board ID: 08DGM-9T66A-G63SJ-6J1FA-3S86Q-TB0HA
    Used output buffers: 1 of 32 (6 max)
    === RTOS ===
    Static ram: 67772
    Dynamic ram: 156184 of which 0 recycled
    Exception stack ram used: 476
    Never used ram: 168784
    Tasks: NETWORK(ready,2044) HEAT(blocked,1276) CanReceiv(suspended,3804) CanSender(suspended,1496) CanClock(blocked,1448) TMC(suspended,632) MAIN(running,4216) IDLE(ready,156)
    Owned mutexes:
    === Platform ===
    Last reset 00:06:48 ago, cause: power up
    Last software reset at 2019-09-23 04:50, reason: Unknown, spinning module Platform, available RAM 169084 bytes (slot 2)
    Software reset code 0x0010 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0442b000 BFAR 0x00000000 SP 0xffffffff Task 0x4e49414d
    Error status: 0
    Free file entries: 10
    SD card 0 detected, interface speed: 0.2MBytes/sec
    SD card longest block write time: 0.0ms, max retries 0
    MCU temperature: min 22.7, current 30.3, max 30.5
    Supply voltage: min 29.9, current 30.0, max 30.2, under voltage events: 0, over voltage events: 0, power good: no
    12V rail voltage: min 12.0, current 12.1, max 12.2, under voltage events: 0
    Driver 0: ok, reads 0, writes 0 timeouts 0, SG min/max 0/0
    Driver 1: ok, reads 0, writes 0 timeouts 0, SG min/max 0/0
    Driver 2: ok, reads 0, writes 0 timeouts 0, SG min/max 0/0
    Driver 3: ok, reads 0, writes 0 timeouts 0, SG min/max 0/0
    Driver 4: ok, reads 0, writes 0 timeouts 0, SG min/max 0/0
    Driver 5: ok, reads 0, writes 0 timeouts 0, SG min/max 0/0
    Date/time: 2019-09-27 01:42:36
    Slowest loop: 4.90ms; fastest: 0.21ms
    === Move ===
    Hiccups: 0, FreeDm: 375, MinFreeDm: 374, MaxWait: 65155ms
    Bed compensation in use: none, comp offset 0.000
    === MainDDARing ===
    Scheduled moves: 2, completed moves: 2, StepErrors: 0, LaErrors: 0, Underruns: 0, 0
    === AuxDDARing ===
    Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0
    === Heat ===
    Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1
    === GCodes ===
    Segments left: 0
    Stack records: 1 allocated, 1 in use
    Movement lock held by http
    http* is idle in state(s) 0 8, running macro
    telnet is idle in state(s) 0
    file is idle in state(s) 0
    serial is idle in state(s) 0
    aux is idle in state(s) 0
    daemon* is ready with "M122" in state(s) 0
    queue is idle in state(s) 0
    lcd is idle in state(s) 0
    spi is idle in state(s) 0
    autopause is idle in state(s) 0
    Code queue is empty.
    === Network ===
    Slowest loop: 1.05ms; fastest: 0.01ms
    Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
    HTTP sessions: 0 of 8
    - Ethernet -
    State: 0
    Socket states: 0 0 0 0 0 0 0 0
    === Linux interface ===
    State: 0, failed transfers: 0
    Last transfer: 51ms ago
    RX/TX seq numbers: 26139/26139
    SPI underruns 0, overruns 0
    Number of disconnects: 0
    Buffer RX/TX: 0/0-0
    === Duet Control Server ===
    Duet Control Server v1.0.4.1
    Code buffer space: 2048
    Configured SPI speed: 2000000 Hz
    Full transfers per second: 50.63
    


  • Sounds like a bug in the code or the specs; the updated specs say 12-32v https://duet3d.dozuki.com/Wiki/Duet_3_Mainboard_6HC_Hardware_Overview



  • @evan38109 said in Duet 3: "Attempt to move motors when VIN is not in range" @ 30V:

    Is this just a bug, or can the Duet 3 not run at 30V? Or am I doing something else wrong?

    i would say its a bug. from the documentation
    https://duet3d.dozuki.com/Wiki/Duet_3_Mainboard_6HC_Hardware_Overview
    VIN in the range 12V-32V must be provided to the Duet.



  • I have the same bug with Duet2Wifi@24V, when I do the first movement of a stepper (homing). Does not seen after.



  • I tried with a lower-voltage power supply this evening and the steppers move just fine. I'm now reasonably confident that this is a bug.

    (...or maybe I'm missing a voltage setting somewhere? There's always a chance this is my fault. 😉 )

    Is there a preferred method to file a bug report, or is this kind of forum post sufficient?


  • administrators

    @evan38109 said in Duet 3: "Attempt to move motors when VIN is not in range" @ 30V:

    Is there a preferred method to file a bug report, or is this kind of forum post sufficient?

    In this case comments here will be seen by @dc42 so no need to file a bug report on GitHub.


  • administrators

    It's a bug. That code should be active for the Duet WiFi/Ethernet build but not for the Duet 3 build of RRF. I will fix it in the next beta.



  • Thank you, @T3P3Tony and @dc42!



  • I've updated to the latest firmware version, and this issue persists.

    If it helps, the web app is reporting these versions:

    Board: Duet 3 version v0.6 (MB6HC)
    DSF Version: 1.1.0.5
    Firmware: RepRapFirmware for Duet 3 v0.6
    3.0beta11 (2019-10-21b1)
    

    I don't want to be a jerk, but...any ETA? It's been a month now.


  • administrators

    Are you certain that it isn't fixed? I put the fix in the source code well before beta 11.



  • @dc42 the current v3-dev still has

    https://github.com/dc42/RepRapFirmware/blob/v3-dev/src/Platform.cpp

    constexpr uint16_t driverOverVoltageAdcReading = PowerVoltageToAdcReading(29.0); // voltages above this cause driver shutdown



  • @Veti said in Duet 3: "Attempt to move motors when VIN is not in range" @ 30V:

    @dc42 the current v3-dev still has

    https://github.com/dc42/RepRapFirmware/blob/v3-dev/src/Platform.cpp

    constexpr uint16_t driverOverVoltageAdcReading = PowerVoltageToAdcReading(29.0); // voltages above this cause driver shutdown

    This constexpr needs to stay for Duet 2 (and possibly other boards as well) - it's the place where it is used that seems to fail for Duet 3 to do the right thing.



  • but should there not be a constexpr for the duet3 over voltage where it shuts down?


  • administrators

    I am sorry, there were two places where maximum VIN was enforced, and I only changed one of them. New firmware build coming soon.



  • Awesome -- thanks, @dc42!


  • administrators

    You can try the new firmware at https://www.dropbox.com/sh/3azy1njy3ayjsbp/AACquxr2m00eV568RZg5QG5wa?dl=0 if you like. This isn't an official beta, but it's running OK on my test setup.



  • Just tried the firmware from dropbox, and it works like a charm. Thanks for taking the time to put this out on a weekend! 👍

    Also -- and I'm sure you get this a lot -- but I can't get over how easy the firmware update was. Kudos.


Log in to reply