1
\$\begingroup\$

This is a schematic for the an internal input/output pins of an uln2003a and other such array transistor.

From what I understand, when no voltage is present on the first transistor, the current will flow from Ouput C to E or Ground. Here I'm, not exactly sure why we have a ground in the schematic as E should be connected to the ground itself.

Now the things I really don't understand is why is there a diode from ground to input. Wouldn't it allow current to flow from OutputC to Input? I guess if such thing would happen, the transistors would stop the current from flowing back to the input.

All output pins should be connected to some kind of positive voltage, so when the input is activated, the electron will be sunk into the output C.

Second thing, it looks like all inputs are connected together to the ground which makes it possible to actually trigger all inputs at once. The resistance between any pair of input is always around 18.88K ohm. Which makes me believe that if I put too much current on one input, it's enough to activate all inputs at once.

By looking at the diagram, we can see there is no diode to prevent current from flowing back from one input to an other.

The reason I'm asking is because I'm unable to understand how to wire this thing to a stepper motor. Most of the tutorial simply wire the input from an arduino for example and it just works. In my case, it seems to be pushing either too much current through the input or not enough because the output do not seem to be activated independently of the input.

I only have a digital analyzer so It's a bit hard to understand what's going on. I can see in the analyzer that the voltage is rising up or down for all channels.

I was trying to add some resistance on one wire to check how the output would change, after I got around 100k for a "clean" rise and fall for one single channel, I tried to connect the other channels but once the four channels were connected with each of them with 100k resistor before the input. I still got messed signals.

It's just a guess, but since I added resistor on each channel, it might prevent electron to flow back to each inputs. Like all of the connected input leak a bit of voltage to ground so it's technically not possible to flow back... With one channel used, it might be simply flowing through the diode below...

Anyone could clear this up... How is it possible 1 input drive multiple output?

Voltage put on input is 5v and on COM 12v. When a stepper motor is connected, I'd expect 12v to flow through the output ports that are open.

ULN2003A schematic internal

Here's the shematic of what I'm have right now:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$

3 Answers 3

5
\$\begingroup\$

I expect the ground symbol is to represent the connection to the IC substrate.

The diodes connected to the input and output are almost certainly parasitic diodes that are not really required but are created as part of the semiconductor design process. Since they are reverse biased under normal conditions they do not affect operation and the circuit can be analyzed as if they are not there. Current will not flow through them under the conditions you will be using.

I don't understand your explanation of what is going wrong. You should be able to drive all the channels independently.

Make sure that the E terminal (pin 8) is connected to the negative terminal of the power supply feeding the Arduino - it is important they share the same ground. If you have a separate power supply for the motor it's negative terminal should also be connected to the E terminal.

The COM terminal should connect to a snubber network, or zener diode to control the back-EMF of the motor to a reasonable value. Connecting it to the positive terminal of the power supply may stop proper action of the stepper motor except at slow speeds.

\$\endgroup\$
4
  • \$\begingroup\$ Oh thank you. Could you elaborate on the common ground, Is it that if some current is passing through 5v+ it has to go back to 5v- and from the 12v+ it has to go back to the 12v-. I'll have to check with some leds what's actually happening. \$\endgroup\$ Jun 17, 2017 at 21:30
  • \$\begingroup\$ @LoïcFaure-Lacroix - that's exactly right. It also has to pass from the input from the Arduino back to the arduino ground. It may not work using LEDs to indicate current as they drop too much voltage and will disturb operation. \$\endgroup\$ Jun 17, 2017 at 22:02
  • \$\begingroup\$ In your schematic you have the COM terminal connected to +12v. This will avoid damage to the ULN2003 but may reduce performance of the stepper at anything above low speeds. \$\endgroup\$ Jun 17, 2017 at 22:04
  • \$\begingroup\$ Yes finally it works with the motor. It seems to work at low speed which is why I didn't realize at first.The common ground was the real issue. Now speed seems to be the issue. I guess disconnecting the 12v to the COM will prevent coil to discharge energy in a loop. If there is no real way to handle this without risking breaking the uln2003, I'll try to convert those unipolar motors and drive them with my l293d chips. Do you have any suggestion to get higher speed? \$\endgroup\$ Jun 17, 2017 at 22:47
2
\$\begingroup\$

Your post provides a lot of explanation of what you think, but not much on why you think it, and a lot of what you write is just wrong. But here goes:

From what I understand, when no voltage is present on the first transistor, the current will flow from Ouput C to E or Ground.

Ordinarily, but not necessarily, E is tied to ground, at least to the input source ground. With no input, the transistors are not turned on, so only leakage current will flow, and the load will be turned off. "the current" will consist of a very low level of leakage - you can find the spec in the data sheet.

Here I'm, not exactly sure why we have a ground in the schematic as E should be connected to the ground itself.

Not necessarily, although usually. For instance, E might be connected to the load power ground through a small resistor to allow monitoring of total load current.

