Shop OBEX P1 Docs P2 Docs Learn Events
Recognizing a reset — Parallax Forums

Recognizing a reset

mountaineermountaineer Posts: 27
edited 2006-03-26 11:25 in BASIC Stamp
I'm working on a robot and its basic stamp seems to randomly reset. This is a problem because it has a startup mode, and then a main loop, so when it resets it goes to the startup mode and then the main loop. Whats the bast way to solve this? The robot uses two GM9's from solarbotics with the upgrade motors as well as 3 HS-5945s, which are often under load. I soldered a .1uF monolithic ceramic capacitor and that seems to have eliminated RF interference(I'm using a wireless playstation controller). Should I put caps on the servos to reduce noise also? And if so, what kind and where should I put them? I thought that it might be that the voltage (I measured it at 7.9v right after a reset) might be dipping down below the minimum level of the basic stamp, but that seems like a significant dip. Is there any hardware way of solving this problem?

I thought that there might be some way to solve this in software. Since I have two loops - startup and main - I could store what loop I was in in EEPROM. Then, if I press a specific button before shutdown it would remember that it was shutdown normally and start up at the beginning of the code. Otherwise, I would assume that it accidentally restarted and go to the place I was last at by looking in the EEPROM. I would rather not have a shutdown button, but that appears to be the only way. Any comments?


Thanks in advance, botguy

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-26 09:04
    Mountaineer -

    You haven't provided us with enough information to even offer an educated guess. How is the power to this platform set up? Does the same power source which feeds the PBASIC Stamp also supply power to the motors and other accessories? What is the voltage and amperage rating of the power supply?

    You don't mention which PBASIC Stamp you are using? Do you happen to know how much current the HS-5945 Hitec digital servos draw while in use? The RM-2 upgrade motor draws HUGE amounts of current at a stall. Depending on the voltage, the stall current can be anywhere from 2.14 amperes to 4.93 amperes. Are your batteries prepared to handle such a load? I can only imagine what the ordinary start-up current is like!

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-26 11:25
    If you want to identify which loop the reset is occuring in and have extra pins, add a couple of LEDs [noparse][[/noparse]preferably different colors] that are active during their respective phase of software. Then you mere can observe which light is on when reset occurs.

    If random, it probably indicates a brownout due to poor power distribution.

    Recently, I have seen ferrite beads on motor leads as a substitute for capacitors. But, without using a scope to identify noise sources and noise events, you may just be adding unneeded complexity.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Sign In or Register to comment.