Controlling two motors with joystick or two dials
General Specialist
Posts: 4
I've spent an hour searching, but can't really find a similar project to steal the ideas from, so I'm hoping someone can nudge me in the right direction:
I'm planning on building a cable-operated camera mount that can pan and tilt via two motors.
The camera mount should be controlled either by a joystick or via two dials, one for each axis.
I'm afraid regular RC servos won't be strong enough, so I imagine I will have to use motors (DC or step?) connected to the axis via gears to provide enough torque.
Crucial features:
* Silent or near-silent operation
* Super-smooth (no jerky steps)
* Variable speed (a quick dial-turn/joystick-push should result in quick camera movement)
I have a BASIC Stamp 2p 24-Pin module and a USB Board of Education.
Any tips appreciated!
I'm planning on building a cable-operated camera mount that can pan and tilt via two motors.
The camera mount should be controlled either by a joystick or via two dials, one for each axis.
I'm afraid regular RC servos won't be strong enough, so I imagine I will have to use motors (DC or step?) connected to the axis via gears to provide enough torque.
Crucial features:
* Silent or near-silent operation
* Super-smooth (no jerky steps)
* Variable speed (a quick dial-turn/joystick-push should result in quick camera movement)
I have a BASIC Stamp 2p 24-Pin module and a USB Board of Education.
Any tips appreciated!
Comments
You could use a potentiometer for each axis with the Stamp reading the resistance value using RCTIME. Center position would be stop while to either side would provide a direction and the distance would give the speed to use. You'd need some kind of limit switch to prevent damage to the pan/tilt head.
Good references are : The "What's a Microcontroller?" tutorial, www.emesystems.com, and the "Industrial Control" tutorial. The tutorials are downloadable from Parallax's website (see the Downloads menu).
Yes, the positioning would be done visually, so no need to monitor the position of the motors.
Could I use any of the smaller motor controllers from Parallax, or would I need two of the heavy-duty and expensive HB-25s?
Mike, if I understand you correctly, I would use RCTIME to monitor any difference in the resistance, and use that to calculate the speed and direction of the movement? Isn't there a risk of reaching the outer limits of the potentiometer, wouldn't it be better to somehow get a dial that just provided pulses that could be counted so that I wouldn't reach the outer limit of the potentiometer's range and not be able to get the the camera head's outer limit?
The JimmyJibs are far too expensive at over $7,000. However, the Underslung head:
http://www.b-hague.co.uk/pan__tilt_power_head.htm#UPH
...looks far more in my price range. I'd love to build one myself, if I felt confident it could be done over a weekend.
I'm assuming that you will use the potentiometer to set the motor's speed and direction, not the actual position. As a result, the "outer limits" of the potentiometer's range are not very important. You will need limit switches as I mentioned to prevent the motors from going too far in any direction. You could use an optical (flag) sensor or a mechanical sensor ... it depends on how you've built the head.
Would I need a special kind of potentiometer that has a "zero" position in the middle, or would I just determine that a certain value in the middle of the range was to be interpreted as "stop?" I assume I'd handle this in software.
Seems like I'd only need one Pololu controller for two independent motors up to 1A each, right? That would be a lot cheaper than using two HB-25s.
If I attach one switch at each extreme position of the axis and then make sure that the corresponding switch isn't activated before telling the motor controller to turn the motor in that direction, that would do it, right?
Thanks again for all the help!
Yep, one controller
Limit switches are good ideas too.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--DFaust
If you know any code that would be a good starting point, please post a link. It's been a while since I was coding...
I've found some starter code in the What's a Microcontroller, I'll go from there when I get the Pololu.
Post Edited (General Specialist) : 10/29/2007 1:23:38 AM GMT