Has anyone ever tried just using a cheap ($5 for example) bike computer but instead of using the wheels, placing the magnet on the crank arms and then calibrating it to show cadence instead of road speed? I may try this but the computer I use only allows a 1 to 3 mm gap at most and that may be difficult to get down there.
This has been done before in pretty much the manner you're describing (and its basically the same way that a decent number of commercial cadence sensors work, e.g. Garmin GSC10, which attaches a magnet to the pedal arm and uses the same type of sensor at the wheel).
An example of someone doing this is this instructable. Basically, the guy attached a bunch of magnets to the crankset's granny ring equally spaced due to how his meter read out (*), and bolted the sensor to the downtube near there.
The main challenge is getting the readout to be readable on your bike computer and also aligning the magnets + sensor.
That being said, Bontrager among others sell ANT+ cadence+speed sensors for around 30-40 USD, so you might not be saving all that much by using this if you already have an ANT+ phone/bike computer.
(*) Assume the bicycle computer is programmed for a tire circumference c (which will be set within some range of values prescribed by the computer manufacturer). Each time a magnet passes the sensor, the sensor counts 1 circumference of tire worth of distance. by putting n magnets on the granny ring (which is the closest and therefore easiest to trigger the pickup), each revolution of the crankset reads nc distance. By setting the tire size on the computer to satisfy cn*1 rpm= 1 km/h, the readout of the computer in km/h will be the cadence in rpm.
The main problem is that your computer probably won't read past say 100 km/h. So, you can do something like set circumference of tire to satisfy c*n*2 rpm= 1 km/h which would give you half the rpm as a readout, or similar.
You also need the magnets to be spaced far enough apart (or of suitable strength) that the sensor (most likely a reed switch, less likely an inductor or hall effect sensor) can switch on and off to register each of the magnets.