In testing I’ve seen DB 0x47 give a 78% duty cycle, and DB 0x58 give a 48% duty cycle. I haven’t figured out the relationship from just that data so was hoping to get some more information here.
I am a little confused on your statement as you mention the DB command twice.
For Zigbee enabled devices, the DB value is going to give you the receive signal strength of the last packet received in Hex value.
Sorry I should have been clearer. I’m referring to the RSSI PWM output that can be enabled on Pin 7 of the XBee 3, and how this PWM value relates to the actual DB value.
I’ve found this documentation for the XBee S2C, which has the sort of thing I’m looking for: https://www.digi.com/resources/documentation/Digidocs/90002002/Concepts/c_zb_rssi_pwm.htm
I’m trying to find that same equation of “PWM counts = (A * RSSI_Unsigned) - B” for the XBee 3.
https://www.digi.com/resources/documentation/digidocs/90001539/#reference/r_cmd_rp.htm?Highlight=PWM
Hello.
I am looking for the same equation as @luca_fusion asked for. I read a lot of user guides and couldn’t find anything. Can anyone help me calculate the RSSI based on the PWM duration value, for an XBee 3 Pro (XB3-24Z8ST)?
I would suggest looking at the following:
https://www.digi.com/support/knowledge-base/pwm-rssi-signal-atrp-command-for-analog-rssi-indic
https://www.digi.com/support/knowledge-base/converting-the-xbee-pwm-to-an-analog-voltage-for-d
Keep in mind that the value is based on a Duty cycle. If your Duty cycle is .1sec, and you have the PWM on 50% of the time, that would put the RSSI at the center of the re-portable value.
@mvut , thank you for your reply.
I don’t need to convert the PWM signal to an analog one. I am using an Arduino board to read the PWM duration value and I need to calculate the RSSI. Those links are not helping me, or I do not understand their content properly. Can you be more specific, like give an example?
Thanks.
@Valentin I would suggest looking at page 59 at https://hub.digi.com/dp/path=/support/asset/xtend-vb-pkg-rs232-485-user-guide/
@mvut I looked at the info, but it does not seem right. First, it is for another module type. Then it is written that the total time period of the PWM output is 8.32 ms, and the PWM output consists of 40 steps, which does not apply to my XBee 3 module. I have the Digi XBee® 3 ZigBee® User Guide, Rev. N, and at page 279 it is mentioned that the PWM period is 64 μs and there are 0x03FF (1023 decimal) steps within this period. I also measured the signal with an oscilloscope and the period is indeed 64 μs.
Digi does not have a document that covers the exact product and protocol for what you want. You can figure it out as follows:
You divide the total number of steps with the PWM timer. Then break that up starting at the lowest RSSI possible for the module in question. That would be -103dBm. For each period of the PWM that is high indicates a value of the signal.
It is strange that Digi encoded the value of the RSSI in a PWM signal, but then is not offering a way to decode it.
As for your solution, it does not sound very precise. I will try, possibly with reading the RSSI value in API mode, and at the same time reading the timing of the PWM signal, and maybe I can find a correlation formula.
Thank you, @mvut !