Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct wiring? / weird values in GUI #13

Open
MZLLYNX opened this issue Mar 30, 2022 · 2 comments
Open

correct wiring? / weird values in GUI #13

MZLLYNX opened this issue Mar 30, 2022 · 2 comments

Comments

@MZLLYNX
Copy link

MZLLYNX commented Mar 30, 2022

Hi,

thank you for the code
Unfortunately, I have some issues.

  1. I guess, the correct wiring (with your sample code in trinamicDriver.py) to a TMC5130A-TA_BOB is:
def __init__(self, masterspi=True, spiChannel=0, mode=3, datarate=1000000, cslow=True, datacount=32,
            resetpin=2, drvenpin=3, clockpin=4, clockfrequ=None, pigp={}, motordef=None, loglvl=logging.DEBUG, **kwargs):

GPIO2 (Pin3) -> VCC_IO
GPIO3 (Pin5) -> DRV_ENN
GPIO4 (Pin7) -> CLK_16
GPIO10 (Pin19) -> SDI
GPIO9 (Pin21) -> SDO
GPIO11 (Pin23) -> SCK
Ground (Pin25) -> GND
GPIO8 (Pin24) -> CSN

Is that correct?

  1. When I start motors2.py, the GUI opens with no errors.
    But there are weird changing values shown. The value for time, XACTUAL, XTARGET, current rpm, VACTUAL and load/temp are changing fast with non-sense values.
    If I try to start the motor, nothing happens without any error output.

Are there any hints, how to fix this?

Thanks in advance.

@pootle
Copy link
Owner

pootle commented Mar 31, 2022

Looks like the clock is not behaving, I'm very busy for a couple of days, so can't look in detail, but try a bit of tracing to see what the clock setup is doing, and perhaps check what values are being set in the chip registers

@MZLLYNX
Copy link
Author

MZLLYNX commented Apr 4, 2022

Hi,

thanks for the fast reply.
Just to confirm to eliminate other errors?:

  • the wiring is correct?
  • there are two typos at https://github.com/pootle/tripipy
    -- run the app: python3 motor2.py should be motors2.py?
    -- start the pigpio daemon if it is not already running I use sudo gpiod -c 256 should be sudo pigpiod -c 256?

Unfortunately I didn´t find the error yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants