Stepper motor/driver and relay interaction
On 12 Aug 00 at 10:07, bryan.henderson@c... wrote:
> ...It was at this point that I noticed that there was a periodic
> pulsing on the LED's and the motor shaft that wasn't noticeable
> before, both during and after the program sequence. It was large
> enough to make the shaft move a step or two in a random direction.
> I moved the '293's enable pins from a stamp pin directly to Vdd on
> the BOE. The pulsing was still visible on the LED's, but the motor
> shaft no longer twitched...
Bryan-
Are you using any of the Stamp instructions that put the Stamp into
a low-power mode (NAP, SLEEP, END) or allowing your program sequence
to fall through into a no-instruction Twilight Zone? This will
cause all I/O pins to go high-z about once every 2.3 seconds as long
as the low-power mode remains in effect. Anything driven by the
pins may "twitch" during the brief (~18 msec per the manual) high-z
blips.
If this is the problem, either don't use the low-power instructions
or use pullup/pulldown resistors to maintain a default state when the
I/O pins go high-z and aren't driving the outputs.
Steve
> ...It was at this point that I noticed that there was a periodic
> pulsing on the LED's and the motor shaft that wasn't noticeable
> before, both during and after the program sequence. It was large
> enough to make the shaft move a step or two in a random direction.
> I moved the '293's enable pins from a stamp pin directly to Vdd on
> the BOE. The pulsing was still visible on the LED's, but the motor
> shaft no longer twitched...
Bryan-
Are you using any of the Stamp instructions that put the Stamp into
a low-power mode (NAP, SLEEP, END) or allowing your program sequence
to fall through into a no-instruction Twilight Zone? This will
cause all I/O pins to go high-z about once every 2.3 seconds as long
as the low-power mode remains in effect. Anything driven by the
pins may "twitch" during the brief (~18 msec per the manual) high-z
blips.
If this is the problem, either don't use the low-power instructions
or use pullup/pulldown resistors to maintain a default state when the
I/O pins go high-z and aren't driving the outputs.
Steve
Comments
participant.
I recently took the plunge to try to incorporate stamps into some simple
manufacturing/test equipment. I connected my stamp2 to an L293D driving a
basic bipolar stepper and, using Rob Turner's program (tip of the hat! [noparse]:o[/noparse])
got the motor
doing everything I wanted it to. Now for the problem.
I first used Rob's program to drive 4 LED's to observe the stepping
sequence;
excellent effect! Next, I connected the L293D and the stepper per the
schematic,
powered by a separate 24vdc regulated supply (with gnds common with the 9
vdc
supply going into the power in jack on the Board of Education) and began
making
turns. It was at this point that I noticed that there was a periodic
pulsing on the LED's
and the motor shaft that wasn't noticeable before, both during and after
the program
sequence. It was large enough to make the shaft move a step or two in a
random
direction. I moved the '293's enable pins from a stamp pin directly to
Vdd on the BOE.
The pulsing was still visible on the LED's, but the motor shaft no longer
twitched.
That was good enough for my first application.
My next application required a relay to be turned on, a motor
movement, and the relay off
after the motor stops. I hooked up an IRF510 MOSFET to drive a small
24v relay (with back
EMF diode). This new program turned on the relay first, paused 1 second,
then began the
motor movement. FINALLY THE PROBLEM! Upon sequence start the relay
actuates,
and the motor moves like it should but the first time the mysterious pulse
occurs, the relay
trips off. This occurs about 2 seconds into a 10 second sequence. I
tried various sizes of
caps at the input of the MOSFET to ground -- no help. I called Parallax
tech support and tried
all of the tech's tricks to no avail.
I am hoping someone on the list has an explanation/fix for me. Thanks
in advance and
sorry for the long winded story.
Best regards
Bryan Henderson
Equipment Design Technician
Corning Cable Systems
Well, I got it working correctly by running the stamp and the L293D
from the same 5v supply, and the relay from the other supply. The
'pulsing' is gone -- it must have been interaction between the 2 supplies
and/or the '293. Strange; I'll have to think this one through awhile, but
at least it works now like I wanted. Thanks. Bryan
>
>
> turns. It was at this point that I noticed that there was a periodic
> pulsing on the LED's
> . I moved the '293's enable pins from a stamp pin directly to
> Vdd on the BOE.
> The pulsing was still visible on the LED's, but the motor shaft no longer
> twitched.
> That was good enough for my first application.
>
> and the motor moves like it should but the first time the mysterious pulse
> occurs, the relay
> trips off.
>
>
> Best regards
> Bryan Henderson
> Equipment Design Technician
> Corning Cable Systems
HI Bryan ,,
OK,,,, From the " sounds of things " your problems seem to show up when you
start to pull some current .... Let me tell you a story ... I had setup a
STAMP to
read a pressure sensor with a 12 bit A/D through a pair of op - amps setup for
a gain of about 1000 . It worked great ... But when I turned on or off a
solenoid
controlled valve . It stoped working .... Now I was driveing the valve with a
solid state relay and when I disconected the 110 ac. [noparse][[/noparse]mains] the problem was
still
there ! Ok the STAMP draws very little current when just " sitting there " but
when it drives something it draws a small amount of current . Well I was useing
a switcher power supply to run my little project WAY below what it was rated
for
It seems that the small current draw diffrence of turning on and off a LED
Appered to the switcher supply as no load // small load ... This drove it
crazzy !!
So every time the LED status changed the switcher hashed the op - amps.
When I replaced the switcher supply with a analog supply the problem went away
Good Luck
Raven
try and disable its function, and see if the problem continues.
>From: bryan.henderson@c...
>Reply-To: basicstamps@egroups.com
>To: basicstamps@egroups.com
>Subject: [noparse][[/noparse]basicstamps] Stepper motor/driver and relay interaction
>Date: Sat, 12 Aug 2000 10:07:54 -0500
>
>Greetings to the stamplist from a long-time list lurker and first-time
>participant.
> I recently took the plunge to try to incorporate stamps into some simple
> manufacturing/test equipment. I connected my stamp2 to an L293D driving
>a
> basic bipolar stepper and, using Rob Turner's program (tip of the hat!
>[noparse]:o[/noparse])
>got the motor
> doing everything I wanted it to. Now for the problem.
> I first used Rob's program to drive 4 LED's to observe the stepping
>sequence;
> excellent effect! Next, I connected the L293D and the stepper per the
>schematic,
> powered by a separate 24vdc regulated supply (with gnds common with the 9
>vdc
> supply going into the power in jack on the Board of Education) and began
>making
> turns. It was at this point that I noticed that there was a periodic
>pulsing on the LED's
> and the motor shaft that wasn't noticeable before, both during and after
>the program
> sequence. It was large enough to make the shaft move a step or two in a
>random
> direction. I moved the '293's enable pins from a stamp pin directly to
>Vdd on the BOE.
> The pulsing was still visible on the LED's, but the motor shaft no
>longer
>twitched.
> That was good enough for my first application.
> My next application required a relay to be turned on, a motor
>movement, and the relay off
> after the motor stops. I hooked up an IRF510 MOSFET to drive a small
>24v relay (with back
> EMF diode). This new program turned on the relay first, paused 1
>second,
>then began the
> motor movement. FINALLY THE PROBLEM! Upon sequence start the relay
>actuates,
> and the motor moves like it should but the first time the mysterious
>pulse
>occurs, the relay
> trips off. This occurs about 2 seconds into a 10 second sequence. I
>tried various sizes of
> caps at the input of the MOSFET to ground -- no help. I called Parallax
>tech support and tried
> all of the tech's tricks to no avail.
> I am hoping someone on the list has an explanation/fix for me.
>Thanks
>in advance and
> sorry for the long winded story.
>
>Best regards
>Bryan Henderson
>Equipment Design Technician
>Corning Cable Systems
>
>
>
>
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
them need a minimum load, including the one in your PC. I have some
projects using them and usually have to use a resistor to provide a minimum
load.
Ray McArthur
> It seems that the small current draw diffrence of turning on and off a
LED
> Appered to the switcher supply as no load // small load ... This drove it
> crazzy !!