Author Topic: Inductance with low voltage?  (Read 2702 times)

0 Members and 1 Guest are viewing this topic.

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Inductance with low voltage?
« on: July 24, 2017, 12:04:59 am »
I've been scratching my head for a few days. A TTL circuit project of mine was going well, I had a basic ALU some registers etc. going and things looked right, so I started focusing on additional features like memory (the wise will have seen a thread on that). But now, my old circuit isn't really working anymore - so I've had to step back and trying to diagnose is providing me with head-scratching stuff.

Instead of boring with the details, the part of the circuit is between the output of the ALU and one of the registers.  The register is set to read the output on the input pulse, and the input of this register is also used by the ALU so it immediately changes the result. So I had it working for a long time that using simple addition it would count up with the amount from one register until it got to 255 and then it would just wrap around. Now, it's pretty much random. It may do counts of a new clocks fine, but all of a sudden a lot of bits are set/reset on random, so it will go all over the place.

I set it to count by 1, and I then put a scope on MSB. I didn't expect to see anything but I do! I see a -1 -> 1.2v flip some times. Granted, this may come from the ALU (74ls181). But I'm beginning to think my little "rats nest" (see photo uploaded) on the register I'm having a problem with may be showing the sign of inductance? It's 22AWG sold wire, and we're talking micro amps and 3.5v or so in each.  So my question is: Given I had a few overlapping wires (no way I can avoid it given the chip design) is this a potential problem? Even at this voltage?

Note - when it worked, it had the exact same nest. Haven't changed it.
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Inductance with low voltage?
« Reply #1 on: July 24, 2017, 12:25:47 am »
Usually you want to put decoupling capacitors across the digital IC supply pins - ideally one per chip. Something like a 0.1uf or 1uF ceramic capacitor. I couldn't see any in your photo.

I doubt if the main problem is inductive or capacitive coupling.
 

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #2 on: July 24, 2017, 02:01:37 am »
Thanks @amspire,
Looks like I identified what's happening, still need to figure out why. I've identified noise on the clock line - a times 10s of very rapid pulses following the long pulse I generate (Ie. I generate a 800-900ns pulse and it's followed by quite a few 1-5 ns pulses).  I do have the switch(es) I use debounced so I need to do more testing. But at least I know it's not inductance causing the strange behavior.
 

Offline matseng

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: se
    • My Github
Re: Inductance with low voltage?
« Reply #3 on: July 24, 2017, 04:31:47 am »
You can measure 1ns pulses? Sure got a nice scope there then... ;-)

But it looks like your LEDs doesn't have any current limiting resistors, a d it looks like they're connected to the databus directly and not via a dedicated buffer. That will fuck up the logic high (or low) levels on the bus.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Inductance with low voltage?
« Reply #4 on: July 24, 2017, 04:57:24 am »
1. First observation will be to use decoupling capacitors (0.1 uF) near power pins on all IC's, and to make sure you have a good 5V supply.
2. It might also be a design problem (glitches or metastability).
3. Breadboards are not ideal for high frequency and fast edges, also breadboards might develop in time poor contacts with the wires, but first make sure there is no problem with points 1 and 2.

Inductance was not a problem for me, even when having a big bigger A4 or Letter format board full of TTLs, memories, a Z80 and lots of wires. Main difference is that I used decoupling capacitors and soldered wires.
« Last Edit: July 26, 2017, 04:14:28 am by RoGeorge »
 

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #5 on: July 24, 2017, 02:22:27 pm »
1. First observation will be to use decoupling capacitors (0.1 uF) near power pins on all IC's, and to make sure you have a good 5V supply.
2. It might also be a design problem (glitches or metastability).
3. Breadboards are not ideal for high frequency and fast edges, also breadboards might develop in time poor contacts with the wires, but first make sure there is no problem with points 1 and 2.

Inductance was not a problem for me. The whole board (bigger then an A4 or Letter format) was full of TTLs, memories and a Z80. Main difference is that I used decoupling capacitors and soldered wires.

