Picoborg Reverse stepper control trouble

Hello everybody,

I've been trying to control a stepper motor with the picoborg reverse but all the stepper does is move erratically and make noise. I've already checked that I'm using the correct phases and that they are wired correctly to the picoborg. There are no issues with the board not being found.

Some other information:
-Im using two picoborg reverse boards (i want to control 2 steppers with them), both are properly initialized according to the getting started guide on this site.
-The boards are powered with from a 12v supply with enough power to drive the motors
-stepper motors in question are NEMA 11 motors
-Weird thing is it has worked in the past, but now i got a new raspberry (3B+, previous one was 3B) and it no longer works
-Im using python 3 to program it with code i basically copied from the examples on this site

Any help would be greatly appreciated!

I also found out there have been some problems with picoborg reverse and newer models of the raspberry due to i think the smbus module, but these issues were solved with new libraries for the picoborg reverse and these are what i'm using as well

piborg's picture

It sounds like the code might be trying to drive the steppers a little bit too fast.

With both the updated library and the faster 3B+ it is possible the delay is not quite long enough now and the PicoBorg Reverse is trying to make steps before the previous one has finished. This will result in missed steps and can make some unpleasant sounds :(

The good news is that if it is the case the fix is simple, all you need to do is increase the step delays slightly. If you code is based on our pbrStepper.py example you will have this line towards the top of the script:

stepDelay = 0.002       # Delay between steps

All you need to do is increase the number and see if the steppers start working properly.

I would suggest you start by making the number much larger to see if it will help, say 5-10 times larger. If that does not change anything it might be a different problem. If it works you can keep trying smaller values until you start seeing problems, then stick with the smallest value which worked correctly.

hey piborg,

thanks for the reply. The speed doesn't seem to be the issue, the problem persists even at delays as large as a second.
I've modified the code a bit so it lets me do a single step on command and this way i noticed the 2nd phase (M2 on picoborg rev) of the motor doesn't receive any power (stepper only locks position every 2nd step). This is the case for both picoborg reverse boards i have, and using different wires for the stepper motors.

Are both boards faulty? or is there some other problem here i'm not seeing?

piborg's picture

It would seem unlikely that both boards have such a specific fault, but I am not certain what the problem actually is.

One thought is that if the board thinks it might have seen a problem (voltage too low, current too large, et cetera) it shuts the output off until the PWM cycles. At full power the PWM does not cycle so it stays off until the power setting changes.

If your script is based on the pbrStepper.py example there will be a line like this:

sequence = [[1.0, 1.0], [1.0, -1.0], [-1.0, -1.0], [-1.0, 1.0]] # Order for stepping 

try turning the output down a bit and see if the behaviour changes. For example this will run at 80%:

sequence = [[0.8, 0.8], [0.8, -0.8], [-0.8, -0.8], [-0.8, 0.8]] # Order for stepping 

Generally speaking steppers do not like being sat at full power too long anyway, you may find it actually behaves better at lower values.

I think we will probably need a bit more information to help resolve this properly. Can you answer the following questions for us:

  1. Does either PicoBorg Reverse make any sharp noises when trying to run the steppers?
  2. Are the steppers getting very hot when powered?
  3. Do you have the specifications for the motors?
  4. Have you altered the stepping sequence in your script?
  5. Can you take some photos of the wiring between the two reverses and the motors?

Lowering the stepper power is something i've already been doing ;) lowering it further doesn't solve the problem

in answer to your questions:
1: Both boards are completely silent and make no smoke signals to each other
2: Steppers get warm but not hot, so nothing out of the ordinary
3: Specification for one of the motors im working with is found at:
4: I'm generating the sequence for microstepping according to another post on this forum:
5: I'll upload some pictures later

piborg's picture

The microstepping example in that post sacrifices some torque to keep things simple, which may explain the steppers struggling to move.

Try using this sequence instead of the microstepping loop:

sequence = [[+powerMax, +powerMax],
		    [+powerMax, -powerMax],
			[-powerMax, -powerMax],
			[-powerMax, +powerMax]]

On a different note, the page with the specifications you linked is for a whole set of steppers. Can you tell us the product code and if it is a 6 or 4 wire stepper.

Oops, my bad, the stepper motor in question is the 5406 one in the list. It's a 4 wire stepper motor.
I've done some more testing and I narrowed down the problem a bit more, using an oscilloscope with one end on a wire and the other on ground. What i found out is that only the M2- port is not working, all it delivers is noise with an amplitude of about a volt.

On some futher testing it seems that on one board the M2- port is receiving a signal, which i measured on the solder under the board, but it there is no electrical contact with the thingy holding the wire. On the other board there is no signal at all on the M2- port, neither on screw or solder under the board.

piborg's picture

I think there is a bit of confusion here about how the motor connections work.

M1+ and M1- are a pair, it is the difference in voltage between them which powers the motor / stepper coil. M2+ and M2- are a pair in the same way. Because of this you need to measure the voltage difference between + and -, not just the voltage on a single connection.

I think the best thing would be to take a step back and just try the standard stepping (not micro stepping) first to see if it works as suggested above.

There is no confusion about how motor connections work, each of the outputs, whether M1+ M1- M2+ or M2- should deliver a signal, whether connected to the other end of the same phase or not. If no signal is measured there is something wrong with it.
I've finally found the problem lies with the wire screw terminals, which twist around ever so slightly upon screwing or unscrewing the wires. I removed these terminals and found out the lines underneath got damaged so i'm now taking steps to repair this.
In the meantime all input i got from this forum post are things i've already been doing and which seem obvious, and in the end i will solve the problem without any meaningfull input at all.
I still value the effort you took in trying to help, and the code examples from other posts on this forum have certainly come in handy, but I hope you will take this as feedback to improve your service to others.

Subscribe to Comments for "Picoborg Reverse stepper control trouble"