If the first weighing does not balance, all coins that participate in the weighing are still suspects, but the coins in one tray are exonerated of being heavy and the coins in the other are exonerated of being light.
Working inductively, let's first consider some smaller cases.
Case 1: Only two of the twelve coins are still suspects. This takes one weighing. Weigh one of the suspects against one of the other ten coins, which is now trusted. If they don't balance, the suspect on the scale is the counterfeit; otherwise, the other suspect is the counterfeit.
Case 2: Three of the twelve coins are still suspects and two of them are suspected only of being light. This takes one weighting. Put the two that are suspected of being light on the scale. If they don't balance, the counterfeit is the lighter of the two; otherwise the counterfeit is the third suspect.
Case 3: Only four of the twelve coins remain suspects. This takes two weighings. Weigh two of the suspects against two of the now-trusted coins. No matter what happens, you've reduced the problem to Case 1, which takes one more weighing.
Solution: Put four coins on each side of the scale. If they balance, we've reduce the problem to Case 2, which takes two weighings.
If the scale tilts, we now have coins {L1, L2, L3, L4} that are suspected of being light, {H1, H2, H3, and H4} that are suspected of heavy, and {T1,T2,T3,T4} that are now trusted. For the second weighing, put {H1, H2, L1, L2} on the left tray, and {H3, T1, T2, T3} on the right. If the scale tilts left, the suspects are now {H1, H2}, which reduces the problem to Case 1, and if the scale tilts right, the suspects are now {L1, L2, H3}, which reduces the problem to Case 2.
A number of variations on this solution are possible. Chris Hoover's was the most elegant, and forms the basis of the next challenge (Challenge 3). (Chris won the ice cream last week.) None of Chris's weighings depend on the outcomes of previous weighings.
Ethan Twisdale, a Math undergrad, also had an elegant solution that, for the second weighing, "rotates" three coins from Tray 1 to Tray 2, three coins from Tray 2 to the table, and three coins from the table to Tray 1. In the first weighing, {1,2,3,4} are the coins in the left tray, {5,6,7,8} are the coins in the right, and {9,10,11,12} are the coins on the table; in the next weighing {9,10,11,4} are on the left, {1,2,3,8} are on the right, and {5,6,7,12} are on the table.
It is easy to see that any outcome to Ethan's first two weighings either narrows the number of suspects down to at most two (Case 1 above), or else narrows it down to three suspects that cannot be heavy or three heavy suspects that cannot be light, which is just the case of the second weighing in the warmup problem. Like Chris's solution, the placement of coins for his second weighing does not depend on the outcome of the first weighing, but the placement of coins for his third weighing depends on the outcomes for the first two.