marktillotson / drv8711 Goto Github PK
View Code? Open in Web Editor NEWDRV8711 library for Arduino
License: GNU Lesser General Public License v3.0
DRV8711 library for Arduino
License: GNU Lesser General Public License v3.0
Good day
Thank you for a really awesome library, I got my boost pack spinning using your library off an Arduino quicker than I could download Code Composer studio (so that was a $9.99 waste lol)
Anyway, my use for your library will be primarilly to init the DRV8711, I tried figuring it out by looking at the .h and .cpp files but I must admit I am a little clueless.
Let me elaborate.
I'd create my object as DRV8711 xmotor(CSpin) ; (final version will have 4 devices on the SPI bus, thus each with their own CS pin. Easy enough
Next I need to init the driver, now using your example I got it spinning in no time at all:
xmotor.begin (60, 8, 2, 0, 1, 0) ;
From the .cpp I gathered:
void DRV8711::begin (byte drive,
unsigned int microsteps,
byte decay_mode,
byte gate_speed,
byte gate_drive,
byte deadtime)
Can you elaborate on what I need to make said values ?
I played with the 2nd byte for example, setting it to 16 and 4 in turn. In 4 the motor stalls (so my step rate is probably too high for 1/4 step, in 16 it seems to run slower (more steps per rotation as expected), so it looks like thats easy enough, should be 16 for 1/16th microstep, and maybe 256 for 1/256 microsteps?
Decay mode
I see in the .h:
So in your example
xmotor. stepper.begin (60, 8, 2, 0, 1, 0) ;
the 3rd byte is 2, is that read as from the table in drv8711.h that 2 = FAST DECAY? And thus if I want Automix instead for example I set the 3rd byte to 5?
The default dead time, gate drive and gate speed should stay the same since I am using the same mosfets as the boost pack....
So my last question is the first byte: DRIVE - set to 60 in your example. Is that 60% torque? I.e. 60% of the 5A setting?
Sorry about the stupididy of the questions. I will update the example sketch with comments and submit a pull request once I figured it out a little better with your answers' help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.