Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

My LOGIC!

Status
Not open for further replies.

shockz

New Member
HI guys, hving a little problem building a circuit comprising a number of logic chips. Im working with the CMOS 4000 series and cannot get the circuit to behave properly. when my iputs are not connected they fluctuate between high and low. just moving my hand over the circuit affects it. how do i solve this?
 
Add a resistor from the inputs to ground. By the way, what is "proper" behavior for your circuit when the inputs are not connected?
 
Do you have bypass capacitors across the supply line?

You need ceramic capacitors in the range 10 nF to 100 nF.

One capacitor per 2 ICs is good rule of thumb.
 
Yep ! Inputs of any logic IC must never be left floating (or high-impedance (HI-Z)) if they are in use. The only two valid logic levels are 0V or VCC. So each IC input not directly driven by another IC must be either pulled down to ground or pulled up to VCC through a pull-up/down resistor (typically 5K-10K).

when my iputs are not connected

When they are connected, to what are they connected ?
 
The reason that your gates are fluctuating is because they are constantly picking up random RF that may go above their 5V reference. The best way to fix this problem is to attach a pull up, or pull down resistor to the inputs. Any unused inputs should be attached to Vcc or ground based on what you want the circuit to do.
 
Yep ! Inputs of any logic IC must never be left floating (or high-impedance (HI-Z)) if they are in use. The only two valid logic levels are 0V or VCC. So each IC input not directly driven by another IC must be either pulled down to ground or pulled up to VCC through a pull-up/down resistor (typically 5K-10K).



When they are connected, to what are they connected ?

I don't bother using resistors. I just connect the unused inputs to Vdd or gnd.

In some cases it does not matter whether you connect to Vdd or gnd but in others it does.

For example, if you are using a JK Flip Flop to toggle, the J & K must be connected to logic 1.

Logic 1 is usually Vdd, but one FF I know has an active low K, so logic 1 = gnd (ie. negative logic).

In the case of TTL, an open is equivalent to a high.

So only CMOS inputs (which have a very high input impedance) need to be tied high or low.
 
Last edited:
You have invented the PERHAPS-GATE.

Get it patended quickly.
 
I don't bother using resistors. I just connect the unused inputs to Vdd or gnd.

If the design is implemented on a breadboard, it is indeed easier to directly tie unused inpupts to Vdd or GND. But it you intend to make a PCB, might be a good idea to use pull ups/downs so this way, you can still use the unused logic to add functionality or correct a bug !!

Also, I suspects that his inputs might be wired to push-buttons to inject "ones" in the system but he forgot the pull-down resistors. That's why I was asking...
 
You have invented the PERHAPS-GATE.

Get it patended quickly.

LMAO! Good one, but not helpful to the initiator of this thread. Perhaps if Shockz were to present a schematic of what he has constructed, we ALL could help him with his problem. PERHAPS-GATE...we've all been there at some point in time... LOL!

Shockz: more information is needed so, if you can, present/post a schematic of your design so it can be analyzed for the issues you are experiencing.
 
Yes, it is sometimes useful to have some flexibility in a PCB.

But I just use wire links if I want flexibility.
 
To answer the orinial question as briefely as possible.

HI guys, hving a little problem building a circuit comprising a number of logic chips. Im working with the CMOS 4000 series and cannot get the circuit to behave properly. when my iputs are not connected they fluctuate between high and low. just moving my hand over the circuit affects it.
That's pretty normal.

The inputs pick up noise, as mentioned above.

how do i solve this?

Connect the inputs to either +V or 0C, as mentioned above.

If you're connecting a switch to one of the inputs you'll need a pull down or pull up resistor depending on how you connect the switch.

Are you using any switches?

Please post a schematic.
 
**broken link removed**

this is my schematic. thanks for the tips guys. the problem i have is ive been using a push button and so when pressed this gives me a true input but when the button isnt pressed obviously the input is left floating. i need to purchase some spdt switches. in doing so ill no longer have floating inputs as i will connect one pole to VCC and the other to ground. so i can switch between both stated without causing floating inputs.
 
. i need to purchase some spdt switches. in doing so ill no longer have floating inputs as i will connect one pole to VCC and the other to ground. so i can switch between both stated without causing floating inputs.

That's neither necessary, not does it necessarily solve your problem. All you need is a resistor that pulls the level to the opposite when the switch is not being pressed. For example, if the switch connects to ground when pressed, use a 10K resistor pullup (or pulldown if the switch connects +VCC). That's all you need.
 
Last edited:
this is the situation, when i press the button i want this to send a value of one into the circuit and circuit will output wll respond according to how i have built it to give me a turned on led. the problem is when its not pressed the inputs are floating. so you are suggsting that i insert a resistor? where?
 
Connect between your switch and ground, like the diagram below. When closed, the switch applies VCC to your input. When open, a ground is applied through the resistor.
 

Attachments

  • SwitchPulldown..JPG
    SwitchPulldown..JPG
    20.7 KB · Views: 128
Here is the way to hook up switches with pull up/down. The resistor is there to provide a valid logic level when the switch is open.

Also remember that since switches are mechanical, their behavior is not completely "clean" during the switch. Their output might oscillate (or "bounce") rapidly between 0 and 1 a few times before settling. Depending on what you do with the output of your circuit, that may be a problem.

nor does it necessarily solve your problem

BrownOut is referring to the fact that during the switch of an SPDT switch, there is an intermediate state where the signal is floating. Once again, depending on what you do with the output of your circuit, that may still be a problem.
 

Attachments

  • Switches..jpg
    Switches..jpg
    11.7 KB · Views: 128
Last edited:
good stuff. i will look more into the topic on pull up/down resistors. dont really know much of their operation.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top