Hi guys, I have a question to ask, I recently tried to interface a 74LS595(8-bit serial in, parallel out shift register) to my Pentium 133Mhz's Parallel Port. I succeded to a certain extent. When I used my power supply to power the 74LS595 (- terminal to ground, +terminal to Vcc, tried to hook up 74LS595 GND to the terminal by the name GND on my power supply but the circuit did not power on). Anyways I hooked up some of the Parallel Port's Data connections to the clk and serial inputs on the chip, no go, data was not correct on the outputs( all of them were around 4.2V-logic "1"). So I got my voltmeter, put the black terminal on the - side of my power supply and put the red terminal to the input of the 74LS595 clk and it read 10.8V and I'm like WTF is this ?!?!, if this were the case the chip would be damaged as the datasheet states a max of 7V on the inputs :S So I put the black terminal on the GND terminal on my power supply and low and behold I get the correct TTL voltage output of the parallel port. So what I did after that is to power the ciruit using the FDD connector on the power supply and then hook up the parallel port and low and behold the byte that was shifted out by my code, came up correctly on the outpus.

My question is why this has happened I spent a whole day being frustrated :), it would be nice to come up with an answer make me feel more confident when I'm dealing with these things.
Posted on 2004-03-19 19:13:21 by x86asm
Its hard to read exactly what your doing, but in short I think your expiencing the effects of float grounds.

Voltages are a potential DIFFERENCE between two points. To keep both your sanity and as well as ensure the electronics see the save values your expecting, its important to have a good grounding system together.

When you hear "positive is 5V" its with respect to the negative wire. Now, if that negative wire is floating around at say, 3.4V, it is actually at 3.4V above ground refference (0V). This means that the positive is then 3.4V + 5.0V = 8.4V above ground reference. All in all, the power supply is doing exactly what your asked for, giving you a potential difference of 5V, however, since the power sourced from your supply may not be GROUNDED, and allow eronious voltages to develop which will in effect allow each lead's voltage to drift around.

In your computer, you dont need to worry about this. Its power supply is designed to 'tether' its negatives to the ground pin on the power supply. This makes sure that all negative lead, when measured to ground, is 0V. With this assured, all voltages on the live leads are then +/-12V and +5V. (All with respect to its ground).

When you want to wire external circuitry with its own power supply, its your job to ensure your external power suplies "BASE REFERENCE" is grounded as well. This is to ensure the computer see Apples-to-Apples with the external voltages from your external power supply. Most lab quality power supplies DO NOT ground the negative leads to GROUND. This is deliberate as there is some cases in electronics where its prefered to allow the circuit to be fully isoltated and 'untethered' to ground. If you need it grounded, as in your case, its a simple fix by adding a jumper wire between the power supplies ground and the negative terminal. Now the negative on the supply is grounded through your power supply (as is your computer).

No even with all this, and each supply grounded through its ground lead, there is still a chance for small drifts between voltages seen between your electronics and the computer. This is because the 'distance' for each ground to mean up is a long and convoluted path: CPU power supply, through your 120V Gnd pin, through the wall outlet, down household wiring, to your electrical panel, to your cold water pipe, to earth ground. Like wise, your power supply will take a similar path. The grounds meat up at a distant point from your circuit. The likely hood that the wire distances are exactly the same is very small. As such slight differences in what is true "0V" as seen by the power supplies will vary a small amount.

To get by this problem, the last thing you should do is directly connect your grounds as the first circuit connections between your computer and your electronics. This avoids the long convoluted loop, and ensures that computer sourced signals, as referenced by its GROUND, is the same signal seen by your electrionics, as referenced by its ground. (Since they are jumperred together). The same effect is true from your electronics to the CPU.

So now you might ask, "how then does battery driven electrionics work with a CPU?, it has no GND pin to work with!". The answer is you dont exactly need it. The most important thing with grounding separate sources in computer electronics is that all GROUNDS are aligned up with each other. The battery is no different than the floating power supply scenario above. But if you directly connnect the negative of the battery to the CPU ground pins, your ensuring that the batteries POSITIVE is read acurately by the CPU. Likewise the voltages sourced from the CPU is read accurately by your electrionics, as its negative is GROUNDED with the CPU power supply.

