Offline
Newbie
Karma: 0
Posts: 34
|
 |
« on: November 13, 2012, 02:17:52 pm » |
Sorry if my question is silly, but I'm not really good with electronics.
I have to power a device with 3V and 200 mA. So the 3.3V output pin of the arduino seems great, and in fact I can power my external device which runs fine.
However, I have to switch the power to that device via software, so I thought a transistor would help me. I connected the 3.3V to the emitter, one of the arduino pins to the base, and the collector goes to my device.
The fact is with this configuration I got too much voltage or current to my device, which doesn't work well. How can I switch the 3.3V from on to off? Do I have to use the transistor? If yes, how can I use it to make it pass only 3.3V and 200 mA?
Thank you in advance
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Sr. Member
Karma: 5
Posts: 468
what?
|
 |
« Reply #1 on: November 13, 2012, 02:22:56 pm » |
which transistor is it?
for the safety of your arduino always use a current limiting resistor to drive the base of the transistor
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #2 on: November 13, 2012, 02:31:23 pm » |
Sorry if my question is silly, but I'm not really good with electronics.
I have to power a device with 3V and 200 mA. So the 3.3V output pin of the arduino seems great, and in fact I can power my external device which runs fine.
The arduino product page for Uno still only rates the 3.3v pin as having 50ma capacity. This probably a legacy spec when the FTDI was supplying the 3.3v pin on older arduino boards. The Uno uses a dedicated 3.3vdc voltage regulator to supply that pin, but I would think it's safe ratings is around 100ma or so, so you may be really stretching it drawing 200ma. But if it works it works I guess.
However, I have to switch the power to that device via software, so I thought a transistor would help me. I connected the 3.3V to the emitter, one of the arduino pins to the base, and the collector goes to my device.
NPN or PNP transistor? No resistor on the base is a good way to damage both the transistor and the output pin.
The fact is with this configuration I got too much voltage or current to my device, which doesn't work well. How can I switch the 3.3V from on to off? Do I have to use the transistor? If yes, how can I use it to make it pass only 3.3V and 200 mA?
Use a relay?
Thank you in advance
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #3 on: November 13, 2012, 02:45:04 pm » |
I got too much voltage or current to my device If you put a load to its rated voltage, you will get its rated current, at max. If you get more than its rated current, something is seriously wrong.
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Online
Edison Member
Karma: 65
Posts: 2244
|
 |
« Reply #4 on: November 13, 2012, 03:15:04 pm » |
which transistor is it?
for the safety of your arduino always use a current limiting resistor to drive the base of the transistor
Yep. Put something like a 330 ohm resistor between the Arduino and the base of the transistor.
|
|
|
|
|
Logged
|
|
|
|
|
Valencia, Spain
Online
Edison Member
Karma: 65
Posts: 2244
|
 |
« Reply #5 on: November 13, 2012, 03:19:57 pm » |
Sorry if my question is silly, but I'm not really good with electronics.
I have to power a device with 3V and 200 mA. So the 3.3V output pin of the arduino seems great, and in fact I can power my external device which runs fine.
What device? A transistor will eat up 0.7V so you'll really only be getting 2.6V across the device if you use the 3.3V pin. It might be better to use 5V and add a resistor to eat up the excess 1.3V @ 200mA (use Ohm's Law to find the resistance needed for that...)
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 274
Posts: 25480
Solder is electric glue
|
 |
« Reply #6 on: November 14, 2012, 03:42:58 am » |
However, I have to switch the power to that device via software, so I thought a transistor would help me. I connected the 3.3V to the emitter, one of the arduino pins to the base, and the collector goes to my device. That is the way to configure a PNP transistor only. These are not the most common type. You always need a resistor between the base and the arduino pin. Please say what number the transistor is so we can check if you have it wired correctly.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #7 on: November 14, 2012, 09:02:45 am » |
I have a BC337 transistor. I understood that I have to connect a resistor between the arduino and the base.
So as someone is saying it would be better for me to use a PNP transistor, which will pass the emitter to the base when no input is given on the base. Did I understood this correctly?
Thanks
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #8 on: November 14, 2012, 09:10:33 am » |
it would be better for me to use a PNP transistor It depends. You can switch from the high side with a pnp or the low side with a npn. Which is better depends on your requirements. Either can be made to work.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #9 on: November 14, 2012, 09:16:49 am » |
it would be better for me to use a PNP transistor It depends. You can switch from the high side with a pnp or the low side with a npn. Which is better depends on your requirements. Either can be made to work. Ok, but the problem is that with an NPN, doesn't the base add itself to the emitter into the collector? Because this is what seems to me, so using a PNP could leave this problem out.
|
|
|
|
|
Logged
|
|
|
|
|
Germany
Offline
Edison Member
Karma: 27
Posts: 1494
|
 |
« Reply #10 on: November 14, 2012, 09:35:11 am » |
You need a base resistor anyway, see Grumpy_Mike's comment earlier. If you have an NPN type transistor ( BC337 ), and need to switch a 200mA 3.3V device, you connect emitter to GND, collector to the - side of your device, + side of the device to 3.3V and a resistor of <=1k between Arduino pin and base. Hope there's no need to have your device - directly connected to GND. (What is it ?) BTW1: If load is an inductance (coil / solenoid / motor) provide a protective diode across your device. BTW2: the 3.3V regulator of a 5V Arduino UNO is too weak for 200 mA http://arduino.cc/en/Main/ArduinoBoardUno : DC Current for 3.3V Pin -- 50 mA
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #11 on: November 14, 2012, 09:39:56 am » |
but the problem is that with an NPN, doesn't the base add itself to the emitter into the collector? What does that mean?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 34
|
 |
« Reply #12 on: November 14, 2012, 10:08:21 am » |
but the problem is that with an NPN, doesn't the base add itself to the emitter into the collector? What does that mean? Doesn't the voltage and the current coming from the base are added to the emitter? Maybe I got this wrong -_-
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #13 on: November 14, 2012, 10:17:51 am » |
but the problem is that with an NPN, doesn't the base add itself to the emitter into the collector? What does that mean? Doesn't the voltage and the current coming from the base are added to the emitter? Maybe I got this wrong -_- Well the total emitter current will be the sum of the base + collector current, but the collector current will remain base current X device beta. Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #14 on: November 14, 2012, 11:44:54 am » |
Doesn't the voltage and the current coming from the base are added to the emitter? Yes. But why does that matter to you?
|
|
|
|
|
Logged
|
|
|
|
|
|