I don't know what to tell you...You're story didn't sound like the cops ripped the place apart to find this...It sounded like it was drugs in open view of anyone and the cop just saw it....I don't think the right argument for you to make is that it 'was dirty so we didn't just throw it there when the cops showed up' I think the argument has to be that it was 'not in plan sight and the police had no reasonable cause for search' But i don't even know if that is a valid argument....YOU NEED A LAWYER
But i do know, you aren't going to get anywhere by saying the pill was old and dirty...Now don't get me wrong, i'm not anti-drugs, there is a time and a place for everything....But, you aren't going to find a Judge like me, your judge isn't going to think that some drug addict is going to make sure all his pills are clean and fresh before taking. That argument is just not viable