Amazing work you've done there! I'm trying to make a "neat" (already failing on that) layout so you can actually see the connections and trace them out on the board. I'm planning on fixing the breadboards to a piece of plywood - but that's for when I'm way down the road.  This is a learning project for me too - while logic gates and CPUs have been part of my professional life for 30+ years I've never designed anything on the physical electrical side before (colorblind, I have to measure every piece of resistor etc. so it takes FOREVER) - so I need to be able to take section by section out and test it. MAYBE when I'm all done I'll stride to emulate your design - I'll have to "grow up" first so to speak, electric wise.

To address your points directly.
1) I have quite a few of them but not at each IC. Since I found cause (not the reason) of the issue being extra pulses being sent, I'll leave this out until I see issues there. For now, I need to figure out why my "debouncing" isn't debouncing. I've never had my scope on for as long I had this weekend trying to make sense of it all. As long as the pulse is auto-generated, it all works. Using my manual pulse switch, not so much. I almost have a diagram ready for it, so I may post it here if I cannot figure it out on my own.

2) I'm NOT blaming the IC :) I know any issue I encounter comes from what's in front of the table - not what's on the table :)  As I noted above, this is a learning experience for me, I do it because I know I'll screw up and have to figure out what I did wrong. Limited spare time also limits how much I can get done.

3) Correct - I don't have high frequencies - I can max turn the automatic frequency to just below 1Mhz - I don't plan to run it much higher than 100-200 Khz when going at full speed. And the little "one pulse at a time" switch is important, because it's how I'll show it/explain computers. When I talk about a short pulse, it's the duty-cycle that's short. RIGHT now (not sure if this was a good idea or not) I have a 555 generating about 50% duty-cycle, but I then take that signal through a very small (0.22uf) cap to generate a very short pulse. I've experimented with different setup and different size pulses. I thought the problem was there initially but I found that even using the 50% duty cycle showed the issue too, so I went back to my original setup of 100ns. I adjusted it all the way down to 1ns (using calculations) at some point without seeing any (positive) change in behavior.  My original thought was a timing issue but that's definitely not happening.

Again, amazing work you've done!
« Last Edit: July 24, 2017, 03:45:29 pm by bitman »
 

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #6 on: July 24, 2017, 02:25:42 pm »
You can measure 1ns pulses? Sure got a nice scope there then... ;-)

But it looks like your LEDs doesn't have any current limiting resistors, a d it looks like they're connected to the databus directly and not via a dedicated buffer. That will fuck up the logic high (or low) levels on the bus.

You mean the LED array? That's because you cannot see them - they're under the array - a simple resistor array was soldered under it :) Not sure what you mean by not having a buffer - the IC under all those wires is a 74245 - and in that picture it's blocking all bus voltage (it's reading).  There are other buffered chips READING constantly but they're only active when there's a pulse plus a "switch" set if I want the register enabled. That read is buffered on the chip too.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Inductance with low voltage?
« Reply #7 on: July 24, 2017, 05:45:45 pm »
Glad to hear you nailed the problem.

You are on an amazing journey, I bet you'll love every bit of it.
Keep going with your great work!

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #8 on: July 25, 2017, 11:57:42 pm »
@RoGeorge
A followup question if you don't mind. I'm trying to design a register with access to two busses (data/address) - an address register. Since I'm on bread-boards I'm a bit limited on space since I want each component like a register on a single board, I'm stuggling having a design with a 16 big register and buffers on each side. Is that the right way to do this?

Btw. to extend this topic, while trying to find the right design I found that once I connected 6-7 components to the clock signal I had issues again. I had to add a transistor to get better current on the clock to make things work (albeit there is still a bit of noise that I cannot identify).
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Inductance with low voltage?
« Reply #9 on: July 26, 2017, 02:55:06 am »
1. Working with breadboards is usually for testing small schematics, with just a few components. I have no experience with very big breadboards full of ICs. Also, a breadboard can have only one 5-10 ICs in a line. The next line of ICs must be on another board, so it will be about 2 inches away. This is a very low density of ICs for a given surface. I'll go with universal board and soldered wires or wire-wrapping for a prototype. Maybe some modules with hand-made PCBs. It all depends. Go ahead and see what fits you best.

