Shop OBEX P1 Docs P2 Docs Learn Events
driving a stepper motor whilst monitoring with pulsin — Parallax Forums

driving a stepper motor whilst monitoring with pulsin

jidicksonjidickson Posts: 2
edited 2007-04-06 12:35 in BASIC Stamp
HELLO!

My bs2 knowledge is average to rubbish so bear with me:

My BEng Hons project involves driving a stepper motor only whilst a digital pulse is recieved. If the pulse stop's then i need to run a subroutine.

The problem is , how do you monitor a pulse ( i assume the best option is pulsin) whilst running a stepper?· Do i need a little sub program running or maybe use the pulse and a capacitor network of somekind to maintain a voltage which will deplete when the pulse stop?

God knows, i know i don't.

All help will recieve my sincere thanks and good karma

dickson

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2007-04-05 19:13
    Dickson,

    Two possibilities:

    1. Use an off-board stepper controller that will take care of the housekeeping of making the motor run. Most types take commands via a serial link. Parallax has a couple listed in the Products section. Then, the Stamp will be able to watch the pulses coming in.

    2. Your idea with capacitor network will work after a fashion. But, to be a bit more precise, have a look for "pulsestretcher" or monostable circuits which you can set to be long enough to do the job (just slightly longer than the time for the Stamp to process its longest loop) without being so long as to miss pulses coming in.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • jidicksonjidickson Posts: 2
    edited 2007-04-05 19:58
    http://www.planetanalog.com/showArticle.jhtml?articleID=180206463

    do you think this would work with a chnage in c and r values.

    Your response was appreciated. your a good lad

    dickson
  • stamptrolstamptrol Posts: 1,731
    edited 2007-04-06 12:35
    dickson,

    That will do it.

    Just play with r and c as described in the article to get the required pulse length.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
Sign In or Register to comment.