Help with octal latch ICs and signal routing.

Started by ahappybunny, August 07, 2011, 06:04:58 AM

Previous topic - Next topic

ahappybunny

Hey Guys,

My name is Matt and I am new to the world of building pedals. I was an electronics tech in the military about 7 yrs ago and some of that knowledge stuck with me, so I figured I would try my hands at building a pedal. I am using a series of 3 state octal latches to remember input voltages and use the outputs to trigger relays to route signal. I was hoping someone on here might have some experience with the matter or might be able to guide me to a thread with some more info.

The specific issue I am having is that I understand how the latch IC works, but I am unsure as to the power requirements. It is telling me that I can only feed it 0.1A into the Vdd, 10mA into any input, and draw 25mA on any output. My question is, with a 9v dc in, how would I get there? I imagine using some resistors and caps to clean up the power and step it WAY down may work, but I am unsure. I am doing research and may get there before you guys post so I will reply as needed.

Again, I apologize if this is basic electronics know-how, but it has been a while for me and if anyone has any suggestions for simplifying the process, I am all ears.

Thanks,
Matt

CynicalMan

#1
Which IC?

Hopefully it won't consume 0.1A from the Vdd! The current consumption is mostly dictated by the output current. Look at the maximum supply voltage instead. If 9V is within the acceptable range, then the chip should be fine with it. You'll just want to make sure that the total power consumption of the chip is within the acceptable range.

The input current depends on the input resistance. Maximum Input Current = Maximum Input Voltage / Input Resistance. If necessary, you can put current limiting resistors on the inputs, but I doubt you'll need them.

The output current depends on the load that the chip is driving. If your relays will trip at a much lower current than 25mA, then you can just put on current limiting resistors. If not, then you'll need a relay driver like this:

R.G.

Quote from: ahappybunny on August 07, 2011, 06:04:58 AM
I am using a series of 3 state octal latches to remember input voltages and use the outputs to trigger relays to route signal. I was hoping someone on here might have some experience with the matter or might be able to guide me to a thread with some more info.

The specific issue I am having is that I understand how the latch IC works, but I am unsure as to the power requirements. It is telling me that I can only feed it 0.1A into the Vdd, 10mA into any input, and draw 25mA on any output. My question is, with a 9v dc in, how would I get there? I imagine using some resistors and caps to clean up the power and step it WAY down may work, but I am unsure. I am doing research and may get there before you guys post so I will reply as needed.
Welcome to the addiction.

First, read http://geofex.com/Article_Folders/fxswitchr/fxswitchr.htm, "A Programmable FX Switching System" at geofex. Specifically figure 7.

CMOS latches need a power source, not a current feed. You'll want to look up the datasheet for the IC. Typical ones use either 3-5V for the 74HC and 74HCT family, or 3-15V for the CD4000x and 74C families. They want a voltage NOT a current for a power supply. If you have the low voltage ones, you will need to regulate the 9V down to the typically 5V the chip needs. So using 74C or CD4000 chips makes the power supply simpler.

The specs of current into the input is a maximum rating, telling you NOT to go more than 10ma or you damage the protection circuits on the inputs. Typically, the input will not pull more than nano-amperes from a voltage inside the power supply range of the chip. Do NOT apply a voltage to the input that is outside the voltage being applied to the chip and you'll be fine. The 25ma rating on the outputs is telling you that the chip will either not supply/sink more than 25ma, or that it will be damaged if you try. If your load needs more than +/-25ma, you must use an external transistor or some such which is driven by the chip, and then in turn switches the heavier current.

I very much recommend "The CMOS Cookbook" by Don Lancaster for some quick study before proceeding. Used copies are cheap, and available at many libraries.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ahappybunny

Hey guys,

Finally got some time to get back to this. I did actually read up on that geofx page and also have the data sheets for the IC(s) in question. I already put  the appropriate buffers on the in and the right driver on the out of said IC. All my voltages are in spec, but there needs to be a step down and back up in current for the IC in question. (I can neither confirm or deny using the switcher setup from geofx as my inspiration orignially) :P   I do thank you guys SOOOO MUCH for your quick response and apologize I was unable to reply sooner. Again, I apologize if this is rudimentary, but it has been many moons since last I held a soldering iron. I hope to continue to expand my knowledge and hopefully can become a regular member of the forum.

Thanks,

Matt

ahappybunny

Hey Guys,

