Jurnal ELTEK
Vol 19 No 2 (2021): ELTEK Vol 19 No 2

Unjuk Kerja GPIO, PWM, ADC dan Timer pada Mikrokontroler STM32F103, ESP32S dan ATMega328

Fatkhur Rohman (Politeknik Negeri Malang)
Nurhadi Nurhadi (Unknown)
Mira Esculenta Martawati (Unknown)



Article Info

Publish Date
29 Oct 2021

Abstract

Perangkat embedded system pada masa sekarang memiliki banyak pilihan terhadap jenis mikrokontroler yang sesuai dengan kebutuhan. Hal ini menjadi tantangan tersendiri bagi pengguna ketika diharuskan untuk memilih salah satu jenis mikrokontroler tersebut. Sebagai contoh permasalahan apakah mikrokontroler yang telah dipilih tersebut memiliki sejumlah pin GPIO yang diinginkan, dengan frekuensi switching yang tinggi, berapakah jumlah kanal, resolusi, linieritas dan durasi konversi ADC, bagaimana kemampuan peripheral internal DAC, Timer dan PWM yang bisa dibangkitkan dari mikrokontroler tersebut. Penelitian ini telah membandingkan setidaknya 4 peripheral internal utama yang dimiliki oleh 3 jenis mikrokontroler. Metode yang dilakukan adalah dengan menguji karakteristik GPIO, PWM, TIMER dan ADC pada 3 jenis mikrokontroler yaitu Arduino ATMega328, STM32F103C8 dan ESP32. Eksperiment dilakukan dengan mengevaluasi frekuensi switching digital ouput, mengevaluasi resolusi sinyal hasil konversi ADC, mengevaluasi ketepatan hasil instruksi delay berkaitan dengan timer program dan waktu konversi sinyal DAC semuanya dilakukan pada masing-masing mikrokontroler. Hasil akhir dari penelitian ini menunjukkan, mikrokontroler ESP32 memiliki unjuk kerja GPIO, PWM, TIMER dan ADC terbaik apabila dibandingkan dengan jenis lainnya. Penelitian ini juga membuktikan integrasi FreeRTOS pada Framework Arduino bisa berfungsi dengan optimal meskipun mikrokontroler berjalan pada 2 task yang berbeda di 2 core CPU yang bekerja secara pararel. Frekuensi switching digital output pada ESP32 mampu mencapai 3MHz, waktu konversi ADC hanya 5,7us dan DAC hanya 3,7us. Today's embedded systems have many choices for the type of microcontroller that suits the needs. This is a challenge in itself for users when required to choose one type of microcontroller. For example, the problem of whether the selected microcontroller has the desired number of GPIO pins, with a high switching frequency, what is the number of channels, resolution, linearity, and duration of the ADC conversion, what is the ability of the internal DAC, Timer and PWM peripherals that can be generated from the microcontroller. This study has compared at least 4 main internal peripherals owned by 3 types of microcontrollers. The method used is to test the characteristics of the GPIO, PWM, TIMER, and ADC on 3 types of microcontrollers, namely Arduino ATMega328, STM32F103C8, and ESP32. The experiment was carried out by evaluating the digital output switching frequency, evaluating the signal resolution of the ADC conversion result, evaluating the accuracy of the delay instruction results related to the program timer and DAC signal conversion time, all of which were carried out on each microcontroller. The final results of this study indicate that the ESP32 microcontroller has the best GPIO, PWM, TIMER, and ADC performance when compared to other types. This research also proves that the FreeRTOS integration on the Arduino Framework can function optimally even though the microcontroller runs on 2 different tasks on 2 CPU cores that work in parallel. The digital output switching frequency on the ESP32 is capable of reaching 3MHz, the ADC conversion time is only 5.7us and the DAC is the only 3.7us.

Copyrights © 2021






Journal Info

Abbrev

eltek

Publisher

Subject

Control & Systems Engineering Electrical & Electronics Engineering Energy Engineering

Description

Jurnal ELTEK merupakan media yang diterbitkan oleh Politeknik Negeri Malang sebagai sarana diseminasi dan publikasi artikel hasil penelitian dan artikel konseptual yang dilakukan oleh para peneliti, akademisi, praktisi dan industri di bidang Teknik Elektro. Artikel yang diajukan untuk diterbitkan ...