Control when current can flow

I want to have my Arduino control when a device can receive current from a voltage source. So basically what I am envisioning is the device being hooked up to a voltage source other than the Arduino, with a "stopper" between the voltage source and the device. The stopper will be controlled by the Arduino, to allow the current to flow on command. So is there something feasible. I was thinking about a voltage regulator, but I'm not to sure.

Thanks

How much current are you trying to stop? Better yet, why are you trying to do this?

A voltage regulator is just that, a regulator. (Or perhaps you found one that has a on/off control?) A simple transistor is an option. It can be used as a solid-state switch. Again, it depends on how much current you are talking about.

This is how I understand it - when the gods / hero members arrive at the new forum, they may have other input.

For DC current - a transistor.
For AC current - a relay.

If you are hooking up a a motor, you need to be careful and use diodes to keep the motor from mule kicking your arduino.

Connect the grounds together when using external DC power sources (hence the name common).

Have fun

I am using it to control 10 led's for a combined .17A.

I would suggest a simple transistor used as a switch. The arduino would control the gate (or base depending whether you use a MOSFET or BJT).

Like this:

Though I think we need to know a little more about your LED STRIP.

Thanks for the diagram. I worked on my own schematic using eagle. The file is public on my mobileme account https://files.me.com/john_rickman/5zq1om. It would be nice if it can be checked for correctness.

Thanks!

That's not in your Public folder (or your Public folder has a password.)

Also more people can look at it if you distribute it as a PDF or Image (like JPG or PNG.) Not everyone runs or has Eagle installed.

Sorry I forgot I protected it, the password is arduino for those of you that have eagle.

Here is a png of the same thing https://files.me.com/john_rickman/sqlspe also with password arduino

Sorry your diagram is totally wrong. Each LED needs it's own resistor, then need to be in the collector to positave, the base needs to be connected to the arduino through a resistor and the emitter should be at ground.

I'm with mike. ... and I also don't know what that transistor is doing in your diagram. Is that something you bought or something you are building?

Here is the modified schematic https://files.me.com/john_rickman/kmmc6v password arduino, the transistor is there to act as a switch.

Better but still not right. The arrow on the transistor is pointing in the wrong direction you need an NPN transistor here not a PNP as you have drawn. The emitter should be connected to ground not +5V. The base should be connected to a resistor with the other end to the arduino.

I updated my drawing so you can see what we are talking about The only difference is that you should be using parallel LED's and resistors. I am now assuming that you are not very well acquainted with schematic symbols... but we are being "particular" or "picky" because it is the language we need to speak to pass our ideas and solutions around... so we need to get it right. This is us helping you get it right.

Parts of a Transistor
E = EMITTER
B = BASE
C = COLLECTOR

Ok, I think I fixed the design. https://files.me.com/john_rickman/kmmc6v password arduino.

You may also be able to put 2 LEDs in series with a single resistor with a 5 V source (depends on the LED voltage drop). That would cut your current draw in half.
Making some assumptions:
17mA current flow desired
Vce - 0.5V,voltage drop across the transistor when on
Vled = 2V, voltage drop across the LED when on
Vsource = 5V, as shown on your schematic

Applying Ohms law, V=IR or V/I = R to calculate Rlimit:
(Vsource - Vled - Vled - Vce)/current = Rlimit
(5V -2V - 2V - 0.5)/.017 = 29.4ohm. so use a 30 or 33 ohm resistor
So, look into your specs for the LED and transistor to be used and calculate the current limit resistors needed.
Power rating needed will be small - with 0.5V across the resistor & 17mA, the resistor is only dissipating 8.5mA (P=IV, so 0.017 * 0.5), so 1/8W resistors are fine.

Connections into the base still not right.

So I believe I have it..

Yes that looks right. :slight_smile:

As far as what "CrossRoads" said earlier. I use the following web site for easy LED diagrams:

http://led.linear1.org/led.wiz

It is a wizard that will calculate how many LED's can go in series and what resistor value to use. It also has a single LED version. Great tool.
Just for future knowledge.