I am trying to make ohm meter by Arduino Mega. The range of resistance I need to measure is around 5 - 120 Ohm. You can see the values of the resistance on the attached picture.
I went through several articles talked about the analog readings by Arduino controller, However, I did get a clear idea about safety issues to Arduino board when using low values resistors in series with the unknown value from the diagram due to the current flow. When I use high value resistor (1Kohm or above), I lose the resolution that I can measure through the analog input.
Mega outputs can handle 20mA continuously and 40mA for a short time. That means a load of 250 (270) or 125 (120) Ohm will be acceptable. Then use Ohm's law to calculate the resistance from the measured voltages on the voltage divider (total and divided). Measuring the total voltage is required due to the output pin resistance, of typically 20 Ohm.
You can use a constant current source for higher current and consequently higher load voltage.
For inductive loads add a freewheel diode across the load.
All those loads are inductive, and if you are measuring multiple loads at the same time the process could be more complex.
The voltage that will be generated by the coils when the current is disconnected can be quite high. Often enough for you to "feel" a very noticeable shock.
So you need to protect the Arduino input for voltage spikes in excess of 200V (spike will be short but can run to quite high voltages.
Assuming you would like to be able to measure to something smaller than 1 ohm, you need to put enough current into a 5 ohm resistance to read enough counts on the A/D to meet his goal.
Here are calculations for a 240 ohm series resistor and 120 ohms series resistor:
Actually, I made simple voltage divider first to measure different values of resistances ranged between 5 - 100 ohm, through multiplexer since I need to measure 30 resistances continuously, and I have only 5 analog inputs available. I attached the circuit I used.
The results on serial monitor were fair enough with an error around 5% only compared with typical multimeter results.
But as you said the loads I want to measure are inductive, so the flywheel diode will be enough to protect the Arduino input?
Moreover, as there are 30 resistances the current drawn will be high if I measured them instantaneously, so your suggested circuit will be good to control the measurement one-by-one by MOSFET, then no high current will be drawn.
the accuracy up to 90% will be fair, and I got it using a series resistance of 120 with the required measured resistances between 5 - 100 ohm.
I am going to use MOSFET to control the current drawn by each resistance one-by-one, since I need to measure 30 resistances continuously. so, I could avoid the too much current drawn if I measured the 30 resistances instantaneously.
R2 limits the current to D1 when a spike comes in from the device under test (DUT)
C1 and D1 absorb any spike voltage
R1 limits any current into the mux if the TVS exceeds 5V.
Conservative = yes. If you want to simplify you could probably eliminate R2 since the current from the coil cannot be larger than your test current.
IMPORTANT: It is usually best to have the DUT connected to ground and your input. Instead of your input and 5V.
I am making a tester device as John said for a machine that is a part of aircraft engine. All these coils are used to control different valves and actuators.
the maximum current of Arduino by regulator is only 1 amp, However, the resistances that will be measured are relatively low, so it will draw high current with all these resistances. So, I will use MOSFET to supply each resistor one-by-one for measurements.
I do not have a device to measure those inductances, but I am going to look for a method to measure it.
I just have one question, why the DUT should be connected to GND instead to 5V?
Because when I swept them, the output voltage to the input becomes too small because the DUT is relatively small (below 50 ohms), hence I might loss some resolution of readings.