Trouble connecting cheap Bluetooth modem to 3.3V Arduino circuit

I’m trying to create a PCB that has an integrated ATMEGA328 (running at 3.3V, clocked at 8mhz) and a cheap Bluetooth module, which I picked up from DealExtreme here: http://dx.com/p/wireless-bluetooth-rs232-ttl-transceiver-module-80711?item=2

I tested the module with a standard Arduino Uno running at 5V and was able to connect to it via Bluetooth and use it as a simple echo. However, now that I’ve connected it to my circuit board, I cannot get it to even show up when I poll for new devices in Win7 (or on my tablet).

I’ve attached the schematic for the circuit I’ve built around the Bluetooth module. I have the RX going to pin 12, and the TX going to pin 8 of the ATMEGA (Arduino pin mappings). I wasn’t sure about the 10k resistor going to the Reset pin, so I’ve tried powering up the circuit with and without that resistor in place, but with the same result.

I’ve also attached an image of the PCB layout if that helps.

Any ideas what I’ve got wrong with my setup?

Here is the sketch that I currently have uploaded to the ATMEGA328:

#include <SoftwareSerial.h>

int BT_RX = 12;
int BT_TX = 8;

SoftwareSerial bluetooth(BT_RX, BT_TX);

void setup() {
  Serial.begin(57600);
  bluetooth.begin(9600);
}

void loop() {
  if(Serial.available())
    bluetooth.write(Serial.read());
  
  if(bluetooth.available())
    Serial.write(bluetooth.read());
  
}

I have only looked at BT module and see you have grounded it's D+ & D- pads (pads 14 & 21), not sure if this will cause problems. When you connected to your UNO did you use 3.3V or 5V and how did you wire it up? 5V on VCC and/or other pins may have fried it. I see no current limiting resistor on D1? I assume from pad number for D1 status LED (pad 31) your module can master/slave switch?

I don't follow with the D- and D+ lines - they are not connected to anything on the PCB. The datasheet lists pins 14 and 21 as PIO14 and GND respectively. D- and D+ are 15 and 20.

I followed this tutorial for wiring up the Bluetooth module to my Arduino Uno for testing: http://www.instructables.com/id/Cheap-2-Way-Bluetooth-Connection-Between-Arduino-a/ . Uses the 3.3V line for power to the BT module.

No current limiting resistor on D1 because it is a blue LED with a forward voltage of 3.3V, which matches the voltage of the chip.

The LED is connected to the pin PIO8 of the BT module, which the datasheet lists as just an indicator for Bluetooth activity.

Right now I've just soldered the BT module to the PCB using four short wires, so I can test that it's working (+3.3V, GND, RX and TX). These are the same four wires that I used to connect the module to my Arduino Uno for testing with no problems.

zenwebb:
I don’t follow with the D- and D+ lines - they are not connected to anything on the PCB. The datasheet lists pins 14 and 21 as PIO14 and GND respectively. D- and D+ are 15 and 20.
My mistake, I now see the schematic image you posted was missing some pins (14, 21 & 22) so it looked like the trace on the board between pins 13 & 14 was linked to D-, same with trace between 21 & 22.

I followed this tutorial for wiring up the Bluetooth module to my Arduino Uno for testing: http://www.instructables.com/id/Cheap-2-Way-Bluetooth-Connection-Between-Arduino-a/ . Uses the 3.3V line for power to the BT module.
Are the TX & RX pins 5V tolerant?

The LED is connected to the pin PIO8 of the BT module, which the datasheet lists as just an indicator for Bluetooth activity.
The modules I have use different pins for the indicator LED depending on if they are Master/Slave switchable or Slave Only. Images attached.

Right now I’ve just soldered the BT module to the PCB using four short wires, so I can test that it’s working (+3.3V, GND, RX and TX). These are the same four wires that I used to connect the module to my Arduino Uno for testing with no problems.
Do you need to swap the RX/TX pins in SoftwareSerial as the attached images show RX/TX crossover.

Master Slave.jpg

Slave Only.jpg

The module's RX and TX are not 5V tolerant, but I tested it through a voltage divider (as shown in the Instructables tutorial). And the board that it is currently soldered to is completely 3.3V - the ATMEGA328 is running at 3.3V / 8mhz.

Right now I do not have the pin that goes to the LED soldered to anything, just to simplify debugging. I'll worry about that when I get communication happening :)

I don't believe so, the RX/TX are wired up exactly as they are in the Instructables tutorial, which worked for me. But just to be sure, I did swap the pins in the Arduino sketch and re-uploaded it. No dice :(

I think I'll desolder the module and test it again on the Arduino, something goofy is going on...

Right now I do not have the pin that goes to the LED soldered to anything, just to simplify debugging. I'll worry about that when I get communication happening

The only reasons I mention it is the type of module you have may effect what pin the LED connects to and the lack of current limiting resistor.

Is the red dotted line around the board image a copper fill and will it effect the underside of the BT module when soldered to the board?

Does the ATmega and the rest of the board work properly?

Is the red dotted line around the board image a copper fill and will it effect the underside of the BT module when soldered to the board?

Yep, that is a ground plane. There is also one on the bottom of the board. However, I made sure to trace the fill around the BT module's antenna so that there will be no copper under it when soldered to the board.

Does the ATmega and the rest of the board work properly?

Yep, everything else works as expected, this the last thing I am trying to test.