How many ICs do you estimate to have in the end, for the whole project? Why do you want to have buffers on each side and each register instead of using a multiplexor?
If you want to go into details, please draw a block diagram schematic with each IC you plan to use and the dataflow. A quick hand draw schematic and a picture will do it, don't go overboard with fancy EDA tools.

2. The fan-out (how many inputs pins can an output pin drive) for a normal TTL is 10. I remember you were talking about LS-TTLs on your boards. For LS, the fan-out is 20.
https://www.fairchildsemi.com/application-notes/AN/AN-319.pdf
Just to be sure, look in the datasheet for the particular IC model and manufacturer you are using. Also, a breadboard adds a lot of stray capacitance, so it might drastically reduce the fan-out.

TTL families usually have asymetric outputs, with sink current much bigger then sourced current, so a pull-up resistor may help sometimes.
Again, please draw block diagrams schematics, so people who are reading this topic can enjoy and make sense of your project as much as you do.

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #10 on: July 26, 2017, 03:25:45 am »
1. Working with breadboards is usually for testing small schematics, with just a few components. I have no experience with very big breadboards full of ICs. Also, a breadboard can have only one 5-10 ICs in a line. The next line of ICs must be on another board, so it will be about 2 inches away. This is a very low density of ICs for a given surface. I'll go with universal board and soldered wires or wire-wrapping for a prototype. Maybe some modules with hand-made PCBs. It all depends. Go ahead and see what fits you best.

That's the way I'm working with it - one board at a time. One component. I've now begun to put SOME of them together discovering other issues as I do which was the whole idea here. I know breadboards aren't meant to do this, in particular not permanently. But I've been inspired by others doing a basic CPU on bread-boards and thought it would be a great way to have something practical to aim at while building up  my knowledge base.  And I do hope I can use it for teaching moments later on.  As to distances on the board, chips that work in pairs or triplets are right next to one another. The only long wires I have at the moment is for bus connections.  Rarely do I need to do the rast-nest I showed here where I need to reach OVER an IC to get to the pin (I'm definitely wondering about the logic in some of the pin-layouts).  That said, I'm not arguing that what I'm doing is optimal or will scale to a large set of components - there's a practical size limit here.

Quote
How many ICs do you estimate to have in the end, for the whole project? Why do you want to have buffers on each side and each register instead of using a multiplexor?
If you want to go into details, please draw a block diagram schematic with each IC you plan to use and the dataflow. A quick hand draw schematic and a picture will do it, don't go overboard with fancy EDA tools.

It's work in progress. ONCE I have things working I try to diagram them out in KiCAD. If I knew better, I could have made the diagram first and know exactly what I needed, but I don't. I have a small dozen of very common 74ls (and 4000s) ICs and I try to use what I have, but once in a while I find something on ebay that I think is worth getting (like going to 8bit register chips instead of 4bits that I had).  I don't know how many total I'll use - maybe 50. I cannot count the times I've made something to just take it all apart hours later realizing it was the wrong thing to do.

As to the multiplexer .... let's me be brutally honest - I had NO idea they existed :)  So thanks for the hint and I'll see what I can find and use here. Looks exactly like something made for what I'm trying to do.

Quote
2. The fan-out (how many inputs pins can an output pin drive) for a normal TTL is 10. I remember you were talking about LS-TTLs on your boards. For LS, the fan-out is 20.
https://www.fairchildsemi.com/application-notes/AN/AN-319.pdf
Just to be sure, look in the datasheet for the particular IC model and manufacturer you are using. Also, a breadboard adds a lot of stray capacitance, so it might drastically reduce the fan-out.
I JUST read about that last night. I got a copy of an OLD book (TTL Cookbook by Don Lancaster) which has shed light on a few things that I've had to learn the hard way.  I definitely do NOT have 20 or even 10 chips receiving the clock yet (I think the count was 6 or 7) - but using a simple 2n2222 transistor cleared that issue up for now.

I do read the datasheets - but I may not understand every aspect of the sheet :)

