Home/Support/Support Forum/How do I properly transmit PWM data over Xbee 802.15.4 S1

How do I properly transmit PWM data over Xbee 802.15.4 S1

0 votes
I'm having trouble properly driving a lilypad vibe board using PWM over Xbees. The signal is successfully received by the Base Xbee, however, it produces an erratic drive pattern on the Vibe Board.

In this project I am attempting to detect a user's heartbeat and transmit the heartbeat to another user where each beat is felt as a pulse from a vibe motor. The pulse from the vibe motor should be a consistent vibration 300ms in length each time a heartbeat is detected. Instead it's choppy and not in time with the user's heartbeat.

I have tested the signal by removing PWM from the code (replaced with DigitalWrite), driving an LED over digital line passing and it is working correctly. I believe it is a sample rate issue.

Device #1 detects a user's heartbeat, converts it to PWM and transmits it over Xbee (connected to Lilypad Xbee).
Device #2 receives the signal from device #1 and drives a vibe motor connected directly to Lilypad Xbee pin.

2 Xbee 802.15.4 S1 in line passing mode with the Remote DIO1 set to ADC and Base PWM1 set to PWM Out. Notable Xbee configuration points are:

Remote
D1= 2
IC = 2
IT = 1
IR = 5

Base
P1 = 2
IU = 1

Help would be greatly appreciated.

-John
asked May 15, 2017 in IEEE 802.15.4 by AlbertIsland New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

+1 vote
Don't use both a Sample rate and change detect. Just use the sample rate (IR).
answered May 15, 2017 by mvut Veteran of the Digi Community (11,354 points)
...