Now the things I really don't understand is why is there a diode from ground to input.

Note that the diode is reverse-biased under normal operation. What it does is to protect the internal base-emitter junctions in case a negative voltage is applied to the input.

Wouldn't it allow current to flow from OutputC to Input?

If the input voltage is positive, no. How could it? If the input is negative, again no, and again, how could it?

I guess if such thing would happen, the transistors would stop the current from flowing back to the input.

Yes.

All output pins should be connected to some kind of positive voltage, so when the input is activated, the electron will be sunk into the output C.

Yup. You seem to have missed the way this circuit is normally connected, as in

schematic

simulate this circuit – Schematic created using CircuitLab

Second thing, it looks like all inputs are connected together to the ground which makes it possible to actually trigger all inputs at once. The resistance between any pair of input is always around 18.88K ohm. Which makes me believe that if I put too much current on one input, it's enough to activate all inputs at once.

No, and I have no idea why you think that. With no voltage on a particular input, there will be no current through that channel's transistors, and that output will remain off. What you are seeing between inputs is not going to produce the effect you think.

By looking at the diagram, we can see there is no diode to prevent current from flowing back from one input to an other.

But the diodes in the transistors do.

The reason I'm asking is because I'm unable to understand how to wire this thing to a stepper motor. Most of the tutorial simply wire the input from an arduino for example and it just works. In my case, it seems to be pushing either too much current through the input or not enough because the output do not seem to be activated independently of the input.

First, I'm assuming that your stepper is unipolar, that is, with all coils connected to a common wire (or 2). This will usually mean a 5 or 6 wire motor. If so, you connect all the common wires to your stepper power supply, the other ends to the 2003 outputs, your drive signals to the appropriate inputs, and connect both your controller ground and the motor supply ground to the E pin.

If you stepper is a bipolar unit, with each coil independent and a total of 4 wires, then you need a more sophisticated driver, and the 2003 will not work for you.

I only have a digital analyzer so It's a bit hard to understand what's going on. I can see in the analyzer that the voltage is rising up or down for all channels.

Without a schematic of how your circuit is connected that makes no sense at all.

I was trying to add some resistance on one wire to check how the output would change, after I got around 100k for a "clean" rise and fall for one single channel, I tried to connect the other channels but once the four channels were connected with each of them with 100k resistor before the input. I still got messed signals.

Don't. Assuming you mean a series resistor added to the inputs, don't. Connect your drive signals directly to the inputs of the 2003.

It's just a guess, but since I added resistor on each channel, it might prevent electron to flow back to each inputs. Like all of the connected input leak a bit of voltage to ground so it's technically not possible to flow back... With one channel used, it might be simply flowing through the diode below...

Aaand - no.

Anyone could clear this up... How is it possible 1 input drive multiple output?

No idea. Please show an exact schematic of your circuit. Edit your post and use the circuit editor - the icon with the diode, capacitor an resistor. And please, no sketches, no pictures of your circuit, and no Fritzings.

Voltage put on input is 5v and on COM 12v. When a stepper motor is connected, I'd expect 12v to flow through the output ports that are open.

And again, this makes no sense. With nothing connected to an output "that is open", there is no possibility of current flowing through it. Where would the current come from and how would it get there? Electrons are not magic beasts which fly through the air wherever they want (well, lightning excepted) and if nothing is connected to a pin current cannot flow through it.

\$\endgroup\$
5
  • \$\begingroup\$ Here's the schematic, the resistance I measure is between all pair of input B1-7. \$\endgroup\$ Jun 17, 2017 at 21:45
  • \$\begingroup\$ @LoïcFaure-Lacroix - If you are measuring resistance with power on, the readings are meaningless. And your circuit looks right. So, one more time, exactly what is your problem? \$\endgroup\$ Jun 17, 2017 at 22:18
  • \$\begingroup\$ Measuring with power off. The problem was that 1 input would trigger all output, At first I didn't have common grounds but only the 12v ground was connected. \$\endgroup\$ Jun 17, 2017 at 22:23
  • \$\begingroup\$ @LoïcFaure-Lacroix - If that is still happening with the grounds properly connected, the 2003 is bad. \$\endgroup\$ Jun 17, 2017 at 22:28
  • \$\begingroup\$ Or potentially could you have not correctly configured the arduino pull *up*/down resistors and left them floating? \$\endgroup\$
    – Tyeth
    May 19, 2020 at 10:13
0
\$\begingroup\$

I would point out that the diode is meant as a flyback diode (I think that is what it is called) used to stop reverse current flow from damaging the device when driving an inductive load. Such as a motor. When the motor stops, as it slows down, it can induce a current in the opposite direction as that which was driving it. This current can hurt the darlington array, according to the datasheet. The diode pushes that current around to the input of the IC not into the output. Other than that, Kevin White's answer is more than I could have helped.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.