Ooops. I glanced and thought you were driving the base.
He could do the same thing with a 2n7000, which he already has on hand, but I don't think 5.1k is a stiff enough pull-up. My concern is the rise-time spec on the '595 clock input.
He hasn't spec'd the driver. Since he was using a i2c level-translator, I was afraid it might be a wimpy i2c port, or some such.
Ideally the "wire" would consist of a separate twisted pair (with ground) for each clock and signal.
Rule of thumb: you should consider the "wires" as transmission lines if their length is more than 1/6 the "length of a transition". "Length of transition" means the distance the signal travels during the rise or fall time.
On a PCB, that equates to about an inch per ns; it is a bit longer in free air. In practice you might be able to get away with a few inches/ns.
Note that the clock frequency is irrelevant, only the transition rise/fall time. That corresponds with your observations.
So, what's the risetime?
What scope bandwidth, what type of probe, and how is it connected? A 6" ground lead has ~150nH inductance and, coupled with a probe capacitance of 20pF will ring at 50-100MHz. Given sharp edges, it is easily possible to see +-1V ringing.
Look up "source termination" and "parallel termination"; there are many many references.
I misspoke previously... the "Magic Block" is not inverting, but the input inverter does the inverting.
Turn it around, Magic Block first, then inverter,, even with 2N4401, the edges are fast... but overall it does invert, so add another ;-)
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
I addressed how to use 2N4401 plus an inverter in another branch of this thread.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
Yep. There are specialty chips just for such purpose. ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
To my knowledge, the pi's GPIO are all identical, with the sole exception b eing that the pins dedicated to i2c have 1.8K pullups.
Regardless, I'm using GPIO 23, 24, and 25, which are not the i2c pins and d on't have pullups on them. GPIO uses a Broadcom BCM2835. The specification of the output ports is at
formatting link
I haven't changed the defaults, so I expect the source and sink capability should be 8ma per GPIO.
The real issue is the edge speed of the transition. For a clock you are damned if you do, damned if you don't. A fast edge will be more likely to cause problems with reflections corrupting the edge and causing double clocking. A slow edge is less resistant to noise causing double clocking. :(
Sounds like your shift register boards are already designed and you can't do anything with them. So you are stuck with single ended signals.
Have you put a fast scope on the shift register clock inputs? This sort of noise can hard to see with a scope as adding the probe to the circuit changes it. Try putting your ground on the rPi and scoping the ground on the shift register. If you see much noise there you have a problem that will be hard to fix unless you deal with the signal integrity issue.
They translate the Pi's 3.3v outputs to 5v, and buffer the extended clk line.
His first problem is he's using an open-drain translator that can't drive his capacitive load. (That's why the 'scope probe spoils it.) A buffer would fix that.
Oh, they are TTL so they can be driven... right, but they have TTL outputs, not CMOS and so can't drive the HC595s any better than the rPi is doing, in fact they are true TTL and won't drive any better. I suppose you can hand a pullup on the output if it is a low value, His first problem is he's using an open-drain translator that
No, he is using the FET as a switch, not an amplifier. If he drove the gate from the right voltage that circuit should work just fine.
See LevelTranslator.pdf on the S.E.D/Schematics Page of my website.
"Magic Block" now updated with judicious Baker clamping, so that it now has a respectable rise time, buffer with 74HCxx on the 5V side and it should be plenty good. ...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
up in either a 3-chip or 6-chip configuration. I'm driving them with a ras pberry pi. They're driven with three pins: data, clock, and latch. Data is daisy-chained from chip to chip. Clock and latch are common to all chips. T he latches are powered via 5V. The raspberry pi is a 3.3V device.
puts) with 3 shift registers. It's greatly unstable with 6 shift registers. I get numerous errors on the outputs. Sometimes I get random gibberish.
figuration go wonky. 10X scope probe is fine.
V logic, I tried installing a 2N7000 based level shifter on the clock and l atch pins (since those are the ones common to all chips, and thus affected by adding more registers). There's nice clean 5V clock pulses now, but if a nything it made the problem worse.
Are your "wires" bundled? With the very high circuit impedances, you almost certainly have major crosstalk issues, inter-wire signal coupling, things like data changes causing erroneous clocking and vice versa. That's one rea son why the "nice clean 5V clock pulses" made things worse. A few feet of w ire is not so bad that you need any kind of special termination. This very easily cleaned up, but I'll let the residents "experts" tell you all about it.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.