Xbee works in activity board socket but not when hard wired
solder_fumes
Posts: 18
I have a reason to want to use two xbee modules on my activity bot.
The purpose of the "second" xbee (the one that will be hard-wired, i.e. not using the xbee socket on the activity board) is to report the bot's battery pack voltage.
The problem I'm running into is that the code works fine when I have the xbee plugged into the activity bot socket...it sends the data as expected. But when I hard wire it, and change the code to use the DO and DI pins I've selected (in my case DO pin 6 and DI pin 5), I don't see any received data. If I plug the xbee back into the activity board socket and change the DO and DI's accordingly, it works as expected.
From looking at the activity board schematic, it seems that the only connects are supply voltage, ground, DO and DI (I see that RTS and CLS are also used, but I'm not jumping those to anything when the xbee is in the socked, so essentially it seems that I have it hard wired just as it's wired when it's in the socket, yet it doesn't transmit.
I have no reason to think it's a coding problem, and the code doesn't change from one scenario to the other. I just move the xbee from the socket to jumper wires.
Any thoughts?
Thanks,
John
The purpose of the "second" xbee (the one that will be hard-wired, i.e. not using the xbee socket on the activity board) is to report the bot's battery pack voltage.
The problem I'm running into is that the code works fine when I have the xbee plugged into the activity bot socket...it sends the data as expected. But when I hard wire it, and change the code to use the DO and DI pins I've selected (in my case DO pin 6 and DI pin 5), I don't see any received data. If I plug the xbee back into the activity board socket and change the DO and DI's accordingly, it works as expected.
From looking at the activity board schematic, it seems that the only connects are supply voltage, ground, DO and DI (I see that RTS and CLS are also used, but I'm not jumping those to anything when the xbee is in the socked, so essentially it seems that I have it hard wired just as it's wired when it's in the socket, yet it doesn't transmit.
I have no reason to think it's a coding problem, and the code doesn't change from one scenario to the other. I just move the xbee from the socket to jumper wires.
Any thoughts?
Thanks,
John
Comments
It could be any number of reasons. How are you hard-wiring it? Do you have a schematic and/or photos of how it is connected?
FYI, for a receiver I'm using an xbee with the usb adaptor, and watching the data on the XCTU terminal.
For clarification, xbee pin 3.3v pin goes to 3.3v header on the board, DO on the xbee goes to pin 6 on the board, DI on xbee goes to pin 5 on the board, and vss on the xbee goes to vss on the board. This doesn't work. Oh, I have a jumper going from the board 3.3v connection to the ADC 3 socket, just to give the program something to work with.
With the same code, when I plug the same xbee into the activity board xbee socket and jumper DO and DI to pin 6 and pin 5 respectively, it works.
Thanks,
John
I've been bitten a couple of times by the DO/DI connections when using a Bluetooth module.
DO on the device (radio) has to go DI on the micro. I don't recall if the labels on the radio header by the breadboard are labeled with the Xbee pin labels or the micro labels. Comparing the ActivityBot schematic with the pin locations for the Xbee might help or with everything disconnected check the continuity of the Xbee socket DO/DI pins (DO and DI marked on the radio module or pinouts from the Xbee data sheet) with those on the the Xbee header.
Hope this helps.
Tom
Are you connecting the jumper wires directly to the 2mm pitched pins of the XBee? If so, they might not be making a good connecting.
Those jumper wires sure look long. Long wires can cause problems. In general one wants to keep connecting wires as short as possible.
I think it's pretty safe to assume you have some sort of connection problem.
I don't understand why you want two XBees. Can't you send battery voltage information from the same XBee you're already using?
I was using the xbee adapter board as my "guide" to the pinouts on the xbee. Turns out (as you all know) that the top left connection when looking down on the board is VSS. I looked at it and thought since the top connector on the xbee adaptor board is VSS, I should use the second connector on the xbee as 3.3 volts. My bad. By moving all the connectors up one, I now have comm.
A small problem still remains. The first "if" statement in my coding should be causing an "a" to be sent if the voltage on ADC pin 3 is greater than 4 volts. If I have ADC pin 3 jumpered to the 3.3 volt bus on the activity board, I see that a "g" is being transmitted as expected. But if I move the jumper from the ADC pin from the 3.3 volt bus to the 5 volt bus on the activity board, I don't see an "a" being transmitted. The voltage on my 5 volt bus is 4.99 volts. Shouldn't "if (v3 >4) cause that condition to be true, and an "a" to be transmitted, at any voltage over 4 volts?
Oh, the use of two xbees was more of a Saturday afternoon experiment than anything else. I will be using just one ultimately, I just became perplexed when it quickly hooked it up and it didn't work as expected :-)
Thanks in advance,
John