Shop OBEX P1 Docs P2 Docs Learn Events
BS2e (not so) random resets — Parallax Forums

BS2e (not so) random resets

aroeskearoeske Posts: 5
edited 2014-04-15 16:10 in BASIC Stamp
I have been lurking around here for a while, but have come across an issue that has perplexed me for the past year or two. Before I dive into details, my education is as a mechanical engineer and work as a software engineer, so while I am familiar with basic circuit design, I am no expert. I also am working on the schematic, it is quite involved.

So what I have is an electric 1/8 scale locomotive. Basically the BS2e takes the input from a pot through an rc circuit and other inputs from switches (direction, etc) and then controls a Dimension Engineering SyRen 50 controller as a servo. It is powered by a 12 deep cycle battery. Off that same battery is the headlights as well (2 12 volt lamps controlled by 2 relays via 2 SPST switches on the control box). One of the relays switches the lamps from parallel to series to dim them. About 30% of the time when that relay deenergizes, the BS2e resets.

The issue is I have startup code that I want to use to verify all controls are in a home position before it will allow motion for safety reasons. Even with that code commented out, it is still a rough ride when that happens as the SyRen 50 has regenerative braking.

I have a couple working theories...

1. Grounding problem? Everything shares a common ground. The drive system is 24V, but it still does it with the 24 V removed.
2. Low voltage for the Stamp. I am running a lcd, and accelerometer off the same 5v regulator the stamp is powered off of.
3. Picking up interference, I use a 18 conductor cable going to the control box, so plenty of places to pick up interference.

So that's the basics, and I know I need a schematic out here and I am working on it. Any thoughts would be appreciated.

Thanks!

Andy

Comments

  • SapphireSapphire Posts: 496
    edited 2014-04-14 20:31
    Do you have a flyback diode across the relay coil? When a relay deenergizes, it creates a large voltage spike. The diode serves to dissipate this energy back into the coil instead of the rest of the circuit. Also, adding a 0.1uF cap across the ATN pin to ground will help eliminate noise getting in there and resetting the stamp.
  • aroeskearoeske Posts: 5
    edited 2014-04-14 21:06
    Sapphire wrote: »
    Do you have a flyback diode across the relay coil? When a relay deenergizes, it creates a large voltage spike. The diode serves to dissipate this energy back into the coil instead of the rest of the circuit. Also, adding a 0.1uF cap across the ATN pin to ground will help eliminate noise getting in there and resetting the stamp.

    I do not have any diodes on the relays. I will try that tomorrow. I'll try the cap as well.

    Thanks!
  • aroeskearoeske Posts: 5
    edited 2014-04-15 12:04
    I added the diode and did a few tests and that seems to have done the trick. Thank you very much!
  • SapphireSapphire Posts: 496
    edited 2014-04-15 16:10
    You're welcome. Let us know if you have any other problems.
Sign In or Register to comment.