Microcontroller systems can be implemented to measure capacitance by using 3 ways: (1) using an RC or LC relaxation oscillator ( and values are known), measuring the output frequency, and calculating capacitance using resonance frequency equations (2) using RC Monostable-MV value known), measure pulse width, and calculating capacitance using pulse width equation and (3) using a capacitor charging system in RC-series circuit with a stable DC voltage source, measuring the charging time until the capacitor voltage reaches a certain value, and calculating capacitance using the charging equation of the capacitor [6-9]. The accuracy of the capacitance measurement by measuring the charging time can be increased using Arduino M0 which has a 12-bit ADC .
2. Methods and Equipment
The RC charging circuit is realized using a DC voltage source, resistor, and capacitor connected in series as shown in Figure 1 . When the switch is closed, current flows from the voltage source through resistors and capacitors so that equations (1) to (3).
(3) The capacitor voltage can be calculated using equation (4). If the values of , VS, and (the charging time of VC(t) to ) is known, then capacitance can be calculated using equations (5) to (7) .
Description of the capacitance measurement system
The capacitance measuring system (Figure 2) was built using the concept of charging a capacitor in an RC-series circuit that is controlled by Arduino M0 using pinMode and digitalWrite Before the charging cycle, the voltage is emptied through which is connected to the ground through a digital pin 6. charging cycle is done through which is connected to a voltage of 3.3 Volts via digital pin 7. charging time from to is calculated using the micros function and then the capacitance can be calculated (equation 7) and displayed to the ERM20004FB-2 LCD with -serial module. The pseudo-code of the Arduino M0-based capacitance measuring system uses the concept of charging capacitors in the RC-series circuit as described below:
• discharging until Volts,
• charging and save time (t1),
• stop charging when the ADC ,
• save time (t2),
• calculate and using equation 7,
• show and values to LCD, and
• repeat step 1.
is set at 100Ohm1% to get a fast discharge time when connected with maximum and determined at 89. 7MOhm (9 resistors in series) to get minimum when connected to minimum . Level data converter module Volt to 5Volt) is used to connect SDA and SCL signals from Arduino M0 to char LCD boards (with -serial module). Capacitor measurement system has been successfully created (Figure 3, not calibrated, and has been tested to measure the capacitance of 14 ceramis-disks capacitors alternately using GWinstek LCR-821 (5 times each) and the results are shown in Table 1. Sketch ofthe system is created using Arduino IDE ver. 1.9.0-Beta and written in the following paragraph:
measurement results (columns 2 and 4 in Table 1) are the average of 5 measurements using LCR- 821 and using capacitance measuring system. The % error (column 8) value is calculated using equation (8).
Referring to equation (7), there are 2 variables that affect the measurement results of capacitance: (1) stability of the ; and (2) stability of the . Because is generated from the function of micros which has a resolution  so that it is assumed that it does not affect the measurement results, the change in the value will cause a change in the value of the measurement. If the value rises, then the measurement value will decrease and vice versa. The average
value is with standard deviation 121 (measured 5 times using LCR-821, so it can be concluded that there is a correlation between the % error value of the measurement ofthe capacitance measuring system and the instability of the value.
An Arduino-based capacitance measuring system uses the technique of calculating the charging time of the capacitor voltage in the RC-series circuit has been successfully made to measure the capacitance of 14 ceramic-disk capacitors with a measurement error rate 0.7% (compared to LCR- 821.
This capacitance measurement system research can be completed with research funds from the Faculty of Engineering, Universitas Negeri Jakarta (based on PPK Decree Faculty of Engineering, Universitas Negeri Jakarta, number 461.a/SP/20l8- May 23, 2018.
The researchers thanked many colleagues in the Laboratory of Instrument & Control of the Faculty of Engineering, Universitas Negeri Jakarta for their contributions and support for this research. The researcher also thanked all the reviewers who provided valuable input and helped complete this article.