Program Pan/Tilt with AC Motor

Hi,

I have a pan/tilt that uses AC motors to turn from 0 to 5V. I was planning on wiring it to a relay shield that fits on top of an Arduino Uno. My end goal is to have the pan and tilt positioned at various angles (pan=-60,-30,0,30,60 tilt=0, 15, 30) for a total of 15 positions. I was hoping to implement that using AnalogWrite(). I set the voltage between 0 and 5V (e.g. set it 2.5 V for pan motor and 2.5 V for tilt motor). Is that possible with using a relay? If not, is there any other recommendation?

http://wiki.seeedstudio.com/Relay_Shield_v3/

I was hoping to implement that using AnalogWrite(). I set the voltage between 0 and 5V

How will that move a motor to a fixed position and keep it there?

A relay will only give you on and off control of a motor.

I can’t see the project as you currently describe it working at all.

If I can't use a relay, is there any other way to adjust the position of pan/tilt that uses AC motor?

Exactly what do you have in the way of hardware? Is the fact you have an AC motor at all relevant? Your posts are not clear to me.

Hi,
Can you post links to data/spec of your AC pan/tilt machine?

Thanks.. Tom... :slight_smile:

Its a Pelco PT1250P/PP Pan/Tilt

Sadly that tells little about the system, it seems just to be a sales sheet.

What you need to know is what sort of controll you need and what, if any feedback it gives.
At worst is is just an open loop ( that is no position feedback other than limit switches is given. )

From your first posts it looks like you want to define the position it point to, but without some sort of feedback as to where it is pointing this is impossible.

Hi,

Tom… :slight_smile:

pt1250p_manual.pdf (119 KB)

Ok I see that diagram. If I wanted it controlled through the arduino, is it feasible for me to adjust the pan and tilt to various set positions (e.g. 30 deg pan left, 15 deg tilted up; 30 deg pan right, 30 deg tilted up; etc.). Can relays work for this application?

Yes but it is not an easy code.
You use those resistors to find the position of the two motors by reading the voltages they produce with an analogue read. Now comes the tricky bit.

The code has to decide which way to turn the motor to get from the position it is in to the position you want. It has to then set some relays wired as a H-Bridge, or use a solid state H-Bridge, to set the direction of the motors. Then turn the motors on and track the position through the changing analogue readings and stop each motor when the correct position is reached.

It would be good to use the end switches to prevent programming errors from grinding the motors further than they would go.

Grumpy_Mike:
It would be good to use the end switches to prevent programming errors from grinding the motors further than they would go.

S1, S2, S3, S4 are built in limit switches.
@dcparduino; Can you please tell us your electronics, programming, Arduino, hardware experience?
Thanks.. Tom.... :slight_smile:

Uh i could be wrong but there appears to be 2 motor windings for each motor with one side as common.

Seems to operate by applying power to one or the other for forward and reverse, i dont think a H bridge will not work.
Looks lile 4 relays are needed one each for up, down, left and right.

Was wondering how you reversed an AC motor.

Hi,
The motors are 2phase motors that rely on the phase change in current that occurs when a capacitor is in the circuit.

When AC is connected to the UP terminal, current flows directly through the upper coil, current also flows through the capacitors and the lower winding.
Because the AC current flowing through the capacitor/coil circuit is 90deg ahead of the current through the other coil, the motor rotates UP.
M_up.jpg

When AC is connected to the DOWN terminal, the current circuit is swapped and the upper AC current is now ahead off the lower coil, the motor rotates DOWN.
M_down.jpg
Yes you will need 4 relays and 4 outputs from your controller.

I hope this helps… Tom… :slight_smile:

Tom, Grumpy Mike,

Thanks for the feedback. I've had experience programming with Arduino Uno and Due boards. I have gone through many of the basic Arduino tutorials that you find online/youtube that use LEDs, switches, potentiometers, servos, etc. This will be my first time working with relays. My understanding is that I can't vary the voltage between 0 to 5 volts (~use PWM) on a relay to adjust the position of the pan/tilt. I'm wondering is there any type of sensor that can measure the angle position of the pan/tilt so that I can simply code it to such and such angle?

My understanding is that I can't vary the voltage between 0 to 5 volts (~use PWM) on a relay to adjust the position of the pan/tilt

That is correct, a relay is either on or off, the relay just determines if a motor is moving and what direction it is moving in, it has nothing to do with the position.

That is given by the reading from those pots. You measure the angles with a protractor and you write down what value you get from the pots. Then when you read the pots in your program you know if it is at one of these set angles.