LinkIt One - Voltmeter

Introduction: LinkIt One - Voltmeter

A voltmeter is a major requirement if you deal with electronics, and sometimes it is hard to measure voltages if your are enclosing it or need to just wirelessly monitor the voltages. So a solution to that is to integrate a micro-controller to do all the readings for you.

So in this instructable I'm going to show you how to convert the Linkit One into a voltmeter, that can measure voltages from 0V-30V.

Step 1: Requirements

Here is a list of components required for this instructable...

  • LinkIt One
  • Battery
  • Breadboard
  • Jumper wires
  • 10K Resistor
  • 100K Resistor

Once you have all the parts its is time to get started...

Step 2: Circuit

The circuit is a simple voltage divider circuit. It contains two resistors, one of 10K and the other of 100K. So with the values used in the voltage divider it is possible to feed in a input of 0V - 55V which would give a voltage of around 5V at the analog pins, but to be on a safer side it the voltage should be limited to 30V which is 2.7V at the analog pin.

This circuit can be assembled on a bread board and hence no soldering requirements are needed.

Step 3: Code

The code can be found below you will need an Arduino IDE with the LinkIt One plugin to upload the code to the board. The voltage range of the board can be changed by modifying the code. Make sure you choose the right port while uploading the code.

int analogInput = 0;
float vout = 0.0; float vin = 0.0; float R1 = 100000.0; // resistance of R1 (100K) -see text! float R2 = 10000.0; // resistance of R2 (10K) - see text! int value = 0; void setup(){ pinMode(analogInput, INPUT); Serial.begin(9600); } void loop(){ // read the value at analog input value = analogRead(analogInput); vout = (value * 5.0) / 1024.0; // see text vin = vout / (R2/(R1+R2)); if (vin<0.09) { vin=0.0;//statement to quash undesired reading ! } Serial.print("\t Voltage = "); Serial.print(vin); }

Step 4: Testing

The code currently outputs the voltage to be displayed on a serial monitor so it can be viewed on a computer. So you need to open the LinkIt One debugging port using the Arduino IDE or Putty. Make sure the baud rate is set to 9600. Hope you had fun, feel free to leave a comment if you encountered any problems while assembling the project.

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020