Need program for two servos and joystick

Hi anyone and everyone,
I am looking for some help,
I am building a video camera pan/tilt head for a boom. Semi professional.
The boom head has come together nicely. If you would like to see pictures; Go to:
s32.photobucket.com/albums/d36/rickstir/boom/
It has only two digital servos and I would like to control them with an industrial type joy stick: to see a picture of this go to::
i32.photobucket.com/albums/d36/r 
 G_3838.jpg

I want to get the the Bot Board, and Adam, and would like someone to give me a program for it.
I am ready to purchase the Bot Board but not sure which Adam to get? Should I get the Programming Starter Pack of just the parts, Save myself a few buck. (I don’t want to become a programing expert).
But then again maybe I will need to get into it, because there are some variables that I will need to trouble shoot though.
What is important to me, is to get joy stick control of two servos, and smooth movement, and when the joystick returns to center position the servos stay where I left them.

Also I think these digital servos (HS-5645MG) have some programing ability, such as, extended range of motion, do you think I would be able to have access to this? Or is this only accessed though something like the DSP-01? Digital Servo Programmer / Tester
Thanks Rick

You are requesting somebody write you what I see as a difficult program for free (this seems to be the second request you’ve made for this). I doubt you will get any knowledgable “free” takers. People will help if you are willing to put out some effort your self. You might want to consider a pure mechanical joystick control such is used in small airplanes using push/pull cables. If you still want to use servos, then you might make your controller from two of the servo testers, substituting the pots in the joystick for the pots in the testers. You might be able to make your controller similar to the below 555 chip setups for very low cost.

uoguelph.ca/~antoon/gadgets/servo3.htm
uoguelph.ca/~antoon/gadgets/servo4.htm

I am not sure if it is difficult or not. I don’t know anything about programing or the software involved. However, I was informed of this user forum by lynxmotion. I was also told by them that this program was fairly easy and to join this forum and ask for help and maybe someone would help me.

It seems you (zoomcat) have a different opinion than Mr Frye at lynxmotion, he wrote “program should be pretty easy” see the thread:
lynxmotion.net/phpbb/viewtop 
 highlight=

Now I will repeat myself I don’t know if its difficult or not, but please I hope *someone else *reads this and can chime in and ad their opinion.

Does anyone else have any answers to my questions listed above in this thread?

Do you want help or not!? :unamused:

There’s a thread in this forum about programming the Hitech digital servos with the Basic Atom Pro. That’ll at least help with one of your questions.

The other half is dependent on what sort of signals the joystick outputs and wether or not the servos are capable of the smoothness you require for your application.

So, what sort of signals does your joystick output?

It appears that you have a control system hooked up already. What have your results with that system been?

For you to get the help you have requested we need more information.

Also, it’s somewhat rude to expect someone to drop what they’re doing and write a program for someone else for free, even if it’s an exceedingly simple one.

Thank you, :smiley:
Its printed on the joystick “5 volts”.
The joystick outputs a variable voltage; 2 volts from center for a total of a 4 volts range.
How I came up with this is as follows:
I supplied it 6 volts across the Black and Red wires.
The Blue and Yellow wires handle the x and y axises.
I connected a meter between one of the power leads (Black or Red) and the other to ether the Blue or Yellow wire; at joystick centred. Voltage reads 3 volts, I push the joystick to one end of its range of motion, voltage reads 5 volts, I push the stick to the other end of the range and voltage reads 1 volt.
I don’t know what the green wire is used for, it was tied back when I robbed this joystick off a powered electric wheel chair. Don’t worry I found the wheel chair at the dump.
To see the joystick go to:
i32.photobucket.com/albums/d36/r 
 G_3838.jpg

The control system I have hooked up is just temporary for testing. I am using the MX-04 servo tester with a 2 way switch to allow control of both servos separately. This has limited functionality: 3 reasons; 1, sometimes I need both servos to move at once. 2, it is comber-son to move a switch when I have so much else going on. And 3, the digital servos are still jerky and I attribute this to the MX-04 and its limited potentiometer, if that’s what it is. I feel that a programmable circuit would give me better, narrower pulse widths or what ever you want to call it
 But, would result in better smother servo control,. Its something I must address ether myself or from someone that has actual experience.
I don’t need speculation or educated guess. I need someone that has actually tried to get smooth movement and succeeded or not succeeded.

But at any rate I need joystick control above all else. If I cant get smooth movement then the next step (after a bot board and joystick) will be to get a gear reduction/transmission.

So what which Adam should I get (pro or not)
and
Starter kit or not? Lynxmotion said the book wouldn’t have the program I am looking for and its pretty advanced stuff.
Is the info on lynxmotion web site enough?
How do I program a Bot board?
Is their a programmers program I can download to take a look at?

Yes I do want Help

Thanks, Rick

Jim was right, this is a fantastic place for help and information, however, you are asking for someone to take the time and do the project for you. Most everyone has their own projects to work on and are willing to help others, but I don’t think anyof us have the time to create a program from scratch.

Zoomcat is extreamly knowledable in this earea and can offer lots of tips, but you have to meet us half way in the effort. Did you pick up a book at even try to learn how do do this stuff? If someone does all the work for you, what would you get out of it? what if you want to do a new project, or improve on this idea? are you going to always rely on the robotic community to do each project?

I am not trying to be rude or mean, but I want you to see the other side of the fence, from another perspective. People are always willing to help, but that help has its limits.

I did say the program didn’t sound difficult. Read two channels from the A to D, increment/decrement a couple pulsout variables, run in a loop. I also said the forum is a great place to get help with the program. However forums are not generally a good place to ask someone to do something for you. People will generally bend over backwards helping someone learn to write a program. But are not so interested in writing a program for someone no matter how simple.

In reality this doesn’t seem like a moon shot type of project or require some profound level of programming skills. While I agree that it is unlikely someone is going to do it for you, I also agree if you show some willingness to sit down and do some trial and error work that you will get an appreciable amount of help from the folks on this forum.

To start, here is what I perceive as the required control loop you need to create for each axis. It seems like you would interpret the joystick input as a velocity request. how fast you allow the servo to move from one velocity to another is acceleration and some testing will be required to determine what is a reasonable limit for your mechanical system. For a desired velocity input you compare it to the current servo velocity, calculate the required acceleration to change the servo velocity to the desired level, limit the amount of change to the maximum acceleration value, then apply the result to the servo position and wait for the next servo update interval to do it all over again.

Typically servos are updated every 20mS so it doesn’t make much sense to make more than 1 position change in that interval. In reality you only control the position commanded to the servo, in this case I would think using the hservo feature of the BA/BAP. If you make your control loop execute every 20mS then it becomes simple to calculate servo velocity, it is just the difference in position divided by the 20mS. acceleration is just the difference in velocity divided by 20mS. So you can use these relationships and the inverse of them to determine how much to change the position command value each time the loop executes.