Shop OBEX P1 Docs P2 Docs Learn Events
javelin kit's motors do not work, HELP PLEASE0 — Parallax Forums

javelin kit's motors do not work, HELP PLEASE0

usantanderusantander Posts: 5
edited 2005-05-30 12:53 in General Discussion
Hi everyone

I hope someone could help me, a time ago i bought a javelin stemp kit [noparse][[/noparse]Parallax] which include two servo motors, but when i try to get them run none of then work

i have followed the user's manual with no luck, i do not know what else to do.
Please help me


Saludos
Ulrich Cerda jumpin.gif

Post Edited (usantander) : 5/30/2005 1:24:36 PM GMT

Comments

  • Kevin B SlaterKevin B Slater Posts: 49
    edited 2005-05-23 00:17
    Ulrich,
    · I will assume you are using the Javelin Stamp Demo Board with your servos, you also don't specify which type of servo you are using.· Posting your hook up diagram and code would help tremendously.· Let me give you some suggestions though.· First make sure that you have power going to the Vm socket on the header closest to the voltage regulator.· This can be either Vdd or Vin but if you are using a power supply greater that 7.5 volts then don’t use Vin as this could damage your servos.· You could also use a seperate power supply as well.· Make sure that your code uses pin 12 and/or pin 13 to test your servos as that is how the servo ports are connected to the Javelin.

    · Starting on page 57 of the Javelin Stamp Users Manual the section "Controlling a Servo with a Background PWM Object" will show you how to control a servo.

    Kevin

    Post Edited (Kevin B Slater) : 5/23/2005 12:35:18 AM GMT
  • usantanderusantander Posts: 5
    edited 2005-05-23 00:57
    Hi kevin

    I'm using 6v battery and PM servo motors on a Javelin Stamp Demo, using both port 13 and 12 to connect them.
    I think the socket works fine, i connect a led using vm{vm is connect to vin} as positive and it ligth so i would like to know if there is a way to check the motors
    to be sure that they are not broken ?.

    I connect them as it is indicated in the user's manual so i can see what is the problem.
    the code i'm trying to run is as follow:

    import stamp.core.*;
    public class ServoControl {
    static PWM servo = new PWM(CPU.pin13,173,2304);
    public static void main() {
    System.out.println("Welcome to Servo Control: ");
    System.out.println(" r - right");
    System.out.println(" l - left");
    System.out.println(" c - center");

    while (true) {
    switch ( Terminal.getChar() ) {
    case 'r':
    servo.update(130,2304);
    break;

    case 'l':
    servo.update(220,2304);
    break;

    case 'c':
    servo.update(173,2304);
    break;
    }
    }
    }
    }



    Saludos
    Ulrich jumpin.gifjumpin.gifjumpin.gifjumpin.gifjumpin.gifjumpin.gifjumpin.gifjumpin.gif

    Post Edited (usantander) : 5/23/2005 11:39:14 PM GMT
  • Mike CookMike Cook Posts: 829
    edited 2005-05-24 02:03
    Just tried the sample program on page 57 of the manual.
    The sample is written for P12 so I tried that first and the program works.
    Then tried your modification (P13) and compiled the program, that also works.

    The only thing that I can think of, why yours is not working, is that you may have plugged your servo in backwards and now the servo is no longer functional. Make sure the black·wire on the servo is positioned towards the white plastic bread board. On my servo I had to cut the plastic "Key" off the servo electrical connector so I could get it to plug into X5 with out forcing it.

    I am powering the Demo board from an external power supply connected to the 6-24 VDC jack. I have connected Vdd to Vm to supply the X5 connector with +5vdc,· generated from the Demo Board's built in +5VDC regulator. The servo motor that I'm using is the Parallax standard servo.

    Hope this helps

    Mike
  • usantanderusantander Posts: 5
    edited 2005-05-24 02:36
    Thank Mike for your reply

    I think the problem could be the power suppply, maybe i should use a separate power supply with the motor as it is mention here
    http://forums.parallax.com/showthread.php?p=464554
    because I try the program on page 57 of the manual and the motor sputter and move a little for the first command and stop and after that i do not get it to respond to any command

    So the questions are how to connect a separate power supply to a servo ?
    and . do you use a separate power supply with the servos ?.


    I would appreciate your help

    Ulrich

    Post Edited (usantander) : 5/24/2005 3:24:48 AM GMT
  • Mike CookMike Cook Posts: 829
    edited 2005-05-24 23:30
    I would suggest if you are not that familiar with programming microcontrollers, you find a power supply that plugs into your house current and converts the AC to a level that is acceptable for the Javelin Demo board. Batteries get weak over time and usage. Parallax sells an excellent power supply for this purpose, see the following link:

    http://www.parallax.com/detail.asp?product_id=750-00009

    There is nothing wrong with using batteries, however while learning, it is highly desirable to have a power supply that can handle the current draw of your circuit. Batteries will go weak after a while and cause unpredictable problems that will make you think something is broken or you have not written your program correctly. If you follow the example on page 57 of the Javelin manual it will work.

    If your dead set on developing while powering your circuits with batteries then make sure you use a fresh set. If you want to power the servos with a separate set of batteries then make sure you use no more than +6dvc for the Vm connection. Connect the positive terminal of the 6 volt battery pack to the Vm terminal and then connect the negative or ground to Vss.

    Hope this helps,

    Mike

    Post Edited (Mike Cook) : 5/25/2005 1:03:29 AM GMT
  • usantanderusantander Posts: 5
    edited 2005-05-25 02:01
    Hey guys, Who can give a diagnostic about the followin:

    when i use the code, which is below, the motor run for
    just second, maybe less, and stop for another second and after that run a for a second
    again and stop again and so on ... to the infinito
    but actually i understand that the motor is to run continously and
    fairly rapidly, so i need to know what is wrong with the servos
    both motors behave the same way

    According the documentation they are pre-modified motor

    In this code i use port 12.

    import stamp.core.*;
    /**
    * Drives right servo at high speed
    *
    * @version 1.0 5/7/02
    * @author Parallax, Inc.
    */
    public class JBotServo1 {
    static PWM pwmR = new PWM(CPU.pin12); // create right servo
    public static void main() {
    pwmR.update ( 110, 2000 ) ;
    pwmR.start () ;
    CPU.delay(10000); // run for one second
    pwmR.stop () ;
    }
    }


    Thanks you all for your time
    Ulrich

    Post Edited (usantander) : 5/25/2005 6:32:22 PM GMT
  • usantanderusantander Posts: 5
    edited 2005-05-30 12:53
    I was working with a 5v, 1a power supply, now i´m working with a 7.5 v 1a and everything work fine
    Book Robotics, Chapter 2 , Activity 1

    Thanks you all

    Ulrich

    Post Edited (usantander) : 5/30/2005 3:39:49 PM GMT
Sign In or Register to comment.