Running a bluetooth board and a motor at once?

Hello,

I am using an Arduino Mega ADK and a Sparkfun bluetooth Mathe Silver. It works fine for them to communicate via bluetooth. Also I have a small motor which runs on 3-5V, which works fine when using it with the Ardunio only.

Now I want to use both of them at once. I connected the 5V-PIN to the motor and the 3V-PIN to the bluetooth board. Whenever the motor starts the run the bluetoot board immediately disconnectes from the smartphone. When I run the motor and connect the bluetooth power PIN right in that moment, the motor stops running. So this schould be a power issue. The Arduino runs with a 12V-DC power supply and with the usb cable connected to the computer.

Any ideas how I can make that running?

Thanks, best regards.

Whenever the motor starts the run the bluetoot board immediately disconnectes from the smartphone.

I'm not surprised.

When I run the motor and connect the bluetooth power PIN right in that moment, the motor stops running.

I am surprised at this. What I'm surprised at is that the motor actually runs.

So this schould be a power issue.

It's a power issue, definitely. You need an external power supply for the motor, and to drive it through a transistor.

I am sorry for the lack of information.

The motor runs via and H-Bridge motor driver. It is a similar setup to this one: http://itp.nyu.edu/physcomp/Labs/DCMotorControl
The bluetooth board directly is connected to the 3V PIN.

Best regards

The motor runs via and H-Bridge motor driver.

Which one?

It is a similar setup to this one

Garbage. Plain and simple.

Motors are noisy. There are no caps on that circuit to absorb the noise. http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

It is the H-Bridge as shown in the tutorial: L293NE

The motor really works finde with that setup. I can control it perfectly from the Arduino Board. I just cant use the motor and the bluetooth board at the same time.

Best regards

Hey,

I found the solution. It works when the bluetooth board is connected to the 5V PIN as well. Also there has been a logic error. The bluetooth board shpuldnt read messages to fast. I integrated a delay of 20 ms each time a byte is read. This prevents the device from disconnecting too.

Best regards

The bluetooth board shpuldnt read messages to fast. I integrated a delay of 20 ms each time a byte is read.

It is impossible to read messages too fast.

It is possible to try to read data that hasn't arrived yet. The delay() is a bandaid. You should implement a proper fix.