Don't turn on D7 and D8 at the same time. I would put a 100-330 ohm resistor at D12 and D13 to protect the pins from gate capacitance discharge. The FETs should probably go below the 12K resistors, since the 2N7000 is a low-side switcher and you're kind of using them as high-side switching. Your FET drain and source pins are reversed, source goes to more negative. And put a 10K resistor from the switching pin to the FET source. You can change your resistor values to get a more accurate reading, right now you have about divide-by-9?
Before risking a microcontroller (Arduino) I would wire it up without the micro and do the switching with a jumper wire to 5V/ground.
Use two analog inputs in differential mode, and forget about the fancy switching on/off the batteries.
If there may be a common ground, make sure the negative pole of one of the batteries goes to one of the analog inputs, the mid point of the voltage divider to the other input, and the top of the voltage divider to the positive pole.
For more stable readings: bring down the voltage to read to <1.1V, and use the 1.1V internal analog reference. Do calibrate this for your particular Arduino as there's a 10% tolerance in the actual value of this 1.1V.
grichfitz:
Hello,
I am fairly new to electronics, although I understand a fair bit, so far!
I´m wondering if someone could take a look at this and see if this is feasible. I will test myself when I get the parts, but the current situation is slowing delivery times.
My goal, is to read battery voltages from 2 different batteries. They may not be sharing a common ground, if they do not, I do not want a common ground. They will also be 12v and/or 24v. So I will need voltage dividers to reduce the voltage to be read on the Arduino.
Do you think this will work? Are my components correct?
My programming will be as such...
Activate D07
Activate D12
Take reading at A01
Deactive D07 and D12
Massive TIA... Love the forum very useful!!
While I get the drift of what you are doing I don't understand how you are doing it?
On the issue of grounds all of the Arduino inputs are single common ground. I see where you are trying to use MOSFETs (incidently consider the Ron (Resistance On) but a more viable solution might be to just use an ADS1115 with your Arduino.
This gives you two programmable gain differential input channels. That or do as wvmarie suggested and use four AI channels and configure for differential measurement. The MOSFET you are using is not a logic level MOSFET and has a high Ron to begin with.
No because the top two FETs don't have there sources at ground and thus won't switch reliably.
I suggest using relays because it will be much easier to get this right with a simple circuit for two batteries that
are at some defined relative potential. And note what I said about the Arduino floating.