Arduino pin to drain a circuit?

Apologies for the number of probably very basic questions I've asked over the past few days. But I could use a little more help.

There's an existing circuit I'm trying to hack in to, but before attempting it, I wanted to get the basic idea of something down first.

Let's say I have a circuit, in this example it's a simple LED. It's powered from a 5v source that also powers my Arduino through a USB connector.

What I want to do, is have the Arduino ground that circuit and cut off the power to the LED. I'm only using the LED circuit as an example since if it works with those current hungry buggers then it should work with anything right?

Initially, I tried using a digital output pin driven LOW and connected (first through a resistor, later not) to the LED's anode. That didn't work - it did in Virtual Breadboard but not in real life. Damn.

Then I tried a basic transistor circuit and must have gotten something wrong because when the Arduino pin (HIGH) switched on the transistor, the LED circuit stayed quite happy but the transistor got very hot and then burnt my finger (leaving a nice blister) when I removed it from the breadboard.

Is a relay my only real option here?

Hoping someone can point me in a better direction. Please - before I damage another bass-playing finger? ::slight_smile:

I'm really very confused at what you're trying to do.

Are you simply trying to control whether an LED is on/off from a digital output? :\

Yes and no.

I know the way I've presented the problem looks a bit daft.

But the actual circuit is a bit more complicated and has a press button switch that grounds the circuit to turn it off (including pulling an IC reset pin low). I need to add an Arduino controlled thing in there to which can ground the circuit in the same way as the switch.

What I want to do, is have the Arduino ground that circuit and cut off the power to the LED. I'm only using the LED circuit as an example since if it works with those current hungry buggers then it should work with anything right?

Well there is probably a valid question in there somewhere ;), but the example is very poor in my opinion. An Arduino output pin can both actively sink (ground out) and source (provide +5vdc). The problem is there is a maximum current flow allowed from a output pin no matter if it's high or low of 40ma maximum (30ma recommended). So your example of having a output pin 'ground out' the board's +5 volt is generating a 'short circuit' condition and will surely damage the output pin.

So if you can actually supply a circuit drawing of what you are trying to do, there would be a better chance of getting proper advice if it is possible or not.

Lefty

Well there is probably a valid question in there somewhere ;), but the example is very poor in my opinion.

Hahaha, yes fair point. :slight_smile:

I'll try to come up with a more accurate reflection of the problem in hand.

the actual circuit is a bit more complicated and has a press button switch that grounds the circuit to turn it off (including pulling an IC reset pin low). I need to add an Arduino controlled thing in there to which can ground the circuit in the same way as the switch.

If I understand what you've got, you can connect a single arduino pin, leave it as an input (with no pullup enabled). Connect ground, too.

To "activate" the circuit, change the pin to an output with a value of 0, delay a bit, then change it back to an input.

-j

"Grounding" somthing always involves a flow of current. We first have to learn how high thatcurrent is.

If it is - say - less 40mA the proposal from kg4 ist fine!
If it is higher you should in fact use a transistor. Please give us the diagram, so we can assess what went wrong the first time.
If it really has to be grounded, you most likely have to use a relay.

I need to get back into the office (where I have some of the circuit's schematic - there are bits missing) and I'll try and post it up.

Most likely, it is less than 40mA but there is an LED connected in there somewhere so I'd rather play it a little safe.

I'm beginning to think that a little 1A 5v relay might be a pretty easy way to do it after all. The 4ms delay wouldn't matter at all in this case and it'd give me a simple way of doing exactly what the switch does, but controlled from the duino.

Certainly learning a lot from this little project... and from all your help.

Reed relais work fine, their coil does not draw more than 10mA, they even come sometimes with an integrated diode. The 1A max of the switch seems to be no issue in your case. They are around 2 USD/1.50 Euro

I think what you need is an "open collector" driver, either in the form of a discrete transistor or a chip such as the 7406 or 7407. Unless you need full galvanic isolation (no electrical connection between Arduino and your controlled circuit), in which case either a relay or an optoisolator will be required.

All suggestions made before ARE "open collector" or "low side" drivers. The reamining questions are: What impedance is acceptable in the "on" and in the "off" state (or residual voltage in the "grounded state). The current in "grounded state has also been clear...

The 7406 is a nice candidate, however it comes as sixpack only, its advantage is easy interfacing and high output voltage compatibility.

This is the best I can do at the minute - it's an extract from an incomplete NES console schematic. So the *RST pin shown here is part of the cpu.

There is another switched circuit (power switch + LED) on the same circuit board which shares the same connection to ground but other than that, I can't find any more exact details about what it's connected to.

I know that joining the solder points of the switch causes a reset - so what I want to do is add an Arduino controlled element in parallel to that to do the same thing.

I'll probably go with the relay option but I'm curious what you all would do.