Go Down

Topic: max milliamps (Read 1 time) previous topic - next topic

qweety

hello .

I am looking to use 8 x relays from my arduino and have 8 x 2n3904 transistors to trigger them, the transistors are similar to 2n2222 which have a peak 200ma base current,
is this dangerous? i hear 500ma is the max before a fuse blows in the usb.  the relays may be turned on at the same time and I also need individual control.

thanks for help : )



markqvist

While I'm definitely no expert here, you should probably be careful. While the USB can handle a maximum of 500 milliamps, each pin on the board has a maximum of only 40 milliamps! You should still be able to use the transistors, but you need to wire in appropriate resistors between the base and the output pins, to limit the current going trough the pins. If the 40 milliamp max you can pull out of the pins isn't enough for you, it is my understanding that you can use a so-called darlington transistor array, which is basically another transistor amplifying the weak output from the pin to your desired 200mA base current for the transistors driving the relays. Hope this helps :)

Leon Heller

You should be using a current-limiting resistor in the base connections.

The AVR outputs can deliver a max. current of 40 mA each, with a total current of 200 mA (IIRC). I'd aim for no more than 10 mA on each one.

The current available from the USB supply is negotiated in the software, 500 mA is the default value, and that is probably what is available to the Arduino. You need to calculate the total current consumption of your circuit, and use an external supply if it is excessive.
Leon Heller
G1HSM

Grumpy_Mike

#3
Jan 12, 2011, 01:39 pm Last Edit: Jan 12, 2011, 01:42 pm by Grumpy_Mike Reason: 1
Quote
the transistors are similar to 2n2222 which have a peak 200ma base current


No they don't. It might be the peak collector current. Anyway that is not the issue you need to know how much current your relay takes. That is what actually flows. The transistor ratings are only how much then can take not what they will take. What they do take is determined by your relay and your base resistor.

Quote
The current available from the USB supply is negotiated in the software, 500 mA is the default value,

No this is the maximum value that can be supplied. No negotiations is going to be over that. Actually the default value is 100mA but the requested value is read from the EPROM inside the USB / Serial chip.

Quote
500ma is the max before a fuse blows in the usb

Only if you are lucky, some machines blow up the USB interface. (and it's not a fuse anyway it is a crowbar circuit)

qweety

#4
Jan 12, 2011, 01:59 pm Last Edit: Jan 12, 2011, 02:01 pm by qweety Reason: 1
hello

I am using DS2Y-S-DC5V relays

http://www.alldatasheet.com/datasheet-pdf/pdf/82416/NAIS/DS2Y-S-DC5V.html

and a 2n3904 transistor to trigger them
http://www.alldatasheet.com/datasheet-pdf/pdf/11470/ONSEMI/2N3904.html

usb is the power source for the arduino,  i could use an external psu (9v) would that help much?

i hoped to use 9 channels each connected to a 2n3904 of which flows power to a separate relay ( 9 of them).

each transistor has a 1.2k resistor at the base.

i have had it working on vero board but i just had to double check i wasnt going to over heat the arduino. : /

qweety

but the power for the relays is coming from an external PSU connected to 5v regulator! the psu can handle over 1amp. the usb only powers the arduino and the current draw from the base of the transistors, surly.  

the whole point of the 9x transistors is to use an external psu to power the relays. right? or am i wrong here?

: /

qweety

thanks guys.

i think i shall make a 9v supply for the arduino anyhow. it can only do good i am sure. : )

Go Up