Bluetooth module (HC-05) wont turn on, when using a power supply

Hello

I've just got the bluetooth module hc-05, and it works perfectly when the arduino is connected to the computer with usb. But... When i power the arduino with a 12v power supply, the bluetooth module won't even turn on... Everything else than the module works perfectly... HELP :slight_smile:

Here is the code i used to turn on a lamp

///////////CODE////////////////

int lampe = 2;

int Received=0;
int lampe_state =0;

void setup(){

Serial.begin(9600);
pinMode(lampe,OUTPUT);

}

void loop(){

if(Serial.available()>0)
{
Received = Serial.read();
}

//lampe
if (lampe_state == 0 && Received == '1')
{
digitalWrite(lampe,HIGH);
lampe_state=1;
Received=0;
}
if (lampe_state ==1 && Received == '1')
{
digitalWrite(lampe,LOW);
lampe_state=0;
Received=0;
}

}

thecatmiaw:
it works perfectly .............. Everything else than the module works perfectly.

Probably dodgy wiring. It can hardly be anything else. Can you see LED? If no, check power. If yes, check Rx,Tx.

I made it work, by using a USB charger that you commonly use to charge phones with, to power the arduino :slight_smile: