Wednesday, April 4, 2018

The Need for Speed (and stability)

Monday I ordered some 10K 0.5% resistors in the 0402 package. As I ordered them I had the horrible thought that maybe, just maybe, they'd used 0201 packages instead, so I ordered a strip of those too.

When dealing with small SMDs, I've found it very handy to have extras on hand. It's far too easy to lose these things, whether by dropping one or by squeezing the tweezers a bit too hard and having it shoot off like a watermelon seed.

When I got the board under the microscope I thought for a moment that they might have used an 0603 package, as there was plenty of room on the board. Fortunately I have quite a few 10K 0603 resistors on hand. However, by placing an 0603 and an 0402 next to the resistor on the board it became apparent that it was, indeed, an 0402.

What a relief! I've never had to handle an 0201 SMD, and I'm really hoping I never do. I've used coarser-ground pepper on my food.

One note on modifying recently-produced boards: they're all made with ROHS solder. This stuff melts at a higher temperature than the 60/40 Sn/Pb solder I use; as high as 220°C rather than 188°C. I didn't allow for this properly when desoldering the old resistor, and when I tried to lift the resistor one of the PCB pads it was soldered to started lifting too. Fortunately the two separated without tearing the pad and I was able to mount the new resistor without further trouble.

I also mounted a new three-pin header in the provided but unpopulated space to allow selection of the ÷1 divisor in the LTC1799, rather than the default ÷10. Connecting a 5V USB supply and touching a scope probe to the clock output showed a stable 1 MHz signal, as I'd hoped. Strapping it for ÷100 gave what looked like a nice 100 KHz signal, and re-strapping for ÷1 gave what looked like a decent 10 MHz clock.

Bringing the board to my office I connected the logic analyzer pod to the board and observed a 9,990,500-ish clock rate. I say "-ish" because the last 3 digits wandered. However, at no time did the upper 3 digits change, giving an error of about 0.1%. At this point I can't tell whether the error is in the LTC1799's output or the clock in my logic analyzer, which is not laboratory calibrated by any means. Regardless, it's close enough for engineering purposes.

Another advantage to changing from a 3.33 MHz clock to a 10.0 MHz clock is that the baud rate generator divisor error is much smaller. Recall that a UART samples the incoming signal at a multiple of the bit rate to find the leading edge of the START bit. In my case this multiple is 16, so the system clock must be prescaled (divided) to 16x the desired bit rate. Prescaling the 3.33 MHz clock by 22 gave a bit rate error of -1.4% (slow). While not ideal, this would have been acceptable if the system clock was accurate. The 10.0 MHz clock with a prescaler of 65 gives a bit rate error of +0.16 (fast). If the LTC1799 is actually running at 9,990,500-ish Hz, the bit rate error is down around 0.06%.

No comments:

Post a Comment