[EN] ESP-IDF Ep.9 : LEDC (PWM) Output

This article discusses the use of the ESP32’s GPIO to output digital signals such as PWM or Pulse Width Modulation or LEDC (LED Control), which enables frequency generation or adjusts the proportion of 1 and 0 states in 1 waveform. Thus, in the absence of the DAC, we can still adjust the average voltage at that pin as needed and it can be applied to control servo motors as well. Therefore, in this article, we will learn how to use PWM and apply it to frequency transmission instead of DAC (from the previous article) and LED dimming using the experimental board as shown in Figure 1.

LEDC / PWM Labs.
(Figure. 1 Our LEDC)
Read More

[EN] ESP-IDF Ep.8 : DAC Output Part 2

This article discusses the use of the ESP32’s GPIO as an analog signal output through the 8-bit DAC module of the ESP32 microcontroller. In this article, we use Cosine wave generation to output the analog signal of the microcontroller through the speaker and show the waveform obtained from the oscilloscope display. The experimental board is still used as shown in Figure 1.

(Figure. 1 Connection and use of DAC examples)
Read More

[EN] ESP-IDF Ep.6 : ADC Input

This article discusses the use of the ESP32’s GPIO as an analog input. By using the voltage input circuit from adjusting values with an adjustable resistor as shown in Figure 1. So, in this article, we will learn how to use the ADC instruction of the ESP32 microcontroller and how to configure the value of ADC in menuconfig.

(Figure. 1 The implementation is illustrated with the example in this article)
Read More

[TH] ESP-IDF Ep.10 : Control the Servo Motor with LEDC.

บทความนี้กล่าวถึงการใช้งานโมดูลเซอร์โวมอเตอร์ด้วยการใช้ GPIO ของ ESP32 ที่นำออกสัญญาณดิจิทัลแบบ PWM หรือ Pulse Width Modulation หรือ LEDC (LED Control) ซึ่งทำให้สามารถสร้างคลื่นความถี่ หรือปรับสัดส่วนของสถานะ 1 และ 0 ใน 1 ลูกคลื่น ที่มีความถี่ 50Hz โดยใช้บอร์ดทดลองดังภาพที่ 1

ภาพที่ 1 การต่อใช้งานประกอบตัวอย่างการใช้งาน LEDC
Read More

[TH] ESP-IDF Ep.9 : LEDC (PWM) Output

บทความนี้กล่าวถึงการใช้งาน GPIO ของ ESP32 เพื่อทำหน้าที่นำออกสัญญาณดิจิทัลแบบ PWM หรือ Pulse Width Modulation หรือ LEDC (LED Control) ซึ่งทำให้สามารถสร้างคลื่นความถี่ หรือปรับสัดส่วนของสถานะ 1 และ 0 ใน 1 ลูกคลื่น ด้วยเหตุนี้ในกรณีที่ไม่มีภาค DAC ผู้เขียนยังคงสามารถปรับค่าเฉลี่ยของแรงดันที่ขานั้นได้ตามที่ต้องการ และสามารถประยุกต์ใช้ในการควบคุมมอเตอร์แบบเซอโวได้อีกด้วย ดังนั้น ในบทความนี้จึงเป็นการเรียนรู้การใช้งาน PWM และประยุกต์เข้ากับการส่งคลื่นความถี่แทน DAC  (จากบทความที่แล้ว) และการหรี่หลอดแอลอีดี โดยใช้บอร์ดทดลองดังภาพที่ 1

LEDC / PWM Labs.
ภาพที่ 1 การต่อใช้งานประกอบตัวอย่างการใช้งาน LEDC
Read More

[TH] ESP-IDF Ep.8 : DAC Output Part 2

บทความนี้กล่าวถึงการใช้งาน GPIO ของ ESP32 เพื่อทำหน้าที่นำออกสัญญาณแอนาล็อกผ่านทางโมดูล DAC ขนาด 8 บิตของไมโครคอนโทรลเลอร์ ESP32 ต่อจากคราวที่แล้ว โดยในบทความนี้เป็นการใช้การสร้างคลื่นแบบ Cosine เพื่อนำออกสัญญาณแอนาล็อกของไมโครคอนโทรลเลอร์ผ่านลำโพง และแสดงให้เห็นรูปของคลื่นที่ได้จากจอแสดงผลของออสซิโลสโคป ส่วนบอร์ดทดลองยังคงใช้ตามภาพที่ 1

ภาพที่ 1 การต่อใช้งานประกอบตัวอย่างการใช้งาน DAC
Read More