centering servomotor using 16F84A


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42

    Default centering servomotor using 16F84A

    i was wondering if some one could help me check if this piece of code works. I got this picbasic pro code from a book to center servo motors and prototyped the schematic onto a breadboard. when i applied power nothing happened but i did notice that if i were to pull off the wire connected to the +ve of the servo motor and plug back it moves a little. If possible can some one take a pic of the completed circuit of what it looks like on the breadboard so i can check it against mine? Can't take a picture of mine as my digicam is in the shop for repairs. Please help!

    Servo Motor - HiTec HS-322HD

    Code:
    start:
    PulsOut portb.0, 150	'Send pulse out on rb0
    Pause 18	'Delay needed to send pulse at 55hz
    GoTo start	'repeat
    <font color=red>Here is the schematics</font>
    <img src="http://i3.photobucket.com/albums/y77/drewandangel/fig02.gif">
    -·=»‡«=·- saturnX -·=»‡«=·-

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Question

    Hi, SaturniX

    try this first ...


    start:
    Low PortB.0
    PulsOut portb.0, 150 'Send pulse out on rb0
    Pause 18 'Delay needed to send pulse at 55hz
    GoTo start 'repeat

    END

    - Be sure your 5v supply can handle more than 500 mA for the servo ...
    - connect servo to Portb.0 via a 220 ohms resistor to protect the PIC.
    - Check all connexions and be sure servo ground and Pic ground connected.

    then apply Power ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    hi Acetronics,

    thanks for the reply, i will try your suggestion later on as i was playing around with the schematics last night and managed to get it to work. I incorporated a voltage regulator to regulate the power supply to the pic and the motor and guess what it worked. But i never thought of your way Acetronics and will try it later. Thanks again...
    -·=»‡«=·- saturnX -·=»‡«=·-

  4. #4
    Join Date
    Sep 2005
    Location
    Malaysia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    alain, hoping you do read this thread still. i was just reading through wat you posted and i was just wondering, is it necessary to have a resistor between the IC and the servo? I am not that good in electronics yet and slowly learning so your help is much appreciated.
    -·=»‡«=·- saturnX -·=»‡«=·-

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Wink not necessary ... but ...

    Hi, Saturnix

    Resistor is not compulsory ... but protects the pic from little things : bad cord connexion and servo input capacitor's discharge in the pic's pin ...

    consider a servo input is often a 1 to 4.7µF cap in series with the amplifier ... so plugging the servo when power is on gives strange things ( reason of the LOW command before PULSOUT ...)

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Code works on 16F84A but not on 16F88?
    By pharaohamps in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th November 2009, 18:29
  2. ICSP using a 16F84a to program 24CXX
    By aftab in forum mel PIC BASIC
    Replies: 26
    Last Post: - 8th April 2007, 11:39
  3. 16F84A and Optrex LCD
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th October 2005, 16:08
  4. RS 485 using 16F84A
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th May 2005, 14:46
  5. Help with a 16F84A
    By Lilmanmgf in forum Off Topic
    Replies: 14
    Last Post: - 16th February 2005, 03:24

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts