Giter Club home page Giter Club logo

duet3expansion's Introduction

Duet3Expansion

Firmware for Duet 3 expansion and tool boards

Duet 3 expansion and tool board firmware is built from several Github projects. You need to use compatible branches of these projects. As at 20 May 2020, the latest source code is on these branches:

  • Duet3Expansion: master
  • RRFLibraries: dev
  • CANlib: master
  • FreeRTOS: master

Instructions for building under Windows

  1. Download and install the gcc cross-compiler from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads

  2. Download and install a recent version of Eclipse IDE for C/C++ Developers from http://www.eclipse.org/downloads/eclipse-packages/.

  3. Download and install GNU Arm Eclipse from https://sourceforge.net/projects/gnuarmeclipse/files/Build%20Tools/gnuarmeclipse-build-tools-win64-2.6-201507152002-setup.exe/download. This provides versions of make.exe, rm.exe and other tools without the 8192-character command line limitation of some other versions.

  4. Modify your PATH environment variable to include the 'bin' folder of the GNU ARM Eclipse installation.

  5. Run "which rm" and "which make" to make sure that rm and make will be fetched from that folder.

  6. In Eclipse create a workspace.

  7. Add this github project, the CANlib project, the FreeRTOS project and the RRFLibraries project to the workspace.

  8. Select and build the configuration you want.

duet3expansion's People

Contributors

chrishamm avatar dc42 avatar jaysuk avatar lirwin3007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

duet3expansion's Issues

[FeatureRequest]: Closed Loop - Ensure 'forward' is the same in open & closed loop

Is your feature request related to a problem? Please describe.

Closed loop control needs to know how the encoder is mounted relative to the motor (i.e. is it on forward or backward)
To find this, it runs a tuning move.
If the encoder is found to be on backwards, the motor is set to run in reverse when in closed loop mode
This means that the 'forward' direction may not be the same in closed and open loop mode

Describe the solution you propose.

targetMotorSteps = targetMotorSteps + (stepDirection ? microstepAngle : -microstepAngle) * (Platform::GetDirectionValue(0) ? 1 : -1);

should take into account if the encoder is on backwards and run backwards as well if this is the case.

Describe alternatives you've considered

N/A

Provide any additional context or information.

N/A

[FeatureRequest]: Closed Loop - Support currents up to 6.3A

Is your feature request related to a problem? Please describe.

Currently the TMCs are limited to 4.5A. However, we should allow a 'peak current' of 6.3A.
Setting a motor current higher than 4.5A is currently not supported.

Describe the solution you propose.

Support setting a current higher than 4.5A, but don't let this current run continuously. Further discussion is required around the limits here.

Describe alternatives you've considered

N/A

Provide any additional context or information.

See

constexpr float MaxTmc5160Current = 4500.0; // The maximum current we allow the TMC5160/5161 drivers to be set to.
for the relevant code

[FeatureRequest]: Closed Loop - Additional Tuning Moves

Is your feature request related to a problem? Please describe.

Currently some tuning moves are greyed out and unavailable

Describe the solution you propose.

These tuning moves need writing ๐ŸŽ‰

Describe alternatives you've considered

N/A

Provide any additional context or information.

The names & nature of each unimplemented tuning move can be found in src/ClosedLoop/Tuning.cpp

[FeatureRequest]: Closed Loop - Automatic PID Tuning

Is your feature request related to a problem? Please describe.

PID tuning is difficult and can lead to unstable oscillations

Describe the solution you propose.

An automated PID tuning routine, similar to that we already have for heaters

Describe alternatives you've considered

Currently we have manual tuning, but that has the issues outlined above

Provide any additional context or information.

A basic zeiger-nichols manoeuvre was implemented, but is currently not working so is #if falsed out

[FeatureRequest]: Closed Loop - Feedforward

Is your feature request related to a problem? Please describe.

When in closed loop mode, the most error is introduced when changing acceleration.

Describe the solution you propose.

Given that we know when we're going to be changing acceleration, we could add in a feed-forward term to try to account for this, and hopefully reduce our error on acceleration change

Describe alternatives you've considered

N/A

Provide any additional context or information.

N/A

[FeatureRequest]: Closed Loop - Synchronised Tuning

Is your feature request related to a problem? Please describe.

When tuning closed loop motors, only a single drive can be tuned at a time.
This means that multiple-driver axes may be put under strain/misaligned as only one drive moves.

Describe the solution you propose.

Synchronised tuning - where both motors move at the same time.

Describe alternatives you've considered

Disconnecting the drivers from the axes - but this isn't great for tuning purposes and is a lot of faff

Provide any additional context or information.

N/A

Handler for CanMessageMovementLinearShaped uses fields from CanMessageMovementLinear

From Andy: I've been running a lot of tests on beta 3 and toolboards and I noticed that I was getting a lot of "other" out of sequence movement messages reported. Digging into the code it looks like the handling of the new movementLinearShaped message in the expansion board CanInterface.cpp file was a copy/paste of the older movementLinear message. Unfortunately this has left code that references the msg.moveLinear part of the message union rather than the CanMessageMovementLinearShaped part. In general this seems not to cause problems (as the two structures match the first few fields), however it does impact the seq number member (which is a different size) which then causes the large number of errors I have been seeing reported. I'm not 100% sure that this is the only problem, but I think it is.

Anyway I thought I'd message you about it before I forget and in case anyone else reports the large numbers of errors:
dup 0, oos 0/0/0/2760, bm 0, wbm 0, rxMotionDelay 768, adv 35269/107771

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.