Shop OBEX P1 Docs P2 Docs Learn Events
My Prop's slow degradation and death — Parallax Forums

My Prop's slow degradation and death

tosjduenfstosjduenfs Posts: 37
edited 2013-11-01 18:23 in Propeller 1
I've been working on a program that will have a telescope track an object. I breadboarded a prop had one of the motors and encoders hooked up an adc and accelerometer all hooked up and working well and tracking. I installed the second motor and edited the code for the second motor. I tried running both motors at once, I had all of the PID, pwm motor speed, and encoder values being sent to the serial terminal and some of them were showing strange values like I had used an integer in a floating point calculation but the motors were running and trying to track but could not because of the bizarre numbers. I switched back to running just one motor and the single motor code. It worked but the prop would occasionally crash and stop sending values to serial terminal and stop controlling the motor. The more I reset the prop and reloaded the code the more it crashed eventually it did not work at all, I tried reloading other known working programs and nothing. Hello World works but I can't get any of my other programs working. Supply voltage is a steady 3.3v. Any idea what happened here? I checked all my connections and I can't see anything wrong. The only thing I changed that started this was installing the second motor and I checked the connections about 10 times when I started having issues. The motor controller works fine and the motor works fine as well.

Thanks
Mike

Comments

  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-10-30 13:57
    Does subbing a new chip fix it? If so, have you checked all the pins with an oscilloscope looking for electrical noise at any of the prop pins that could be damaging things? are you pwm ing the motor through a fet? If so, do you have a reversed diode over the leads to prevent kickback spikes from the motor???
  • kfuremkfurem Posts: 19
    edited 2013-10-30 14:31
    I have a lot of devices that don't work properly on the prop without pull down or pull up resistors. The other that got me a few times is when a cog is using a routine from the main memory, it can look like the chip is crashed, but a cog can be running around blocking mainline functions. I would look at exactly how (in software) you added the second motor. Invent-O-Docs comments about the diode are excellent.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2013-10-30 15:26
    tosjduenfs wrote: »
    I've been working on a program that will have a telescope track an object. I breadboarded a prop had one of the motors and encoders hooked up an adc and accelerometer all hooked up and working well and tracking. I installed the second motor and edited the code for the second motor. I tried running both motors at once, I had all of the PID, pwm motor speed, and encoder values being sent to the serial terminal and some of them were showing strange values like I had used an integer in a floating point calculation but the motors were running and trying to track but could not because of the bizarre numbers. I switched back to running just one motor and the single motor code. It worked but the prop would occasionally crash and stop sending values to serial terminal and stop controlling the motor. The more I reset the prop and reloaded the code the more it crashed eventually it did not work at all, I tried reloading other known working programs and nothing. Hello World works but I can't get any of my other programs working. Supply voltage is a steady 3.3v. Any idea what happened here? I checked all my connections and I can't see anything wrong. The only thing I changed that started this was installing the second motor and I checked the connections about 10 times when I started having issues. The motor controller works fine and the motor works fine as well.

    Thanks
    Mike

    It's like being back in the 1920s when you could sidle up and listen to the "wireless" but you couldn't see anything, or click on anything to find out more, you just had to imagine the scene in your head. Nowadays there is this interweb thingy I heard people are using, I believe it's fairly easy to post code and diagrams and even include a photo or two. Imagine that, being able to see it instead of imagining it!

    However two things caught my attention despite the lack of real information, "BREADBOARD" and "MOTORS". All too often the Prop is connected without all it's grounds grounded and all too often the motor ground current runs through the Prop's grounds. This makes the Prop very sick, almost to the point of dying, in fact I thought the thread title was a death notice for the Prop itself as a product, not as your breadboard. Analysis of common failures show that this grounding problem with high currents can zap the Prop's PLL. You can confirm this by running without the PLL or just using RC fast if possible, at least for a blinky program. The other thing that was brought up are "spikes" on the supply line but then I can only imagine at this point how it's hooked up.
  • Mark_TMark_T Posts: 1,981
    edited 2013-10-30 15:32
    Definitely a photo is worth a lot of words here - issues might be various from poor grounding, inductive spikes, lack of decoupling, noise pick up,
    loose connection, software bug....

    Never share high current ground or power wires with logic circuitry, logic chips need clean supplies, and clean means free of glitches (which
    a multimeter has no hope whatsoever of detecting). Decoupling is essential for all logic chips.
  • motionmanmotionman Posts: 2
    edited 2013-10-31 01:26
    Emphatically , mixing digital and power signals is a recipe for disaster .(ask me how I know !)

    I use an H11L1M optoisolator :
    Turn on and turn off speeds around 1 microsecond
    Schmitt trigger output with open collector .16 V withstand and 16 mA drive
    Emitter required input current only 1.6 mA
  • tosjduenfstosjduenfs Posts: 37
    edited 2013-10-31 15:02
    I found the problem. I ripped apart the breadboard and started over. While pulling it apart I found one of the jumpers for one of the propeller grounds was not connected electrically to the pin but that fact was hidden by the small rubber cover. I am not driving the motors from the prop I am using two separate motor controllers that accept a pwm rc input. The power supplies are seperate. Both motors are running and tracking fine. Next time I will know to double check the prop Vdd and Vss connections before tearing the whole thing apart.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-31 18:33
    tosjduenfs wrote:
    I am not driving the motors from the prop I am using two separate motor controllers that accept a pwm rc input. The power supplies are seperate.
    If the two systems share a common ground, it is is still very important to pay attention to how the grounds are connected. It needs to be done in such a way that motor return current does not run though the logic ground circuit. IOW, group your logic grounds to a single point and your motor gournds to a single point, and connect those two points together where both power supplies enter the board.

    -Phil
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-11-01 04:05
    Phil,
    I'm doing PWM on a motor with a FET. I'm thinking about separate power supplies. Is there anything else I should add besides connecting grounds like filter capacitors or something?

    Things are working ok off the same supply now.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-01 09:24
    Things are a bit easier with two supplies, since you don't have to worry about brownouts in the logic supply when the motor stalls. The main issue then becomes ground currents, which I discussed above, and noise. Noise can be abated by adding bypass caps across the motor leads at the motor and from each motor lead to the metal motor housing.

    -Phil
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-11-01 18:05
    Very helpful. I have experienced 'stalls' from tome to time, it resets the prop, but tends to not happen if I keep the pwm frequency low. I heard putting a small cap across the fet leads will help smooth with the stalls. I also will try running the motor for an initial second at 100%.
  • Mark_TMark_T Posts: 1,981
    edited 2013-11-01 18:23
    Very helpful. I have experienced 'stalls' from tome to time, it resets the prop, but tends to not happen if I keep the pwm frequency low. I heard putting a small cap across the fet leads will help smooth with the stalls. I also will try running the motor for an initial second at 100%.

    If you think about it adding capacitor across the FET source/drain leads to large current spikes when it turns on and the cap dumps its
    charge through the FET. A cap here can be useful as part of a snubber network I think, but I wouldn't add one without careful consideration
    of what value is appropriate for the FET and supply voltage.
Sign In or Register to comment.