If perhaps, you didnt ground your power supply. And didnt ground your electronics between your CPU and your electronics, the only grounded supply would then be your CPU itself. If you measure two points isolated from each other between your CPU sourced signals and your electronics, you can vary well get large voltage differences that seemingly dont make sense. This is because the electronics you create see things differenty as it floats above ground potential on each lead. Internally there is nothing wrong, 5V signals are developed. However your electronics is Apples to the CPU's Oranges at this point, becuase it is GROUNDED. And the elevated 'floating' voltages on your electronics are much higher than the grounded voltages developed by the CPU. Since a volt meter doesnt (in theory) allow any current to conduct through it, the act of measuring differences do not make any electrical connection between these two points, and you get a true voltage difference between each device (say 10.4V), even though each in their own right, are generating a 5V difference in potential signals privately to their own cirucits.

I hope this makes sense to you. Im kinda rambling on as i go. As a last though, USB was designed to ensure this problem is delt with every time a new device is connected to its USB network. The actualy USB cords were designed to ensure that the first electrical connection made on either end is the GROUND. And likewise the last electrical connection broken is also the GROUND. This ensures that from the moment circuit connections and signals are exchanged between devices, they are seeing everythin in a true Apples-to-Apples grounded system between hardwared devices.

Best of luck!
Regads,
:NaN:
Posted on 2004-03-20 10:08:34 by NaN

Its hard to read exactly what your doing, but in short I think your expiencing the effects of float grounds.

Voltages are a potential DIFFERENCE between two points. To keep both your sanity and as well as ensure the electronics see the save values your expecting, its important to have a good grounding system together.

When you hear "positive is 5V" its with respect to the negative wire. Now, if that negative wire is floating around at say, 3.4V, it is actually at 3.4V above ground refference (0V). This means that the positive is then 3.4V + 5.0V = 8.4V above ground reference. All in all, the power supply is doing exactly what your asked for, giving you a potential difference of 5V, however, since the power sourced from your supply may not be GROUNDED, and allow eronious voltages to develop which will in effect allow each lead's voltage to drift around.

In your computer, you dont need to worry about this. Its power supply is designed to 'tether' its negatives to the ground pin on the power supply. This makes sure that all negative lead, when measured to ground, is 0V. With this assured, all voltages on the live leads are then +/-12V and +5V. (All with respect to its ground).

When you want to wire external circuitry with its own power supply, its your job to ensure your external power suplies "BASE REFERENCE" is grounded as well. This is to ensure the computer see Apples-to-Apples with the external voltages from your external power supply. Most lab quality power supplies DO NOT ground the negative leads to GROUND. This is deliberate as there is some cases in electronics where its prefered to allow the circuit to be fully isoltated and 'untethered' to ground. If you need it grounded, as in your case, its a simple fix by adding a jumper wire between the power supplies ground and the negative terminal. Now the negative on the supply is grounded through your power supply (as is your computer).

No even with all this, and each supply grounded through its ground lead, there is still a chance for small drifts between voltages seen between your electronics and the computer. This is because the 'distance' for each ground to mean up is a long and convoluted path: CPU power supply, through your 120V Gnd pin, through the wall outlet, down household wiring, to your electrical panel, to your cold water pipe, to earth ground. Like wise, your power supply will take a similar path. The grounds meat up at a distant point from your circuit. The likely hood that the wire distances are exactly the same is very small. As such slight differences in what is true "0V" as seen by the power supplies will vary a small amount.

To get by this problem, the last thing you should do is directly connect your grounds as the first circuit connections between your computer and your electronics. This avoids the long convoluted loop, and ensures that computer sourced signals, as referenced by its GROUND, is the same signal seen by your electrionics, as referenced by its ground. (Since they are jumperred together). The same effect is true from your electronics to the CPU.

