Go Down

Topic: Controlling servos (Read 1 time) previous topic - next topic

jremington


AWOL

#31
Oct 23, 2018, 12:47 am Last Edit: Oct 23, 2018, 12:48 am by AWOL
I was going to use a separate power supply for the servos.. only 1 servo will be running at once.. clearly I was mistaken as to this group being able to help me as connecting 1 wire from a switch to an arduino compared to connecting 10 wires from 10 switches to control 5 individual servos.. sorry I've wasted yours and everyone else's time
Wiring up a single switch and a single servo is relatively simple.
Learning to program first a single switch, then a second switch, and then a single servo is relatively simple.

Wiring up ten switches and five servos is a little more complicated.
Learning to program ten switches and five servos, without proving the wiring is a recipe for disaster.

Baby steps.
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

Paulcobra

This is why I was asking.. but not getting helpful answers.. I was told to learn the one switch 1 servo and that will help me.. like I say can't see how that helps me figure out 10 switches 5 servos (1 switch to move a servo one way a set distance and a different switch to move same servo a set distance the opersit direction)

TomGeorge

Hi,

Servos also consume current when in the set position if you have any force on the servo mechanical arm.

The servo will, if the arm moves from the set position try and return the arm to that position, this will mean drawing current even though no other servo command has been sent.

If the force is constant, then the servo will draw current constantly, so even though you will operate one point at a time, other points may be still be consuming current.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

Hi,
This may help, shows code development as well;


http://thenscaler.com/?page_id=174

Tom... :)

Everything runs on smoke, let the smoke out, it stops running....

Paulcobra

#35
Nov 07, 2018, 06:21 pm Last Edit: Nov 08, 2018, 11:34 am by Paulcobra
I'm wanting to use the attached setup (screenshot pic)
Only thing is I want to use the switches in other pic..

Looking at the diagram is it just the 3.3v on one switch pin then feed to arduino on other pin or do I need those switches with 4 pins.

Thanks guys

florinc

The "switches with 4 pins" are actually push buttons equivalent to the one you already have.
The 4 pins are actually 2 pairs of connected pins. Check that with your multimeter.


Paulcobra

I don't have any of the 4 pin ones to check which is why I asked... so am I right in thinking I need the 3.3v feed one side and feed to arduino on other pin

lastchancename

You can probably get a better understanding by reading and experimenting with the tutorials in this forum.
A simple switch / button sketch - put the switch between the input pin and ground - using INPUT_PULLUP pinMode.

Then you don't need to fiddle with the 3V3 or 5V lines - a very typical input configuration.
Experienced responders have a nose for laziness, (they were beginners once)... expecting the poster to contribute to the learning experience.

Paulcobra

Trouble is I already have the sketch done for the diagram.. I just don't get people directing me to something totally off subject instead of answering my question

Due_unto

WOW!
OK, take the switch you have, connect one of the pins to the Arduino input. Add a 10K resistor from ground to that SAME input pin, finally connect the other pin from the switch to 3.3V. However, if you are running the Arduino on 5 Volts then you should use that voltage on the switch.
Do not look into laser with remaining good eye.

larryd

#41
Nov 08, 2018, 04:37 pm Last Edit: Nov 08, 2018, 10:06 pm by larryd
Trouble is I already have the sketch done for the diagram.. I just don't get people directing me to something totally off subject instead of answering my question
If you have 10 people giving answers, you may get 10 different ways that steers you to an answer.

Many people here try to lead you to an answer by showing you how to answer things yourself.
A method I prefer.

At the start of your threads, tell us you don't want to be taught.
Tell us you only want people to answer your question and you don't want any questions from us .
See how far that goes on this forum.

FYI



.
No technical PMs.
The last thing you did is where you should start looking.

Paulcobra

WOW!
OK, take the switch you have, connect one of the pins to the Arduino input. Add a 10K resistor from ground to that SAME input pin, finally connect the other pin from the switch to 3.3V. However, if you are running the Arduino on 5 Volts then you should use that voltage on the switch.
Didn't mean to come across as rude but I thought I asked a simple question and was hoping for a simple answer.. it was the resistor to ground that confused me only having 2 pins I couldn't work out the need for the resistor to ground.. but your answer clears that up thank you.. as far as I'm know it's running on 5v being through the usb.. again thank you for your kind response

Paulcobra

If you have 10 people giving answers, you may get 10 different ways that steers you to an answer.

Many people here try to lead you to an answer by showing you how to answer things yourself.
A method I prefer.

At the start of your threads, tell us you don't want to be taught.
Tell us you only want people to answer your question and you don't want any questions from us .
See how far that goes on this forum.





FYI



.
Its not that I don't want to be taught.. it's that I asked what I thought was a simple question and was told to basicly go off project and do something else.. I was confused with the 3.3v and resistor to ground.. but if my questions offend you and others then maybe I should leave the forum as I'm obviously out of my depth and mistaken that this forum was aimed at helping people.. I'm sorry to have asked stupid questions and wasted everyone's time

lastchancename

#44
Nov 08, 2018, 08:13 pm Last Edit: Nov 08, 2018, 08:14 pm by lastchancename
Quote
Its not that I don't want to be taught.. it's that I asked what I thought was a simple question and was told to basicly go off project and do something else..
That's the i,portant element you missed telling us...
What project?
I/we are simply trying to help you get a simple switch connected in the simplest way... not voltage dependent, and you may learn something.
BTW the 'two pin' switch in th photograph is possibly an N/C contact arrangement, which will confuse you even further.

Forget that.
Your response tells a lot.
Experienced responders have a nose for laziness, (they were beginners once)... expecting the poster to contribute to the learning experience.

Go Up