Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Resetting issue — Parallax Forums

Propeller Resetting issue

jaegjaeg Posts: 156
edited 2011-06-28 18:33 in Propeller 1
My Robot:
I'm using a Gadget Gangster Propeller board with a prototyping module equipped with a Ping, Mesmic accelometer, and TI's version of the L293d motor driver chip. My robot is built from a Tamiya Track set with a twin gearbox. The motors are from Solarbotics. My robot use to use a Picaxe board and worked just fine off of 4 AAs. I wanted to use the board for another robot and had my Propeller board laying around and a Mesmic sensor so I thought what the heck.

My problem:
For some reason when my motors change direction the Propeller resets. I check the voltage and it's not dropping below 5volts on Vin, and both the 5v and 3.3v regulators are producing acceptable levels. Both my motors have caps on them and the did cause the Picaxe to reset before. My motors are connected via these screw terminal things so I can easily remove them. I've noticed that if I have my screwdriver touching on of the terminals it doesn't reset.

Comments

  • LeonLeon Posts: 7,620
    edited 2011-06-28 10:24
    Transients from the motors and/or driver chip are affecting the Propeller. You need to use separate power supplies, pay attention to grounding, and provide effective filtering. TVSs across the 5V and 3.3V rails are advisable.
  • jaegjaeg Posts: 156
    edited 2011-06-28 10:28
    When you say pay attention to grounding do you mean to make sure I tie both grounds together?
  • LeonLeon Posts: 7,620
    edited 2011-06-28 10:32
    Yes, at one point.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-06-28 10:35
    You need to arrange your ground connections so that ground current from the motors doesn't flow through the same cables as the ground current from the Propeller. Have a common ground point, usually at the batteries. Run one heavy ground wire from the motors (or the motor controller) to this common point. Run a separate ground wire from the Propeller to this point.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-06-28 10:40
    It also helps to solder 0.1uF ceramic bypass caps directly to the motor: one between terminals, and one from each terminal to the metal housing. Keep the leads as short as possible!

    -Phil
  • jaegjaeg Posts: 156
    edited 2011-06-28 12:33
    Well I just put the extra caps on and moved it to a separate power supply but with no luck. It working when you have a screw driver on a screw terminal is inconsistent now. I've noticed that when I unmount the motors of the chassis and move them away from the main board it works fine.
  • LeonLeon Posts: 7,620
    edited 2011-06-28 12:38
    You will have to do a lot more than that to it, as I mentioned.
  • jaegjaeg Posts: 156
    edited 2011-06-28 12:50
    I don't have a TVS for the raillines on hand so I'll have to wait till I go out to get it what are some other filter techniques I can use? I payed careful attention to how I grounded the motor supply battery.
  • LeonLeon Posts: 7,620
    edited 2011-06-28 12:52
    Filters using inductors and capacitors.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-06-28 13:43
    I often put a 10K external pull up resistor on the reset pin and have a jumper in the reset line from the programming source so that that can be isolated. A small capacitor could help but it has to allow for the DTR pulse to get through.

    When the motors are running they are trying to go as fast as they can up until the point that their internal generated voltage tend to match the supply (as much as their loading will let them). When they are reversed that almost equal voltage is fighting the supply and will give a short period of almost cancellation (at the motor terminals at least). So common point grounding at the supply source is vital.

    Ground loops crop up "dead sneeky" and can be absolute piglets to trace/eradicate.
  • jaegjaeg Posts: 156
    edited 2011-06-28 14:49
    With the board I'm using I really don't have access to the reset pin sadly. I'm thinking about trying a different motor because it resets when this particular motor reverses and it did start doing it randomly rather than doing it since I first built it.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2011-06-28 15:19
    I had a similar problem when I had my Prop near some EMFs, the solution is as Toby said.
    I put a 2.2K pull-up resistor and a 0.1µF cap. No more resetting problems for me.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-06-28 15:29
    The fact that it was OK at first and has since got worse may be the answer. What happened since the by modification or rebuilds? Are the suppressors that worked for a while over stressed and failing ? Remember that the interference spikes that launch off the motor's inductance will be up in the hundreds of volts, rather than the 12 V (for example) being supplied, the Prop is a high speed chip that is keen to react to any fleeting glitch. Could the clock rate be slowed down just to see if that helped ?
  • jaegjaeg Posts: 156
    edited 2011-06-28 15:45
    Hmm... I'm unsure. At the time it first started I had a program running that pulled info from a Ping sensor to avoid obstacles. Because of how I had it written the motor had a tendency to switch back and forth really quick. It was about this time the problem occurred.

    I actually just got it to quit resetting by swapping which motor goes to which output on the motor driver chip. So I'm really unsure what's causing the problem.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-06-28 17:01
    Starting quickly, braking quickly (if the controller has a braking function), or reversing directions quickly can all cause large current transients. This is because a motor that's energized but not turning at the requested speed and direction looks like a virtual short circuit to the controller. It's always better to ramp your speeds up and down, when starting, stopping, or changing direction.

    -Phil
  • jaegjaeg Posts: 156
    edited 2011-06-28 17:17
    Yah that's probably what caused the issue. I was thinking when I wrote the quick program to test out my wiring. I'm thinking about switching my robot back over to the picaxe and using my propeller board for the Dagu quadruped I'm getting for my birthday. For the simple processing this little bot needs the Picaxe will suite just fine.
  • BigFootBigFoot Posts: 259
    edited 2011-06-28 18:33
    You might add a pi filter in front of the propellers power supply to filter out any noise spikes.
    You could use 10uF ceramic caps with a 10-47uF inductor.
    1024 x 451 - 32K
Sign In or Register to comment.