# urgent !! HC SR04 ultrasonic sensor connection with XBee(serie 2)

**URL:** <https://forums.digi.com/t/urgent-hc-sr04-ultrasonic-sensor-connection-with-xbee-serie-2/16270>\
**Category:** XBee - Zigbee\
**Tags:** arduino-xbee, serie, connection, sensor, 2\
**Created:** [February 15, 2016, 3:56pm UTC](https://forums.digi.com/t/urgent-hc-sr04-ultrasonic-sensor-connection-with-xbee-serie-2/16270 "2016-02-15T15:56:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferhat](https://avatars.discourse-cdn.com/v4/letter/f/58f4c7/32.png) [@ferhat](https://forums.digi.com/u/ferhat)\
**Post date:** [February 15, 2016, 3:56pm UTC](https://forums.digi.com/t/urgent-hc-sr04-ultrasonic-sensor-connection-with-xbee-serie-2/16270/1 "2016-02-15T15:56:15Z")

</div>

How do I make a connection with XBee(serie 2) hcsr04 ultrasonic sensors?  
note:  
parking sensors help you specify the source I’m so glad I’m working on a project?  
thanks for everthing

---

<div class="post-metadata">

**Author:** ![michaelt](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/michaelt/32/92_2.png) [@michaelt](https://forums.digi.com/u/michaelt)\
**Post date:** [April 8, 2016, 6:58pm UTC](https://forums.digi.com/t/urgent-hc-sr04-ultrasonic-sensor-connection-with-xbee-serie-2/16270/2 "2016-04-08T18:58:16Z")

</div>

If you have a Digi XBee ZB Coordinator, make sure you set ZS=2 to maintain compatibility with 3rd party ZigBee Pro Featureset (ZigBee 2007) devices. The ZS=1 setting can be used to maintain compatibility with ZigBee 2006 if your sensor uses this older ZigBee stack.

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [April 12, 2016, 3:35pm UTC](https://forums.digi.com/t/urgent-hc-sr04-ultrasonic-sensor-connection-with-xbee-serie-2/16270/3 "2016-04-12T15:35:05Z")

</div>

You would need to pass it through something like an RC circuit such as the one listed at [http://knowledge.digi.com/articles/Knowledge\_Base\_Article/Converting-the-XBee-PWM-to-an-analog-voltage-for-DAC-Digital-to-Analog-Conversion/?q=analog+to+digital&amp;l=en\_US&amp;fs=Search&amp;pn=1](http://knowledge.digi.com/articles/Knowledge_Base_Article/Converting-the-XBee-PWM-to-an-analog-voltage-for-DAC-Digital-to-Analog-Conversion/?q=analog+to+digital&amp;l=en_US&amp;fs=Search&amp;pn=1)

into the radios ADC input after then scaling it down to either 0 - 1.2v, 0 - 2.5v or 0 - 3V depending on which XBee module you use.
