Comments (7)
Thanks a lot for your time there were different fault yesterday I was able to recreate them
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
TMC2209: after 10 tries not valid answer. exiting
TMC2209: is Stepper Powersupply switched on ?
I think my old breadboard is worn out, I just touhced one wire and it happend again.
As I said thanks for your support and for the lib it helps a lot also the documentations makes it easier to work with. Maybe I misinterpreted the print statements from today. Reread it again and yes I didnt understood them.
I think the 5-6 steppers are for the ESP32 the RPI was only to test it in generell. Should be able to use a secound of the UARTs if the adress exceeds 3. the other lib from you and kjk25 uses at the moment hardcoded UART 2 right?
from tmc2209_raspberry_pi.
Hello,
yes, the library should also work with other TMC2209 boards like yours.
Could you please share some more information?
Do you have the SilentStepStick TMC2209 v2?
https://github.com/watterott/SilentStepStick/blob/master/hardware/SilentStepStick-TMC2209_v20.pdf
What is the output of the demo/debug_script_01_uart_connection.py script?
Can you please share a sketch or photo of your wiring.
from tmc2209_raspberry_pi.
Thanks for the reply
the output the script is
---
SCRIPT START
---
TMC2209 0: Init
TMC2209 0: GPIO Init finished
TMC2209 0: Init finished
---
---
TMC2209 0: ---
TMC2209 0: TEST UART
TMC2209 0: received 12 bytes; 96 bits
TMC2209 0: hex: 550006e805ff0621000041c6
TMC2209 0: bin: 010101010000000000000110111010000000010111111111000001100010000100000000000000000100000111000110
TMC2209 0: length snd: 4
TMC2209 0: length rtn: 12
TMC2209 0: the Raspberry Pi received the sended
bits and the answer from the TMC
TMC2209 0: the Raspberry Pi received exactly the bits it has send.
the first 4 bits are the same
TMC2209 0: complete
TMC2209 0: 550006e8
TMC2209 0: 550006e805ff0621000041c6
TMC2209 0: just the first 4 bits
TMC2209 0: 550006e8
TMC2209 0: 550006e8
TMC2209 0: ---
---
---
TMC2209 0: Deinit
TMC2209 0: Motor output active: False
TMC2209 0: GPIO cleanup
TMC2209 0: Deinit finished
---
SCRIPT FINISHED
---
Yes i can confirm that that is the right stepper modul.
I soldered the jumper pads together and checked the connection by resistence
The only two requirements for the UART connection that I found was the solder connection to at least 2 of the pads(see picture) and an 1k resistor in TX wire
Another qustion where can I set which UART channel the PI is using I would need to use 5-6 stepper and I want to use sensorless homing on all of them
from tmc2209_raspberry_pi.
Ok made some more tests the output from the answer above is done without the external powersupply(PC power supply with 12/5/3.3V) as soon as its activ I get no connection
th eoutput from your debuggfile is
---
SCRIPT START
---
TMC2209 0: Init
TMC2209 0: GPIO Init finished
TMC2209 0: Init finished
---
---
TMC2209 0: ---
TMC2209 0: TEST UART
TMC2209 0: received 12 bytes; 96 bits
TMC2209 0: hex: 550006e805ff0621000041c6
TMC2209 0: bin: 010101010000000000000110111010000000010111111111000001100010000100000000000000000100000111000110
TMC2209 0: length snd: 4
TMC2209 0: length rtn: 12
TMC2209 0: the Raspberry Pi received the sended
bits and the answer from the TMC
TMC2209 0: the Raspberry Pi received exactly the bits it has send.
the first 4 bits are the same
TMC2209 0: complete
TMC2209 0: 550006e8
TMC2209 0: 550006e805ff0621000041c6
TMC2209 0: just the first 4 bits
TMC2209 0: 550006e8
TMC2209 0: 550006e8
TMC2209 0: ---
---
---
TMC2209 0: Deinit
TMC2209 0: Motor output active: False
TMC2209 0: GPIO cleanup
TMC2209 0: Deinit finished
---
SCRIPT FINISHED
---
thats a little weird at least for me all devices share a common ground
from tmc2209_raspberry_pi.
Regarding your connection problem
I dont understand what exactly you mean with "cannot get a working connection", because in both cases your script output show the correct answer from the TMC (4 send + 8 received bytes = total 12 bytes) and the connection seems to work correctly.
TMC2209 0: received 12 bytes; 96 bits
what exactly does your power supply work in both cases? Normally you dont need the Vio Voltage, because the drivers should have internal voltage regulator, but i am not sure whether this is the case for every TMC2209 board.
Connecting 5-6 drivers via UART
connecting up to 5-6 drivers via UART to use StallGuard on each motor is tricky, because the addressing on one UART line support only 4 drivers:
As you can use the DIAG pin on the TMC as StallGuard Output, you could connect the DIAG of each driver to different pins of the RPi/ESP and use the "write only access" configuration:
If you want to have write and read access on each driver individually, you either need to use different UART port (for example SoftwareSerial on the ESP, on the RPi this is a bit harder and i have not tried that)
Or you use analog switches for the UART connection:
from tmc2209_raspberry_pi.
Thank you very much. I try to improve the documentation with every feedback i get.
TMC2209: did not get the expected 4 data bytes. Instead got 0 Bytes
If you get 0 bytes, there is a problem with your wiring.
Because of the shared RX and TX line, the RPi/ESP should always at least receive the 4 bytes it has send to the TMC.
On the RPi you can set the SerialPort in the constructor with serialport="/dev/serial0"
On the ESP it seems you can use serialport=2
in the constructor of kjk25 lib.
from tmc2209_raspberry_pi.
I will close this issue now. If you still have questions feel free to reopen this issue or open a new one.
from tmc2209_raspberry_pi.
Related Issues (20)
- Implementing velocity ramping with VActual
- Implementing CRC check for reply datagrams
- Destructor not beeing called
- change code to comply with Style Guide for Python Code
- Standstill current reduction not working (iHOLD) HOT 2
- TMC2209: after 10 tries not valid write access HOT 2
- Adding a function for continous turning HOT 3
- stallguard / finding values HOT 3
- Do something else while running a stepper HOT 4
- positions being skipped (due to performance issues) HOT 3
- Stallguard fires right away HOT 4
- Connecting two tmc2209 to serial HOT 6
- about wiring diagram and wiring table HOT 3
- First vactual after TMC power-on is different than the rest HOT 1
- How to disable UART and use just STEP/DIR HOT 3
- When will version 0.4.3 be released HOT 2
- TWOTREES TMC2209 v2.0 passes tests but fails to energize stepper HOT 3
- Request: Replace logger print-statement with python logging library HOT 3
- RuntimeError when redoing homing after failed attempt HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmc2209_raspberry_pi.