Well I'm stumped. I don't think the netduino can measure current directly. You might need something like this that outputs varying voltage:
http://www.sparkfun.com/products/8883
Thats overkill!
You only need a resistor. Calculated by Ohms law.
You need a voltage drop of 3.3 V at 20 mA, and then you just measure the volage over the resistor with the analog input of the Netduino.
165 Ohm at 20 mA gives a drop of 3,3V (max for the Neduino analog input) (U=R*I)
I would select the one closest below 165 Ohm I can find, with 1% accuracy I would take 162 Ohm.
/Jan Olof
- DracoRSA likes this