Shop OBEX P1 Docs P2 Docs Learn Events
Automatic reset — Parallax Forums

Automatic reset

ArchiverArchiver Posts: 46,084
edited 2000-04-14 19:34 in General Discussion
Can someone please solve this mystery?

The mystery is how a few of the Basic Stamps appear to have been
modified so that they cannot run their programs properly. They
function normally except that they automatically reset in one of the
programs. This happened at the same points every time. Reloading the
programs does not help.

The problem occurs after the instrument has run continuously for a
period of 3 to five weeks.

Thinking it could be a disturbance from somewhere in the circuit, I
swapped microprocessors, but the Basic Stamp retained the problem
even in the €··'³new€··'´ circuit board, while the "old" circuit
board, now
with the other Basic Stamp, functioned faultlessly. The problem
therefore is in the Basic Stamp and the mystery is that when, at a
certain point in the program sequence, the program tells it to run
another program, it goes to program no. 0, i.e. resets. I cannot see
any reason in the program for this. Bill Kraft suggested I put
an €··'³END€··'´ statement in at the end of each program might help,
but
unfortunately it didn€··'²t.

Trying to provoke this problem with a coil over the Basic Stamp
caused the Stamp to show weird characters and €··'³freeze€··'´, but
on
switching of and on again the Stamp worked faultlessly. Could there
be something in the circuit that affects the Stamp slowly, low
intensity, causing the stamp to reset itself?

This problem doesn€··'²t affect BS2. Instruments with a BS2 run
happily
moth in and month out.

I am running a Basic Stamp BS2Sx in an amperometrc analytical
instrument with a micro-pump, micro-valve and transformer connected
to the circuit board, if this can be a clue.

Thanx,
Hans

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-04-14 14:11
    Is the instrument battery powered?

    The symptom you describe is often associated with turning on something that
    draws a lot of current (like a motor or pump). Say you have this program:

    Debug "Begin",CR
    OUTPUT 1
    Debug "Starting Motor",CR
    HIGH 1
    Debug "Motor running"
    END


    This program might crash between the 2nd and 3rd Debugs. The reason is the
    high current demand can drop the Stamp's power to below 5V and the reset
    controller will force a reset. There is also a chance that noise on the ATN
    or RES line will cause this. Using pullup/pulldown resistors will tell the
    tale here. If ATN or RES have long connections, you might also put a small
    capacitor to ground to filter out transients.

    However, because of the 3-5 week number, I suspect low batteries. Remember
    batteries under load don't perform like batteries with no load. If I wanted
    to test this I'd hook up a long time base storage scope, strip recorder, or
    a DMM that can dump to a PC and monitor the voltage while things got turned
    on. My guess is that it will drop too low. When the batteries are fresh --
    no problem.

    If this is the case you might consider separate batteries for the Stamp and
    the motor (tie the grounds together).

    Hope that helps.

    Regards,

    Al Williams
    AWC
    * Floating point math for the Stamp, PIC, SX, or any microcontroller at
    http://www.al-williams.com/awce
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-14 19:34
    Does the program write to EPROM?

    Ray McArthur

    Original Message
    From: <hsmag@a...>
    To: <basicstamps@egroups.com>
    Sent: Friday, April 14, 2000 5:11 AM
    Subject: [noparse][[/noparse]basicstamps] Automatic reset


    > Can someone please solve this mystery?
    >
    > The mystery is how a few of the Basic Stamps appear to have been
    > modified so that they cannot run their programs properly. They
    > function normally except that they automatically reset in one of the
    > programs. This happened at the same points every time. Reloading the
    > programs does not help.
    >
    > The problem occurs after the instrument has run continuously for a
    > period of 3 to five weeks.
    >
    > Thinking it could be a disturbance from somewhere in the circuit, I
    > swapped microprocessors, but the Basic Stamp retained the problem
    > even in the ? '³new? '´ circuit board, while the "old" circuit
    > board, now
    > with the other Basic Stamp, functioned faultlessly. The problem
    > therefore is in the Basic Stamp and the mystery is that when, at a
    > certain point in the program sequence, the program tells it to run
    > another program, it goes to program no. 0, i.e. resets. I cannot see
    > any reason in the program for this. Bill Kraft suggested I put
    > an ? '³END? '´ statement in at the end of each program might help,
    > but
    > unfortunately it didn? '²t.
    >
    > Trying to provoke this problem with a coil over the Basic Stamp
    > caused the Stamp to show weird characters and ? '³freeze? '´, but
    > on
    > switching of and on again the Stamp worked faultlessly. Could there
    > be something in the circuit that affects the Stamp slowly, low
    > intensity, causing the stamp to reset itself?
    >
    > This problem doesn? '²t affect BS2. Instruments with a BS2 run
    > happily
    > moth in and month out.
    >
    > I am running a Basic Stamp BS2Sx in an amperometrc analytical
    > instrument with a micro-pump, micro-valve and transformer connected
    > to the circuit board, if this can be a clue.
    >
    > Thanx,
    > Hans
    >
    >
    >
    >
    >
Sign In or Register to comment.