Let's Make Robots!

Servo controller using timeframes

I have four servos with the following specs:

 

Nylon gears3 pole wireHigh quality casingWeight: 8 gramsTorque: 1.4kg/cm@ 4.8V and 1.9kg/cm@ 6.0VSpeed: 0.1 sec / 60o at no loadOperating Voltage: 3.0V – 7.2 VDead Band Width: 2msDimensions: L 23mm x W 12mm x D 26mmDead band width: 2msConnector wire length: 160mm (16cm) from the outer housing of the servo to the universal RX plug.Universal RX plug

Have never ever ever never ever used servos or controllers so you may have to be a little slow and direct with your answers please no slang/jargon or lingo as I will not understand what you are saying.

 

The task is a simple one (I think). It involves the four servos being attached to a tray on each corner. Every 10 or so minutes (hence the timed explanation, I think timed in servos means something else tho)I need the servos to raise or lower the tray via a arm coming off the servo and attached to a stationary bar (in other words fixed.). 

 I estimate the servos will need to operate in a 90 degree arc. 

 I basically need to know what parts (i.e what controller) to get, how to assemble and how to adjust. Try explaining things tho I can't guarantee I will understand, so apologies in advances... 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thank you for the info.

 

Will be sure to ask if theres anymore probs. 

Yes. Get a picaxe 28x1 chip and board (the one used in the start here bot). Your servos can just about plug directly in. You then have to program the chip but it is a language called basic and almost looks like english.

Your code would look kinda like this:

main:

servo 1, position (where position is the number associated with where the servo points)

servo 2, position

servo 3, position

servo 4, position

pause x (where x is how long you want the servo to "wait"

let position=position + 1 (increase the servo's position a little)

goto main (go and do it again)

 

 

there you go, this is actually a simple problem... You just need to learn a few steps to get to your goal.

 

Have just noticed that servo will move in less than a second. Can i make it move much slower? Or is it poss to move 1 degree every second for 90 seconds to get to 90 degrees arc, thus 'slowing' down the servo?

 

Yes you can.

I think first thing would be to find out the start position, and end postion values, then divide that by 90(see the below note on this though). That should give you an increment value that you would need. use that with a delay of Z microseconds.

NOTE: One issue though is you may not get the 1 degree of accuracy that you want with a servo, so you may need to figure out something like 2 degree increments 45 times or 3 degrees 30 times. You will need to change your delay time accordingly.

Example loop.

put this in a loop like below(which is just an example)

 x = start_pos; start point of servo

 y = end_pos;end point value that would put the total rotation at 90 degrees

my_delay = 900; 900 milliseconds added to the time it takes for the loop to itterate.

for (;x < y;x++)

{

increment_servo(inc_value);

pause(my_delay); //this is a rough guess of a delay, you'd have to test values for this to make sure it works

 

}