Go Down

Topic: Servos (Read 83 times) previous topic - next topic


I have a question about servos. Which one do I need to operate, lets say for instance:
when the motion sensor is activated, the servo operates but when the motion sensor goes off, the servo reverses itself back to where it started before being activated the first time.
Can you help me?


If by "the motion sensor" you mean a PIR, then this tutorial may help. The program prints out "motion detected" when it first detects motion, ans "motion ended" when it thinks its stopped. Those two points in the program would be where you move the servo for the first time, and then back again, ready for a new motion whenever that happens.

Have a look at the servo library page to see how to move the servo.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0


what triggers the 'servo' is irrelevant..

what you need to do/ask is.. what servo do I need to to 'lift/move'  XYZ..

All servos (for the most part) will work the same..

Arduino reads sensor..
Arduino processes value/logic
Arduino tells servo to move (or not)

The crucial elements are usually:

* power
   --- An Arduino pin by itself can NOT provide enough current to move a servo under load
   --- You should use an external power supply to 'power' the servo,.. and only use 1 pin to 'control' it.  (make sure all GNDS are connected in both servo/power source/Arduino)

* torque of the servo itself.. there are cheapie plastic servos and metal geared servos..etc
   ---You need to knwo what you want tot move and then find a servo that has that much torque to move said object.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131