Submitted by FlyingBirdy on Tue, 03/24/2015 - 14:53
Try to run a bipolar stepper motor (QSH-5718-51-28-101).
Get this error
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
What does that mean, can't find the error on the web-site.
Thanks,
Bert
piborg
Tue, 03/24/2015 - 15:02
Permalink
Failed sending motor X drive level!
This error means that the PicoBorgRev.py script encountered an error when trying to use the I2C bus to talk to the board.
Could you post all of the lines displayed by the script?
FlyingBirdy
Wed, 03/25/2015 - 13:45
Permalink
Hi,The program to test the c
Hi,
The program to test the circuit with the stepper is "pbrStepper.py".
( Spec's from stepper see http://www.reichelt.nl/QSH5718-41-055/3/index.html?&ACTION=3&LA=446&ARTI... )
Power supply is approx. 20Volt
root@raspberrypi:~/picoborgrev# python pbrStepper.py
Loading PicoBorg Reverse on bus 1, address 44
Found PicoBorg Reverse at 44
PicoBorg Reverse loaded on bus 1
Steps to move (-ve for reverse, 0 to quit): 5
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
Steps to move (-ve for reverse, 0 to quit):
This is the output.
Thanks,
Bert
piborg
Wed, 03/25/2015 - 14:32
Permalink
Failed sending motor X drive level!
This is strange, the I2C bus must be working as the PicoBorg Reverse is actually found...
Could you answer a few questions for us?
uname -a
Can you also try running the following lines directly in Python:
Let us know if any messages are printed, also if the LED on the PicoBorg Reverse is on or off afterwards.
FlyingBirdy
Wed, 03/25/2015 - 15:06
Permalink
1. Model B rev.12. root@rasp
1. Model B rev.1
2. root@raspberrypi:~/picoborgrev# uname -a
Linux raspberrypi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux
3. No resist by turning shaft
4. Stepper is cold (there flows no current according the A-meter)
>>> import PicoBorgRev
>>> PBR = PicoBorgRev.PicoBorgRev()
>>> PBR.Init()
Loading PicoBorg Reverse on bus 1, address 44
Found PicoBorg Reverse at 44
PicoBorg Reverse loaded on bus 1
>>> PBR.SetLed(True)
The led is On.
The piborg rev card is from April 2014 (order nr 2954)
piborg
Wed, 03/25/2015 - 15:12
Permalink
Failed sending motor X drive level!
Hmm, this is a bit of a puzzle.
Could you try the following sequence of Python commands:
This should turn both stepper coils on at 20% output (4V)
Hopefully this will either give us a more detailed error message, or power the stepper.
FlyingBirdy
Wed, 03/25/2015 - 16:23
Permalink
>>> import PicoBorgRev >>> PB
>>> import PicoBorgRev
>>> PBR = PicoBorgRev.PicoBorgRev()
>>> PBR.Init()
Loading PicoBorg Reverse on bus 1, address 44
Found PicoBorg Reverse at 44
PicoBorg Reverse loaded on bus 1
>>> PBR.bus.write_byte_data(0x44, PicoBorgRev.COMMAND_SET_A_FWD, 51)
>>> PBR.bus.write_byte_data(0x44, PicoBorgRev.COMMAND_SET_B_FWD, 51)
>>>
No stepping at all.
Maybe i have send the the board inc. the stepper motor and raspi to you (i you send it back to me)?
piborg
Wed, 03/25/2015 - 16:42
Permalink
Connections
Just to check, are your wires connected like this:
M1+ → Black
M1- → Green
M2+ → Red
M2- → Blue
If so, could you try the following sequence of Python commands:
This should manually command the stepper through about 8 steps
FlyingBirdy
Thu, 03/26/2015 - 16:01
Permalink
The wires are correct connect
The wires are correct connected to the board.
No moving at all
Could it have to do with the start current?
piborg
Thu, 03/26/2015 - 16:30
Permalink
Stepper not moving
It is possible we have a power problem in this case.
Looking at the data sheet the stepper is rated for 2.8 A.
The PicoBorg Reverse itself should be more than capable of driving that level of current, however the power supply might not be capable.
If you could answer these questions it may help us resolve this:
It would be worth seeing if the board is reporting any faults:
If
PBR.GetEpo()
printsTrue
then the board is intentionally preventing movement because it thinks an attached EPO switch has been set.If
PBR.GetDriveFault()
printsTrue
then the board believes there is a problem powering one or both of the motor outputs.FlyingBirdy
Thu, 03/26/2015 - 18:36
Permalink
1. No error message2. TopW
1. No error message
2. TopWard Electronics model: TPS-4000
3. At rest there flows approx. 275mA by 18V (after 5...7minutes the stepper is warming up)
>>> import PicoBorgRev
>>> import time
>>> PBR = PicoBorgRev.PicoBorgRev()
>>> PBR.Init()
Loading PicoBorg Reverse on bus 1, address 44
Found PicoBorg Reverse at 44
PicoBorg Reverse loaded on bus 1
>>> PBR.ResetEpo()
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(0.2)
>>> print PBR.GetEpo()
False
>>> print PBR.GetDriveFault()
False
I will try to get another PowerSupply.
Did some extra tests:
root@raspberrypi:~/picoborgrev# python pbrStepperSeq.py
Loading PicoBorg Reverse on bus 1, address 44
Found PicoBorg Reverse at 44
PicoBorg Reverse loaded on bus 1
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
Failed sending motor 1 drive level!
Failed sending motor 2 drive level!
Failed sending motor 1 drive level!
The red led on the board is flashing, i can feel some activity on the stapper shaft.
piborg
Thu, 03/26/2015 - 20:37
Permalink
Flashing LED
The LED flashing suggests something is going on which should not be.
One possibility is that the communications fail-safe has been enabled.
Try the following:
If it prints
True
then the fail-safe is getting enabled and turning the motors off when it has not been communicated with quickly enough.This should not be the case, the board is meant to start with this option disabled.
Another possibility is the 3.3v pin from the Raspberry Pi is not supplying enough power to the PicoBorg Reverse, which is causing it to restart every so often.
This would likely point to the 5v supply to the Raspberry Pi not being able to supply enough current for both the Rapberry Pi and everything attached to it.
I think the second option is more likely, if the board is restarting it could also explain the errors you are seeing.
Whenever the board restarts it would also turn the power to the motor off, preventing it from stepping.
I would suggest trying again with as few devices connected as possible (monitor, keyboard, PicoBorg Reverse).
In particular Bluetooth and WiFi dongles can use a fair amount of power.
If that does not work see if you can find another 5v supply.
FlyingBirdy
Fri, 03/27/2015 - 18:47
Permalink
I think that i will switch to stamp collecting.......
The 5V and the 3.3V is stable (checked with a scoop, and also no noise on the lines)
Found a strange thing
This works the stepper is stepping.
>>> import PicoBorgRev
>>> import time
>>> PBR = PicoBorgRev.PicoBorgRev()
>>> PBR.Init()
Loading PicoBorg Reverse on bus 1, address 44
PBR.SetMotor1(0.2)
Found PicoBorg Reverse at 44
PicoBorg Reverse loaded on bus 1
>>>
>>>
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
>>> PBR.SetMotor2(0.2)
>>> PBR.SetMotor1(0.2)
>>> PBR.SetMotor2(-0.2)
>>> PBR.SetMotor1(-0.2)
The following program does not work.
root@raspberrypi:~/picoborgrev# python steptest.py
This the program:
import PicoBorgRev
import time
PBR = PicoBorgRev.PicoBorgRev()
PBR.Init()
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
PBR.SetMotor2(0.2)
PBR.SetMotor1(0.2)
PBR.SetMotor2(-0.2)
PBR.SetMotor1(-0.2)
Attached my program, please rename from *.txt to *.py
Its al the same.......
piborg
Sat, 03/28/2015 - 09:18
Permalink
Step delay
The reason the script is not working is that the stepper needs to be given a chance to move before the next step.
I have attached a new version of your test script with delays between each step.
It will step very slowly (once per second), but should step like running the commands manually.
If this works you should be able to reduce the
stepDelay
value in the script to increase the stepping rate.If you make it too small the stepper will either stop rotating or start making loud buzzing sounds.
If you cannot make it move fast enough you can then try increasing the
power
value in the script to try and get the motor to respond quicker.When you have some values that are working happily you can edit
pbrStepper.py
to make it use the same values.First change
stepDelay
to be the same as you have working.Second change
sequence
to use the same number as you used forpower
.For example if you have
power = 0.2
then you should use:sequence = [[0.2, 0.2], [0.2, -0.2], [-0.2, -0.2], [-0.2, 0.2]]
Hopefully this will get you up and running ^_^
FlyingBirdy
Sat, 03/28/2015 - 15:05
Permalink
Thanks, this works. Played wi
Thanks, this works.
Played with power and stepDelay.
Will continue with the python part.
Will put the results here.