Category Archives: Troubleshooting & Debugging

iPad Repair – Quick, Dirty, Improvised

Fade In…

It’s the night of April 25, 2012. I sit in the big easy chair located in one corner of my living room browsing RSS feeds on my iPad and beginning to nod off. Deciding to turn in for the night I get up, switch off the lights, and set my iPad on the kitchen counter before going to lock the front door. No sooner am I two steps from the counter when I hear a thud as my iPad hits the ground.  Lame. I think aloud as I bend over and pick it up. Still bathed in darkness with sleep nibbling at the edge of my consciousness, I power it up and try out a few gestures to make sure everything still works. Everything checks out and I head to bed.

Fade to Black. Cut to this morning…

While waiting to take my girlfriend to the airport before work I open up my iPad with the intent of checking out a few odds and ends on the internet before we leave. Weirdly, the volume notification seemed to be stuck on the screen and nothing I could think off would get it off. Seeing the volume level stuck at the lowest it’s then I notice the dent on the top right corner, right where the volume rocker is. It seems in the fall last night the iPad caught it’s edge on one of the stools next to the counter somehow. As this realization dawned on me I let loose a string of expletives that could peel the paint off of walls and wonder if there’s anyway to fix this without dropping some serious coin. Without time to pursue the matter I head off to work…

 Fade to black…

Hope you enjoyed the melodramatic intro. I find it’s best to picture it in your mind like a film noir while reading it. Anyways, I made an appointment at the closest Apple Store to me when I got into work hoping the fact that the iPad (second gen by the way) was still under warranty would count for something. The dent wasn’t that bad from an aesthetics standpoint and if it occurred literally anywhere else on the device I wouldn’t have cared less. However, the iPad happened to fall and dent itself on one of the few areas that could actually affect functionality making it so I couldn’t ignore the problem. Murphy’s kind of a douche if you ask me.

When I got to the Apple Store they said I was out of luck. The warrant doesn’t cover accidental damage and all they could do was replace it for $250, take it or leave it. After leaving the store and a quick check on my phone for replacement back panels showed iFixit didn’t carry them and one random website sold them for $150. No luck there. Looking at the dent though I couldn’t help but think it was fixable if I sat down and tried. I went back asked the Apple employee if they could possibly let my in back to try but he rejected me. I said I swore I wouldn’t sue if it broke I just needed a small screwdriver. Again I got rejected so I went home full of piss and vinegar to try to tackle the repairs myself.

Looking over one of iFixit’s iPad 2 guides I saw they recommend heating the front panel with a heat gun to soften the glue before removing it and using guitar picks to hold the front panel up as you make your way along the edge. Well I don’t own either of those thing so I had to improvise. Girlfriend’s hairdryer, close enough? Toothpicks, why not? For the actual prying I was going to be doing I used one of the soldering picks I got from RadioShack ages ago.

Turning on the blow dryer I heated the corner of the iPad with the dent for about a minute or so, all the while keeping the nozzle ~1 inch from the iPad. A minute was all I needed to heat the tablet enough to make prying at the edge somewhat easy without using excessive force. Obviously if you’re removing the whole panel it’ll make longer to heat everything. Slowly and very gently I worked my pick into the device and applied pressure on the dent to pop it out. Every now and again I would fiddle with the volume rocker to see if it released at all giving me control over the volume again. When my initial prodding didn’t work I started to feed toothpicks into the crack I was creating to hold it open. I didn’t really have a plan in mind, I was mostly just slowly working on the dent and hoping volume control returned. Finally after ten minutes or so of playing around with various numbers of toothpicks stuck in my device I hit pay dirt. Volume control returned! Slowly with the pick I worked my way down the gap I had opened up and removed the toothpicks one by one.

Apologies for my awesome camera phone photography. It’s all I have to work with. Click a thumbnail to enlarge a picture.

After taking all the toothpicks out and seeing that the fix still worked I looked over my handy work. You can definitely tell the iPad was dented but overall things look good. There’s still a slight gap between the front and back covers which I may seal with some super glue or epoxy later but I’m not sure yet (my apologies to any Apple fanatic whose heart just skipped a beat). The RadioShack soldering pick worked pretty well but it did leave some scratches in the back panel. I would definitely recommend investing in some tools designed to open cases without leaving marks to anyone trying this themselves. I’ll probably wind up ordering some myself once my next paycheck hits just to have on hand. Also the toothpicks worked okay to keep the gap in the panels open but a few of their tips broke off and one may now be inside my iPad. Use them in a bind but invest in some guitar picks or similar item in my opinion.

