The temptation is strong to exonerate Judas - judge not lest ye be judged and all that. Who knows what any one of us might have done in that situation. I think there is good reason to doubt that Judas was thinking of trading Christ's life for money for charity. By the time that night on the mount of olives rolled around Judas had already witnessed Jesus defend the woman who anointed him with precious (and expensive) ointment, reminding those present "you will always have the poor with you." So we are either witnessing another level of moral failure on the part of Judas, or something else is at work.
Judas was likely a member of the Zealots, and as such he was eagerly awaiting the day when the messiah would raise an army and purge Israel of Roman occupation and hellenic influence. One might wish to think that he was either trying to force Jesus' hand by turning him over (effectively grabbing the mic at the center of the ring and shouting, "Let's get ready to RUM-BUUUUUUUL!") - or - upon realizing that Jesus was not that kind of messiah he felt betrayed and wanted to exact revenge. And of course scripture also indicates that there may well have been demonic influence at work, begging the question, "did the devil make him do it?" And if the pinnacle of Christ's ministry was to die for the sins of humanity, then didn't Judas get the ball rolling in that whole salvific drama, like the first soldier to fire in a battle-field standoff between two musket-toting battalions.
I guess in the end we can say that, whatever his motives were, Judas was willing to put his own will and desires above those of Jesus, and ultimately, that is what sin is - putting our own will above the will of God, whether it's because we don't understand his will and lack the faith to believe that his will is what is best for us, or because we are directly opposing his will because we find it restrictive or uncomfortable in our limited understanding of freedom. At any rate, when we do that each of us directly participates in creating a chasm between God and humanity that in the end we believe is only undone by the death of Christ on the cross.