Motor causes Arduino reset with Bluetooth shield

I have the following circuit set up on a breadboard:-

The '470 uF' capacitor is actually 104 uF, it was mislabelled, sorry. ;D The transistor is a MOSFET, I didn't know the symbol for a MOSFET when I drew it. The MOSFET I'm using is this one.

I labelled the power rails as '9VA' and '9VB' because the motor is powered by 6 AA batteries, and the Arduino by a 9V battery, both with shared ground. The tests give the same results even for 5V USB Arduino power though.

Pictures here.

I want to make a simple RC car toy that can be controlled by the computer over Bluetooth. The motor runs fine without the Bluetooth shield on the Arduino, but if I have the Bluetooth shield on, it causes a reset after a short while of being run (sometimes a fraction of a second, sometimes a little more, but never more than 3 seconds).

I actually have two programs set up (one for the PC, one for Arduino) to control the Arduino through Bluetooth, but even with the simple 'blink' example modified to give an always-high output the reset happens when the Bluetooth shield is connected (although it isn't actually being used). It runs fine without it though.

Datasheet etc. for the Bluetooth shield can be found here.

I've recorded a video of the problem that you can watch here.

The programs for Processing and Arduino, respectively, can be found here and here.

A user on IRC suggested that the problem might be that the MOSFET draws current, and the Arduino having to power both the MOSFET and the Bluetooth shield, browns out. I'm not sure yet how to check for a brown-out though. I'll measure the current flowing through the 100 ohm resistor and post the results here.

So, finally, for my question:- How do I fix this? :P

104uF is an unusual value - are you sure it isn't 10 000uF?

Also, '9VA' is an odd way of referring to a supply rail. Why is it labelled so?

There's no MOSFET in your diagram

Sorry, forgot to mention that - The motor is powered by 6 AA batteries, and the Arduino by a 9V battery, both with shared ground, so I labelled the power rails that way to differentiate. The tests give the same results even for 5V USB Arduino power though.

And about the 104 uF, dunno, the capacitor just says 'F 104' on it. :-?

And the transistor I drew is actually a MOSFET, I didn't know the symbol for a MOSFET at the time I drew it, but it was functionally similar to a switch in this case so I used that symbol. :P

I've tried measuring the current flowing from pin 9, but my multimeter always shows 0A, or near 0A, like 0.1 uA even. The multimeter has worked pretty well otherwise. O_o On IRC a user was saying the switching current must be higher though...

"F 104" probably means 10x10^4 pF or 0.1uF. I don't think it's necessary and I'd take it out.

My concern is your direct connection of an I/O pin (13) to the LED. You need a resistor there (try 220 ohms to start).

Your MOSFET (IRF630B) is not a "logic-level" MOSFET. It needs ~10V from gate to source to turn on. You want something like an NDP6060L which turns on at 5V.

The 9V battery actually has very little capacity and if the Bluetooth shield draws appreciable current (and knowing Bluetooth, it does) the battery voltage can easily sink too low for the Arduino. Try two 9V batteries in parallel, or better, 6 AA's.

http://www.ruggedcircuits.com

My concern is your direct connection of an I/O pin (13) to the LED. You need a resistor there (try 220 ohms to start).

Hmm, okay, I’ll put one.

Your MOSFET (IRF630B) is not a “logic-level” MOSFET. It needs ~10V from gate to source to turn on. You want something like an NDP6060L which turns on at 5V.

Unfortunately this is the only one I have right now, I also have a C9014 transistor, but that’s low current. I’ll buy some new ones - or better, I’ll just get an H-bridge chip.

The 9V battery actually has very little capacity and if the Bluetooth shield draws appreciable current (and knowing Bluetooth, it does) the battery voltage can easily sink too low for the Arduino. Try two 9V batteries in parallel, or better, 6 AA’s.

But this problem occurs even if I use USB for power…

Your MOSFET (IRF630B) is not a "logic-level" MOSFET. It needs ~10V from gate to source to turn on. You want something like an NDP6060L which turns on at 5V.

But this problem occurs even if I use USB for power...

Do you know the voltage that USB uses? Hint: It's less than 10 volts.

Haha, wow, I used the wrong quote in that. I meant that as a reply to the suggestion about replacing the 9V with with 2 parallel 9Vs or 6 AAs. :-[

And yup - USB Vcc is 5V, IIRC.

But yes, I'll try to find a better trasistor or get an H bridge.

Heh, i had this same problem, even without a bluetooth shield. The problem is the motors startup causes a spike in current draw. The current is all used up and the arduino shuts down. Add a fairly large capacitor (.5 farad worked for me.) capacitor to either 5v or the Vin pins and the other pin to ground. it should provide the current for the motors.