I tried different firmware versions for the xbee and used the default settings (vis XTCU restore). I have used the latest firmware and tried older versions (like 1084) to see if it is a matter of not setting the firmware up correctly.
I am trying to use the xbees as a direct virtual serial cable.
I offer $20 via paypal to anyone who figures this out for me!!
I have a very simple sketch running that is constantly sending a string of text and checking to see if any characters are received. If it receives a character it turns an led on pin13 on.
When I connected the tx/rx points by wire to the xbee dongle on my pc the transmission/reception routing worked (i.e. I kept receiving the proper string and every time I sent characters the led on the arduino clone pin13 would light up).
I have also tried disconnecting the DIN in line on the xbee (via the jumper on my schematic) to see if I just got transmission but got no results.
I have also tried wiring the 4 pins of the xbee directly to the board using discrete wires to try and isolate some problem with headers (i.e. solder bridge I couldn't see etc.)
I am guessing there has to be a layout issue with my pcb that is causing too much noise on the power lines? Maybe the xbee is way more sensitive than I would believe (even though you can see in the schematic that there is adequate filtering).
I am going to try putting a couple of 0.1u caps right on the xbee module between pwr and gnd to see if some extra filtering will help.
Don't mind sharing at all, I want this to be an open source/shared project.
What is the best way for me to post them here? Upload to my webpage and link to the files?
I was just measuring the voltage on the reset pin with my DMM and it seems to fluctuating between 0.5 and 2.0V... I have tried tying this pin to 3.3V in case the reset pin was floating but it made no difference (and I think it has internal pullups anyways)
I took my xbee module and connected three wires to it: 3.3V, GND, and the DOUT.
I connected these three pins to an arduino: 3.3V, GND and RX
and then uploaded the same test code.
This worked without issue (i.e. the xbee connected and received data)
On my pcb I cut the trace to the RX pin so that I could solder the XBEE directly to it in the same way as my arduino test.
That meant the only other things I connected were power and gnd yet this did not work!! argh
In the meantime I have been testing all sort of other functionality on my design and it all works (including using the SPI port etc.)
So what does this mean?? Is there something totally wrong with the 3.3V power supply?
Or is there something connected to other pins of the arduino that somehow interferes?
Could it have something to do with the xtal I am using? (I am guessing no since I was able to receive serial via direct wire)
finally some good news! I got it to work by bypassing the 3,3V regulator and then using a TO202 one instead. I am not sure why the one I was using was a problem since my meter showed that it was producing 3.3V and the only thing drawing current from it was the xbee (which is fairly low power).
The simple solution design wise is to just use the component that works but I still want to know why this was a problem....