Prop Unexpectedly Restarting
John Board
Posts: 371
G'day everyone,
Been working with the prop recently, and I have been having trouble with it restarting unexpectedly. I am using it to drive a motor driver, the wheel turns for a time (random amount of time) and then stops, I have determind it was becase of a prop restart. There is plenty energy for it, it is plugged into a wall socket, and the motor is running on a different power supply. I do know that it was a restart, however, I don't know why... Can anyone help me? I really need help.
Thanks in advance,
John
P.S. Each I/O pin is not having more than 40 ma drawn from it.
Been working with the prop recently, and I have been having trouble with it restarting unexpectedly. I am using it to drive a motor driver, the wheel turns for a time (random amount of time) and then stops, I have determind it was becase of a prop restart. There is plenty energy for it, it is plugged into a wall socket, and the motor is running on a different power supply. I do know that it was a restart, however, I don't know why... Can anyone help me? I really need help.
Thanks in advance,
John
P.S. Each I/O pin is not having more than 40 ma drawn from it.
Comments
See the following threads:
http://forums.parallax.com/showthread.php?131815
http://forums.parallax.com/showthread.php?116711
http://forums.parallax.com/showthread.php?116713
-Phil
When it is restarting, is the USB cable connected between the Prop board and the PC or not. Does it restart with the USB cable disconnected from the Prop board?
The links you sent me weren't really applicable. However, the last 2 were interesting, because I just had the same sort of serial problem, I had figured it out previous though.
@T Chap:
Here is the driver I'm using:
http://www.pololu.com/catalog/product/713
I've connected pretty much as per the link. I loaded a "motor forwards" program to the EEPROM, and then loaded a "motor backwards" program in the RAM. The motor turns backwards for a time (random amount) and then stops, then it waits for about 1 second (Prop boot up time) then it starts turning backwards, that is why I say it is restarting. I have no idea why it is restarting.
I have connected all the pins as per the link, however, I have left out the following pins because I do not need to hook them up as I am not using a second motor:
BIN1
BIN2
PWMB
BO1
BO2
I have noticed that if I "Hard wire" up the pins:
AIN1: 5V
AIN2: GND
STBY: 5V
And only control the PWMA pin via the prop, everything is fine, however, when I connect the pins AIN1, AIN2, and STBY, the prop turns the motor for a bit, then restarts.
I hope this is enough information and thanks for your help,
-John
*While connecting the grounds together, bracing self for large "BANG" and smoke rising from my circutry*
Close, but no cigar. The motor did what it always did, turn for a bit, then stop, here is my code:
Thanks,
-John
The module does not specify a PWM minimum freq, only max of 100k. For speed control you would be better to use an object like PWMASM, set the duty and rate. For example 20k and 0-100 duty for testing.
-John
I assume that you have tested some code with an LED( flash on bootup) or some other means to verify that the Prop will function with code other than trying to drive the motor.
1. Go back and confirm all connections, verify the inputs to the driver
2. Insert a 220 - 470 ohm resistor between the Prop lines and the driver. If you are connecting a Prop pin to GND accidentally, it may be that shorting out the Prop(high) pin to GND is pulling the Prop power low enough to brown out the Prop. A series resistor may verify this.
3. Disconnect the motor but leave the driver on and connected. See what happens
4. Take a hammer to both boards and see how many separate parts you can create from the 2.
I'll try these things, and let you know how I fair.
-John
Had pain with the motor drivers for about a month... not only these motor drivers...
Well, wouldn't you know, option 4 worked...
Not, it was actually the STBY pin, as I said, I worked the way through all the pins (From PWMA to AIN2) and worked fine... when I got to STBY I started getting problems. As the STBY pin isn't an integral part of the driver, and I can leave it out, I'm fine with leaving it un-hooked.
Thanks for all your help, and I hope to see everyone around!
-John
P.S. In a few months I'll post a few pics of my robot in the "Projects section"
Just to be sure, the two different power supplies do share the same ground right?
The motor controller's 5V is coming of the GG board? I'd suggest adding a couple of caps to the GG power lines both 5V and 3.3V. I generally use 1000uF but might be good to include some smaller (0.1uF) caps too. The controller board might pull a relatively high current from from the 5V rail causing the a drop in voltage on both the 5V and 3.3V lines.
Based on your simple code, for the Prop to reset, it can only be one of several possibilities:
1. 3v3 is dropping below a point and the Prop resets when it goes back up
2. The reset pin is getting noise on it causing a reset. I suppose that the noise could affect the FTDI USB interface, which may trip the Reset pin. In all kinds of noisy situations, I do not think I have ever seen this.
I had this same problem a couple of weeks ago.
I was working on some stepper motor programs and was getting resets.
At first I thought it was caused by "Static Discharge" in the vicinity.
I'm using a plug board with lots of wire length. Static discharge resets, to me, were annoying but understandable.
But this didn't make sense as this happened even when I didn't move.
Anyway, I had been noticing a small LED on the 5V power buss, (before the 3.3V regulator), was flickering as the steppers would move.
Bingo, this might be the problem. Then I moved the LED to the 3.3V buss. That flickered also. I was on to something.
The tiny 5V cell phone switching wall wart I was using was rated at 180mA. This should have been plenty for the small steppers I was using.
I got out the scope. There it was. The small wall wart didn't like the 60mA current pulses. The 5V would drop down a couple of volts which caused the 3.3V to drop and once in a while the prop would reset.
The fix was to use a slightly smaller cell phone wall wort that was rated at 500mA. Problem solved.
Anyway, Even something as simple as a small LED (plus resister) across the power buss can find problems.
I was surprise at how narrow the dropout pulses could and yet be seen with the tiny flickers of light.
Duane J
1. He has a power supply that was provided with the board that should have been adequate
2. He said he has tested the board with other programs and it does not crash.
3. The board he has already has some LED indicators for power.
But for sure that is a good point that if he has a low power wall wart then by the time he turns on a few pins, that could be pulling the rail down. If the drop is really fast then the LED may not show it, but a flicker on a meter might show enough to detect that the rail is getting hit. Anyways, at least it is more for him to look at. Good call.
Spikes. from the motor can easily cause these problems.
Possibly larger filter caps could help. And a small, say 20nF cap or so, on the reset pin to 3.3V rail would help.
Duane J
GG Prop Board is powered by a 550ma wall socket adapter.
The motor driver is getting supplied from a large 6v torch battery.
Originally I had both motors and prop on the mains power (wall socket), but I too had the light flickering on the main power bus. So I seperated the power supplies, that did the trick. Would have loved to hook up a scope to it, but I don't currently possess one. Do have a multi-meter though, can try with that, I think I did before and no bizare readings.
Thanks for your help,
john
Thanks for all your help and your time,
-John