Shop OBEX P1 Docs P2 Docs Learn Events
PWM and Variable Pulse Width — Parallax Forums

PWM and Variable Pulse Width

ArchiverArchiver Posts: 46,084
edited 2004-01-08 02:55 in General Discussion
Can someone explain the difference between PWM(Pulse Width
Modulation) and Variable Pulse Width Modulation? I have looked on
google and cannot find clear answers. And is there a way to
interpret Variable Pulse Width with the BSX2?

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-01-07 23:39
    Depending on the frequency and duty cycle, you may be able to use PULSIN
    to measure the high and low portions of an incoming signal, then do your
    analysis.

    +
    + +----
    | | |
    ----+ +
    +

    tOn tOff

    Period = tOn + tOff
    Duty Cycle (%) = tOn * 100 / Period


    -- Jon Williams
    -- Parallax


    Original Message
    From: webboyben [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Fa2hKzeA4QsqNIOH2AbO6zuhTuNZAUsaoi9UXfnpMJx1RJI7dTrZ_A4bi8XHMLJi-rm_ZCAhINC4m2EU]webboyben@h...[/url
    Sent: Wednesday, January 07, 2004 10:34 AM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] PWM and Variable Pulse Width


    Can someone explain the difference between PWM(Pulse Width
    Modulation) and Variable Pulse Width Modulation? I have looked on
    google and cannot find clear answers. And is there a way to
    interpret Variable Pulse Width with the BSX2?



    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject
    and Body of the message will be ignored.


    Yahoo! Groups Links

    To visit your group on the web, go to:
    http://groups.yahoo.com/group/basicstamps/

    To unsubscribe from this group, send an email to:
    basicstamps-unsubscribe@yahoogroups.com

    Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/




    This message has been scanned by WebShield. Please report SPAM to
    abuse@p....
  • ArchiverArchiver Posts: 46,084
    edited 2004-01-08 02:55
    From: "webboyben" <webboyben@h...>

    > Can someone explain the difference between PWM(Pulse Width
    > Modulation) and Variable Pulse Width Modulation?

    "Pulse modulation" in general refers to the creation of an intermittent
    signal. We do this to carry information on the pulse relationships, as in
    telemetry, or to increase the peak radiated power while keeping within a
    limiting average power, as in radars. In a simple telemetry example, we
    might make the pulse length proportional to the temperature a sensor
    detects, while the interval between pulses is made proportional to the
    barometric pressure a different sensor is detecting. In radars, the pulse
    modulation is chosen to enhance the return from targets of interest, to
    improve penetration of areas of precipitation, or to increase the radiated
    power of individual pulses while holding the average power to within the
    equipment limitations.

    The pulse repetition rate would determine whether a Stamp could be used
    without an off-board receiver chip to interpret something like that
    telemetry example. I don't think a BS2sx would handle a very high PRF, but
    something like a temp/pressure sensor pair obviously would not require very
    many transmissions per second. One? Ten at worst? In the radar example, the
    emitted pulses have no intentional intelligence encoded in their
    relationships, so in that application and many others the term "interpret"
    is not meaningful. A Stamp could be used to "interpret" such a pulse train
    as a voltage to which the average power corresponds. You would do that with
    RCtime in general, but I'm not sure I can picture an application.

    The Pulse Width Modulation command used on the stamp uses that general
    principle as a form of digital to analog conversion. Like a miniature
    version of the radar example, the objective is the average power of a long
    train of pulses, not the length of any particular pulse. With any kind of
    capacitance in the load, the effect of a PWM signal is that the load
    perceives the average power, rather than the peaks or the intervals when no
    power at all is transmitted. This gives you a simple way to increase the
    perceived voltage of an output when in fact the Stamp is either providing
    ground or +5V at all times.

    As I remember, the Stamps are coded (in the firmware I mean) to provide
    successive pulses of pseudo-random width with the specified average power.
    This prevents a resonance that otherwise would occur with some loads if the
    Stamp output a steady pulse train with each pulse the same width.

    Gary
Sign In or Register to comment.