Stepper Motor Control

Nicol60

New Member
Hi I have been away from Picaxe for some time so give me some flexibility with this request in case the answer is in plain sight.

I would like to control two stepper motors with one double joy stick. That is a stick that say Right and Left would control one motor and Up and Down the other.
The project is a Animatronic Scull and I have it mounted on an PTZ unit from a PTZ Camera. So I have the mechanics but not control.

So if start by asking for help

Thanks

Jim
 

Nicol60

New Member
Hi Can you give more technical details on the PTZ unit.
Hi The PTZ unit supports the two stepper motors one in the horizontal and the other vertical. So when the vertical unit is powered it gives an Up Down movement and the other provides for Left to right.

Others items are perhaps two servos one for the jaw and the other for the eyes but there is no point to this is the unit will not move.
The steppers are bi-polar four wire ( I think, but the shed is out of bounds at the moment) and since the part of the unit they can move the scull easily.

Regards

Jim
 

oracacle

Senior Member
Is there space for end stop switches?
You are going to need something to driver the motors, some sort of h-bridge ir actual stepper driver such as A4988 or DRV5525 depending. The drivers will depend heavily on what motors you plan to use.
The rest is software, but that can't be answered until we know about end stops and drivers and how the drivers are setup.
 

Nicol60

New Member
Hi
Sorry for the delay in my reply, I have attached a picture of the project. This shows the head mounted on a PTZ from a CCTV camera. One motor gives vertical movement and the other gives horizon. I could fit end stops if required but as yet I have no drivers for the motors. I tried an Arduino, it uses a stepper driver but I could get it to work hence the reason for this mail. I would prefer not to have end stops as this will mean at least three more wires to deal with in a limited space. Have look at the picture and see if this helps, if can suggest something..great if not then thank you for the help so far.

Jim
 

Attachments

oracacle

Senior Member
picaxe_manual3
Page 16, bipolar stpper motors.
It is perfectly possible to drive stepper motors from just about any microcontroller. But you need to have some sort of driver.
The A4988 are about £8 for 5. You only need to 2 .

Does the PTX make use of a slip ring to transmit power and signal through rotating joints? If not I suspect that either end stop are well hidden or it used current detection from its motor drivers for end stops. Either way you are going to have to think about how you are going to get power and signal to motors past at least 1 rotating joint.
 

Hemi345

Senior Member
You shouldn't need end stops if you can position the skull at both extremes on the x and y axis and then count the steps. But... it would be nice to have end stops for when you power off the device or the skull gets bumped and the counts are no longer correct.

You could share a single pin between the end stops. For example, after a power cycle, your startup routine could programmatically rotate one motor till the pin is shorted, then back it off till the pin is open and do the same for the other motor. Then you can count steps from then on.

I used an arduino feather board to drive a 4 wire stepper motors. I'll see if i can find the Ebay listing I bought it from and share the code to drive the stepper, if you're interested. The board supports two motors, so would be perfect for your use.
 

kfjl

Member
I'd start with orocacle's link to the picaxe manual's example. Get one motor wired up correctly and turning.
And check your driver can cope with the motor you're using first.
 
Top