Shop OBEX P1 Docs P2 Docs Learn Events
ESC Problem Again... — Parallax Forums

ESC Problem Again...

ArchiverArchiver Posts: 46,084
edited 2001-05-10 22:32 in General Discussion
Hmm, I still can't figure this one out. I did this:

For x = 1 to 10000
pulsout 3, x

and I still didn't get a response from the motors???

I thought this ESC only needed GND, 5V+, and Signal. After sweepng the
signal range, it does not look to promising. Does anyone else have any
ideas?

Karl
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-05-10 17:58
    Just looking at this code fragment, I'd say you need a PAUSE in
    there. Otherwise it will step thru from 1 to 10000 very quickly, and
    you may never see the motor move. Most ESCs have pots in them so
    that you can do neutral and endpoint adjustments. Have you found
    where these points are in the PULSEOUT range? Another way to check
    would be to plug a servo into the channel and get it to go from far
    right to center and then left. Once that is working, try plugging
    the ESC back in and see if it works the same. Do you have an RC
    receiver to check that the ESC is working properly absent the Stamp?

    Kevin

    --- In basicstamps@y..., "Arch- Angel" <sefiroth@h...> wrote:
    > Hmm, I still can't figure this one out. I did this:
    >
    > For x = 1 to 10000
    > pulsout 3, x
    >
    > and I still didn't get a response from the motors???
    >
    > I thought this ESC only needed GND, 5V+, and Signal. After sweepng
    the
    > signal range, it does not look to promising. Does anyone else have
    any
    > ideas?
    >
    > Karl
    > _________________________________________________________________
    > Get your FREE download of MSN Explorer at http://explorer.msn.com
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-10 18:03
    Have you got x set up as a word or a byte? It must be a word to have a value
    over 255.

    Original Message



    > Hmm, I still can't figure this one out. I did this:
    >
    > For x = 1 to 10000
    > pulsout 3, x
    >
    > and I still didn't get a response from the motors???
    >
    > I thought this ESC only needed GND, 5V+, and Signal. After sweepng the
    > signal range, it does not look to promising. Does anyone else have any
    > ideas?
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-10 21:27
    --- In basicstamps@y..., "Arch- Angel" <sefiroth@h...> wrote:
    > Hmm, I still can't figure this one out. I did this:
    >
    > For x = 1 to 10000
    > pulsout 3, x
    >
    > and I still didn't get a response from the motors???
    >
    > I thought this ESC only needed GND, 5V+, and Signal. After sweepng
    the
    > signal range, it does not look to promising. Does anyone else have
    any
    > ideas?
    RC servos and ESCs (which simulate servos) need a very specific
    output pulse shape to work. You can't just blast a string of pulses
    at them and expect to see anything happen. First, the pulse must
    typically be in the range of .5 to 1.5 milliseconds duration (some
    servos may vary from this value a bit), which represent the low and
    high range of position (speed, in the case of an ESC). 1.0 ms is
    generally neutral. Second, the pulses must be repeated at a specific
    frequency, which I believe means about a 15 to 20 ms pause between
    pulses. So basically you need something that looks like this:

    loop:
    pulseout 3,x 'where x is the value which gives the right
    'length pulse on your stamp - varies by stamp type
    pause y 'where y is a value that corresponds to the
    'required delay between pulses in ms, perhaps 20
    goto loop

    This is very hard to do on a stamp and still do any other work at the
    same time. It's especially hard to get a consistent time between
    pulses when a lot of other code is being executed. That's why they
    sell dedicated servo controllers that can generate these pulses
    continuously from a single command. Check the documentation to get
    the right values for x and y, but I believe for a BS2 x can vary from
    about 250 to 750 and y is about 20.

    Chuck
  • ArchiverArchiver Posts: 46,084
    edited 2001-05-10 22:32
    Here is a simple code snippet that works with a BS2SX and a Futaba 148
    servo:

    Pulse VAR WORD
    Servo_Port CON 3

    'unremark whichever line you want to use. I would start with the pulse at
    1550
    'so the servo will be approximately mid-travel. Keep in mind these values
    vary
    'depending on which Stamp you use due to the length of the counts used to
    'generate the pulses.

    'Pulse = 400 'position servo at 0 degrees (minimum travel)
    Pulse = 1550 'position servo at 90 degrees (center of travel)
    'Pulse = 2700 'position servo at 180 degrees (maximum travel)

    Loop:

    PULSOUT Servo_Port,Pulse
    PAUSE 20

    GOTO Loop


    Original Message
    From: "Chuck Davis" <cdavis@o...>
    To: <basicstamps@yahoogroups.com>
    Sent: Thursday, May 10, 2001 3:27 PM
    Subject: [noparse][[/noparse]basicstamps] Re: ESC Problem Again...


    > --- In basicstamps@y..., "Arch- Angel" <sefiroth@h...> wrote:
    > > Hmm, I still can't figure this one out. I did this:
    > >
    > > For x = 1 to 10000
    > > pulsout 3, x
    > >
    > > and I still didn't get a response from the motors???
    > >
    > > I thought this ESC only needed GND, 5V+, and Signal. After sweepng
    > the
    > > signal range, it does not look to promising. Does anyone else have
    > any
    > > ideas?
    > RC servos and ESCs (which simulate servos) need a very specific
    > output pulse shape to work. You can't just blast a string of pulses
    > at them and expect to see anything happen. First, the pulse must
    > typically be in the range of .5 to 1.5 milliseconds duration (some
    > servos may vary from this value a bit), which represent the low and
    > high range of position (speed, in the case of an ESC). 1.0 ms is
    > generally neutral. Second, the pulses must be repeated at a specific
    > frequency, which I believe means about a 15 to 20 ms pause between
    > pulses. So basically you need something that looks like this:
    >
    > loop:
    > pulseout 3,x 'where x is the value which gives the right
    > 'length pulse on your stamp - varies by stamp type
    > pause y 'where y is a value that corresponds to the
    > 'required delay between pulses in ms, perhaps 20
    > goto loop
    >
    > This is very hard to do on a stamp and still do any other work at the
    > same time. It's especially hard to get a consistent time between
    > pulses when a lot of other code is being executed. That's why they
    > sell dedicated servo controllers that can generate these pulses
    > continuously from a single command. Check the documentation to get
    > the right values for x and y, but I believe for a BS2 x can vary from
    > about 250 to 750 and y is about 20.
    >
    > Chuck
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
Sign In or Register to comment.