Shop OBEX P1 Docs P2 Docs Learn Events
If Xbee PWM isn't the kind of PWM servos can use, then what kind of PWM is it? — Parallax Forums

If Xbee PWM isn't the kind of PWM servos can use, then what kind of PWM is it?

ElectricAyeElectricAye Posts: 4,561
edited 2012-05-20 15:37 in Accessories
On Page 39 of the Xbee Tutorial, it says:
Note: The XBee PWM is not the same type of PWM used for servos. This is a PWM-controlled voltage level as opposed to a PWM signal.

And I read a little of what people said about that on Google and here:

http://forums.parallax.com/showthread.php?128667-PWM-Voltage-vs-PWM-Signal-on-XBee-s-RSSI-Output

But I'm still confused about what PWM on the Xbee really means. I've always thought of PWM as having the frequency constant but the duty cycle is what varies. So what is this PWM that is not a PWM signal but is instead "a PWM-controlled voltage level"? Does this imply the frequency is variable, too, or somehow erratic? or.... what?

confused.png

Comments

  • FranklinFranklin Posts: 4,747
    edited 2012-05-19 20:39
    A PWM controlled voltage level has no need for a set frequency or width of pulse as long as the total is the correct percentage of the full cycle. Usually there is a device to smooth out the result.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-05-20 07:54
    Franklin wrote: »
    A PWM controlled voltage level has no need for a set frequency or width of pulse as long as the total is the correct percentage of the full cycle. Usually there is a device to smooth out the result.

    Thanks, Franklin.

    So, from your answer, I'm getting the following vibes:

    1. The "PWM" frequency is not constant.
    2. The pulse widths might be changing all the time.
    3. But the integrated value of the "PWM" output could theoretically stay at a constant value provided some sort of integrator is externally attached.
    4. In the case of external LEDs, the integrator is your eyeball.
  • FranklinFranklin Posts: 4,747
    edited 2012-05-20 10:07
    I think your vibes are correct but if the led flickers you might try a cap across the leads. I've done that with those led candels and it softens the transitions.
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2012-05-20 13:22
    ElectricAye,

    What Franklin says is correct. Basically there are three components to PWM ... Time ON, Time OFF, and the rate of repetition. The Time ON versus the Time OFF dictates the duty cycle and establishes a ratio that if integrated through a charge/discharge cycle (resistor/capacitor) will 'average' the voltage proportionally to the applied duty cycle. As long as the duty cycle is kept, the averaged output appears to hold the same value. However it is possible to change the Time ON versus the Time OFF and still maintain the same duty cycle. For example... If the pulse is ON for 20 clock cycles , and then OFF for 40 clock cycles, it would have the same duty cycle as if it were ON for 200 clock cycles and OFF for 400 clock cycles. Both of which would have a 33.3% duty cycle. By changing the Time ON and Time OFF while maintaining the same duty cycle, you are effectively altering the rate or repetition. This may be desirable in a situation where you want any noise that is generated to appear random. If the Time ON versus Time OFF remains fixed it could potentially produce audible noise into the system. That said, it's generally a bad idea to use 'Random Period PWM' to drive a motor, not because of the nature of the PWM , but because the transistor being driven in most cases can't keep up with the short random periods because of internal gate capacitance within the transistor. Consequently the transistor operates in linear mode driving a typically high current inductive load. This can waste a lot of energy in the form of heat across the transistor and potentially destroy the transistor.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2012-05-20 15:37
    ...Basically there are three components to PWM ... Time ON, Time OFF, and the rate of repetition. ....

    Thanks Beau. I see what you're saying. But to me, it seems that the type of PWM the Xbee is providing should have another name. I haven't a clue what it should be called, but this sort of PWM seems very different from what I'm used to thinking about PWM. For example, if somebody told me they were providing an AM radio signal, but then that signal also changed the frequency at which the AM was taking place, I'd have to scratch some part of my anatomy and wonder what the heck were they talking about.
Sign In or Register to comment.