Maker Pro
Maker Pro

How to use simple IC Chips?

galantida

Oct 27, 2012
19
Joined
Oct 27, 2012
Messages
19
Hello All,

I think I am really burning out parts but I can’t be sure. I have had some luck with simple transistor circuits but now that I purchased some IC chips they don’t seem to be behaving as I expected. Then after I play with them for a few minutes they don’t even seem to behave the same as when I first started working with. It is at this point I throw them in the questionable part bin and grab another of the same model. After a few iterations of this I thought I’d better seek help.

I bought the chips below
74HTC04 Hex Inverter
74HC138B1R 3 To 8 Decoder (Inverted)
74HC238N 3 to 8 Decoder (Non-Inverted)

From their data sheet I believe these are all 5 volt chips. On all the chips I am connecting the ground to GND and VCC Pins.

On the decoders I am connecting 5 Volt negative to one of the three input pins and that special input pin that enables the outputs on the entire chip. On the 0-3 output pins I have connected LEDs and the appropriate resistors but they never light. I eventually applying negative voltage between the chips output and the led resistor to get the led to come on and my bench power supply shuts down. (It’s a homemade power supply I made from a PC power supply. It shuts down when there is a short)

On the Hex Inverter I connected the same diode and resistor combo to one of the inverter outputs. Now the LED lights but when I supply 5 volt negative to that inverters input the LED stays lit. Sometimed it dims slightly but never goes out as I thought an inverter would. After a few minute of fiddling I can eventually get the LED to go out but it never comes back on. At this point I think I have killed the chip.

No smoke or funny smells but I believe I have killed 5 chips of each type so far. If I were to ask specific questions they would be…

Is 5 volt too much for these chips?

Is applying reverse voltage of 5 volt enough to kill chips of this type? Meaning mistakenly applying negative 5 to the output side of the chip.

How bad is static to modern chips? It’s still warm and humid here and it’s not like I am dragging my feet on a carpet or anything. But I am not wearing a static wrist band either.

Any other ideas what I could be doing wrong?

Any tips for working with these types of chips?


Hope you guys can help?
Dave
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I bought the chips below
74HTC04 Hex Inverter
74HC138B1R 3 To 8 Decoder (Inverted)
74HC238N 3 to 8 Decoder (Non-Inverted)

These are all CMOS ICs. That means they can be damaged by static electricity, even if you don't feel it.

From their data sheet I believe these are all 5 volt chips.
Yep

On all the chips I am connecting the ground to GND and VCC Pins.
Umm, no. Connect +5V to Vcc and ground (your negative lead) to GND.

On the decoders I am connecting 5 Volt negative to one of the three input pins and that special input pin that enables the outputs on the entire chip. On the 0-3 output pins I have connected LEDs and the appropriate resistors but they never light. I eventually applying negative voltage between the chips output and the led resistor to get the led to come on and my bench power supply shuts down. (It’s a homemade power supply I made from a PC power supply. It shuts down when there is a short)
It sounds like you're shorting your power supply through the input protection of the chips. That will kill them.

