Motors are not running anymore
Forums:
I got picoborg setup previously, and it was working fine (running the samples) and motors were running, I started having issues now (after 2 weeks of not using it)
Basically, all python calls succeed and it says it found the board x, it is using address y, but the motors are not moving at all after issuing the api call SetMotor1(1), or running stepper sequence script. I got no errors or exceptions either.
What could be the reason? I checked all the wiring, batteries, power and they all seem fine. When there was less power, I remember the board was making very low pitch voice, presumably trying to pull from pi; and there is no voice coming out now. Would it be on the board, on the motors, or something else you think?
piborg
Wed, 07/30/2014 - 20:12
Permalink
Motor diagnostics
Is the jumper fitted across the two-pin EPO connector?
It would also help to know if you are trying to use DC motors or a stepper motor.
Do you know the voltage ratings of the battery and the motors you are using?
You can force the system into what should be a good state using the following sequence:
You should then be able to confirm a good state using:
which should answer with:
If any of these are different there is a problem of some kind.
If
PBR.GetDriveFault()
returnedTrue
then the following problems may be the cause:Connecting a larger voltage supply should solve the problem
Try disconnecting the motors one at a time and see if repeating the sequence changes the answer
Double check with the provided wiring diagram
If
PBR.GetEpo()
returnedTrue
then the board thinks the EPO / jumper is disconnected, which means it will prevent the motors being powered.You can bypass the EPO protection by using:
PBR.SetEpoIgnore(True)
PBR.ResetEpo()
Any of the other lines returning the wrong answer would suggest a problem either with communications or the board itself.
You can perform a quick check using the following code:
It should take about four or five minutes to run, if the communications and board are okay it should end with the all good message.
A copy of the script is attached to this post.
If most or all of the tests fail then there may be a problem with the wires for the six-pin header, the board itself, or possibly event the I2C pins on the Raspberry Pi.
If a low number of tests fail the problem is very likely to be with the wires for the six-pin header.
For problems with the six-pin header wires try making sure they are firmly pushed on to all of the pins. Double-check that they are connected the correct way around and on the right pins on the Raspberry Pi.
You can also try using the other six-pin header on the board to see if the problem goes away.
You can test for a potential fault condition during running by setting the speed to 100%:
PBR.SetMotors(1.0)
then checking the fault flag after a brief wait:
PBR.GetDriveFault()
If you get
True
then there may be a problem with the motors or the board, try disconnecting the motors from the board and repeating the test.The low pitch noise was most likely the under-voltage protection shutting the motors off for short regular bursts when the battery power is too low.
This is normal, the board does this to protect itself from damage.
certen
Fri, 08/01/2014 - 11:53
Permalink
Thank you
Thank you very much for the detailed diagnostic code and explanation. It helped me drill down the issue, it turned out the battery pack was drained, and after recharging the batteries, it works like a charm!
Thanks again for the wonderful support.