Problem with Motor 1


#1

Hi there,

I recently purchased the SlushEngine Rasberry Pi HAT and am having problems using motor 1. I have tested two steppers that will work fine on Motor 0 but get the “check SPI configuration and cables” error when i attempt to use them on Motor 1.

I have tested this on both my Raspberry Pi 2 and Pi 3B+ and Motor 0 always connects on GPIO 24 and works great but get the error when trying to use M1.

I’m hoping someone has advice or ideas on what might be going wrong here?

Thanks for the help,
Joe


#2

Hi jorR,

I’m not familiar with the SlushEngine Raspberry Pi HAT, but if your using similar coding to this,

import Slush
b = Slush.sBoard()
m = Slush.Motor(0)
m.move(1000)

Then try passing values from 0 to 6 in Slush.Motor(parameter). Hopefully, the other stepper motor should work.


#3

Hi rraghvani,

I had previously only tried Slush.Motor(0) and Slush.Motor(1) in my script since the Pi HAT has only two motor connections. I went through and tried the values 0-6 as you suggested and can still only get Slush.Motor(0) to connect on GPIO 24. The rest of the values (1-6) produced the check SPI configuration and cables error.

Is there anything else I could look into that might be causing this problem?


#4

Hi,

Have you followed the instruction in setting up the RPi and installing SlushEngine? Are you using the original SlushEngine code from GitHub? Has the coding been modified in any way?

Check the HAT, and verify that the board is not damaged,


#5

Hi,

I will redo the install just to make sure it is not something i missed the first time around. I also was hoping i could get an opinion on the quality of the soldering on these pins.

There seem to be some with dark spots and one (pin 20 i think) that has very little solder on it. Could this be the cause of my problem?

Thanks for your help


#6

Hi,

If you have a soldering iron, it may be worth redoing those joints. The dark sports can be ignored. Does anything else look a bit odd or out of place on the board?

Another user http://forum.roboteurs.com/u/Skyice, also uses the HAT. You could try and send a message to get help.


#7

Thanks rraghvani,

Went ahead a redid a couple of the joints but didn’t make a difference. The rest of board appeared fine. I also read through another thread were you recommended modifiying the motor.py file to see outputs for the motor CONFIG status, my outputs are as follows,

Motor(0)
L6470 24: 11912
L6480 24: 6770

Motor(1)
L6470 25: 0
L6480 25: 0

I’m assuming 0 is not a value i want here, what does this indicate?


#8

Hi,

11912 (integer value) or 0x2E88 (hex value) is the default CONFIG status, of when the L6470 is initialised.
If the coding getParam(LReg.CONFIG) doesn’t equal 0x2E88, then you get the message communication issues; check SPI configuration and cables.

Have a read through Communication issues with the SlushEngine, and try to initialise all motors from 0 to 6. If the value returned is either 0 or 65535, you may have a faulty RPi (GPIO pin could be dead). Olivier had a faulty RPi board.


#9

I would be somewhat surprised if its a faulty raspberry pi as I have this problem on both my RPi 2 and RPi 3B+ which is brand new. When I get a chance I am going to try a fresh install of Raspbian and reinstall from the SlushEngine code from GitHub to see if that fixes anything.

Thanks again for taking the time to help me


#10

Install Raspbian and then perform an update (https://www.raspberrypi.org/documentation/raspbian/updating.md)

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

Enable SPI and I2C (https://learn.sparkfun.com/tutorials/raspberry-pi-spi-and-i2c-tutorial/all) via

sudo raspi-config

Install the drivers

sudo pip3 install spidev inputs smbus2

Finally install SlushEngine (https://github.com/Roboteurs/slushengine/blob/master/INSTALL.md)

Hopefully, fingers crossed, it should work!

However, if you still get the same problem, then you may have a faulty HAT.


#11

Hi rraghvani,

Just wanted to update some good news that I received a Model X LT today and all 4 motors worked out of the box on my current raspberry pi setup. So it appears everything related to slush engine is installed correctly and i can continue with my project.

I’m still not sure what is wrong with the Pi HAT but i may go back and check those joints i soldered more closely


#12

Hi jorR,

It’s good you got your Model X LT working, but shame about the HAT not working. It would be good to get a picture of the HAT, and compare it with your HAT to ensure there’s no components missing.

Advice: ensure your setCurrent(self, hold, run, acc, dec) values are kept low i.e. 10, then increase by 5, to get the stepper motors working. And make sure the L6470 chips don’t get too hot.