So now you might ask, "how then does battery driven electrionics work with a CPU?, it has no GND pin to work with!". The answer is you dont exactly need it. The most important thing with grounding separate sources in computer electronics is that all GROUNDS are aligned up with each other. The battery is no different than the floating power supply scenario above. But if you directly connnect the negative of the battery to the CPU ground pins, your ensuring that the batteries POSITIVE is read acurately by the CPU. Likewise the voltages sourced from the CPU is read accurately by your electrionics, as its negative is GROUNDED with the CPU power supply.

If perhaps, you didnt ground your power supply. And didnt ground your electronics between your CPU and your electronics, the only grounded supply would then be your CPU itself. If you measure two points isolated from each other between your CPU sourced signals and your electronics, you can vary well get large voltage differences that seemingly dont make sense. This is because the electronics you create see things differenty as it floats above ground potential on each lead. Internally there is nothing wrong, 5V signals are developed. However your electronics is Apples to the CPU's Oranges at this point, becuase it is GROUNDED. And the elevated 'floating' voltages on your electronics are much higher than the grounded voltages developed by the CPU. Since a volt meter doesnt (in theory) allow any current to conduct through it, the act of measuring differences do not make any electrical connection between these two points, and you get a true voltage difference between each device (say 10.4V), even though each in their own right, are generating a 5V difference in potential signals privately to their own cirucits.

I hope this makes sense to you. Im kinda rambling on as i go. As a last though, USB was designed to ensure this problem is delt with every time a new device is connected to its USB network. The actualy USB cords were designed to ensure that the first electrical connection made on either end is the GROUND. And likewise the last electrical connection broken is also the GROUND. This ensures that from the moment circuit connections and signals are exchanged between devices, they are seeing everythin in a true Apples-to-Apples grounded system between hardwared devices.

Best of luck!
Regads,
:NaN:


Thanks NaN, I'm slapping myself on the head for not realizing this, it makes perfect sense :D

Hey can you explain to me something, what does open-collector mean?! I'm trying to build an EEPROM programmer with the Parallel Port, using 74LS590 (8-bit counter with output register) and a 74LS595 (8-bit serial in, parallel out shift register) to make address and data but I would like to read data back so I can verify the data was burned correctly into the chip but the only inputs on the parallel port are Open-Collector, what is so special about them?
Posted on 2004-03-21 21:04:36 by x86asm
Usually you tie a 10K ohm resistor to VCC from output (collector) for pull-up.
Posted on 2004-03-22 01:47:02 by mrgone
Open collectors are handy to have in some cases. In others, its a nusance since you have to design in an extra resistor an Mrgone pointed out.

As im sure your aware of, TTL is 5V transistor logic. You put 5V/0V in and signals out are 5V/0V. The point here is the output voltages are constrained to the power supply voltage of the chip (give or take +/- 0.3V).

With open collector chips, they are purposely designed in an 'unfinished' state. Meaning the last output transistors that give the desired logic signals out are NOT internally loaded. With no load, no current can flow through the transistors collectors. This means the voltage will always be 0V for any desired output signal. If you put a resistor from +5V to the collector that is open, you in effect load the collector. So now you will see +5V when the transitor is off (since the resitor is tied to the +5V supply), and when the transistor is on, current flows and the voltage drop on the resistor pushes the colector pin to 0V (or 0.2V). This is how TTL outputs work.

So why would you ever want an open collector?

When for things like EEPROM burners, for one ;) . EEPROM requires an elevated voltage to burn with (often around 13V). TTL with open collectors allow you to logically process 5V TTL input signals and convert the output to +ANY VOLTAGE / 0V. If you loaded the output collector with a resistor connected to +13V while the chip itself is powered by 5V & GND, then the output signals would be either 13V when the transistors are off, and 0V when the transistor is on. A very nice way of translating signal voltages, while keeping the logic behind the signals.


I hope this clears things up.
:NaN:
Posted on 2004-03-22 16:46:47 by NaN