Can we measure a electricity? Embedded System?


Checking if electricity is passing through a wire or not using embedded systems. I want to check if power is there or not. I am new to embedded system. If yes how can I check.

Best Answer

By passing through, I presume current flowing.

If it is voltage you are looking for, the previous answer is an exceptionally excellent one.

There are questions one has to ask before a single answer can be given, as above, it depends on the level of involvement of your circuit in the wire you wish to measure.

Measuring the current in a wire with a resistor:

By adding a small resistor to the line you create a little "dam" where the current gets held up a little. This causes a small voltage drop that you can amplify with an op-amp.

Ohm's law for predicting this voltage is: V = I * R

Where V is the voltage you are measuring, I is the current and R is the resistance. You will need to keep in mind that you are "wasting energy", so with high currents you need a very low resistance, to avoid too high power loss or too much heat.

The power loss can be calculated with: P = I^2 * R

So be sure your resistor can handle P in watts, when you insert I in ampere and R in ohm.

Mesuring the current with no physical intervention:

There are special ways to measure a current in a wire without interfering with the current itself, if you need to. It's a bit more costly and it involves the magnetic effect of current in a wire.

All wires create a magnetic field when a current flows through them.

If your wire conducts AC voltages a simple way is making a signal transformer out of your wire, you loop one or more times through a transformer core (iron, powdered iron or otherwise, depending on frequency) and loop a thin wire on the other side many times. You can now see a small representation of the AC current in the wire in your second winding.

Transformers like these can also be bought outright.

Another way, to measure both AC and DC is what is called a "Hall Effect Current sensor", they measure the minuscule magnetic effect directly and output a voltage representing it, allowing the detection of a DC current as well. I believe Allegro Microsystems makes some affordable types of these.


Be aware that for using a resistor the power flowing through your wire needs to be related to the power of your measurement device, for example they need to share a ground reference. With transformers and hall-effect sensors you are fully isolated from the current, and so they do not need to be related.