Connect 0v, negative, gnd (whatever it's called on your power supply) to Gnd, and +5V to Vcc. Any connection to an input should be to either GND or Vcc on the chip. NEVER anything outside that range.

For CMOS you can connect the inputs via a 10k resistor (from either Gnd or Vcc) which will still work, but provide plenty of protection should you accidentally connect it to an output.

Is applying reverse voltage of 5 volt enough to kill chips of this type? Meaning mistakenly applying negative 5 to the output side of the chip.
In an instant.

How bad is static to modern chips? It’s still warm and humid here and it’s not like I am dragging my feet on a carpet or anything. But I am not wearing a static wrist band either.
It's bad.

try not to touch the pins with your fingers. Make sure you connect the Vcc and Gnd connections first (A capacitor across these will provide significant protection).

Any other ideas what I could be doing wrong?
I think the big one is that you're not connecting up the power correctly.

It sounds like you have three power supply connections. You speak about +5, gnd and -5. This may be because you have a double ended power supply (-5V-0-5V) or because you have a separate ground connection.

You only need 2 connections. the negative and the positive, and you should read 5V between them. the negative is called Gnd, the +ve, Vcc (or Vdd)
 
Last edited:

galantida

Oct 27, 2012
19
Joined
Oct 27, 2012
Messages
19
Thank you so much for your reply. I think making my own power supply just confused me even further on the positive/negative/ground situation. Now that I have the chips connected correctly they are working so they seem to have survived my experimenting. I am now, back to having fun and trying different circuits on my breadboard.

I do have one more question about the chips though. The overall circuit I am trying to make is a 3D LED cube driven by an Arduino. Right now I am testing with a 4x4 grid of LEDs with all of the anodes connected across the rows and all the cathodes connected across each the columns. This allows me to light any single LED by applying positive to its row and ground/negative to its column. (This is working)

I then connected the outputs from one of the decoder chips to the rows and the outputs from the inverted version of the decoder chip to the columns. This allows me to use a decoder chip outputs (e.g. HLHH) and the inverted chips outputs (e.g. LHLL) to drive the grid using the limited inputs on the decoders. (So far this works too, sort of)

When I change the inputs, some LEDs begin to grow brighter and some dimmer until most of the time it eventually settles on the LED it is suppose to. This is a two second process that seems almost like organic behavior. My current thinking is that I need some drain or resistor connected to ground to help shut off the LEDs faster and stabilize.

If there is a better direction I should be looking into please let me know.
Also thanks again for your help Steve. It is stumbling blocks like that which can kill a new hobby before it even gets started so I really appreciate it.

Dave
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Good to hear that your chips survived. You obviously didn't do the worst I imagined you did. It doesn't mean they're not damaged though.

With that matrix arrangement of LEDs you need to have resistors in one leg. So you could put (for example) 220 ohm resistors in each anode leg.

Another important thing is to make sure that every unused input on the CMOS IC's is tied to either ground or Vcc.

You may have inadvertently set up an oscillator if you're using the same output to drive the LED as you use to drive the input of a gate being used to invert it (especially where the output of that gate connects to it's input via some circuit element).

In logic circuits, inputs need to be kept high or low, there is a no-mans-zone in the middle that will cause strange and undefined behaviour. If your output is loaded so that it drops more than about 1V from Vcc, or above 1V from Gnd (so between 1 and 4 volts) then you're getting close to this region. I suspect you've gone much further.

What you should do is buffer the signal to the LED (i.e. the output powers nothing but the LED). That way, loading it down affects nothing.

You could have the output going to the inverter, but instead of going to the LED as well, it goes to first one inverter and then a second (a signal inverted twice is unchanged). Then the LED and its resistor connect between the outputs of the inverter strings. This approach will use a lot of inverters. You could also use a duplicate decoder.

another approach (which will work for testing) is to increase the value of the resistor to something larger (say 4k7) which will ensure that the output voltage is not loaded down (the LEDs will be dim though).

If you have a circuit diagram that you're working from it would help if you can post it as I'm making an awful lot of assumptions here. I may be able to scribble down some circuit diagrams for what I've spoken about here because I understand that words are often not enough.
 

galantida

Oct 27, 2012
19
Joined
Oct 27, 2012
Messages
19
Sorry it took so long to reply but it took me a few days to test your ideas.


*** What I Had ***

In my original circuit I simply had the output of one decoder chip on the anodes of the LEDs in the grid and the other decoder output on the cathodes of the grid. I had a DIP switch block to control my inputs. This allowed me to select which of the input pins on the decoder to send +5V to. The problem is they were single pole switches so when in the off position they did not connect the IC input pin to GND. I also didn’t realize how inaccurate these DIP switch are. I would run my finger along the top of them and my LEDs would change.

The only resistor I had in the entire circuit was on the positive feed dropping the voltage of the entire circuit to an LED safe level. It made me nervous to have only a diode between the outputs of two decoder chips but it seemed to work.


*** What I Fixed ***

I could not find a way a safe way to test your ideas in the circuit without ordering double pole switches. I decided I felt comfortable enough to introduce my new Arduino to the circuit. The Arduino has +5V and GND pins which I used to power my circuit. Then it has output pins that I can set through software to either +5V or GND. I connected these pins to the inputs of the decoders. Now the inputs will be either +5 or GND and the pin won’t be left in limbo. (This was to follow your advice)

Now I needed a place to put my resistor so I don’t burn out my LEDs. I really can’t drop the voltage of the entire circuit to an LED safe level because I don’t have control over the output pins on the Arduino. They are either GND or +5V so decided put a resistor as you suggested on the LED rows.

