View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
PWM Signal from SoundCard

3.0 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 1.46 KB File ID: #9366 Version: 1.0
image thumbnail

PWM Signal from SoundCard


Michael Wunder (view profile)


15 Dec 2005 (Updated )

Create a pwm signal using a standard soundcard.

| Watch this File

File Information

PWM Signals are used in a wide area of applications. Examples are a servos used for positioning in electromechanical control design (mechatronic). Here is a simple function that allows to create a pwm signal with a standard soundcard. Parameters are: pulsewidth and time between pulse-starts.

One restriction is that the approach allows duty cycles up to 50% only.

All you need is to add at the output of the soundcard is a resistor as load (1k) and a diode (1N4001). The image enclosed shows the output I got for:

>> PWMSound(1.5e-3,10e-3);

Required Products Data Acquisition Toolbox
MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements standard soundcard, should work on older releases
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
16 Mar 2014 Noé

Noé (view profile)

06 Aug 2008 shanthanu chakravarthy

02 Jun 2008 oldokh tsendayush

i analsysis matlab sinmklif

Comment only
19 Apr 2007 essalhi adil

pwm simulink

Comment only
04 Apr 2007 Oscar Campo

You can obtain different duty cicles by adding this line after the "dat" definition:


Comment only

Contact us