Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC delay

Status
Not open for further replies.

lukus102

New Member
is it possible to connect a PIC to a servo then once reset it will move the servo arm into position (0-90 degrees) after 3 seconds then return to to its orginal position after 20 seconds? Then once reset again it will repeat?

Scehematic diagram please on how all the components are connected to the PIC.
 
That should be quite easy with a PIC.

Servos are controlled with a variable width pulse at 5 V. I think that 1ms is one end of travel and 2ms is the other end of travel, repeated every 20 ms. The pulse needs to be there every 20 ms if the servo is to hold its position.

You can get any PIC to output a pulse by turning the output on, waiting for 1 - 2 ms, turning off the output, and waiting 20 ms. So the connection is just a PIC output to the servo input, with 5V and 0V to the supplies on both servo and PIC, and lots of capacitors across the power lines.

To do what you want you need to work out several timing loops, for the 3 second delay, for the 20s delay, for the 20ms delay and for the 1 - 2 ms delay.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top