Was this the greatest fix ever under taken? No, but I did save $250 dollars on a replacement, more if I wanted to upgrade to the new iPad, and I feel pretty damn happy about that. I’m now settling down with a cold beer (see the gallery above) and watching Community. I’ll leave you with this clip of Jeremy Clarkson from Top Gear that totally describes my current mood (0:15 to 0:50 is the most relevant chunk).


Filter Fiasco: Chapter 2

For those of you that missed it, Chapter 1 of this saga can be found here.

We left off with the initial simulations looking peachy keen and me feeling hopeful that the hardware implementation would work. However, as these things usually go, the first time I fired the filter up nothing worked right. From Figure 1 below you can see nothing really met spec other than the response was bandpass shaped.  The center frequency for a single stage was 9 MHz rather than 10 MHz, the attenuation was much less steep then expected, and where the heck did the gain go?

Figure 1: Frequency Response of 1st BPF Stage

Clearly something was wrong and I spent a few days trying to figure out what exactly that was.  Going back to my simulation I started to “beat on it” as one of my professors would say.  I stuck small capacitors to ground (~10 pF) on various nodes to simulate board parasitics and watched the Bode response change. Sure enough, the input nodes to the op amps  were very sensitive to parasitic capacitance and I was able to reproduce the terrible response I was seeing on the spectrum analyzer.  Being somewhat stupid and inexperienced I had unfortunately decided to go against the datasheet’s suggestion on page 20 to remove ground planes from beneath the amplifier.

I didn’t have the option of ordering a new revision of the board so in order to fix the problem I had to get creative.  Eventually I went to ask the director of the surface mount soldering lab if he had any suggestions on the best way to partially remove my unwanted ground plane.  His suggestion, mill it out by hand using the small drill press in the lab.

Figure 2: My Operating Table

With sweaty palms and a beating heart I carefully began to mill out the ground plane beneath each of the three filter stages on my board.  Did I mention that I left the components on while do this? Well I did and the whole time I was working I was terrified that I’d drill straight through an op amp ruining the both the part and the PCB. Probably not the smartest thing I’ve ever done but after a few minutes I emerged victorious. Now to retest the filter and see if it would cooperate.

Figure 3: PCB Bottom Post Drilling

Sadly, things were still pretty crappy the second time around. I forgot to grab a scope capture of the response but it was pretty similar to Figure 1 only the passband was a few dB lower than seen there. It appeared my efforts had been for naught and having exhausted all ideas I could think of I decided to hit the books to see what was really going on in my circuit.

Stay tuned for the Chapter 3 for the stunning conclusion. I promise I will have it out much sooner than it took to get Chapter 2 out.


Filter Fiasco: Chapter 1

One of the circuits I have to design for my thesis is a bandpass filter.  Based off the specs I was presented with back in the early fall a filter with f_center = 100 MHz and Q = 250 was required; plus f_center needed to be tunable without changing Q. Not exactly the easiest design in the world but I studied up on a few topologies and settled on the Dual Amplifier Bandpass filter (pages 5.74 and 5.93).  According to Matlab and some hand calculations a 4th order filter was all I needed.

Figure 1: Dual Amplifier Bandpass Filter Schematic

Cut to Rev. 1 of the board and not a single aspect of the filter met spec or even remotely functioned as a bandpass filter.  Simply scoping the output showed my design self-oscillated around 50 MHz, fantastic.  Adjusting the potentiometer I put in place for R2 merely shifted the frequency of oscillation. No amount of debugging or rework could make the filter behave and according to one of my professors, my use pots in the first place was a recipe for disaster because of high parasitics along with poor overall performance at high frequencies. Another important thing to note was my use of a current feedback amplifier as opposed to a conventional voltage feedback amp  because of the higher bandwidth and slew rate they offer at high frequencies (foreshadowing, this will haunt me later on…).

After discussing things with my advisor we decided our first attempt was too ambitious and to spin a second revision of the board only this time with a few changes in the specs.  Mercifully, having a tunable center frequency was no longer required. It was determined that this feature wasn’t necessary in the prototype stage and that designing a new tuning method would take too much effort, thus preventing me from completing more important aspects of the project.  The center frequency was also dropped to 10 MHz which lowered Q down to 25 giving a much more achievable design.  Refining my Matlab simulations and hand calculations showed that I was actually incorrect on my first attempt (whoops) in regards to the number of stages.  With these new specs I would need a sixth order filter.  I decided to keep using a current feedback amplifier though I changed parts from Rev 1 and picked the THS3202 from TI.

