Arduino UNO vs Nano BLE - DC motor set-up not working

Hi,
I'm a 8th grader looking for guidance on Arduino project. I'm new to Arduino.
My project involves Nano 33 BLE and Nano 33 BLE Sense getting connected by Bluetooth when they come close to each other (proximity sensor), and that triggering a DC motor to get turned on (that's connected to Nano 33 BLE).
I am able to get the Bluetooth component working.
For DC motor, I used the code and set-up provided by Arduino for Arduino UNO (see attached pic), and simply replacing with Nano 33 BLE. I can get the motor to work using Arduino UNO but its not working when using Nano BLE.
My guess is that maybe the power requirements for Nano 33 are different? Or else my pin connections need to be different for Nano BLE vs Arduino?
Any suggestions would be great - am stuck at this point, and not sure how to proceed.
I'm happy to provide further info if above is not sufficient. But pls note that I am unable to do lot of advanced troubleshooting on my own, so pls provide some step by step directions.
Thanks so much!


Welcome, pleases have fun with the project. You say" My guess is that maybe the power requirements for Nano 33 are different? ", I agree. Start by using something other then a 9V battery, it is borderline at best on operating your project.

Should I use something higher or lower than 9v?

Forget the 9V part, it is the battery itself not the voltage that is the problem. What is the voltage of the motor?

The motor says its rated for 3-12V. And says it can use 3V 4.5V 6V 9V 12V power to drive.
The thing is the set-up works perfectly fine w Arduino Uno (I have tried both boards). So, its something about the difference between the Uno and Nano?
Motor:
Rated Voltage: 3V-12V DC
Rated Speed: 9000 -25000 RPM (3V-12V).

The Nano BLE and the BLE sense are 3.3V devices, while Uno is a 5V device. If you´re trying to power the circuit through the VUSB pin, the VUSB pads on the back of the board should be soldered. (I´m assuming that the Nano BLE is powered through USB)

I suggest you try to use the 3.3V pin to feed the button and check if a 3.3V signal is enough to activate the transistor.

The UNO is a 5V processor, the Nano is also 5V the Nano BLE is a 3V3 processor. That voltage difference is probably why it is not working. Can you post a simple schematic showing how you put this together and what that black blob (MOSFET I assume) is by part number (part selection for this is critical) . The problem appears not to be solvable.

First of all - thank you so much for continuing to respond and help me with this.
I hope you meant that the problem is solvable.
I'm attaching pics of the set-up I have.
The MOSFET part # is IRF520.
In terms of voltage do you recommend I try a lower voltage battery then?


Thank you. Is soldering a must to even prove the concept? I can try that and get a 3.3 V battery as well - will 2x AA work to first check if it works?
Yes, Nano BLE is powered through the USB. Pls see the new pics I added.

I cannot answer properly until you answer the question.

I suggested you to change this wire to the 3.3V pin of the Nano BLE:

Doing that, no soldering on the VUSB would be needed. But now that you´ve mentioned that the MOSFET is an IRF520 (@gilshultz ), I´m afraid it won´t be enough to make the circuit work, as the Vgs of the IRF520 is 4V.

So the question is: how much are you willing to change the original circuit?

Here are some options:

  • change the wire to 3.3V pin as suggested AND choose another MOSFET that has a Vgs below 3.3V (you can check this topic for more details);

  • solder the VUSB pads and let the circuit operate on the 5V of the USB. In this case, you cannot connect the button as it is now, because it would allow 5V to go into the digital pin D2 (it can damage the pin, since Nano BLE operates in 3.3V). You might set pinMode D2 as INPUT_PULLUP, connect the other leg of the button to GND and check when D2 is LOW instead of HIGH on the sketch.

The voltage of the battery is not the problem, although 9V batteries are a poor choice to feed DC motors (they will be empty quickly). If the battery is full and you just want to test the circuit, you´re ok to go.
A better option would be 4 AA batteries (6V, much more capacity).
I hope you realize that the function of the transistor on your circuit is to isolate the 9V part of the circuit (which now drives the motor) from the 3.3V logic part that controls it.

Additional tip: check the position of the diode. It looks like being reversed.

Thank you. I'll try what you suggested over the weekend and come back to you.
I should have mentioned that I did try the 3.3 pin yesterday and it didn't work, like you suspected.
Also, I'm totally fine modifying the entire circuit as needed. Main thing is I have to use a BLE board and so I am kind of stuck w Nano BLE for now. Since I used the circuit diagram of Arduino Uno, the parts am using are not probably all appropriate (resistor, transistor, diode) - like you pointed out the transistor. I'll check on the diode polarity - I had used that for UNO.
Also, I don't really need the button to be there either. I just have to then modify the circuit and code accordingly - which I'm not an expert in.
The battery - yes, I only need all this as proof of concept and for this thing to work for like a minute. I can look for efficiency etc. at a later time. I did order a 3.7V and receiving it today.
Thank you again!!!

The MOSFET part # is IRF520.

That is your problem: Gate threshold voltage (VGS-th) is 4V (max) Get another MOSFET with a VGS-th max less then 3V, the lower the better.

Would you be able to recommend me the one I should buy? I'm looking as well.
How about this one:

I would suggest looking at a 2N7002 because a while back the 2N7000 had a higher threshold. However it probably will not survive the motor load??? I suggest you get an avalanche rated MOSFET in a TO220 package. Be sure the Vgs is no more then 3V, lower is better. There are many different units available in a wide range of price. I do not use azon. Vds 30V or greater, 3A or greater, Vgs =<2.5V preferred <3V required, Package whatever you can use.

Thank you. I ordered a couple of transistors that are due to arrive on Monday. Will let you both know how it goes once we get them.