Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 21, 2025, 11:12:29 11:12


Login with username, password and session length


Pages: [1]
Print
Author Topic: servo motor  (Read 6432 times)
0 Members and 1 Guest are viewing this topic.
hamid9543
Active Member
***
Offline Offline

Posts: 124

Thank You
-Given: 80
-Receive: 7


« on: July 08, 2007, 07:07:30 07:07 »

hi
i want to drive 2 servo motor synchronise.2 servo motor (both) move forward or move backward by pic16f877.
hard ware:
 servo motor  (2)
  pic16f877     (1)
software:
picbasic pro
Logged
chandra2sekhar2000
Active Member
***
Offline Offline

Posts: 125

Thank You
-Given: 25
-Receive: 18


« Reply #1 on: July 09, 2007, 09:52:43 09:52 »

hello hamid
just connect the control signal of both the servos to single out put of pic.
later on i will try to provide u the code
Logged
hamid9543
Active Member
***
Offline Offline

Posts: 124

Thank You
-Given: 80
-Receive: 7


« Reply #2 on: July 10, 2007, 09:30:19 09:30 »

hello chandra2sekhar2000
thanks for yor help.can you explain more about this
Logged
hansariii
Newbie
*
Offline Offline

Posts: 17

Thank You
-Given: 3
-Receive: 1


« Reply #3 on: July 26, 2007, 11:50:48 11:50 »

hello
you need to create a square wave with 1 to 2 ms on for signal pin
Logged
chandra2sekhar2000
Active Member
***
Offline Offline

Posts: 125

Thank You
-Given: 25
-Receive: 18


« Reply #4 on: July 26, 2007, 12:22:54 12:22 »

sorry for late
i hope the given circuit may explain u.
Logged
mcr
Junior Member
**
Offline Offline

Posts: 91

Thank You
-Given: 217
-Receive: 23


« Reply #5 on: July 26, 2007, 10:17:31 22:17 »

Use the pulsout command.

Haven't used any servos my self but on many books the use the pulsout command.

Make a quick search on the web, lots of examples (to bad we can not provide links to other forums).
Logged
iphone
Active Member
***
Offline Offline

Posts: 168

Thank You
-Given: 115
-Receive: 10


« Reply #6 on: July 28, 2007, 03:42:11 15:42 »

sorry for late
i hope the given circuit may explain u.

chandra2sekhar2000,

Can you share the sourcecode as for starting point ?

Thanks
Logged
hamid9543
Active Member
***
Offline Offline

Posts: 124

Thank You
-Given: 80
-Receive: 7


« Reply #7 on: July 31, 2007, 12:10:54 12:10 »

thanks
very good
Logged
sherm
Junior Member
**
Offline Offline

Posts: 44

Thank You
-Given: 14
-Receive: 9


« Reply #8 on: July 31, 2007, 01:08:43 13:08 »

You can use the PULSOUT command in PBP to control a servo very easily.

Connect the control line of the servo to RB0 and a centre off SPDT switch wired as active low to pins RA0 and RA1. That'll act as a direction control for your experiment. The following code should give you a good starting point. Adding an extra servo and different control method will be easy after this Smiley

Code:
bPos var byte
bPos = 150          'Centre position

loop:
  if PortA.0 = 0 then rotA
  if PortA.1 = 0 then rotB
  pulsout PortB.0, bPos
  goto loop

rotA:
  bPos = bPos + 1
  pulsout PortB.0, bPos
  pause 18
  if bPos > 200 then limitA
  goto loop

rotB:
  bPos = bPos - 1
  pulsout PortB.0, bPos
  pause 18
  if bPos < 100 then limitB
  goto loop

limitA:
  bPos = 200     'direction limit
  goto loop

limitB:
  bPos = 100     'direction limit
  goto loop



This code could be re-written far more efficiently, but it's laid out so that it's easy to understand the process of working with servo's. There's a wealth of information available on the subject if you do a Google search. This should get you started though.

Good luck Smiley
« Last Edit: July 31, 2007, 01:15:13 13:15 by sherm » Logged
engr.humair
Newbie
*
Offline Offline

Posts: 29

Thank You
-Given: 5
-Receive: 2


« Reply #9 on: December 13, 2007, 01:29:50 13:29 »

Read the PULSIN & PULSOUT function in PBP Manual.They will do the job
Logged
Deimos
Newbie
*
Offline Offline

Posts: 31

Thank You
-Given: 1
-Receive: 14


Whatever...!!!


WWW
« Reply #10 on: December 13, 2007, 02:45:24 14:45 »

Look at here:

http://www.sonsivri.com/forum/index.php?topic=6901.0

you can use this code, changing the potenciometers by using four push buttons.
Logged

Saludos desde Ecuador
Upgraded
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 4
-Receive: 2


« Reply #11 on: December 17, 2007, 07:36:09 19:36 »

Don't power the servos (R/C-servos?) from the same supply as the microcontroller. Servos draw quite a bit of current, and will induce spikes that makes the PIC go funny.
Logged
picza
Guest
« Reply #12 on: December 18, 2007, 06:38:12 18:38 »

If i want to control 3 dc-motor together.how should i do? and will i use with Chip l239d for 2IC?
Logged
Deimos
Newbie
*
Offline Offline

Posts: 31

Thank You
-Given: 1
-Receive: 14


Whatever...!!!


WWW
« Reply #13 on: December 19, 2007, 01:22:56 01:22 »

You can use one L293 for controlling two dc-motor, if you want to controll trhee, you need two L293, what do you mean with 2IC?

I2C is a protocoll, you can use PWM to controll the speed of the motors.

PD: the topic is about SERVOMOTORS.
Logged

Saludos desde Ecuador
alsabbag
Guest
« Reply #14 on: December 25, 2007, 09:39:29 21:39 »

I2C Protocol is used to connect multiple devices together. I don't think it is required for controlling servo motors. PulseOut command can help providing control to 3 servo motors knowing that step duration is much larger than single instruction cycle making the difference in motors start time negligable.
Logged
anemon06
Newbie
*
Offline Offline

Posts: 33

Thank You
-Given: 32
-Receive: 34


« Reply #15 on: January 03, 2008, 12:10:45 12:10 »

step and servo motor application include picbasic and proteus schematic
Logged
yobalzal
Junior Member
**
Offline Offline

Posts: 48

Thank You
-Given: 18
-Receive: 11



« Reply #16 on: January 04, 2008, 08:39:24 08:39 »

I hope this will help. Once testing motors controlling experiment, I killed two microcontrollers by the back emf from motors, I found a very simple technique, just put a 100 ohms resistor and a 5V zener diode to protect the micros. It did help a lot.

Cheers...
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC