Pages: [1]   Go Down
Author Topic: DOUBT ON ARDUINO UNO BOARD PROGRAMING ON SERVO AND OBSTACLE SENSOR  (Read 1021 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi...
      am new with arduino. i ve decided for a project which runs 15 servo motors along with obstacle sensor. i ve decided to start with arduino uno board. i need your help regarding few doubts which i ve, to start with my project.
the doubts are -
1) is it possible to supply +5v and ground  to the 15 servo motors using the arduino uno board ?
2)how to program obstacle sensors ?
3) my project is about walking robot which require 15 servo motors to work differently at different time, again there work will change with the obstacle sensors signal to the board. i need your help to give me a sample program to perform the task.

 An early reply will be really helpful.
 thank you.
Logged

California
Offline Offline
Faraday Member
**
Karma: 82
Posts: 3123
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, no need to shout.

1) is it possible to supply +5v and ground  to the 15 servo motors using the arduino uno board ?
Depends on the servos
Quote
2)how to program obstacle sensors ?
Depends on the obstacle sensors.
Quote
3) my project is about walking robot which require 15 servo motors to work differently at different time, again there work will change with the obstacle sensors signal to the board. i need your help to give me a sample program to perform the task.
Doubt people are going to have example code for your specific requirements. There is example code for running servos. There is example code for reading sensors. Understanding and adapting that code to fit your requirements is your responsibility.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 64
Posts: 6893
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Your UNO will likely need a separate power supply to power the servos. You can try the servo library to see if you can use 15 servos. I only used one but I think you may be able to use as many servos as you have pins.

You didn't specify what obstacle sensors you have so I can't tell you if you can use it with arduino.
Logged


UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11164
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I remember one of the regulars here mentioned a board (a shield, I think) that provided support for lots of servos - I think you will need something like that. I don't know how many servos a UNO can drive directly, but I think it's considerably less than 15.

A typical small hobby servo requires about a 1A supply so if yours are similar rating them you will definitely need to provide a separate power supply for them and it may need to be quite substantial.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 686
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might can get away with powering 1 servo with no load from an Arduino, but 2 or more you will have to use a separate power supply.

The Servo library uses timers on the Arduino board to drive the servos.  From Servo.h, you can drive 12 servos per timer.  If I am not mistaken, UNO only has 1.

After that, more info is needed as stated by the other posts.
Logged

//LiNK

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Good timing, you can only control 12 Servos from an Arduino UNO using the standard servo library, however you can control 20 using only 4 pins with this library that I published yesterday -

http://rcarduino.blogspot.com/2012/10/arduino-serial-servos-20-servos-4-pins.html

Notice how that i used the term 'control', thats because Arduino is easily able to send the control signals for your servos, but it is not a power supply, it will not power even one servo reliably.

This is not a problem with Arduino, its how servos work, they expect a control signal and a power supply, they do not expect or need them to both come from the same device.

The power supply for your project is going to be the biggest cost, you will need strong batteries, LIPO batteries are a good option, they are light which is going to be important for a walker if its supporting its own weight.

As well as the batteries you will need a charger for them and one or more regulators to give your servos a steady input voltage.

Look at whats involved in sourcing this lot and then worry about the code.

Duane B

rcarduino.blogspot.com
Logged


Gosport, UK
Offline Offline
Faraday Member
**
Karma: 19
Posts: 3114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I remember one of the regulars here mentioned a board (a shield, I think) that provided support for lots of servos - I think you will need something like that.

There's the Renbotics servo shield, but it never seems to be in stock.

http://www.renbotics.com/products/servoshield.php
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi..

the sensors i use is obstacle sensor ( that has logical output).
> is it possible to power +5v to the servo motors from the arduino uno +5v pin from the board connected to a PCB and short various +5v pin of servo shorted to that pin.?
> can you please provide me a  sample program  for a bug using servo and obstacle sensor
 early response will be helpful.

thankyou
Logged

California
Offline Offline
Faraday Member
**
Karma: 82
Posts: 3123
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the sensors i use is obstacle sensor ( that has logical output).
Google search for "obstacle sensor" gives me over 5 million hits; you're going to have to be more specific than that.
Quote
> is it possible to power +5v to the servo motors from the arduino uno +5v pin from the board connected to a PCB and short various +5v pin of servo shorted to that pin.?
No.
Quote
> can you please provide me a  sample program  for a bug using servo and obstacle sensor
Nope, fresh out.
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 686
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

DuaneB has a very good tutorial about hooking up servos to the Arduino.

http://rcarduino.blogspot.com/2012/03/how-to-connect-servo-to-arduino.html

And there is no need to PM members asking for help.  You will get more help here, but first you need to help yourself.  That is what Arduino is all about.  It is for YOU to build YOUR projects, not the members.  There is a ton of example programs for Arduino to run servos with a obstacle (distance sensor).  Just open Google and search "Arduino servo distance sensor code." 

For the programming, you are going to need the Servo library.  Do a search for it on Google.  You will find it in the playground of this site.  Next I recommend the NewPing library for the obstacle (distance) sensor.  Look at the examples from those and start learning.  If you have any questions about specific problems, then come and ask away.
Logged

//LiNK

Pages: [1]   Go Up
Jump to: