PDA

View Full Version : driving a stepper motor whilst monitoring with pulsin



jidickson
04-06-2007, 01:20 AM
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

stamptrol
04-06-2007, 02:13 AM
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

jidickson
04-06-2007, 02:58 AM
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

stamptrol
04-06-2007, 07:35 PM
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