Introduction: RC Meter Using Tiva Microcontroller
For this project a micro-controller based RC meter is designed and implemented to be portable, accurate, simple to use and relatively cheap to fabricate. It is simple to use and the user can select the mode of the meter easily as either: resistance or capacitance.
The resistance of an unknown component can be measured using voltage divider rule where the unknown component is connected in series with a known resistor. A known voltage (Vcc) is supplied and the voltage drop across it is directly proportional to its resistance. For auto-ranging, 4 JFET circuits are used which compare the unknown resistance voltage and gives the best value.
For capacitance, the time taken to charge a fully discharged capacitor to 0.632 of the supply voltage, VS; is found through the counter in the micro controller and it is divided by the value of the known resistance i.e. 10k to give capacitance. The measured value is displayed on the LCD which gives a floating point value.
Step 1: Hardware and Components
We are gonna use the following components :
1. Microcontroller TM4C123GH6PM
The Cortex-M microcontroller selected for hardware-based programming and interfacing
illustrations is TM4C123 from Texas Instruments. This microcontroller belongs to the high-performance ARM Cortex-M4F based architecture and has a broad set of peripherals integrated.
The liquid crystal display (LCD) is replacing the seven-segment display due to its cost
reductions and being more versatile for displaying alphanumeric characters. More advanced graphics displays are also available now at nominal prices.We are gonna use 16x2 LCD.
3. 2N7000 MOSFET
The 2N7000 is a N-channel, enhancement-mode MOSFETs used for low-power switching
applications, with dierent lead arrangements and current ratings. Packaged in a TO-92 enclosure, 2N7000 is a 60 V device. It can switch 200 mA.
Resistances of 100 ohm, 10kohm, 100kohm, 698kohm are being used for autoranging in Resistance meter and 10k for the circuit in Capacitance meter.
Step 2: PIN CONFIGURATION
The order in which we are gonna attach pins is shown in the figure:
Step 3: WORKING
R meter is designed using the principle of voltage division. It states that The voltage is divided between two series resistors in direct proportion to their resistance.
We have used four MOSFETs circuits that provide switching. Whenever an unknown resistance is to be measured, first of all voltage is measured across the unknown resistance which is common to each of the 4 circuit using voltage divider rule. Now ADC gives the value of voltage across each known resistor and displays it on LCD. Circuit diagram and PCB layout for R meter is shown in figure.
In our circuit we are using 5 control pins of microcontroller i.e PD2, PC7, PC6, PC5 and PC4. These pins are used for give 0 or 3.3V to the corresponding circuit. ADC pin i.e PE2 measures the voltage and LCD displays it on the screen.
For measurement of C we are using the concept of time constant.
There is a simple RC circuit ,the input DC voltage of which is controlled by us i.e by using the pin PD3 of tiva .On which we supply 3.3Volts to the circuit. As soon as we make the pin PD3 output , we start the timer and also start measuring the voltage across the capacitor using Analog to Digital converter ,which is already present in tiva.As soon as the voltage is 63 percent of input (which in our case is 2.0856) , we stop the timer and we stop giving supply to our circuit.Then we measure the time using the counter value and frequency . we are using R of known value i.e 10k ,So now we have time and R we can simply and the value of capacitance using the following formula:
t = RC
Step 4: CODING AND VIDEO
Here are Project codes and the datasheets of the components used.
The project have been coded in Keil Microvision 4. You can download it from the website of Keil 4. For the details of various lines of codes, you are encouraged to go through the datasheet of tiva micro-controller at http://www.ti.com/lit/gpn/tm4c123gh6pm
Step 5: RESULTS
The Results of different values of resistors and capacitors are being showed in the form of tables and their comparsion is also shown in the figure.
Step 6: CONCLUSION
The main objective of this project is to design a microcontroller based LCR meter to measure Inductance, Capacitance and Resistance. The objective was achieved as the meter works and can nd the values for all three components when the button is pushed and the unknown component is connected. The microcontroller will send a signal and measure the response of the components which is converted to a digital form and analyzed using programmed formulae in the microcontroller to give the desired value. The result is sent to the LCD to be displayed.
Step 7: SPECIAL THANKS
Special Thanks to my group members and my Instructor who helped me through this project . I hope you find this instructable interesting. This is Fatima Abbas from UET Signing Off.
Hope to bring some more for you soon. Till then take care :)
Participated in the