[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] MicroPython : PWM

This article discusses the use of PWM or Pulse Width Modulation modules under the machine class of MicroPython for esp8266 and esp32, along with an example of using PWM to dim the brightness of an LED and the generation of audio frequencies with PWM, which can be applied in the future.

Read More

[TH] Arduino: ESP32 PWM.

บทความนี้กล่าวถึงการใช้ PWM (Pulse Width Modulate) ของไมโครคอนโทรลเลอร์ ESP32 ในเฟรมเวิร์ก Arduino หลังจากที่ได้กล่าวถึงการทำงานของส่วนนี้ใน ESP-IDF และ MicroPython ไปแล้ว โดยบทความกล่าวถึงฟังก์ชัน การใช้งาน และตัวอย่างโปรแกรม ด้วยการเชื่อมต่อบอร์ดกับลำโพงดังภาพที่ 1

ภาพที่ 1 บอร์ด esp32G2 ที่ติดตั้งลำโพงแบบบัซเซอร์ไว้ที่ GPIO19
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] MicroPython : PWM

บทความนี้กล่าวถึงการใช้ PWM หรือ Pulse Width Modulation ที่เป็นโมดูลภายใต้คลาส machine ของ MicroPython เพื่อใช้งานกับ esp8266 และ esp32 พร้อมตัวอย่างการใช้ PWM ในการหรี่ความสว่างของหลอดแอลอีดี และการสร้างความถี่เสียงด้วย PWM ซึ่งสามารถนำไปประยุกต์ใช้ได้ต่อไป

Read More