View previous topic :: View next topic |
Author |
Message |
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Tue Jun 23, 2020 5:50 am Post subject: TMC2130 Stepper Driver in standalone mode |
|
|
Hi. This is more of an electronic question than a Bascom issue.
I've got a issue with a TMC2130 stepper driver module running in standalone mode. I can get the motor turning fine with the step/dir pins. I am wanting to keep an eye on the motor with the DIAG0 and DIAG1 pins on the module. DIAG0 pin is for Reset and stall detect and DIAG1 is for motor index.
I can't get the pin's to do anything. DIAG0 requires pullup of 100k or less and DIAG1 requires pull down on of 50k..
On page 72 of the data sheet it says DIAG0 should pull low on reset. I can't get any of these 2 DIAG pins to do anything. I can get the step mode working correctly by changing the CFG1-2 pins around
Ive got CFG0 pin Gnd, CFG3 pin High, CFG4 pin Gnd, CFG5 pin High
CFG1-2 pins are step modes (full step,half etc)
Cheers
Snow
(BASCOM-AVR version : 2.0.8.2 ) |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Tue Jun 23, 2020 12:24 pm Post subject: Re: TMC2130 Stepper Driver in standalone mode |
|
|
snow wrote: | Hi. This is more of an electronic question than a Bascom issue. |
In fact there is no relation to Bascom at all, why do you intentionally post it in the wrong part of the forum then?
Quote: | running in standalone mode |
RTFM, page 85, quote:
Quote: | Figure 24.1 Standalone operation with TMC2130 (pins shown with their standalone mode names)
...
GCONF settings:
GCONF.diag0_error = 1: DIAG0 works in open drain mode and signals driver error.
GCONF.diag1_index = 1: DIAG1 works in open drain mode and signals microstep table index position. |
Quote: | DIAG0 pin is for Reset and stall detect and DIAG1 is for motor index. |
No and yes.
Stall detect and other options are active if configured via SPI, in standalone operation SPI is off and I read the data sheet the way, that only functions as mentioned are active, i.e. driver error and motor index.
The motor index may trigger, but you miss it by making DIAG1 useless with a pull-down.
Quote: | ... and DIAG1 requires pull down on of 50k. |
'Pulldown, PMD, PDD' according data sheet sounds a bit deceptive.
These pins can work in open-drain or in push-pull mode, in 'standalone mode' open-drain is active.
The open-drain stages as shown at page 72 pull both to ground, to get some signal change, pull-ups must be used.
Quote: | I can't get any of these 2 DIAG pins to do anything. |
Understandable, if a pull-down is connected parallel to an open-drain and reset of the stepper controller simply may not show up while in operation. |
|
Back to top |
|
|
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Tue Jun 23, 2020 9:23 pm Post subject: |
|
|
Thanks for your reply
Quote: | In fact there is no relation to Bascom at all, why do you intentionally post it in the wrong part of the forum then? |
Because I'm using a Bascom to control the micro to handle the smarts of running this module and you people are very helpful. Is there another forum that is great for electronic help?
Ive tried leaving both DAIG pins float, pulled high and low with resistors but nothing changes when I get pull the module reset pin high. The module's reset pin works as it lets the motor freewheel and soon as I take the pin low the motor locks and moved when I trigger the Step pin
Thanks |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Tue Jun 23, 2020 10:00 pm Post subject: |
|
|
snow wrote: | Is there another forum that is great for electronic help? |
This site provides an appropriate forum section:
Quote: | AVR
AVR hardware related. Here you can discuss topics that are not directly BASCOM related. But are related to the AVR. |
You may notice that page 72 speaks about a power-on reset, while you are pulling the reset pin high.
Quote: | DIAG0 always shows a power-on reset condition by pulling low during a reset condition. |
Quote: | nothing changes when I get pull the module reset pin high. |
That's not the same.
Also pulling DIAG0 low at power-on reset may result in a quite short pulse, so I'd check with an oscilloscope. |
|
Back to top |
|
|
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Tue Jun 23, 2020 11:21 pm Post subject: |
|
|
as per datasheet pg72
Quote: | PDD=100k pulldown
PMD=50k to VCC/2 |
My VCC is 5v
I've got the DIAG0 pin tied to 2.5v with a 52k resistor as per the data sheet on page 72 . When I hold the reset pin on the module High the DIAG0 pin just stays at 2.5v on the scope. By the looks of the Schematic it should go to VCC under reset condition
I've tried a different module but the results at the same.
Quote: | Also pulling DIAG0 low at power-on reset may result in a quite short pulse, so I'd check with an oscilloscope. |
I cannot see anything on the scope, even if i one shot capture it and set the trigger at 2.6v
Thoughts? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Jun 24, 2020 9:02 am Post subject: |
|
|
when posting in the BASCOM-AVR forum there should be at least some BASCOM code shown.
And when it is about a chip, include a link to the PDF as well. _________________ Mark |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Wed Jun 24, 2020 9:25 am Post subject: |
|
|
snow wrote: | as per datasheet pg72
Quote: | PDD=100k pulldown
PMD=50k to VCC/2 |
|
You need to read my replies.
MWS wrote: | 'Pulldown, PMD, PDD' according data sheet sounds a bit deceptive. |
Quote: | When I hold the reset pin on the module High the DIAG0 pin just stays at 2.5v on the scope. |
Which reset pin? By looking up a module, I did not find any.
https://wiki.fysetc.com/TMC2130/
Quote: | the module's reset pin works as it lets the motor freewheel |
Sounds not like a dedicated reset, more like the 'driver enable' input.
Of course the module can provide a reset pin, which, quote from the data sheet:
Quote: | In order to reset the chip to power on defaults, any of the supply voltages monitored by internal reset circuitry (VSA, +5VOUT or VCC_IO) must be cycled. VCC is not monitored. | cycles any of these voltages.
It's your job to link to the module you use, it's not mine to guess it, all I see is the chip's schematic and the chip does not have a dedicated reset-pin.
Quote: | By the looks of the Schematic it should go to VCC under reset condition |
Surely not, neither from schematic, nor from quote page 72:
Quote: | DIAG0 always shows a power-on reset condition by pulling low during a reset condition. |
'Reset condition' is read in context with the first part of the sentence, which specifies 'power-on reset'.
Which schematic exactly, the one on page 72?
From this schematic a signal called 'power-on reset' connects to an OR-gate.
In standalone mode the signal 'diag0_pushpull' is inactive, thus connecting the gate's output to the mosfet's gate, while the mosfet's source is connected to ground.
A signal level high for 'power-on reset' will result in a high at the mosfet's gate and this will pull DIAG0 to ground.
Quote: | I cannot see anything on the scope, even if i one shot capture it and set the trigger at 2.6v |
Did you check at switching power-on? As said your module's reset pin may not be what you think it is.
Attached two excerpts from the data sheet, one of them shows DIAG1 is open-drain/pull-up too.
As the data sheet tells two times about pull-down, it's contradictory.
I'm all for pull-up because of the schematic and table. |
|
Back to top |
|
|
snow
Joined: 28 Jun 2005 Posts: 200 Location: Ashburton / Mid Canterbury / New Zealand
|
Posted: Thu Jun 25, 2020 3:14 am Post subject: |
|
|
Hi Thanks for your reply
Here's a list of information I SHOULD HAVE included in my earlier post as pointed out.. my fault totally
Product Name: SlientStepStick
Chipset: TMC2130-LA
Product link
https://www.trinamic.com/fileadmin/assets/Products/Eval_Drawings/SilentStepStick-TMC2130_v10.pdf
Chipset Datasheet
https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet_Rev1.12.pdf
Yes product does NOT have an external reset pin as you stated . I mistakenly call it that . I was meaning enable pin
Theses are my setting on config pins
I have closed the SPI jumper put it into standalone mode.
Motor power is Vm pin = 5v
Vio Pin=5v
CFG0= GND
CFG1= 5v Step rate (Halfstepping)
CFG2=Gnd
CFG3= 5v
CFG4= GND as per layout drawing
CFG5=5v as per layout drawing
Standalone mode configuration on page 85 of chipset datasheet
I was trying to get DIAG0 pin connected for driver error and stall checking. The module is running the motor fine but was i was trying to add a few error checking features to my code.
Thanks for you help |
|
Back to top |
|
|
MWS
Joined: 22 Aug 2009 Posts: 2262
|
Posted: Thu Jun 25, 2020 10:34 am Post subject: |
|
|
snow wrote: | Yes product does NOT have an external reset pin as you stated . I mistakenly call it that . I was meaning enable pin |
Like I thought. This disables the power stages, but does not reset the TMC2130.
You've waited for a reaction to an action that never happened.
Quote: | Standalone mode configuration on page 85 of chipset datasheet |
I wrote that already, in standalone mode the signals connected to the diags are GCONF.diag0_error and GCONF.diag1_index, nothing else.
Quote: | I was trying to get DIAG0 pin connected for driver error and stall checking. |
Driver error is set by default in standalone mode, stall checking is off.
Quote: | i was trying to add a few error checking features to my code. |
For this purpose you need to leave standalone mode 2 and switch to Step/Direction Driver mode 1, where you can access GCONF and others via SPI.
It comes not clear from the data sheet, if it works to set registers bits like GCONF.diag0_stall in mode 1, and keep the bit set after switching back to mode 2.
Try it out, if you wanna know. |
|
Back to top |
|
|
|