The buzzer draws 100mA at peak, while the dc motor draws (correct me if i'm wrong) about 250mA.
Of course, the arduino cannot supply that amount, so the use of a transistor is required.
Until there, no problem. But here is where things get tricky. What would be the best choice for me?
I had in mind the NPN BC547A transistor to use for the buzzer. However, in the datasheet, I couldn't find if it supplies 100mA from the emitter; instead I found that the...um... collector current is 100mA? I really am confused.
Then, I don't know what would the other transistor BE! I just can't understand this current/emitter thing at all!
Soooo... Yeah. Could anyone tell me what would be the best choice, please? I am very stuck right now.
You could look at a BC337 instead (800mA @ collector). You would need to implement your wiring as "common emitter" which means that the transistor becomes a "ground switch" and not at "positive switch" (emitter follower). By doing this, your buzzer / motor is not drawing current through the transistor.
Basically anything that can do two bi-directional brushed DC motors at ~5V and 1.5 Amp peak.
Oh, and the 5v would be coming from arduino right?
So, no. An external supply (battery) capable of supplying at least 1.5A is recommended. I am not sure from the linked page whether it is 1.5A per motor or 1.5A total for both.
For 1.5A you need either a MOSFET or a darlington. A single BJT switching transistor can only handle 500mA or
so driven from an Arduino pin as the base current needs to be at least 5% of the load current.
BTW the original BC547 transistor is classed as a "small signal" transistor, which means low power. A
"switching" transistor is the sort to look for as they are optimized for high current and efficient saturation.
Small signal transistors are designed as amplifiers for signals, running in the active transistor region.
For power switching duty a transistor is run in cut-off and saturation only.
Here is a link to a hefty MOSFET that you could stock up and use in other projects as well. It is kinda like using a car battery to light a single LED, super overkill, but it works! (in this case, the MOSFET does not cost nearly as much as the car battery but you get the idea)
Okay, I think I get it.
So, for the buzzer the BC337 works, right?
Another thing I kinda don’t get is that I wouldn’t be able to supply those 1.5 A because the current of the arduino pin is too low to drive too many current, is that it?
And finally, if I supply more current, let’s say 1A to a 500mA motor, will it kill it?
(Consider this as “more current that needed is bad?”)
Another thing I kinda don't get is that I wouldn't be able to supply those 1.5 A because the current of the arduino pin is too low to drive too many current, is that it?
Yes. The arduino pin is rated at UP to 40mA. That's .040 Amps, but it is not recommended to do so. Limiting the current to 30mA or less is more typical. Trying to pull 1.5A (1500mA) from a 40mA supply will damage the pin.
And finally, if I supply more current, let's say 1A to a 500mA motor, will it kill it?
(Consider this as "more current that needed is bad?")
No. As a matter of fact, having a supply being rated much higher than the components attached is good practice. Power supplies will last longer when you don't use the max rating.
Of course there is no need to get silly either and put a 5000A supply on a 500mA motor, but it still will not harm the motor. Most components like your motor require a constant voltage @ a certain amperage to work. With the motors, the current actually varies depending on load, start, stall, but it still wants to see the required voltage.
Joprp05:
Oh, okay. Thank you.
Though I doubt that putting, let’s say, 400mA in a LED without a resistor wouldn’t kill it, or would it still hang on shining?
That depends upon the led. There are many different types with different current requirements, but if you are referencing a simple signal led then yes, it will burn in the blink of an eye. That's why datasheets are so important.
The BC337 is fine for the buzzer which can easaly be powered by the 5V pin on the arduino. About the motor(s), I'm not sure. It seems like the link says 200-400mA drive and 1500mA hard stall - but this is apparently for 2 motors. If you only run one motor (assuming 200mA drive, 750mA stall), the BC337 would be fine for this. For two motors you either need something else, or you would need one BC337 per motor wich would be sufficient. No matter if you run one or two motors, you will not be able to power them from the arduino Vcc pin (5V pin).
Thanks for the advice Danois, but...
I discovered something quite interesting...
look at this link : https://upverter.com/parts/Soberton%20Inc/WT-1205/
it says that current-supply is 40mA.
so this wasn't needed at all!
thanks otherwise
(edit: i found other datasheets saying that it needs 50mA to operate, and I said that it needed 100mA because Leo(wawa) said that. So i'm a bit confused)