For the past couple of weeks, I’ve been leisurely debugging the puzzle box printed circuit board that I’ve designed. First I discovered that I’d used the wrong pins to communicate with the GPS chip, which required cutting a couple of traces and running jumpers, and then I discovered that I’d improperly put a 10k resister between the contrast trimmer and ground, when it should have been between Vcc and the trimmer.
For the LCD display I’m using, the GDM1602K from Xiamen Ocular, you need provide a Contrast Adjustment voltage on pin 3. In the data sheet, they show a trimmer with a range from 10k to 20k with the wiper going to V0, pin 3. Of course, manufacturers don’t make 10k – 20k trimmers, what you do is use a 10k resister and a 10k trimmer to produce the desired effect. Essentially, the 10k resistor and the trimmer create a voltage divider that limits the V0 voltage to values from zero to 2.5V.
When I designed the board, I erroneously put the resistor on the ground side, which meant that V0 was between 2.5 and 5V, not exactly what I had in mind.
I eventually spotted the problem, but before I was going to make more mods to my board, I wanted to test my ideas to be sure. (I’m still new at this stuff, but it strikes me that you should always test your fixes before implementing them, if possible.)
I stuck the LCD display on a breadboard, then wired it up to the PCB using all the lines except for the contrast adjustment. First, I rigged it up as it was on the board, to confirm the problem. Then I rigged up the proposed fix, moving the resistor to the correct location. That worked!
Next I had to figure out how to modify the board. The resistor that I’d misplaced was in an inconvenient location. A more experienced hacker might have removed it, but I decided my best bet was to just jumper over it. I used some pre-tinned bus wire which is great for this kind of thing. I worked one end under the lead on one side of the resistor, and the other end under the other lead, looped them a couple of times and tightened, then soldered. Next, I cut the trace that led from the positive power supply to the trimmer and made sure the gap was wide enough it wouldn’t easily bridge. Then I scraped the green masking off the powered end of the break to provide a place where I could solder the new 10k resistor. I soldered the new resistor to the makeshift pad and to the leg of the 10k trimmer.
After the solder cooled, it was time for a test. I plugged everything back together and tried it and … it didn’t work. I still couldn’t see text on the display. I was not happy.
Today I took it up again and checked everything I could check, resistances and such, with the device off. Then I checked voltages with the board powered. That gave me some bizarre results. I found that there was still 10k worth of resistance between the bottom leg of the trimmer and ground. Something had to be wrong somewhere.
I went back to my test fixture and verified all the voltages and resistances with the LCD working correctly. No sign of the mysterious 10k.
Most of you with any experience have already deduced that I had a bad solder joint somewhere. They can be very difficult to track down. I wouldn’t have done it nearly as quickly without the help of my friend Marco who coached me over the phone.
It turned out that I never really soldered one end of the jumper that bypassed the 10k resistor that was in the wrong place, between the trimmer and ground. It only took a couple of minutes to fix once I’d found it.
Now I’m about half-way through debugging my board. Next step is the GPS chip.