ULN2003 confusion
henrytj
Posts: 90
Thought I had my circuit worked out. I had watched a YouTube video where someone was driving relays directly from a UNL2003 without any resistor between them. So thinking that was correct and what the UNL2003 was made to do, I connected the UNL2003 outputs directly to my connectors for my old photo flash units. Testing out each connection one at a time with just one flash unit, it seemed to work great. But when I found my other working flash unit, and connected two flash units, each to separate UNL2003 channels, the flash units were both being triggered together, which is not what I wanted. After adding just a 100-ohm resistor (because I had a pack of them handy) it worked just fine. The flash units then triggered separately. So I apparently misunderstood the ULN2003 and how it's used. Now worried I may have risked some damage to the ULN2003 or Stamp, which seem to still work fine.
But, is 100-ohms enough? Problem is, I will likely be mixing different brand flash units on different ULN2003 outputs. My old flash units have 15V trigger circuits. Other newer, digital camera flash units will likely have 3-5V trigger circuits. A quick calculation, based on my limited recall of electronics, and guessing at the flash unit specs make me wonder if I should be using a 330-ohm resister on each output. I seem to recall when trying this project years ago I experimented with several resistor values when doing this with straight NPN switching transistors, that too high (like 1K ohm) resistors on the (collector, I believe) kept one of the old flash units from triggering reliably. So my old notes seemed to indicate that between 100 and 500 ohms worked, but this as based on experimenting and not on circuit calculation.
Also I am connecting the UNL2003 inputs directly to the Stamp I/O pin connections. Is that bad as well?
Yes, I'm doing too many things right now, being out of work and looking for a job, writing a sci-fi novel (I already have 10 short sf stories circulating the publishers) also trying my hand at screen plays (I have 2 registered screenplays now,) and trying to get a demo-reel short movie project going, all the while keeping a vigil to try to keep a mean-spirited neighbor (who can't seem to be reasoned with) from disappearing the couple semi-stray cats that I care for. Actually a third one, that I got fixed last year, has already gone missing. Thus my life is already filled with chaos, and trying to re-re-figure out this electronic stuff that I used to do.
But, is 100-ohms enough? Problem is, I will likely be mixing different brand flash units on different ULN2003 outputs. My old flash units have 15V trigger circuits. Other newer, digital camera flash units will likely have 3-5V trigger circuits. A quick calculation, based on my limited recall of electronics, and guessing at the flash unit specs make me wonder if I should be using a 330-ohm resister on each output. I seem to recall when trying this project years ago I experimented with several resistor values when doing this with straight NPN switching transistors, that too high (like 1K ohm) resistors on the (collector, I believe) kept one of the old flash units from triggering reliably. So my old notes seemed to indicate that between 100 and 500 ohms worked, but this as based on experimenting and not on circuit calculation.
Also I am connecting the UNL2003 inputs directly to the Stamp I/O pin connections. Is that bad as well?
Yes, I'm doing too many things right now, being out of work and looking for a job, writing a sci-fi novel (I already have 10 short sf stories circulating the publishers) also trying my hand at screen plays (I have 2 registered screenplays now,) and trying to get a demo-reel short movie project going, all the while keeping a vigil to try to keep a mean-spirited neighbor (who can't seem to be reasoned with) from disappearing the couple semi-stray cats that I care for. Actually a third one, that I got fixed last year, has already gone missing. Thus my life is already filled with chaos, and trying to re-re-figure out this electronic stuff that I used to do.
Comments
(So, you can cross that off your worry list.)
That's the protection diode. But, not sure how to do what when I am using multiple flash units at the same time, which may have widely different voltages ranging from 3V to 15V, or even higher.
Probably just a separate diode for each across the relay to whichever supply.
Those are Darlington outputs, they may not work out so well with lower voltage devices. Their collector-emitter saturation's being "1V" can take the P out of a 3V device.
Just for clarity's sake...
First that doesn't seem to be the case. Without output resistors, one 15v flash unit was triggering another that was one, or two, channels over. So there is some kind of crossover going on somehow. Adding just a 100 ohm resistor on each output stopped that from happening.
I am trying to keep the control box as simple as possible. As I am really in abject poverty. Right now, I have under $10 to my name until the next unemployment payment happens, which is a weak from now. My utilities are on the verge of being shutoff. It's the way my life seems to go. This is also why I never completed this project when I first started it almost 10 years ago. I just happen to find the box of that early effort recently when looking for something else. When I saw the ULN2003, I figured it would considerably simplify the completion. Like driving 7 channels for 50-cents total, rather than $5 each channel. I have looked for opto-isolators back then, but seemed I had trouble finding them.
The other thing is that I also found two more old flash units I had actually forgotten about. These are portible flash units (Norman 200C) that are probably 20+ years old. Unfortunately they are large NiCad battery powered, and the one battery is dead, and the other had started to melt a decade ago when I last tried to charge it. So I will also be trying to figure out an improvised means of powering them. If I had money, I'd just buy all new stuff and be done with it, and not be here asking questions. But, my destiny seems to be a life of poverty. I have a degree in science, yet my last several part-time temp jobs have been warehouse labor. Go figure.
I'm not the type of person who claims to know everything about everything but I can tell you that resistors are not needed on the outputs of a ULN for it to function properly. The output pins of a ULN are all ACTIVE LOW, meaning the pin connects to GND when active. I have absolutely no idea how you wired everything up and what your loads are on the ULN. I suspect maybe your flash units are too much of a load for the ULN to handle. Typically a single output can sink up to 500mA but the more outputs that are active simultaneously decrease this limit exponentially. The maximum total limit of the ULN is around 1200mA for simultaneous pins that are active. Relays are the way to go when you need to drive a load that is too much for the ULN.
P.S. - A chematic of what you have now could answer a lot of questions from those trying to help.
Anyway, will try to link/load the schematic I tinkered together.
Flash unit 1 is a Norman 400, unit 2 is a Norman 200C, and the 3rd is an older Canon Speedlite that usually attaches to the top of the camera. So far the resistors on the right-hand-side seem to work with 100-ohm.
http://www.ebay.com/itm/Solid-State-Relay-SSR-25DA-25A-3-32V-DC-24V-380V-AC-for-Temperature-Controller-/400401748678?pt=LH_DefaultDomain_0&hash=item5d39cdd2c6
I think there is still a misunderstanding. For example, for Flash Unit #1 (the highest voltage unit) the 15V is not the power supply to the flash unit. That one is 120V-AC powered. It is the sync connector voltage. The flash unit maintains a voltage on the sync circuit, such that when the (+) of the sync circuit is grounded, then the flash fires. That is how the flash unit detects that it should fire. So when the STAMP raises its output pin to HIGH, then the ULN2003 darlingtion pair conducts the flash sync (+) to ground, and the flash fires so that it fires.
This is different that the other application of controlling movie lights, which in the next project that I have planned. So I think the confusion is that there are two distinct and separate projects being discussed at the same time, which is my fault.
Watch your pocketbook -
Those solid-state relays are AC output devices (as in AC Output ONLY).
All well and good but that means you have positive voltage going to the output pins of the ULN, not good. You need to isolate those circuits from the ULN, again, small relays will do the job for example. The 4 channel relay boards you referred to earlier (around $5 on eBay) would work nicely.
Not true. The ULN2003 has an open-collector output, which can sustain up to 50V. This device doesn't source any current, it can only sink current through its outputs.
Also, pin 9 can be left open if none of the outputs are connected to inductive loads.
I agree, but the fact that Henry was having issues before he added resistors to the ULN outputs shows that something isn't quite right here. Maybe it's slight overkill but personally, I would isolate those circuits. It's cheap and easy to do. I'm not saying there aren't other ways to make this work properly, I'm just saying it's the way I would do it.
Anyway, I'll just resort to my old test and go with whatever seems to work, rather than cause an argument.
I returned home 15 years ago at my elderly mother's request and became her caregiver. It became a nightmare as her health got worse, and I discovered what a labyrinth it is to get assistance from the government. I wore myself out physically and mentally. Since her passing several years ago, I have been unable to get my life restarted again. So everything I do is 90% improvising. I actually built the project that I am working on now, the first time 10 years ago with a box full of TTL chips (counters, flip-flops, AND gates, etc.) I had when I was a kid, but my circuit maxed out at controlling only 3 flash units. (I should take a picture of it and post it.) Then when I bought the Basic Stamp kit at a Radio Shack store that was closing, I realized that I could do it so much better with a micro-controller. But I was smarter back then. I think I might have suffered a minor stroke near the end of being the caregiver for my mother as I was so totally stressed and exhausted. In going through some of my old math books I recall have once knowing how to do calculus, and frustrated as it seems so difficult to me now. It really is like I lost some of my faculties. And last couple years I can seem to find only part-time temp warehouse work. *shrug*
Again, I am sorry for the confusion. And this is becomming more involved that I had hoped. I really thought the uln2003 would greatly simplify what I had tried to do in the past.
Rest assured, the people here want to help so don't give up.
Hang in man,
DJ
Rectifier diodes.
1N4000-type (1N4001, 1N4002, etc.) are fine.
Thanks.