Proper use of Open-Drain Output pins

Thread Starter

Marquis

Joined Jan 18, 2015
16
I'm a little confused about open-drain outputs. In my case I have a microprocessor that will be running on a battery so I'm trying to save power. I have a few components, a sensor and a large draw light that draw a fair bit of power. I want to use the pin to turn power to them on and off. How do I go about that using the open-drain pin?

I'm more used to working with arduinos where I can just turn off the pin to disable the component and save power. How do I go about the same thing using an open-drain pin?

Thanks
 

Papabravo

Joined Feb 24, 2006
21,228
Using an external pullup with an open-drain output only consumes power when the output is LOW. When you turn the output off, it goes to the value of the voltage on the other side of the pullup resistor and no current flows.
 

Thread Starter

Marquis

Joined Jan 18, 2015
16
I should also add that some of the things I want to control will likely draw more current than the chip can sink. So I take it I need to use it control a larger transistor.
 

hp1729

Joined Nov 23, 2015
2,304
I should also add that some of the things I want to control will likely draw more current than the chip can sink. So I take it I need to use it control a larger transistor.
What are you having trouble with? Did you do the "Blink the LED" exercise on the Arduino? when the output goes low the output turns on. Turn on a PNP transistor to drive something of higher power.
 

Thread Starter

Marquis

Joined Jan 18, 2015
16
I'm sorry, obviously I have not been clear enough in my question.

I am using an arduino to run a DS2408 which is a one-wire switch. The switch needs to activate a few items. The arduino is running on 3.3 votes and powers the DS2408. The item that the switch turns on is a 5 volt item that draws a fair bit of current. It's basically a small 5 volt bulb for heat.

Screen Shot 2016-11-02 at 12.47.34 PM.png
Is my circuit correct? I don't think so. The DS2408 can be input or output. I am using it as an output switch. It is an open-drain type switch. So this should work, but I am not sure if I can sink that kind of current through the switch. I suspect I need to use the switch to run a larger transitor that will actually control the bulb, but I'm not sure of the configuration for that.

Any thoughts? Thanks.
 

MrChips

Joined Oct 2, 2009
30,824
Why are you using the DS2408S in the first place?
Why not use a single NPN transistor or a logic-level N-Channel MOSFET?
 

Thread Starter

Marquis

Joined Jan 18, 2015
16
Why are you using the DS2408S in the first place?
Why not use a single NPN transistor or a logic-level N-Channel MOSFET?
I'm using the DS2408S because I need to run a few different items. Basically, because I have run out of ports on my arduino. The arduino is busy doing the inputs so I'm using the DS2048 to handle turning things on and off.
 

MrChips

Joined Oct 2, 2009
30,824
I'm using the DS2408S because I need to run a few different items. Basically, because I have run out of ports on my arduino. The arduino is busy doing the inputs so I'm using the DS2048 to handle turning things on and off.
Fair enough.

The max sink current is 20mA. Will your bulb turn on at 20mA?
With a series resistance of 300Ω plus an ON resistance of 100Ω, the most you will get is 5V/400Ω = 12mA.
With a bulb in series you will get a current much less than 12mA depending on the resistance of the bulb.
 

Thread Starter

Marquis

Joined Jan 18, 2015
16
I am pretty sure that I will be drawing more than 20mA. And I assume that the 20mA is total for all the items being controlled by the DS2408. So that is my issue. How do I set this up so that the circuit isn't running the power through the control switch?
 

AnalogKid

Joined Aug 1, 2013
11,056
So this should work, but I am not sure if I can sink that kind of current through the switch.
Look up the continuous current rating for the switch part and divide that by 2.
Calculate or look up the current through the load device if the switch were zero ohms.
Compare the two numbers.
If the load current is greater than the reduced switch part current, you need a different part.

ak
 
Top