Prop Resets Itself (Very Hard Reset)
Chris The Carpenter
Posts: 18
I would like to pre-thank you guys, I have lurked for quite a while and asked my very first question just a week or so ago. I found friendly people and good answers and I appreciate that. I am running into a weird issue and I hope the same will happen with this problem.
I am running a Gadget Gangster USB prop board on Walter, my robot. Walter is about as big as a dog, weighs about 80 lbs and is super awesome. The major parts (that would have any bearing to this conversation) are the main board, a Arduino-based motor driver board speaking i2c, a second arduino that simply fires off my (4) sonars and sends the data to the prop (UART serial), a thumb-drive mp3 player (speaking serial) and a i2c servo driver board. The 5V regulator (on the prop board itself) has been jumped (per manufacturer's instructions) and 5v power is supplied by an external 5v 3A regulator. Everything else --main drive and servos have their own volt regulators. Juice comes from a big ol' 12V SLA battery. There is more --blinkM's etc. but nothing else worth mentioning.
I am having problems with the chip/board doing it's own "hard reset". This is a new problem, and did not exist in the past using the same hardware and similar code. When I say "hard reset" I mean that the main 5V power supply is being pulled low. I even caught it on a scope. This is a picture of the reset. When this was taken, I had the probe on the main 5V supply (from the 5v regulator and the same supply that feeds everything 5v) and the ground.
Attachment not found.
You can see that "something" is yanking my power down to nothing. It is the same swoop down to low then a square corner and it shoots back to high. The O-scope says that every reset is exactly the same length give or take a few uS. If you have turned the board on for the first time, the reset happens after about 4 minutes. If you let it run from there, the resets come more frequently --sometimes every 15 or 20 seconds. They resets seem to also happen more when more cogs are running. Removing the WiiCamera object and code seems to help but I can't confirm that removing it fixes my problem. I would have thought this was an "overflow" or a "null-style" problem (it feels like that kinda problem), but I don't like the looks of the scope trace --This is not just some kinda internal reset from code that blew-up, something is pulling down hard.
Here is the code I am running. I did a tidy-up and a bunch of comments.
(Don't click the big button when you get there--it is an ad)
Look for "Navigation 20 --Reset Problem"
Code is Here
I thank you all in advance for your time.
I am running a Gadget Gangster USB prop board on Walter, my robot. Walter is about as big as a dog, weighs about 80 lbs and is super awesome. The major parts (that would have any bearing to this conversation) are the main board, a Arduino-based motor driver board speaking i2c, a second arduino that simply fires off my (4) sonars and sends the data to the prop (UART serial), a thumb-drive mp3 player (speaking serial) and a i2c servo driver board. The 5V regulator (on the prop board itself) has been jumped (per manufacturer's instructions) and 5v power is supplied by an external 5v 3A regulator. Everything else --main drive and servos have their own volt regulators. Juice comes from a big ol' 12V SLA battery. There is more --blinkM's etc. but nothing else worth mentioning.
I am having problems with the chip/board doing it's own "hard reset". This is a new problem, and did not exist in the past using the same hardware and similar code. When I say "hard reset" I mean that the main 5V power supply is being pulled low. I even caught it on a scope. This is a picture of the reset. When this was taken, I had the probe on the main 5V supply (from the 5v regulator and the same supply that feeds everything 5v) and the ground.
Attachment not found.
You can see that "something" is yanking my power down to nothing. It is the same swoop down to low then a square corner and it shoots back to high. The O-scope says that every reset is exactly the same length give or take a few uS. If you have turned the board on for the first time, the reset happens after about 4 minutes. If you let it run from there, the resets come more frequently --sometimes every 15 or 20 seconds. They resets seem to also happen more when more cogs are running. Removing the WiiCamera object and code seems to help but I can't confirm that removing it fixes my problem. I would have thought this was an "overflow" or a "null-style" problem (it feels like that kinda problem), but I don't like the looks of the scope trace --This is not just some kinda internal reset from code that blew-up, something is pulling down hard.
Here is the code I am running. I did a tidy-up and a bunch of comments.
(Don't click the big button when you get there--it is an ad)
Look for "Navigation 20 --Reset Problem"
Code is Here
I thank you all in advance for your time.
Comments
***Good Links****
Code is Here
Image is here
Please post a schematic. Something, possibly controlled by the Prop, is shorting out your 5V supply.
-Phil
First off, thanks bunches for the response. Yup, the prop has got to be controlling a piece of hardware that is thus, shorting out my power. I am camping on this conclusion until a better one comes by. The problem is the extent to Walter's wiring. Not to put too fine a point on it, there is a metric Smile-load of it. I am meticulous, I crimp and solder every "servo connector" --I keep my stuff tidy! Then again, with the shear volume of wiring, there is a lot that could go wrong.
I sob when I think of a tear-down and systematic rebuild. It could be done, and each part could be checked individually --the right way of doing it-- but... well, I don't wanna.
I think I'll wait a little bit and hope for a miracle answer. --Seriously, a whole-frame rewire (or really, unplug, check and replug everything) would take about a week. Uff-da.
-Phil
That sir, is a splendid idea. My scope will do it and will "record" the whole event. Gotta find my little "individual pin" clippy-testy-thingies...
In theory, something should happen a split-second before the reset...
Sure. Walter has been through a few "total rebuilds" including most recently, the addition of an extra bracket to carry (2) pan/tilt units (one holding his new Wii Camera) and his compass. I don't have posts anywhere showing this new bracket but, here is the newest stuff I got.
The last time I took "proper" pictures of him. HERE --Just scroll down a wee bit. ( I never update the blog)
The Navigation routine (a few versions ago) HERE with video (driving around).
A post about Walter's WiiCamera and the PCB I made for it. HERE --this one is pretty good.
An old video (when Walter was just a chassis, RC and still powered with drill batteries. Oh yeah,
I had a Rubbermaid tote screwed on and I gave the kids rides. HERE is a video of me convincing my wife to ride, just before I drive her directly into a huge speaker... Good times.
Well boys... good news/ bad news...
I scoped each pin and didn't really see anything funny. It is starting to sink in --what are those "stages of grief" again? Something about "acceptance"? It is looking like a major rewire/tidy-up is in my future. I unplugged my top module (shield). This board basically converts all the prop pins to 3-pin servo-style connectors. It also has my X-bee and some input buttons. It is simply the "main connection point" for basically everything on the robot. I removed it, and replaced it with a simple test shield (breadboard kinda thing) and we are 100% reset free. Or at least we have been for almost 2 1/2 hours.
So now that I unplugged "everything" it works!! No big deal, I just gotta go through everything... Shouldn't be too tough. It seems I got 2 options: Leave anything on and remove one-by-one until the problem stops --or-- strip everything and add them back one-by-one checking as we go. Seems to make more sense to start from 0 and build back up. Yeah, it's gunna suck but I will end up with a much better, more solid product in the end. <sigh>
I want to tell you guys how much I appreciate your time. I must admit, I sorta knew the answer I was going to get when I asked the question, but through everyone's help, I was able to accept what I needed to accept. No biggie, I guess --No blue smoke, coulda been worse.
I swear to god this situation has caused me some serious grief. Can you please elaborate on when and how and why this situation happens? It would help me so much!
There's been several long threads about the USB reset issue... Basically, using fullduplexserial puts 3.3V on the Prop's TX pin. This provides power to the FTDI chip and if the USB cable is not connected, the FTDI chip will toggle the reset pin once it has enough power. One fix is to test the Prop's RX pin for a logic 1, indicating USB cable is connected, and only then start up fullduplex serial. You can search the forum and find a lot of other solutions...
I think you might be onto something. The very shape of the curve (leading decay, trailing sharp rise) suggests that the 5V was simply removed, not shorted out, then reinstated. 100ms does seem a bit brief for the whole cycle to occur, though, unless the thermal cutout has no hysteresis whatsoever.
-Phil
-Phil