I am not sure which suggestion fixed it but it is working crazy fast now. By design, my 4x4 grid is only able to display one LED at time but I can switch them so fast that it looks like all 16 LEDs are on!

*** What’s Next ***

My goal is to continually simplify my circuits as I learn more and more. To decrease the number of resistors I plan to test if putting the resistor on the VCC pin of the decoder decreases the voltage of the outputs to an LED safe level. Remember I have no control over the +5V input I receive. I’ll post back how this works out.

I also noticed that a 4x4 grid works perfectly but when I increase my design to simulate a 4x4x4 cube the LEDs get noticeably dimmer. When I increase the simulation to my planned 8x8x8 they are barely lit. In my current design I can only display one LED at a time across the entire cube. I still have a lot of ideas to test here but I am open to others. (Special LEDs, Capacitors, driving each level of the cube independently)

I also plan to add support for controlling brightness and eventually use RGB LEDs so I can set colors. These parts were so expensive when I was a kid in the 80’s that I never got to try out all of my crazy ideas, I am having a ball!

Dave
 

galantida

Oct 27, 2012
19
Joined
Oct 27, 2012
Messages
19
I have been playing with this circuit for some time now. Steve's suggestion that every connection on the IC chip needs to be connected was very important. I want to post this for the next guys that discovers my post in a search.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I had a DIP switch block to control my inputs. This allowed me to select which of the input pins on the decoder to send +5V to. The problem is they were single pole switches so when in the off position they did not connect the IC input pin to GND.

You need a resistor between each input and ground to pull them down. CMOS inputs should not be left floating as they can take on any state (almost at random)

I also didn’t realize how inaccurate these DIP switch are. I would run my finger along the top of them and my LEDs would change.

The DIP switches are perfectly accurate. This is just a change in electric field causing the inputs to change state. pull down resistors (1k to 100k) would fix that.

The only resistor I had in the entire circuit was on the positive feed dropping the voltage of the entire circuit to an LED safe level.

There is no "safe voltage". You use a resistor to limit the current. Doing things this way will make your circuit misbehave in all sorts of ways.

I could not find a way a safe way to test your ideas in the circuit without ordering double pole switches.

You should have asked. I gave the answer above. It would have saved you time. There are occasions where even a double throw (not double pole) switch would also not work correctly.

The Arduino...

That's really using a hammer to crack a wallnut. However the same issues arise on the inputs of the arduino! (However you can turn on weak pull-ups on the arduino)

I am not sure which suggestion fixed it but it is working crazy fast now. By design, my 4x4 grid is only able to display one LED at time but I can switch them so fast that it looks like all 16 LEDs are on!

That's excellent. It's called multiplexing. It relies on your persistence of vision. 16 leds may appear to be on at once, but they will also appear to be only 1/16 as bright. This might be fine for 16 leds but as the number increase...

I also noticed that a 4x4 grid works perfectly but when I increase my design to simulate a 4x4x4 cube the LEDs get noticeably dimmer. When I increase the simulation to my planned 8x8x8 they are barely lit.

From 1/16 to 1/64 to 1/512. Yep, you need to have more LEDs on at once.

I still have a lot of ideas to test here but I am open to others. (Special LEDs, Capacitors, driving each level of the cube independently)

I would start by driving 8 LEDs at once. That's an entire row. So now your multiplexing 64 ways (down from 512). However, you'd be best off to drive more LEDs at once. Maybe an entire row (64 LEDs) so you only multiplex 8 ways.

This will require some magic to extend the IO capability (look at 74HC595's) beyond what your Arduino has. (and you need more current to drive the row or layer, so these drivers will need to be capable of handling a higher current.)

I also plan to add support for controlling brightness and eventually use RGB LEDs so I can set colors. These parts were so expensive when I was a kid in the 80’s that I never got to try out all of my crazy ideas, I am having a ball!

Brightness is trickier than you might think, and using RGB leds will multiply everything by 3. Get a single colour cube working first, then add brightness, finally try RGB. Don't think that something which works on a small (say 4x4x4) cube will necessarily work on a larger (say 8x8x8) cube.

Sorry I didn't get back to you earlier on this.
 
Top