Powering two devices from 5V port

Hi,

I'm currently trying to setup an arduino with a relay to control a mains (110V) switch. In addition, I have a bluetooth serial module that I want to use to interface with the micro controller wirelessly. Unfortunately, both the relay and bluetooth module require a 5v connection. I've tried to power both from the 5v pin, on my Uno, but the neither of the devices work properly. In addition, I tried to power the relay using a digital out pin, but that doesn't provide enough current for the relay. Is there a way I can power both devices using my arduino? The micro controller itself is powered using a 9V battery.

You need to determine the amps required by all boards (arduino, bluetooth, and relay). If you are using a small 9 volt battery, It will not last for more than a few minutes with all these boards at max power, but you may have a monster 9 volt battery. What is the amp hour rating of that battery?

Relays commonly take a lot of drive current. Normally you can't drive a relay from a output pin from the arduino.
Give us more details. How is your power supplied. What boards (url to specs would be good) are you using. Just from initial info, I suspect you need more power, and/or split the power supplies to use two (one for the relay), the other for arduino and bluetooth).

BTW, if you used a SSR (relay) you could probably cut down your 5 volt current requirements, and get by with just one power supply.

could you give the electrical characteristics of the relay and the BT module ?
how much current do they need ?
There are several solutions : use another 5V regulator (or a switching reg.) for the relay and the BT module or just for the relay....

send links to the devices datasheet, that'll help

The relay runs on 5V and requires 15-20mA driver current. It is not a solid state relay. The bluetooth module has a working voltage range of 3.5-5.0V. I'm not sure what the power rating of the 9V battery is, just that is one of the standard Duracell 9V batteries.

Also, the relay is designed to be operated directly by the Arduino and has a transistor in built

Thanks for the update. So be aware that the 9 volt battery will not last for to long. You may want to put a volt meter across it when you run the system and see what voltage you have, after 5 minutes, 20 minutes, etc. I suspect, that your 9 volt battery is dropping down to low. But take the readings and let me know what you see.

So you have a relay board!. That makes a difference about the I/O drive, but the amps from the battery are still about the same. Do you have a URL for that relay board?
How long do you want to run this system before the battery dies? Are you able to use a wall wart plug rather than a 9 volt battery?
Or, how does it work if powered through the USB cable?

Satre:
The relay runs on 5V and requires 15-20mA driver current. It is not a solid state relay. The bluetooth module has a working voltage range of 3.5-5.0V. I'm not sure what the power rating of the 9V battery is, just that is one of the standard Duracell 9V batteries.

15-20mA , the Uno should definitely be able to switch the relay . We dion't know anything about the BT module ....
did you try without the BT connected ?
I'd say like Jackwp that the 9V battery is surely too weak (these little 9V batt. are....awful) .
Does it work with arduino powered only via USB ?