Arduino Current Sensor Project

With this project, we are going to be working with a less popular sensor that we have been so far: the current sensor.

A current sensor can be super useful to monitor the amount of current that flows into a motor, for example, this can help avoid overloading your motor when it is in use and at the same time help preserve the motor from burning. You can also use a current sensor to calculate the energy consumption of a circuit.

The name of the sensor we are going to use here is ACS712.

Let’s get started.

Parts needed

It is very useful to have jumper wires with alligator clips to make the connection of the motor to the battery easy.

We will also need some male to female cables to connect the display and the sensor to the Arduino.  There are no pins connected to the digital side of Arduino. We used one analog pin, SDA and SCL for the I2C communication with the display.

Keep in mind that on the schematic, the blue cables are GND and the red cables are VCC (5V).

The 9V battery is for illustration purposes only, you can use any different battery as long as it fits with your the parameters of your motor.

When you are done connecting, upload the following code to the Arduino board.

To make our readings more reliable, we used the for loop to read the output of the sensor multiple times then output the average value. We’ve also subtracted 0.15 from the readings to serve as an error correction, thanks to this we have 0.00A when the current is not flowing through the circuit. You can see the result on the LCD but also on the serial monitor.

As you can see in the video below, I am trying to stop the shaft of the motor with my fingers and as a result of this, the current is increasing which is normal. You can also try working with a bigger motor or even building an Arduino current meter for your workshop.

That’s all for this Arduino project. Waiting to hear from you in the comment section below!

You might also like:

Leave a Comment