Sinking current - How to pull down a point to zero using Arduino pins

I was trying modify an RC car control using Arduino. Figured out 4 lines of control in the original control board using which I can control the motors.

These lines/points need to be earthed/connected to ground in order to activate an action.
eg; point 1 needs to be earthed to get the motor to go forward. and so on.

It would have been easy if it just needed a digital high to get invoked.But they need to be sinked.

I know Arduino digital pins can sink when they are low, up to some 20mA.Measured the sink current and it was some 1-5 mA only. ( Connecting the multimeter in series
with ground and the points)

So far good.

But when I measured the voltage between ground and these points , it was around some 9 V.
I think arduino pins cannot handle above 5 V even in low currents.( NOT SURE).

One way to get this done is to use transistors on each line , enabling the grounding by digital highs at base.

Is there any other way without using transistors? A voltage divider will work?

When using an arduino as a sink it is important that the scource voltage is not above the supply to the arduino either 5 V or 3.3.
You need to use an external transistor or you risk destroying you arduino.

You need to post a circuit diagram.

Ajan:
Is there any other way without using transistors? A voltage divider will work?

Possibly , you may need zeners though, a simple transistor is probably the easiest approach.

Ajan:
Is there any other way without using transistors? A voltage divider will work?

No, but you can use transistors packaged up conveniently in an IC like the ULN2803.
8 channels and handles higher voltages.

There are compelling reasons to consider using transistors.

  1. A $0.20 transistor is cheaper than a $3 AVR chip
  2. Transistor array driver chips are really inexpensive.
  3. The solution here screams "open collector", which is what you get with ULN2003 or discrete NPN transistors. The wiki explains it all. Open_collector
  4. Voltage dividers are not magical and have some real draw backs in general but in my opinion definitely doesn't belong in this solution.

I urge you to consider using a transistor to do the muscle work and keep your AVR signal pins sending signals to "perform" heavy lifting to parts designed to do so.

The solution here screams “open collector”

Of course all of us with 20 years or more electronics experience know what you mean and have experienced that feeling but I don’t think the OP appreciates that comment as much as the rest of us. A low tech option for people who should never be seen with a soldering iron in their hand (because of the disaster that would result: see photo)
20151128_230251_resized.jpg

is a small arduino friendly 5V relay board that can be easily interfaced with jumpers. They come in the 4-relay variety.
4-relay module

Oh please!

Don’t advise people to use ULN2003/ 2803!

(here we go again...)

Oh please!

Don't advise people to use ULN2003/ 2803!

Don't just complain. Provide a compelling alternative.

Thank you all for the responses.
I'm convinced that transistors are the best option.

@Paul__B

Paul__B:
Oh please!

Don't advise people to use ULN2003/ 2803!

Can you please explain why transistor arrayULN2003/2803 are not good options?

pwillard:
4) Voltage dividers are not magical and have some real draw backs in general but in my opinion definitely doesn't belong in this solution.

I tried using two 1K resistors to divide voltage and tried on another control board
which has 2.9 V sink voltage.I got 1.5 V at arduino pin to sink and it worked good.

My friend Tom suggested this about using voltage dividers:
"I thought about that, but when you're not driving the pin, it'll be at 9V, so you might blow up the ATmega chip."

Can you people share your thoughts about using advantages/disadvantages of using voltage divider in this context?

A voltage divider is to be used on an INPUT. The voltage divider happens to be an easy and effective level-shifter, but it has drawbacks due to its simplicity. In this context (5V device output), it is not a "level-shifter".

Is there any other way without using transistors? A voltage divider will work?

Short answer, NO. Voltage dividers won't work.

The OP stated he needs to sink current by pulling four nodes to GND.
As ALREADY stated, this application SCREAMS OPEN COLLECTOR.

@OP,
Do you understand what "open collector" means ?
If not, please say so, so we can bring you up to speed on that.
(or you could just Google it, if you chose to)