With my first design having crashed and burned I turned to PSpice to see if I could get my design working in simulation before spending time in hardware chasing something that may prove to be a dead end.  Using  Intersil’s AN1613 (mentioned in my last post here) I downloaded the Spice model for the THS3202 from TI’s website, incorporated it into my schematic and began simulating.  I eventually got my filter working and meeting spec with the help of some compensation techniques from other app notes I discovered and got the results below in Figures 2 and 3.

BPF Mag Plot

Figure 2: Magnitude Plot of BPF

BPF Current Pulse Response

Figure 3: Vout of BPF to Current Pulse Input

From these figures everything appears to be in order, there’s a nice bandpass shape to the filter that met spec, a decent response to being hit with a 100 uA current pulse for 30 us, yadda yadda. All that should have been left was to slap it on a PCB and make sure it functioned right?  Stay tuned for Chapter 2 as our story continues…


The Poor Man’s RF Probes

While working on my thesis I often have to measure signals up into 2.45 GHz range be it testing a mixer or determining the transfer function of a filter.  At such high frequencies standard banana jack or alligator clip cables turn into antennas which render any measurements done with them pretty much useless.  I get around this inconvenience by using what the engineers I worked with last summer called “Poor Man’s RF Probes.”  These probes are very easy to use and you can make a pair of your own for $10 assuming you already have shielded BNC to SMA cables and a few SMA billets.  Semi-rigid SMA male to male cables are used to make the probes themselves; here’s a link to the ones that I’m using. There may be cheaper cables out there and if you can find them I’d love to hear about it but in order to make the probes the outer jacket needs to be exposed in order to solder it directly to ground.

To make the probes themselves first cut the semi-rigid cable just below each SMA jack leaving a small amount of shielded cable to strip.  Figure 1 below shows two of the probes I am using at the moment next to an uncut cable and a Digi-Key label for reference.  Each probe is just over an inch long or so giving me enough room to strip the ends and bend the probe as needed while still keeping the overall length short enough to ensure quality measurements.

Figure 1: Semi-Rigid SMA Cable Cut to Length

When stripping the cut cable, I’ve found the easiest way to strip the rigid outer jacket is to use needle nose pliers.  Gripping the end of the jacket with the tip of the pliers and slowly bending it back and forth a few times is usually enough to cause the jacket to break all the way around the cable and you can then just slip it off leaving the center conductor insulator exposed.  The center conductor insulator can be stripped using standard wire strippers (~ 20 Gauge).  The goal is to minimize the amount of exposed center conductor keeping the probe close to the measurement point. I recommend practicing on the unusable  middle portion of the cable that will be left over to get the hang of it before stripping the probes themselves.

Once you get the probes themselves made, figure out where you’re actually placing the probes on your board next. Look for a relatively open area of ground plane close to the pad where you will be measuring from.  Bending the stripped probe slightly is necessary for both a good ground connection and the probe’s mechanical stability.  Note: It’s possible to snap the center conductor from too much bending resulting in a useless probe that will only cause headaches later on so bend with care.

Once you’ve determined where you are going to solder down the probe, use a hobby knife or similar tool and carefully scrape away the solder mask on the ground plane near the measurement site.  Be gentle but firm when scrapping because gouging the board too deeply could short the ground plane to any internal layers that might be in your board.  Figure 2 shows what the site around the input to my filter where I’m placing the probe.  In the picture, I’m placing the conductor of the probe on the unpopulated pad of R2 making use of the 0Ω resistor trick.

My apologies for the so-so photo quality during the remainder of this post; my camera phone only works so well…

Figure 2: Scraped GND Plane Solder Mask Near Probe Site

The third step of the process is to solder down the center conductor of the stripped SMA cable. Usually I’ll tin the pad with a little solder before placing the probe, blob some solder on the iron and while holding the probe in my fingers, tack solder the center pin down (Figure 3).  Note: The probe should be able to stand on its own right now but I wouldn’t move the board or probe too much as you could lift the pad the center conductor is soldered down to.

Figure 3: Tack Soldered Center Conductor

The next to last step is to solder the exposed ground plane to the outer metal jacket of the probe for a solid ground connection.  This will also make the probe mechanically sound so you can now make sure the center conductor is properly soldered down without worry. Note: This step can be done before the previous step if you so choose.  Just don’t be like me and hold the probe with your fingers because if you’re not quick you get burned.  I find this method easier as it make shorting the center conductor to ground less likely.

Figure 4: Soldered Ground Connection

