Pages: [1]   Go Down
Author Topic: Arduino pin to drain a circuit?  (Read 1047 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Sr. Member
****
Karma: 0
Posts: 304
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?  :smiley
« Last Edit: August 19, 2010, 01:47:53 pm by Eight » Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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? :\
Logged

UK
Offline Offline
Sr. Member
****
Karma: 0
Posts: 304
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 19, 2010, 02:01:00 pm by Eight » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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  smiley-wink, 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
« Last Edit: August 19, 2010, 02:13:54 pm by retrolefty » Logged

UK
Offline Offline
Sr. Member
****
Karma: 0
Posts: 304
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Well there is probably a valid question in there somewhere  smiley-wink, but the example is very poor in my opinion.
Hahaha, yes fair point. smiley

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

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

"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.
« Last Edit: August 19, 2010, 03:12:59 pm by mpeuser » Logged

UK
Offline Offline
Sr. Member
****
Karma: 0
Posts: 304
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 1
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 20, 2010, 04:25:17 am by anachrocomputer » Logged

0
Offline Offline
Edison Member
*
Karma: 0
Posts: 1103
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

UK
Offline Offline
Sr. Member
****
Karma: 0
Posts: 304
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: