bs2p24 will not reset w/power reapplied unless reset button.
lightsout
Posts: 22
Well , like the subject says, bs2p24/USB demo board will not reset (start· running program from beginning) when power has been removed and reconnected power unless reset button is pushed or its reprogrammed.
Shouldn't removing power always make it just like pushing reset ?
The clue might be that this only happens after it's run through all of it's code and come to an "end". If you power off/on before it gets to the "END", then it will reset/start over.
There is no eeprom.
I have made sure the power LED actually goes out.
I have tried disconnecting any possible sources of feedback/stray power that might be keeping it powered up at the "end" line.
I have tried letting it set for 15 minutes or so to get it fully powered down.
·Thanks to all !
Shouldn't removing power always make it just like pushing reset ?
The clue might be that this only happens after it's run through all of it's code and come to an "end". If you power off/on before it gets to the "END", then it will reset/start over.
There is no eeprom.
I have made sure the power LED actually goes out.
I have tried disconnecting any possible sources of feedback/stray power that might be keeping it powered up at the "end" line.
I have tried letting it set for 15 minutes or so to get it fully powered down.
·Thanks to all !
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
and powering up after each diconnected item....still nothing. Last step was to diconnect everything from the board, so nothing but the "USB board" with the stamp on it, then reconnect USB, check loopback on bebug, reconnect power.....nothing...push reset button and away it went (started prog.).
Prior statement "no EEPROM" meant no external memory.
As for posting my program, I prefer not to unless absolutely needed.
Please help. Thank you!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
In the other run modes, the chip does pull a few milli-amps -- enough to draw down any supplies to zero. That's why Chris suggests the 'Stop' instead of the 'End'.
Now, perhaps you WANT that 'low-power' mode. Hmm. Tricky. I'll have to think about it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Also ,like I said, I had disconnected everything.
I don't know why I didn't try this earlier.........With it acting-up (not reseting), I powered-down, removed the stamp from the board, reinstalled and powered-up...still nothing.
Then Replaced the "END" with a "STOP" ....fixed the problem.
Each of these steps were repeated to confirm results.
WHY ?????
Now does this mean I can never use "END"??
Post Edited (lightsout) : 2/1/2006 3:24:54 PM GMT
·· I spoke with our Senior Software Engineer on this and he had the following to add to my findings:
The Stamp is working exactly as it's supposed to, in this case, but the circuit is keeping it from working as desired.
The board that you have the BS2p24 connected to (USB BOE, right?) has two power capacitors on it to condition the power going into the board and also going into the BASIC Stamp.· If the program simply ends at some point, or if the program has an actual END statement that it reaches, the Stamp goes into low power mode where it drops it's power consumption by more than 10 times (typically) and it basically goes to sleep, however, it's really taking more of a "nap" than a solid sleep; ie: it wakes up periodically (every 2.3 seconds) and then decides it needs to go back to sleep.
So, in this state, it is drawing upwards of 10 times less power per interval than it did during norming running... disconnecting all power sources will cause the capacitors on the board to drain into the Stamp until they are depleated, but that will take much longer now since the Stamp is consuming much less power.· The result is, short power disconnections (I mean on the order of a few seconds to a minute or so), will result in the Stamp continuing to have enough power to maintain its sleep state, and when power is connected back in, the caps charge back up to full and the Stamp never even realized that any power fluctuation occurred at all because the caps maintained a higher-that-brown-out voltage, so it continues to sleep, or "nap" if you will.
The reason that the STOP command causes it to behave differently is becuase the STOP command is similar to:
· WaitHere:
····· GOTO WaitHere
Here, as with the STOP command, the Stamp is running at full power, and constantly executes a command, so removing the power source causes the caps to drain much quicker, leading to the Stamp reaching it's brown-out trip voltage (about 4.2 volts DC) much faster, and actually going into shut down mode.
If you need to have the program/Stamp quit until a power-cycle or reset, and you're using the USB BOE or a similar board or a circuit with similar power filtering (capacitors) on it, then you'll have to use a STOP command in place of any END commands in order to prevent this issue.· One other possibility, if you were using your own pcb, is to utilize the third prong on most power jacks (which is connected only when a power plug is not inserted) to have it drain power from the caps through a properly sized resistor, so that even when the Stamp is in low power mode and the power is disconnected for a very short time, the caps will drain beyond the brown-out voltage level very quickly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I still have your other tests to try, but none of those tests address how "stamp removal" doesn't reset.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I am determining it never ran the program based on no servo action or debug info,debug screen can always be verified by pushing reset button and seeing program run.
I have also found that placing "end" at first part of program causes the same problem.
Stamp pins #21 & 22 are staying at·aprox. 1.5volts·(very slowly dropping) even when absolutely everything is unplugged from board. Shorting out #21 & 22 before powering up allows normal operation.(I took my chances that it was OK to do that).
When voltage is present on pins #21 & 22 and stamp is not reseting, I can remove stamp, measure voltage at board socket and get close to zero volts on··22 and close to 1 volt at 21.
Is it possible to have a stamp voltage leak from VCC to RES ??
Remember, it only is having the problem with the·"END" statement. Using·"STOP" or using the following allows normal operation.
TestLoop:
· DEBUG “PROGRAM ENDED!”, CR
· PAUSE 150
· GOTO TestLoop
You haven't mentioned if the additional power-draw of the 'STOP' command is a problem for you or not. Assuming it is, one other thing you might try is a 100 KOhm resister between the BS2's VDD and VSS pins. During normal use, this will pull an additional 50 micro-amps of current from your supply, which shouldn't be a problem. When the supply goes down, this resistor should give you a path to ground to insure the BS2 resets when power comes back up.
Another alternative is a:
TestLoop:
Sleep 5
GOTO TestLoop
The idea here being that in 'sleep', the BS2 uses as much current as in 'END', but then it tries to 'wake up'. When it tries to 'wake up', it should pull enough current to give you a hard 'zero volts' condition, which should force a reset when power comes back.
The assumption being here in 'pause' it won't pull much current
Or, that it would take as much as a minute for the BS2 to 'self-discharge' enough to enable the brown-out reset circuit.
MY PROBLEM IS THE USB/BOE "HOLDING POWER".
I must have super caps or something !
I have swaped bs2p24 stamps with the other one on this project and only have the following program on both:
DEBUG "clear"
END
·The other board is a serial/BOE and that resets normal with no problem.
And only the USB/BOE board will not reset with power disconnected.
Absolutely everything is diconnected from the board, I even manually unplugged the power wire and USB·from the board ,reconnect ,re-identify ,power-up·as I have before with the other tests.
Sitting powered down for over 15 minutes doesn't do it.
- Anyone else have this problem with the USB/BOE boards??
- Is this really the first time this has come up ??
- Don't most people want to start thier program without having to open up thier project box and pushing the reset or reprograming every time ??
- Is my USB/BOE board somehow defective ??
I want the low power when not running the program, however during the program it doesn't matter.Maybe allanlane5's current draining resistor would work, but then defeats the low power idea I think.I've got about 10 hours into this problem and I feel like this:
I can't tell from your posts, but the question is, if you DON'T have the USB cable connected, and you then pull power, and you then reconnect power, does your BS2 reset?
And what happens if you do use the 'sleep' loop above?
Oh, and if you open a 'debug' port (those little icons to the top right of the IDE) that should also send a 'reset' to your BS2.
·· Here's the deal.· If you look at the schematic for the current revision BOE you will find that the Vcc (not Vdd) pin on the BASIC Stamp is connected to a 1000 uF capacitor.· This pin is not normally connected to anything else on the BOE.··There are two capacitors just below the battery snaps.· One (the right one) belongs to the regulator and the other (the left one) is the one connected to the Vcc pin.· When you power down the board there's really nothing to discharge this capacitor very fast, so what happens is that it gets down to about 1V and floats there for quite a long time.· This capacitor is designed to protect the Stamp Module from browning our when running from a battery pack by keeping the Vcc circuit charged when Vin sags.· When the BASIC Stamp is in SLEEP mode the brownout detection is disabled and therefore the Stamp Module doesn't know that there has been a brownout condition.· So, when you power the circuit back up it picks right up where it left off.
·· The bottom line is this.· If you insist on using END statements in your program then you would need an external brownout chip such as the 13811 to handle your power down conditions.· Otherwise you will need a board that doesn't have this 1000 uF capacitor on the Vcc pin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com