Giter VIP home page Giter VIP logo

Comments (9)

Lopezno68 avatar Lopezno68 commented on July 21, 2024

MCP443X_commands

from core.

terjeio avatar terjeio commented on July 21, 2024

Oops, likely typo on my part. WIll commit a fix.

It will be great if you can verify that setting the current works as I do not have a MKS board for testing.

from core.

Lopezno68 avatar Lopezno68 commented on July 21, 2024

According to the MKS SBASE board schematic, it would also be more accurate if the current setting factor was 100.45f instead of 113.0f.

cmd [1] = (uint8_t) min (255.0f, roundf (current * 100.45f));

However, the current adjustment functionality works correctly. Nice work with the software, Terjeio

from core.

terjeio avatar terjeio commented on July 21, 2024

The Marlin driver uses 106.7 as the factor (AFAICT). The schematic I have specifies two different values for Rsense depending on the driver version (DRV8824 vs DRV8825) and R11 = 20K (with an asterix meaning that this might be different on the board?) in the BOM so for me it it is impossible to tell what is correct. So I'll change it to 100.45. I must say I am a bit curious about how you arrived at that factor though.

from core.

Lopezno68 avatar Lopezno68 commented on July 21, 2024

Yes, the R11 in my board (DRV8825) is exacty 20K. The Vref impedance in the DRV8825 is superior at 1M1 ohms, then, the Vpot drain current (at the cursor) is negligible. There are 4 50K potenciometers in parallel and with the R1 they are forming a voltage divisor to obtain 1.269 volts as reference for the 4 potenciometers. Applying electronic mathematics, the value for the potenciometer is Value=100.45 *Imotor.

Imotor calcs

I have measured it on my board with a voltmeter and the theory exactly matches the result.

from core.

Lopezno68 avatar Lopezno68 commented on July 21, 2024

it's good to be curious ...

from core.

Lopezno68 avatar Lopezno68 commented on July 21, 2024

An other correction. Sorry
20210501_173857

from core.

terjeio avatar terjeio commented on July 21, 2024

An other correction. Sorry

No problem.

I wonder if the factor should be multiplied with sqrt(2) to set the RMS value as it looks like the current from Equation 1 (in chapter 8.3.2) in the datasheet is the peak current. The Trinamic driver code I've seen does that. However, the Marlin documentation for digipots does not help in making that clear, not even for the Trinamic setting which I assume is the RMS current...

from core.

terjeio avatar terjeio commented on July 21, 2024

Fix committed with your factor.

from core.

Related Issues (20)

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.