SIMPLE CLOUDX OHMMETER WITH LCD CloudX

  • img
Project Details

This tutorial will show you how to make a Digital Ohm Meter using CloudX. 

The ohmmeter is a device that helps us measure the resistance of a resistor. 

So, let’s turn our CloudX into a device that can measure resistance.

This design measures resistance from 1Ω to 1MΩ with an accuracy of ±5% approximately.

To achieve this here are the components we need;

1) CloudX M633 

2) Breadboard

3) 16X2 LCD Display

4) Jumper wires

5) 10Kohm Resistor

6) A Resistor of any Value

 

PICTURE OF CIRCUIT

The Ohmmeter is one of the easiest project that can be achieved with CloudX. With a resistor of known value resistance, you can measure another one by voltage divider principle.

This project also helps to understand basic electronic principles.

 

EXPLANATION OF CIRCUIT AND CODE

The circuit schematic for the CloudX ohmmeter is shown below.

From the circuit above one end of the resistors in series is connected to a 5V source and the other end is hooked to ground. The 5 volts that the CloudX provides is divided between the two resistors with respect to each one’s resistance value. The resistor which holds the greater resistance gets more of the voltage, according to ohm's law formula, V=IR. The voltage that falls across a component is directly proportional to the amount of resistance it contains. Using this principle, we can derive a mathematical formula, based on the voltage division.

To derive this formula we need to understand what the Voltage Divider Circuit is and, in the process, use it to derive our mathematical Model.

Picture of cut- out from the main circuit to show the voltage divider part(expl)aning that, that part is the voltage divider circuit

 

 

 

 

 

This is a Voltage Divider Circuit diagram with two Resistors called R1 (known value) and Rx (unknown value), a 5V voltage supply(Vin) across them to Ground, Vx (Voltage across Rx) and & I (Current).

This circuit allows us measure any range of Resistor value by just slotting it in the Rx Position.

How does the circuit work?

By applying constant Vin and then calculating Vx (Voltage across Rx) & I (Current) value will give the exact Resistance value of Rx.

Here, R1 and Rx are connected in series so the current I, flowing through each resistor is same.

Vin=5V 

 

 

CODE

#include <CloudX/ADC.h>
#include <CloudX/LCD.h>
#include <CloudX/stdlib.h>

#define R1 10000
#define Vin 5 
           
float VoltageReading;         
char  *OhmDisplay;          //  char OhmDisplays[20];


setup(){            
        //setup here           
             Analog_setting();      
             LCD_setting(1,2,3,4,5,6);         
             LCD_cmd(cursorOff);  
             LCD_cmd(clear);           
             LCD_writeText(1,1,"CloudX Ohmmeter");

loop(){         
       //Program here      
          VoltageReading = Analog_read(A0);      
          delayMs(200);    
          VoltageReading = (VoltageReading * Vin) / 1023  ;
          VoltageReading = (VoltageReading * R1) / (Vin - VoltageReading);         
          OhmDisplay =  floatTostr(VoltageReading);    
          delayMs(200);           
          OhmDisplay[6]=0;          
          LCD_writeText(2,1,"Res: ");          
          LCD_writeTextCP(OhmDisplay);         
          delayMs(200);        
          LCD_writeTextCP(" Ohms");          
  }     
       }

 

Hope You enjoyed the Tutorial.

If you have any questions or contributions be sure to place them in the comment section below.

Thanks.

 

Share this with friends