20M2 with Stepper Motor Controller PBL3770A - Confused - Please Help!

sodeaf

Senior Member
Hey Guys, I salvaged a Stepper Motor and Controller Board from a Vending Machine.. And thought I would try and control it with a Picaxe 20M2.. I am a Newbie.. So please forgive me if the "Code" or Terminology I use is not 100% Accurate.. I have the board wired to my 20M2 as shown in Picture..

I have read a lot about controlling a stepper motor, but all the info I found is in regards to controlling the motor directly.. instead of threw a type of controller. I understand the concept, but am having a hard time getting the motor to work under load. For instance I can get the motor to move in steps with the following code, but under a load it will not do anything.. (I mean under load in regards to the actual load it was under in the original machine, So I am not adding any more load then for what its original design was for.)

symbol PhaseA = B.0
symbol PhaseB = B.1
symbol Power1 = B.2
symbol Power0 = B.3

Symbol PushSwitch = PinC.0 'Tied High through 10K to 5VDC


High PhaseA
High PhaseB
Low Power1 'Sets Stepper to 60% Power to keep motor in place and not spin freely
High Power0



Main:

If pushswitch = 0 then let b1 = 1 endif
if pushswitch = 1 and B1 = 1 then let b1 = 0 goto spin endif

goto main

Spin:
Low Power0
pause 8
Low PhaseA
pause 4
Low PhaseB
pause 4
high PhaseA
pause 4
low PhaseB
pause 4
High Power0

goto main


So with that code I can get the motor to move (without anything on shaft - NO LOAD, Under Load it just wiggles and doesn't move), It takes about 30 Pushes to spin all the way around, so its not moving 1.8 Degrees per step.. Can anyone help me, or explain to me where my HEAD is not think properly... I want to be able to move the motor one step at a time.. As well I measured all these "Wires" with my scope (In original equipment), and that's how I came up with the pause times.. But My scope has been acting up and I cannot see the first 15ms from the first trigger, I can only see the running timing.

Thanks Steve

goto mainStepper.jpg









http://www.datasheetcatalog.org/datasheets/150/35361_DS.pdf
 

bluejets

Senior Member
Sounds like supply to the motor is not high enough.
Usually stepper motors require a much higher supply voltage with current limiting to get the performance you require.
So the 24 volt motor may require as much as 40 volt.
really need the complete circuit of what you have now.
 

Goeytex

Senior Member
Try This as a test:

Code:
#Picaxe 20M2
dirsB = %00001111

do
     pinsb = %1011 : pause 10
     pinsb = %1001 : pause 10
     pinsb = %1000 : pause 10
     pinsb = %1010 : pause 10
  
loop
Does the motor turn with significant torque ?
 

sodeaf

Senior Member
Hey Guys thanks for the input.. The motor is a 16VDC motor, I know I wrote 24VDC but after looking over the data sheet I found it was actually a 16VDC.. So I am good there.. The Diagram I provided is from the original equipment it self.. The power wires are all isolated.. So I can power it with the same machine power supply.. I have removed the 4 control wires from the equipment and connected them to the Picaxe Pins..

The machine the stepper and has great torque, Starts and stops it on a dime.. as we would all assume.. I just want to replicate it.. I am doing this purely for fun and giving me an excuse to play with the Picaxe.. I will try and scope it again.. and let you know how I make out.. As well I will try the code you suggested this evening..

Thanks

Steve
 
Top