Help with PWM over Xbee 801.15.4

All things pertaining to wireless and RF links

Moderator: phalanx

Post Reply
AlbertIsland
Posts: 1
Joined: Fri May 12, 2017 2:00 pm

Help with PWM over Xbee 801.15.4

Post by AlbertIsland » Fri May 12, 2017 3:01 pm

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 (replace 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

Post Reply