On another note, it would be NICE if we knew HOW MUCH current needs to be sinked ? (I want to say "SUNK", but in 30 years of electronics , I don't recall hearing that used in this context.

Thanks again for the valuable inputs.

Ajan:
"One way to get this done is to use transistors on each line , enabling the grounding by digital highs at base.
Is there any other way without using transistors? A voltage divider will work?"

I have mentioned already in the original post about the use of transistors and hinted the open collector configuration, as solution. Though I did not use the term ope collector.( in the above quote)

Also I have mentioned the current in the original post, 1 to 5 mA.( I got this by connecting the multimeter between ( in series) with ground and the control points)

I appreciate you all reaffirming the use of transistors as a solution.

But I am still curious why voltage divider should not be used in this case.

Paulcet:
A voltage divider is to be used on an INPUT. The voltage divider happens to be an easy and effective level-shifter, but it has drawbacks due to its simplicity. In this context (5V device output), it is not a "level-shifter".

I did not understand this comment.

"voltage divider is to be used on an INPUT" - Why not in output , for sinking - in this context?
"but it has drawbacks due to its simplicity" - What are the draw backs?

Either I am missing some obvious principles of electronics/electricity. My intuition says- do not use voltage divider . But my brain questions it . Please help.

My friend Tom suggested this about using voltage dividers:
"I thought about that, but when you're not driving the pin, it'll be at 9V, so you might blow up the ATmega chip."

For low current, ULN2x03’s are acceptable. I use them routinely myself. But only when I’m dealing with a small load, not when I have to switch any significant amount of current.

If you’ve got a bunch of things that are getting pulled up to 9v, but you only need to sink a few mA from to pull to ground, the 2003/2803 would IMO be a pretty good option. They don’t pull all the way down to zero - it goes to like 1-1.4v IIRC, depending on load - that’s probably low enough for the device in question to recognize it as low, which is all you need (since as you’ve said, the current you need to sink is <5mA - so that means this is just the input for something that then controls the motor)

Voltage dividers, unlike transistors, are not controllable. I assumed you needed to be able to control the current sinking nodes. If not, why not just jumper them to ground ? Why would you need to post if you didn't need control of the sinking ? You simply jumper them directly to ground and be done with it.

Ajan:
My friend Tom suggested this about using voltage dividers:
"I thought about that, but when you're not driving the pin, it'll be at 9V, so you might blow up the ATmega chip."

Your friend is correct perhaps he can explain.
As asked post a diagram of your idea and we can say why its wrong.

OP
Try drawing it out.

An open collector 'collects' current not volts.

Consider when it is switched off though what happens to the terminal voltage at the arduino output pin?

A voltage divider divides volts what you are trying to do is 'divide' current.

Ajan:
Either I am missing some obvious principles of electronics/electricity. My intuition says- do not use voltage divider . But my brain questions it . Please help.

My friend Tom suggested this about using voltage dividers:
"I thought about that, but when you're not driving the pin, it'll be at 9V, so you might blow up the ATmega chip."

That's it. You are missing some obvious principles of electronics. Not that I am putting you down. Asking questions is a good thing, but we don't have time to teach you electronics 101. Many of the people helping here have studied/practiced electronics for years and the reasons not to use a voltage divider in this application are obvious to us.

You have your answer. Are you trying to avoid it?

Ajan:
But I am still curious why voltage divider should not be used in this case.I did not understand this comment.

"voltage divider is to be used on an INPUT" - Why not in output , for sinking - in this context?
"but it has drawbacks due to its simplicity" - What are the draw backs?

Either I am missing some obvious principles of electronics/electricity. My intuition says- do not use voltage divider . But my brain questions it . Please help.

My friend Tom suggested this about using voltage dividers:
"I thought about that, but when you're not driving the pin, it'll be at 9V, so you might blow up the ATmega chip."

What you're missing is Ohm's law. There are three variables in there, voltage, resistance AND CURRENT.
There is no voltage drop across a resistor unless there is current flowing (that's the issue in whatever Tom was envisioning). And any change in the current flowing will change the voltage drop.

Voltage dividers only work when the current across the two legs of the voltage divider is equal (so you can't be driving a load, or sourcing or sinking any current in the middle - all you can be doing is measuring that voltage, pretty much) - otherwise the voltage at the middle of the divider will change. That's why you normally use it for inputs - an analog input involves negligible current, so it's fine to divide the voltage down, and analog inputs need analog voltages.

You can't use it for powering things, because that load will throw things off.

And you can't use it to control things, like you're suggesting.
How are you even proposing to connect it? I can think of at least three ways, but they're all various shades of wrong, and if you draw them out and look at ohm's law...

So yeah, you need transistors of some sort for this!