After much delay, I am back. RG, I did not realize it was you. *bows before your awesomeness* So, here is the situation. I have followed your guide to making this thing work as best I can, but alas, I am still having issues. The switching section works, flawlessly. No problems there, now the issue arises where I cannot get the transistor to power my relay. I have tried the uln2003 and the bs170(well, a clone, but the same piece either way). Neither of them appear to work. :(

I have everything connected as close as possible to your guide RG, but cannot get the damn relays to trip. Link for datasheet for relays in question.
http://www.fujitsu.com/downloads/MICRO/fcai/relays/a.pdf

If I am reading it right, this relay draws 140mW. At 9 volts, .015 amps. The chain is good up to the octal latch, but after that is where it starts to fall apart. I have the 1k resistor to the bs170 gate, 10k tied to ground for stability. The drain ties to my relays negative terminal. 9V goes to positive terminal and there is a diode in parallel. Source ties to ground. I flip the switch, nothing happens in the relay, no change. When I try to use the uln2003, same result.

I have tried researching this on my own and feel like an idiot for not having figured this out, but I am desperate to get this damn thing working!! Please tell me I am just stupid and have something backwards.  :icon_mad:

R.G.

1. What is the *exact* model number of the relay you have, copied off the relay itself?
What I'm after here is whether you have a relay that *can* be flipped with 9Vdc. It's not as simple as 140mW so .14W/9v. The relay coil must be rated for the power supply voltage (or lower in some cases) to draw enough current to change state. A 12V relay will not work reliably on 9V even if the coil is pulled properly.

2. Does the relay work without the logic stuff? That is, when you connect the proper voltage across it, does the relay flip? When things don't work, simplify. A relay only knows one thing - is its coil pulled to the correct voltage/current or not. So try that out in isolation from your logic/buffers.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ahappybunny

The relay is the 9v double winding model. AL-D9W-K. I have several of them and they do indeed work when just 9V is involved.

R.G.

That being the case, does your logic circuit give it the right pulse on one coil for set, and the other coil for reset?  A latching relay will be set one way by a single pulse, but will stay there if all you do is release the coil or pulse it again. You have to pulse the second coil to get it to flip the other way.

And some latching relays are polarized. You have to pull the 9V the correct polarity on each coil.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ahappybunny

Curses! I didn't think about that. Polarity is good, but I didn't think about the latching. Quick test to confirm! Thank you pedal lord! :P

ahappybunny

Yup, latching relays. Have to get non-latching ones or figure out how on earth to make these work with what I have... :icon_confused:

PRR

Use simple one-coil relays.

If you are near a Radio Shack: their "12V" relays will clack on a FRESH 9V battery. Try hot-wiring relay to battery to confirm, before you get into transistors.

Long-term you DO want to get a "right voltage" relay. I had the 12V working for a few days, forgot the mis-spec. One day it didn't want to work. I got a little crazy before I remembered to try a fresh battery (or find a true 12V supply).
  • SUPPORTER

ahappybunny

Hey Guys,

(sigh) I'm back again. Proper NON-latching relays arrived today. Joy! Put one in the IC testing bracket of awesomeness, wired it up per RG's guide, epic fail. Still not latching correctly. The odd thing is that when I turn the circuit on before engaging any switches, the relay trips, as if activating, but my multimeter shows neither throw being connected. It seems the relay is in a state of limbo between the two two positions...not sure what to make of it.

I just want to make sure I have this wired right and all the components are right. (Stupid question warning) Were the resistors on the BS170 specific to using 5v? Logic would dictate such, but I wanted to be sure. If so, I either need to buy 5v relays and a 5v supply. Or I can figure out how to make this setup work. I took the initiative and tried to use the resources below to figure out resistor values to bias, to no avail. My limited knowledge of the subject places me at a disadvantage. Might be time to take some classes...

Any help in what to do: whether it be resistors needed, websites to use to find that out, or buying new relays for the 5v setup, would be appreciated.

Thanks!

http://www.electronics-tutorials.ws/transistor/tran_4.html
http://www.daycounter.com/Calculators/Transistor-Bias/NPN-Transistor-Bias-Calculator.phtml
http://www.nteinc.com/specs/400to499/pdf/nte490.pdf

G. Hoffman

I can't add much to what has been said by guys much more knowledgeable than me, but I'll make two comments.  Does your latch do what it is supposed to do when you just have it hooked up to LEDs?  Second, do you have a schematic you can post of what it looks like when it isn't working?  That can help a lot in debugging via the internet.

Oh, and R.G. is right about the CMOS cookbook.  I learned a lot when I worked my way through it, but it is even better for trouble shooting when I don't know how to solve a problem.  I can usually find it in there.


Gabriel

PRR

What voltages did you end up with? 9V supply and 9V relays? Does the 9V stay at 9V or sag?

Still, "no contact" suggests you are mis-reading the confusing pinouts.
  • SUPPORTER

R.G.

Gabriel and Paul have the right advice.

- does the IC itself switch its outputs high and low as expected? If this doesn't work, the relays can't possibly work.
- a schematic of what you have would be a huge help for us to make suggestions
- the power supply and relay rating need to match reasonably well under all "relay on" conditions
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ahappybunny

Gentlemen,

It works. I was misreading the pinouts on the relay. I have been up almost 24 hrs and was too tired and frustrated to notice. Works beautifully with the ULN2003 setup. I thank you for your patience and apologize if my questions were....simple, for lack of better word. Now, if you will excuse me, I have a 12 yr old single malt with my name on it.

Thanks again guys!

-Matt