Introduction: Linkit ONE Battery Tester
I would like to share a small project which I wanted to make using the Arduino but could not. So when Instructables sent me the LinkIt ONE, I made it with that instead.
This is very easy to make and requires no external components other than the LinkIt ONE (Except for a battery to test it of course). You can use it to test a AA or AAA battery.
Step 1: Downloading and Uploading the Code
Download the attached code and plug in your LinkIt ONE. Then, select the right COM Port and press the upload button and wait
Step 2: Using the Tester
To test a battery, put its positive side on the pin A0 of LinkIt ONE and the negative side on the LinkIt ONE’s ground pin. It is better to use a battery holder as I have used because when you are connecting wires there is a chance you connect the wrong wire by mistake and reverse the polarity. I have included images of this although it is very easy and even an absolute beginner can do this.
When done, open the serial monitor and there you will either be seeing “The battery is full”, “The battery is just ok” or “The battery is weak”, based on your battery’s condition.
Note: I do not know what happens if you plug in the battery the other way around or use another battery which is rated more than 5 volts, but I can assure you that it will not be good. So keeping these things in mind, make and use this, because I am not responsible for any damage to your LinkIt board
Step 3: Working of the Code
This step is only there for those more technical people, who want to know how I have converted the value read from the analog pin, which ranges from 0 to 1023, to voltages which can be understood by us.
This is because a new AA or AAA cell measures approximately 1.5v, probably more. The LinkIt ONE’s analog input pins (A0, A1, A2) measure up to 5 volts, exceeding that, will damage the pins. So to convert the range which is from 0 to 1023, we will need to divide 5 by 1023, which will give us the value 0.0048.
So this is why in the code, I have multiplied the “readValue” by 0.0048 to give us the voltage level.
Because of this, you may also use a D or C size battery with this but with the condition that the voltage should not exceed 5v as that would damage the LinkIt ONE.
We have a be nice policy.
Please be positive and constructive.