# Waveform

## Waveform

### Sine wave&#x20;

รูปคลื่นที่มีลักษณะโค้งมีความถี่ต่อเนื่อง&#x20;

![Sine wave](https://paper-attachments.dropbox.com/s_9D43B161433480F4FEA10620C63FD4CEB522B7FCE9F87DAC0A78DCA5270ECBB4_1600235158004_image.png)

*(อ้างอิง:* [*https://en.wikipedia.org/wiki/Waveform#/media/File:Waveforms.svg*](https://en.wikipedia.org/wiki/Waveform#/media/File:Waveforms.svg)*)* &#x20;

### Square wave&#x20;

รูปคลื่นที่มีลักษณะเป็นรูปสี่เหลี่ยมจัตุรัสมีความถี่ต่อเนื่อง

![Square wave แหล่งมี่มา:  https://en.wikipedia.org/wiki/Waveform#/media/File:Waveforms.svg](https://paper-attachments.dropbox.com/s_9D43B161433480F4FEA10620C63FD4CEB522B7FCE9F87DAC0A78DCA5270ECBB4_1600235338465_image.png)

### Triangular wave&#x20;

รูปคลื่นที่มีลักษณะเป็นรูปสามเหลี่ยมมีความถี่ต่อเนื่อง

![Triangular wave  แหล่งมี่มา:  https://en.wikipedia.org/wiki/Waveform#/media/File:Waveforms.svg](https://paper-attachments.dropbox.com/s_9D43B161433480F4FEA10620C63FD4CEB522B7FCE9F87DAC0A78DCA5270ECBB4_1600235374815_image.png)

### Sawtooth wave &#x20;

รูปคลื่นที่มีลักษณะเป็นฟันเลื่อยมีความถี่ต่อเนื่อง     &#x20;

![Sawtooth wave แหล่งมี่มา:  https://en.wikipedia.org/wiki/Waveform#/media/File:Waveforms.svg](https://paper-attachments.dropbox.com/s_9D43B161433480F4FEA10620C63FD4CEB522B7FCE9F87DAC0A78DCA5270ECBB4_1600330865156_Untitled.png)

## Pulse Width Modulation (PWM)

&#x20;เป็นการสร้างสัญญาณ Square wave ที่สามารถปรับค่าความกว้างของ pulse ได้ โดยการกำหนดค่า %duty cycle เพื่อกำหนดความกว้างของpulse สำหรับค่า PWM ใน Arduino สร้างได้จากการเขียนโปรแกรม โดยกำหนดค่าความกว้างของ pulseได้ตั้งแต่ 0 ถึง 255 ค่า สามารถเทียบเป็นค่า %duty cycle ได้ดังภาพด้านล่าง

![Pulse Width Modulation แหล่งที่มา: https://www.arduino.cc/en/tutorial/PWM](https://paper-attachments.dropbox.com/s_9D43B161433480F4FEA10620C63FD4CEB522B7FCE9F87DAC0A78DCA5270ECBB4_1600250889965_image.png)

## Clock Signal &#x20;

Clock Signal  หรือ สัญญาณนาฬิกาคือ สัญญาณที่มีลักษณะเป็น square wave ที่มีความถี่เท่ากันทั้งสัญญาณหรือเรียกได้ว่าคือ สัญญาณ PWM ที่มี duty cycle 50% นั่นเอง

![Clock Signal ](https://paper-attachments.dropbox.com/s_9D43B161433480F4FEA10620C63FD4CEB522B7FCE9F87DAC0A78DCA5270ECBB4_1600337006680_image.png)

## Function Generator&#x20;

&#x20;      Function Generator หรือ เครื่องกำเนิดสัญญาณไฟฟ้า สามารถสร้างรูปแบบคลื่นสัญญาณแบบต่าง ๆ (Waveform) เพื่อทดลองวงจรที่เกี่ยวข้องกับความถี่ต่าง ๆ เช่น วงจรขยายเสียง วงจรกรองความถี่ วงจรวิทยุ วงจ่ายไฟแบบสวิทชิ่ง เป็นต้น

![Function Generator ](https://1856353139-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MClo3nC-1US0rbK8Qau%2Fuploads%2FrBHVBWWJU7ClDMbruXSR%2Fs_9D43B161433480F4FEA10620C63FD4CEB522B7FCE9F87DAC0A78DCA5270ECBB4_1600238936984_22181.jpg?alt=media\&token=682f0bb6-9db2-495d-a637-b36cd47b719b)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/embedded-systems/resources/basic-hardware-and-firmware/lab1-oscilloscope/waveform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
