Categories
TUTORIALS

Creating a non-invasive current sensor

In this tutorial, we will be setting up a non-invasive current sensor to measure current flow.

Material List

Breadboard Setup

Breadboard Setup Notes

Setting up the non-invasive current sensor requires some modification of the available hardware. Non-invasive current sensors available come with an audio jack head. I found this to be an unnecessarily clunky and fragile addition to the wiring of the current sensor, so I cut off the head and stripped the wires. This allows you to set up the current sensor as shown above.

There is no non-invasive current sensor piece in Fritzing, so here is a picture to show you what your current sensor looks like unclamped. To sense current traveling through a wire, we put the wire through the square hole and clamp the plastic on the left.

Calculations for burden resistor

According to Power Electronics, “A burden resistor connected across the secondary produces an output voltage proportional to the resistor value, based on the amount of current flowing through it.” What this means in English is that its resistance helps converts current readings into voltage following the equation V=IR.

To determine the size of the burden resistor requires a simple math problem:

Burden Resistor (ohms) = (AREF * CT TURNS) / (2.828 * max primary current)

AREF is the Analog Refernce Voltage (in this case, the voltage given by the Arduino which is 5V), CT Turns is the number of turns in the current sensor to give the peak-current in the secondary coil (2000 turns, according to the data sheet), and the max primary current is the current rating of the sensor (100A). So in this case, the burden resistor in ohms would be

Burden Resistor = (5 * 2000)/(2.828 * 100) = 10000/282.8 = 35.4

It is always better to use slightly less resistance, so I opted for a 33 ohm resistor.

Code

The code aspect of a current sensor is easily provided in the EmonLib (click link to download ZIP file of library to add to your libraries in Arduino IDE).

Install the library in your Arduino Library folder and open the example sketch titled “current_only.” If you cannot find it, it is below:

Upload the code to your Arduino. After putting the wire with the current you want to measure through the current sensor, open the Serial Monitor. Apparent power will be on the left, and current sensed will be on the right. You should see that it goes through peaks and valleys like a wave, as this is how currents travel through wires.

Optimizing Readings

There are some simple tricks to get a better current reading:

  1. Measure the current a wire with less insulation: This is why I suggested the optional connection of the 9V battery to the Arduino. The wire used to connect the battery has less insulation and provides a good demonstration of concept.
  2. Make sure your current flows in the same direction as the arrows on the sensor: As the picture below shows, there are arrows on the top of the current sensor. Match the current flow to the direction of these arrows
  3. Put your wire in the middle of the sensor: This may be difficult given the size of your wire, but the closer you can get it to the middle of the clamp, the better the reading will be due to the nature of the electromagnetic coil in the coil’s hardware.

Leave a Reply

Your email address will not be published. Required fields are marked *