Shop OBEX P1 Docs P2 Docs Learn Events
PWM Voltage vs PWM Signal on XBee's RSSI Output — Parallax Forums

PWM Voltage vs PWM Signal on XBee's RSSI Output

kf4ixmkf4ixm Posts: 529
edited 2011-01-12 05:26 in Accessories
Reading the text in the new "Getting Started with XBee Modules" Chapter 3, page 39 states at the bottom of the page...
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.

As i started reading this and seen the mention about pwm being output in the rssi pin, i kept having this idea in the back of my head about a signal strength meter for XBee's using this pwm output to control a pointer mounted to a servo to replicate a analog meter-style of signal strength display... then i read that. (proverbial bubble popped)

I understand that PWM controlled voltage is that the voltage level is proportionate to the pwm signal, my question is, is there a simple way to convert this to a pwm signal that can be read/used by a servo, or would polling the xbee with at commands then using that value to calculate a pwm signal to be sent to a servo, which kinda nulls and voids my idea of a simple signal strength display.

Any thoughts on this?

Just a thought, could the pwm rssi output be connected to the base of a transistor then the emitter side of the transistor to the signal line of the servo suffice for signal conditioning? maybe using two, (a npn feeding the base of a pnp)?

Comments

  • Mike GMike G Posts: 2,702
    edited 2011-01-11 10:18
    Why not use A/D? Then you can do whatever with the digital output.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-01-11 10:47
    Voltage to PWM ckt (attached)
    469 x 143 - 7K
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2011-01-11 11:46
    It would lot be a simple task to convert the RSSI voltage PWM to a servo signal PWM of 1-2mS with 20mSec delay.

    As mentioned, it is fairly easy to convert to a voltage by filtering, the you can use the DC voltage for metering or such. Chapter 6 on API mode has a bit more, including a filter circuit for PWM, though you probably may want to follow it up with a op-amp buffer to prevent dragging down the signal.

    -Martin Hebel
  • kf4ixmkf4ixm Posts: 529
    edited 2011-01-11 12:01
    Thanks for the responses. i know there would be other, and better ways to do this, it's just the brainstormer in me, when i seen the pwm output for the rssi, i just got to thinking of how cool it would be to directly drive a servo from that signal/pin alone without external, or very minimum, components for an old-school type of feedback device, like an analog meter/pointer. thanks PJ for the example, and to all for your input.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-01-11 16:01
    OK
    Here's another thought then.
    The RSSI is a fixed pulse-length, varying rate PWM, like the PWM output of a Stamp. So, if you can count those pulses, or a sample of them, in time enough to consequently effect a servo pulse routine then you're on.
  • Martin HebelMartin Hebel Posts: 1,239
    edited 2011-01-11 19:13
    Actually, with PWM for voltage control, the rate remains the same - constant frequency. The duty cycle, or the time high to low varies. It could be possible to read the pulse width using PULSIN, but I believe it is very quick and resolution with the BS2 would be poor. Besides, if using the controller as mentioned, you can simply do the ATBD instruction to read RSSI.

    -Martin
  • FranklinFranklin Posts: 4,747
    edited 2011-01-11 20:57
    Why not just measure the voltage with an analog voltmeter rather that converting the analog voltage to a digital signal and then converting that to a PWM string to feed to a servo to simulate an analog voltmeter?
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-01-12 04:53
    Well, the "Getting Started..." pdf link has disappeared since yesterday. I was cursorily reading (glossing over) the material online and my understanding was that the RSSI wasn't based on real PWM (varying duty vs constant rate), but the ersatz/parallax/FM'y sort. No telling, now.
    Anyway, the RSSI output or the rate/duty it's based on should be stable enough to make this servo-meter thing happen, not some super n-th degree of the gnat's hiney exercise in resolution/metrology. Cripes. Much ado about nothing.
  • kf4ixmkf4ixm Posts: 529
    edited 2011-01-12 05:26
    Thanks for all the replies folks! i was mainly curious/seeking other peoples input on the idea of using the rssi output to drive the servo directly, i guess the coolness factor, not that it would be feasible to do or anything like that. if i really was wanting to monitor the rssi, i would parse it directly from the xbee and use the prop to preform the rssi to user interface. i know im not the only one that when they read something like that, that the output is a pwm output, gears start whirling inside my head and start thinking of all the cool things you could do with something like that, my brain just landed on the pwm to servo idea. just an exercise in mental prototyping/exploration i guess. i like to free my mind and wonder 'what if' at times. this was just one of those occasions. no plans to build such a thing or anything. just wanted to stir the proverbial knowledge pile, so to speak. Thanks!
Sign In or Register to comment.