The best idea I've had along those lines is a randomized 5-question quiz at the ballot box, multiple choice, about basic facts. Not anything partisan, just things like "____ is the current Speaker of the House". Get less than 4/5 right, and the machine takes your vote but doesn't count it (and gives no feedback as to whether answers are correct or not).
Nothing obscure, just stuff that's current and nonpartisan. Have a nonpartisan committee set up with, say, 5+ members, and questions have to be accepted unanimously, so any one member can veto (so no chance of political pressure overruling any side). Come up with 15-20 questions, the system generates a randomized 5-question quiz for each user, whether randomly printed on the backs of blank ballots or electronically handled with voting machines; the number of possible questions makes it unlikely anyone would memorize answers, like knowing that the "right code" was BBACD or whatever.
Doesn't really "disenfranchise" anyone, since it's not preventing them from voting, it's just allowing gross ignorance to void their ballot, in the same way that voting for both candidates would.