Blown PLL
Graham Stabler
Posts: 2,510
I've been using a protoboard in an experimental rig of mine for months, the day before yesterday I made some modifications, tested it and it worked fine. Then I moved it into its new home to try it out proper, I powered up and the program didn't work. I checked for electrical gremlins (bits of wire and loose connections) and nothing. Then I ran a simple program and it worked but still no video out, diagnosis a blown PLL.
I found a recent post by Paul Baker on the likely causes and how to avoid them. One thing that struck me was that I was powering the demoboard from a wall wart and the stepper motors from a 12v 5A switchmode supply. I had the two plugged into the same "dado" in the lab but quite a way apart. The wiring in my box was bothering me too, not very neat at all as it was a bit of a rush job.
So I rewired box from scratch, now the protoboard, LCD screen and steppers are powered from the same 12v supply. The master switch switches power to the protoboard and screen, then a second switch can be used to power up the stepper motors. After some checks I powered up the unit, protoboard worked fine outputting video to screen as normal, then I turned on the steppers; the propeller rebooted but still worked. I repeat the cycle and then nothing. PLL blown again.
I'm wondering if I have removed some poor practice only to replace it with some more poor practice.
What does worry me is that much of the advice in Paul's post concerned PCB design, I'm using a protoboard and so a lot of my wiring if off the board. As far as I can tell there is nothing horrendous in my electrical construction and I'm a bit surprised this has become an issue.
I have one protoboard left but feel I must work out what to do to protect it before re wiring.
Graham
I found a recent post by Paul Baker on the likely causes and how to avoid them. One thing that struck me was that I was powering the demoboard from a wall wart and the stepper motors from a 12v 5A switchmode supply. I had the two plugged into the same "dado" in the lab but quite a way apart. The wiring in my box was bothering me too, not very neat at all as it was a bit of a rush job.
So I rewired box from scratch, now the protoboard, LCD screen and steppers are powered from the same 12v supply. The master switch switches power to the protoboard and screen, then a second switch can be used to power up the stepper motors. After some checks I powered up the unit, protoboard worked fine outputting video to screen as normal, then I turned on the steppers; the propeller rebooted but still worked. I repeat the cycle and then nothing. PLL blown again.
I'm wondering if I have removed some poor practice only to replace it with some more poor practice.
What does worry me is that much of the advice in Paul's post concerned PCB design, I'm using a protoboard and so a lot of my wiring if off the board. As far as I can tell there is nothing horrendous in my electrical construction and I'm a bit surprised this has become an issue.
I have one protoboard left but feel I must work out what to do to protect it before re wiring.
Graham
Comments
It should be quite easy to replace the Propeller, if you know what you are doing. ChipQuik and a good soldering iron is the best way to do it.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The positive is switched at the front of the box, I doubled up the wires for these connections. Again each drive has a seperate wire for its positive supply.
Graham
Graham
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
These are the drives:
www.imshome.com/Product%20Manual%20PDF/im483.pdf
I am using 0.25mm^2 wire, doubled up until it splits to the drives. The signal and power are not bundled together.
I doubt the problem is being caused by the step direction signals due to the optoisolators so I suppose that leaves the supply lines. Ground loops are mentioned a lot, I understand what these are, two points that should be of the same potential are not due to voltage drops etc but is the essential cause of a PLL failure that the supply to the propeller has become greater than is should be? Can this be caused just as easily by a high spike on the positive line than a low spike on the ground?
Ground loop is just a pair of words to be, I'm trying to understand what is actually happening when the PLL blows, it it just about current entering the ground?
Graham
You can get voltages above 4V several ways:
1) Connecting Vdd/Vss to the wrong supply voltage
2) Connecting an I/O pin to a voltage more than 0.6V above Vdd or more than 0.6V negative (to Vss). This causes conduction of the "protective" diodes on the I/O pins and, due to resistance of the traces (conductors) on the chip, can cause local increases in the power bus voltages on the chip to where something breaks.
3) Noise induced in the Vdd supply to the chip can temporarily raise the supply voltage. A 0.7V noise spike induced in the Vdd supply wiring will exceed the absolute maximum supply voltage (3.3V + 0.7V=4.0V).
4) Noise induced in the Vss supply to the chip can temporarily raise the supply voltage. A 0.7V negative spike induced in the ground supply wiring will exceed the absolute maximum supply voltage. The ground becomes -0.7V and the normal 3.3V supply now becomes 4.0V with respect to the effective ground at the Propeller chip.
A ground loop is really a manifestation of electrical resistance in ground circuitry. If I connect a power source to a motor through a wire with 1/100 Ohm resistance and the motor draws a maximum of 10A of current, there will be a voltage drop across that wire of 0.1V. Let's say that wire is used for both the ground lead and the + power lead to the motor. Let's also put a 3.3V regulator across the power supply at the motor and power some logic from that, but the ground connection for that logic is connected to the other end of the wire. The regulator is producing a 3.3V output relative to the power at the motor, but there's a voltage drop across the wire. Relative to the power source, the output of the regulator is usually 3.3V, but may become 3.4V when the motor is drawing its maximum current. If there's a poor connection in the ground leads so it occasionally has a resistance of 1/20 Ohm, we can sometimes get a peak voltage drop in the ground lead of 0.5V. The motor won't notice that, but the logic will see a supply voltage of 3.8V, dangerously close to the point where damage can occur.
To prevent this sort of thing, you have to do what you've done, split the ground lines for the high current and low current devices and attach them together at a single point, usually where the power comes in. It sounds like you're doing the proper things, but you're still blowing chips. I would go over everything, compare how things are physically connected with what you think you have. Often there's a discrepancy and that's what's causing your problems.
You mentioned a common ground for the controller and motors. This may or may not be the source of your trouble, but I would highly recommend separate ground leads, joined outside the box at their source. Any voltage transients due to motor currents in the common ground lead will be felt at the Propeller and could cause trouble.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Something I didn't mention because I didn't want to confuse matters is that once the power enters the box it goes to a bridge rectifier, this acts to prevent reverse polarity problems with my non polarized plugs.
Everything is connected to the output of the rectifier, could this be a potential cause of the ground dropping with high current?
Graham
I did another little test this afternoon, I just kept an eye on the LCD screen when I powered up the stepper drives, there was a definate flash. I should be able to use this as an indicator on the effectiveness of changes to layout etc. At least if I can get rid of it I will feel more confident.
Graham
Cheers,
Graham
Graham
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
To Leon, I was meaning transient when I said noise my error.
Graham
Graham
For some irritating reason, MANY stepper drives expect sinking outputs to drive their inputs. Glance at page 41 of that drive manual pdf. Is this the circuit you were expecting to see? Because if these "inputs" are connected directly to the propeller's output pins, they are going to want to pull them up to 5 Volts (5V flows quite easily through the 470 ohm resistor and the LED)!
However. The ULN2803 could be one of many answers, but the answer it provides is not due to the internal diode. The ULN2803 is going to PULL DOWN the drive's inputs, just like it needs to. Again, the +5V is going to the anode of the LED through a resistor, and you've got to go pull low (sink the current) if you want to turn it on. This is the non-thinking, it will definitely work, solution.
On page 45, The TTL interface (Figure 7.8) requires many things to go right, and to me it's abuse of a gate. Figure 7.7 is really what's happening. Then again, figure 7.7 doesn't show the base resistor, so even then it's not entirely correct, but whatever, it's close enough to the concept.
I'm still enraged from a week ago where I was chasing these "phantom grounds" people like to bring up, on a variable frequency drive. It turns out my program was correct (30 some odd machines were built the same way in years past), the drive parameters were correct, the wiring was correct, but there were two bad, new out of box motors with shorted windings.
It's the simple things sometimes, really.
Graham