Communication issues with the SlushEngine


#1

Hello,

I received the new SlushEngine but im having a problem I didnt have with the other one I had.
Im getting this error 6x when I try to move a stepper, communication issues; check SPI configuration and cables.
I can still move the servo for the gripper, but nothing else. I followed the instruction on the website + reinstalled the OS 2x time, checked at the cables and connections…last slushengine was working with the same setup.

Anyone got a idea? I really dont know what to do


#2

So I digged into the code and found out where the error message is coming from. I dont know if posting in this forum can lead to something since no one is active and the admin is in radio silence mode.

It seems the drivers on the slushengine are not recognized by the SPI ports, maybe it have something to do with quick2wire? I reinstalled everything and it still doesnt work. The software or hardware could be defective, I dont know. I will try using some tb6600 with a breakout board instead if I cant make the slushengine work, and I will ask for a refund since I cant make any use of it…


#3

Hi olivier,

Have a read of my response to Issues with import Slush. Also, have you enabled SPI and I2C interface on the Raspberry Pi? What version of Python are you using?


#4

Hi,

Thank you for replying, yes I have read your post and both SPI and I2C have been enabled using sudo raspi-config option menu. I tryed everything from the post you mentionned already. I also tryed with another cable beetween de slushengine and the raspberry pi. Could the raspberry be defective?


#5

Hello,

Are you using SlushEngine Model X LT? What version of Raspberry Pi and OS are you using?

From the command prompt, type in

python3
import Slush
b = Slush.sBoard()

Then, from another prompt, type in

i2cdetect -y 1

The above command will check to see if there’s anything connected to the I2C Bus


#6

Thank you I will try this for sure. Im using the model D.


#7

The message that you see communication issues; check SPI configuration and cables, is when the method self.getParam(LReg.CONFIG) is not equal to 0x2E88. 0x2E88 is the default IC configuration of the L6470 motor driver.

SlushEngine Model D uses L6480 motor driver, and from the datasheet, the default IC configuration is 0x2C88.

In file Motor.py, method def initPeripherals(self) checks the CONFIG parameter. I wonder if self.getParam([0x1A, 16]) is correct?


#8

when I type i2cdetect -y 1, I get 17 under column 7 and line 10, rest is –


#9

When I do the m=Slush.Motor(0) with a stepper plugged in the output 0, I get the communication issues message again


#10

I am using raspberry pi 3b with xubuntu. I also tryed with raspbian


#11

I’m not familiar with xubuntu, and I don’t know if it’s fully supported by Raspberry Pi. Also, using a different OS, it may not have all the appropriate drivers installed.

When you type i2cdetect -y 1, and it returns an address, it means that the device is connected – assuming you only have the SlushEngine connected.

It’s not necessary to have the stepper motors connected, in order to execute the command m = Slush.Motor(0)

Can you modify Motor.py, and insert the coding just beneath def initPeripherals(self):

print("L6470 {}: {}".format(self.chipSelect, self.getParam(LReg.CONFIG)))
print("L6480 {}: {}".format(self.chipSelect, self.getParam([0x1A, 16])))

and then run the program,

import Slush
b = Slush.sBoard()
m0 = Slush.Motor(0)
m1 = Slush.Motor(1)
m2 = Slush.Motor(2)
m3 = Slush.Motor(3)
m4 = Slush.Motor(4)
m5 = Slush.Motor(5)
m6 = Slush.Motor(6)
b.deinitBoard()

What are the outputs for each of the motor CONFIG status?


#13

I am using xubuntu wich is ubuntu for raspberry pi because it support ROS while raspbian doesnt. I had exactly the same error with raspbian installed from my previous test.


#14

Hi olivier,

Sorry for the wrong coding, I had written it off the top of my head. I’ve updated the coding, which I have tested on my SlushEngine, and it works.

Here’s the output of my SlushEngine X LT:

pi@RPi3:~/slushengine $ python3 testit.py
L6470 24: 11912
Motor Drive connected on GPIO: 24
L6470 25: 11912
Motor Drive connected on GPIO: 25
L6470 26: 11912
Motor Drive connected on GPIO: 26
L6470 27: 11912
Motor Drive connected on GPIO: 27

Decimal value 11912 equals 0x2E88


#15

Thank you, I will try it as soon as I can and share with you the results.


#16

Here is the results :

ubuntu@ubiquityrobot:~/slushengine$ python3 control.py
L6470 24: 65535
L6480 24: 65535
Communication issues; check SPI configuration and cables
L6470 25: 65535
L6480 25: 65535
Communication issues; check SPI configuration and cables
L6470 26: 65535
L6480 26: 65535
Communication issues; check SPI configuration and cables
L6470 27: 65535
L6480 27: 65535
Communication issues; check SPI configuration and cables
L6470 20: 65535
L6480 20: 65535
Communication issues; check SPI configuration and cables
L6470 21: 65535
L6480 21: 65535
Communication issues; check SPI configuration and cables
L6470 22: 65535
L6480 22: 65535
Communication issues; check SPI configuration and cables


#17

The blue light on the board is working, I can move the servo-motor with the servo output on the SlushEngine, but all the steppers drivers seems dead. They never worked yet on this board.

I will try with another raspberry pi, but I doubt the raspberry pi GPIO are defectives since I was able to control some servo-motors with it a few day ago.


#18

What results do you get with i2cdetect?


#19

65535 equals 0xFFFF, and CONFIG is expecting 0x2C88 or 0x2E88. Hence, nothing is going to work.

Are you using the default SlushEngine source code from GitHub, which has not been modified? If yes, then I suggest to look at the Raspberry Pi. Use the supported OS i.e. Raspbian and configure/set SPI/I2C and the necessary drivers

It’s very unlikely that the new board will be defective, but I suggest to thoroughly look at the board to make sure nothing looks abnormal – dry joints, solder not overlapping etc.

Look at How to enable spi on the Raspberry Pi. Do you have another Raspberry Pi to use, to test that SPI is not damaged?


#20

Looking at the board itself, everything seems fine. I have another raspberry pi on the way for testing this.

Source code didnt get any modification and I followed the instruction to install everything correctly. I doubt its the OS since it was working with the other slushengine, but I will try with Raspbian just to be sure.


#21

I hope the new Raspberry Pi will resolve the issue.