Finally before you can consider yourself done, use a multi-meter and make a quick continuity check. Be sure the center conductor is not shorted to ground and that it is actually connecting to the node you would like it to.  Note: If you have to desolder the probe because of a short or to remove it altogether desolder the center conductor first to avoid lifting the pad.

If you treat these probes with a little care they should last you long enough to justify their cost.  After enough wear and tear though they will become unusable and have to be replaced.  I’ve been using the same two probes for over six months now with no lose in measurement quality and they’ve been removed and resoldered quite a few times.  Before each use however, I do recommend checking the continuity of the center conductor just to be sure it’s still good. Troubleshooting a bad probe isn’t exactly fun and can make you lose your hair when your circuit mysteriously stops working.

Figure 5: Final Probe Placement for Filter Testing


The Value of 0 Ω

I learned the value of 0 Ω resistors while on co-op during the summer and fall of 2008.  My official title was NPI (New Product Introduction) Electrical Intern and I worked in the department in charge of transitioning new products from the R&D stage to production.  My responsibilities included building and documenting the electrical test fixtures that were used out on the production floor to test products at various stages of completion. Being at the end of my second of five years in school, I knew very little about anything at the time, and this being my first real world engineering experience, I was not the one who designed these fixtures.

However, being able to work with the man who did design the circuitry for these fixtures was, I can honestly say, awesome.  Over the six months I worked with him I came to think of his as the Yoda of circuit design. He was an old-time analog guru and I have no idea how long he’s been designing circuits but it seemed like he knew everything. Whenever there was a complex board to test or debug Yoda and I would sit together in his cube,measuring various voltages and what not and he would always patiently explain to me how something worked or why a certain portion of the layout had to be a certain way. I learned a lot from Yoda about design and troubleshooting, but my favorite trick he used was to stick 0 Ω resistors and unpopulated passive component footprints in key areas all over the board.

Figure 1: Example Circuit of Yoda's Techniques

Figure 1 above shows an example circuit containing the techniques I learned from Yoda.  Capacitor C1 and Resistor R3 would be marked NP, for Non-Populated, on the schematic by Yoda indicating to myself that the components were not to be soldered down when building the board.  If, when checking output of the op-amp stage, the output looked a little noisy, placing a capacitor in the feedback path to filter out noise above a certain frequency wouldn’t require a complex rework. The component was simply soldered down on the empty pads and testing could continue.

As testing would go on for the op-amp stage, the empty pads where R3 should be were convenient places to place a multi-meter or oscilloscope probe.  Only after the op-amp was working correctly would I be told to solder a 0 Ω resistor in place for R3 and testing would then continue on down the signal chain.

When it came time to finalize the schematic, if C1 was needed, its value would be inserted into the schematic and the NP marker removed, otherwise it would be deleted.  R3 was typically left in place because if a problem arose with U1 in the future the resistor could simply be tombstoned, thus isolating the op-amp from the rest of the circuit for testing.  This in and of itself was a useful debugging technique for if the problem disappeared after removing R3 then we knew something down the line was affecting the loading on U1 and the op-amp was probably fine.

Another thing I admired Yoda for was that he always came up with multiple circuit blocks to implement a desired function.  The two or three most feasible of these blocks would be placed on the test fixture PCB in parallel with each other and 0 Ω resistors were put in series with their inputs and outputs as shown below in Figure 2.  His most likely choice for that given feature was soldered down first and tested.  Should that block not perform to spec, time was saved because the PCB did not need to be re-spun, just move the 0 Ω’s to an auxiliary block and keep going.

Figure 2: Another Example of Yoda's Techniques

Yoda got away with this because most of the time there wasn’t a tight area requirement for the test fixtures. Placing an extra op-amp or two on the board could be done with only a minimal cost increase.  Typically, electrical components went into a standard sized project box that was machined with the proper holes for connectors and any other mechanical parts and that was about it.  So long as the PCB fit in the box all was good.  This freedom to experiment with new and/or different options for various circuits not only made testing and debugging easier, it also made Yoda a better designer because when it came time to design a new product and its required test fixtures, he already had a sense on what type of circuit might work for a given application.

While these techniques may seem like common sense, I for one am glad I got to learn about them while out in the field. The use of 0 Ω resistors and empty pads in key places are not the type of topics that get covered in core EE courses and I probably would not have learned them otherwise while in school. Currently, I am making great use of these techniques while designing and testing the circuit for my thesis. Having these tricks up my sleeve has been quite handy during the whole process.  Thanks Yoda.