No common GND connection?
From spec sheet:Supply voltage: 2.5 V to 5.5 VYou are providing the voltage of 6 AA batteries, around 9V. So it is too high. If you have a 3-AA battery pack, it will work. Or if you connect the power to arduino 5V directly.
Quote from: pwillard on Aug 02, 2011, 03:02 pmNo common GND connection?Did not catch that.So OP, why do you want to power this sensor with a separate battery from arduino?
"What I kinda need is a reverse MOSFET - where power can flow freely between drain and source, but while power is flowing, the gate pin outputs a 1. When power is not flowing, it outputs a 0."How about a PNP transister?
Replace motor/diode with LED.The other - how about measuring voltage across a shunt resister? If need a high/low signal instead, then run the voltage into + input of a comparator, -input from a trimpot between +5 & Gnd, will get a high out when shunt voltage exceeds trim pot. Amplify the shunt voltage with an op amp if need larger comparison range.http://www.dipmicro.com/store/index.php?searchStr=shunt&act=viewCat&Submit=Search
Resisters on the gate are not critical, MOSFET input is voltage driven, not current. Mostly they ensure the part is off when arduino starts up & inputs, are, well, inputs, and levels are floating. Current limit resister for the LED is important. Make sure to select a logic level MOSFET.
Shunt - how low do you want it? Needs to have some resistance, or else no workable voltage is developed to make a measurement on.5A thru a 10mOhm shunt is only going to develop 50mV. How much current are you expecting?
MOSFET looks good. 1K, 10K, not critical. Voltage at the MOSFET Gate will be 0/5V from the arduino. Could be as low as 180 ohm with series resister between arduino & gate and will still work.
You've got so many pieces now I can't keep track. Can you post a complete diagram and show where you want to get 0/1 indication from?
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16