I'm new to Arduino and i'm currently trying to learn coding and microelectronics. Currently, i'm working on my first small project, a solder fume extractor, which requires a Arduino Nano 33 BLE Sense to control a 5V PWM fan.
Because the 5V PWM fan is drawing more Current than the Arduinos +5V Pin can provide (I think), i'm using a separate 5V Power Supply that supplies the fan as well as the Arduino on VIN.
Now to develop the program, i obviously need the Arduino connected to my PC via USB, which also supplies 5V to the Arduino. Since i also need the Fan for testing, i also need to power the fan, which in turn also powers the Arduino on VIN.
Now there would be multiple power sources connected to the Arduino. Is that a problem?
I tried to draw a diagram of the current setup, i hope that makes sense.
Connect the 5V from the power supply to the 5V pin, not Vin.
Make a USB cable with the red 5V wire cut, that way gnd and the two data wires are connected and the Nano33 is externally powered.
I made a cable with a box in the middle, 5V wire cut and the two ends connected to external terminals.
That way if i need to power a controller I just place a jumper across the terminals.
Hi @2112
Thanks for the suggestion. This is a valid solution for now, but i plan on soldering everything together and putting it inside a 3D-Printed case when i'm done, making it quite cucumbersome if i want to change the code or troubleshoot something using the computer.
Thanks for the suggestion! I didn't know that cutting an USB-Cable open to just use the data and ground lines was an option, but i guess it's a valid workaround.
I'm a bit surprised that the Arduino doesn't seem to be able to handle two power inputs at the same time, since it's not rare that an Arduino has a power connection soldered to the pins as well as other components inside a neat 3D-Printed casing. Under such circumstances you either need to design a way to break one of the power connections and even then, there is the danger that you might break the Arduino if you forget to disconnect one of the power sources.
If i may ask, what's the reason for connecting the power supply to the 5V pin over VIN ? I assumed the 5V pin was only for output.
Connect the 5V to the Vin pin and don't worry about USB, it has a diode that interrupts the current between Vusb and Vin when both are connected.
Check the documentation for the Nano 33.
D2 was added to enable the use of USB and external power at the same time.
In some boards the separation of the powers has some issues, so the general advise is not to rely on it.
In this case the diode seems pretty reliable.
This is a Nano33BLE SENSE, the pin is named VUSB, not 5V, the supply to VIN is correct.
Supply to VUSB might feed back into the PC and is not advisable.
I trust the schematics better than the rest of the documentation.
Designers and engineers use the schematics to build the board in several iterations and then hand over the stuff to the writers that may or may not have technical knowledge.
Furthermore, the datasheet contains contradictions while the schematics show some logic to me.
Add a switch, .1 jumper hood, shorted connector or something to break the connection when needed.
You can have a USB interface port on your enclosure. Use a connector that shorts Vbatt to Vin when in use. Remove that connector and connect a modified USB cable that breaks the Vin connection.
That's extra effort for a what-if. Adding a small slide switch inside the enclosure would be the easiest. Open the box, slide the switch, update your code, move the switch back.
I should mention i got the "Nano 33 BLE Sense", without "Rev2".
I'm kinda scared to use VIN or VUSB/5V (Printed "5V" on the PCB) at the same time with USB, since its apparently not clear if it could damage anything. I could turn off the Power Supply, however i still measure about 2.2V when the PSU is "Off", which i suspect might be problematic when plugging in USB?
I guess i'm going for @2112's suggestion and just break the connection from Vbatt to VIN manually before plugging it in via USB.
The microcontroller on the Arduino Nano 33 BLE Sense runs at 3.3V, which means that you must never apply more than 3.3V to its Digital and Analog pins. Care must be taken when connecting sensors and actuators to assure that this limit of 3.3V is never exceeded. Connecting higher voltage signals, like the 5V commonly used with the other Arduino boards, will damage the Arduino Nano 33 BLE Sense.
All MOSFETs have parasitic diodes. If 5V is applied to an input/output pin of your processor, the diode in the P-MOSFET will conduct and may be damaged if the current is too high. A resistor will limit this current.
According to figure in the white paper with the open collector driving the input, the current from the pull up resistor in the fan is very low. I couldn’t find numbers in the datasheets, but that current is apparently so low that it won’t cause damage.
The tachometer output is an open collector, it needs a pull up resistor to work. As your processor works on 3.3V, you should connect it to the 3.3V pin, or you can use the pull up resistor built in in your processor.
Thanks for the feedback, but unfortunately i don't know a lot about electronics yet, so i tried to look up what an "open collector" and "pull up resistor" is, but i haven't understood it really.
But according to my research, if it's a 5V Fan, the tachometer signal will also be 5V when it is high, which apparently does damage the processor over time, no matter how short the signal impulse is.
Could i maybe use a resistor limit the current?
Thank you.
A transistor can work as a switch, on or off. (It can also be something in between, but that isn’t used here.) You are aware of the push-pull outputs of a microcontroller, that is two switches, one connects the output to the supply, so it can push current into whatever is connected to the output, the other connects the output to ground, so it can pull current from whatever is connected to the output. This has both advantages and disadvantages.
The open collector output is actually older and simpler. In the drawing above opening or closing the switch won't work, the input will remain at ground level. It needs a pull up resistor to work, literally pulling the input to a higher voltage.