Hi Tarak,
I use MB02's as well, I'm guessing you must be an Aussie whereas I'm Kiwi, either way Homan Designs is 'local'. In fact that's how I came
to suggest putting a diode in the circuit, I've blown the input buffer for just one pin on one of my MB02s. MB02s DO NOT accommodate
being reverse biased....nor are you doing yourself any favours by demanding that IOs either deliver or sink a great deal of current.
Depending on the actual IO MB02s are good for 24-32mA source and about the same sink. I personally like to keep it to 5mA or less. Having said that
I don't like to overload IO neither do I like it to loaf. In the example above I used a 5K resistor as pull-down, ie 1mA. I could have used a much
higher resistance, say 100k but the pull-down current would only be 50uA and therefore be subject to noise.
As garyhlucas has said the robustness of relays and the moderate voltages and currents used in such designs can prove to be a much better
performer in noisy environments compared to micro-power low voltage signals.
Craig