Quote
TTL families usually have asymetric outputs, with sink current much bigger then sourced current, so a pull-up resistor may help sometimes.
Again, please draw block diagrams schematics, so people who are reading this topic can enjoy and make sense of your project as much as you do.

Yes - that was one of my early lessons learned. The bus has pullup and pull down resistors on it (pull up for when I manually set values for testing). Lots of other small tricks like that on the clock etc.  Reading the first chapters of the above book made it clear WHY that is - I didn't know that before.

Thanks for the feedback. And yes, I know this is a silly project. But so far it's been well worth the learning experiences. Ie. learned how to use a (cheap) scope, sizing a pulldown resistor properly, learning why grounding yourself is utterly the most important thing you need to do, etc. - there's definitely been a lot of Duh movements and I expect more to follow.

I also have a lot of "huh" moments like I have an xls28c16bp EPROM that I use to drive a line of 7segment LEDs to display decimal value of what's on the bus. It works fantastic, but despite having disabled WR on the board, it WILL reset a value or two now and then in the PROM. I have NO clue why such a thing can happen - for now that's just on the back-burner.
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Inductance with low voltage?
« Reply #11 on: July 26, 2017, 03:52:06 am »
Why do you need pull-down resistors on a TTL bus?

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #12 on: July 26, 2017, 04:12:12 am »
Why do you need pull-down resistors on a TTL bus?

Avoids floating. So if no signal is being sent to the bus it has a known value.

So I had chance to check the 74ls157 out - and while I initially thought "great" I don't think it will work for me. I'll need more than one, since I need both input and output on at least one of the busses (depending on what features I want to but into microcode). So it's by-directional and needs to be buffered (tri-state). Reading [ur]http://www.futurlec.com/74LS/74LS157.shtml[/url] shows it's uni-directional.

I'm using 74245s currently as the tri-state buffers on the databus. It allows me to buffer both ways but in most cases I don't buffer the read. But in this case, because I have two sources I need to select it for both read and write, so I'll need 8 of them just to interface with two buses (16 bit address register). That's far more than attempting to use 74244 or 74245 which still has me struggling for space. So I'm putting the thinking hat back on ... not sure what good it will do :)
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6202
  • Country: ro
Re: Inductance with low voltage?
« Reply #13 on: July 26, 2017, 04:39:33 am »
Pull down resistors won't do any good for a TTL bus.

Anyway, TTL doesn't need to avoid floating, like CMOS do. By default, a floating TTL input will be high (puled internally anyway, if you look to the typical schematic of a TTL gate). Only in very noisy environments a schematic might need a pull-up. But why a pull-down resistor? I don't get it. Maybe a partial schematic will help to understand the exact use case (hand drawn or using something like Paint will be more then enough, KiCad and other EDA tools are way to much of an overkill, and not suited for discussing a design).

Again, without a draft of the schematic, there are many ways to put together the ICs you were enumerated, but I'm sure you'll find the best way for you project.

Have fun!

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #14 on: July 26, 2017, 05:04:43 am »

Again, without a draft of the schematic, there are many ways to put together the ICs you were enumerated, but I'm sure you'll find the best way for you project.

Have fun!
Understood - I'm definitely cherry picking instead of wanting someone to show me a solution, I seek to understand and find a solution on my own. So I'm very hesitant showing the whole plan which quite frankly changes a lot. This is why I use bread-boards so I can try out different ideas over and over again.
Thanks again for all your input. I've really picked up quite a lot from it.
 

Offline bitmanTopic starter

  • Supporter
  • ****
  • Posts: 299
  • Country: us
  • Open Source Guy jabbing with Electronics
Re: Inductance with low voltage?
« Reply #15 on: July 26, 2017, 05:09:45 am »
I just realized that one of the examples of doing this used pulldown resisters too. Mine isn't exactly like that, but the BUS is pretty much what you see (LEDs and all): https://www.patreon.com/beneater/posts - it's long :) But if you go through the forum you'll find posts to KiCad schematics of what Ben created.  I'm not saying he's doing it right, however instead of me repeating those drawings I could direct you there to see some of what inspired me.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf