Newbie alert - measuring voltage around a NPN transitor - Page 1
Forum section: electronics / beginners

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 01:14:11 am
content: Ok - there must be a way to do this, I just don't see it. In a slightly larger circuit I have a signal coming out which triggers a simple 2222A NPN transitor to pass a load. I have a load on the collector, and the emitter goes straight to ground. I have currently the signal coming in a very low frequence (1-2 hertz) so I can keep up with things.When I use my scope to measure, what I want to measure is the "wave" - ie. the voltage across the collector/emitter when the transitor is triggered. But no matter what I do, I get a current voltage from + to - since the collector is directly connected to + (through a load transistor) and the emitter goes straight to -. So all the scope shows is +5 (my voltage). And my test LED just blinks at me. I can measure before the load resister, after, on the anode or cathode of the LED or directly on the collector - regardless, it shows either +5v or +3.x volt depending on the resistor value I use. It doesn't show the voltage turning up and down.I'm definitely a newbie - and somehow I think the voltage is constant and what changes is the current only. If that's the case, how can I check the "cleaniness" of the turn on/off that the transistor is creating? I want to see a very square wave.I've done this straight on the signal line and I see the wave form here. But I would like to see that same wave as it's created over the transistor. And I'm out of ideas.

author: Ghydda
author_rank: Regular Contributor
timestamp: April 23, 2017, 01:25:48 am
content: My guess would be, that you are feeding to much current into the base of the transistor.Increase the base resistor value 10 times and have a look on your scope. If the signal is still not showing up, do a 10-fold increase again. Rinse and repeat. Just don't expect to see a perfect sine wave on your scope.Happy hunting.

author: Shock
author_rank: Super Contributor
timestamp: April 23, 2017, 03:04:37 am
content: Quote from: bitman on April 23, 2017, 01:14:11 amYou really need to post a schematic of how your circuit is wired.I'd measure across the LED if you think it's switching then prove it with the oscilloscope. Make sure your circuits power and signal input is floating though I don't want you to short out anything with your ground clip.The inputs on your oscilloscope can also be AC or DC coupled. DC coupling normally allows both DC and AC signals through, while AC coupling accepts only AC signals.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 03:21:07 am
content: I drew up a very rough scematic. The signal coming in is about 3.8 volts. I need to drive something with 5 volts, for now I'm just putting a led there.I've tried to measure with GND on the emitter and the postivie on pin 2 of D1 - All I get is a constant voltage of around 3-4 voltage (given R2). The LED is blinking as the signal is changing. I can measure the base by itself just fine, but I would like to measure it over Q1. But putting the meter on Q1's collector and on it's emitter all I measure is the voltage through the resistor - or rather nothing because of the LED/diode. And while I see nothing on the scope, the LED keeps on blinking

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 03:36:57 am
content: In addition to handling a larger load than what the signal wave can, I generally want to "square" things up. This is what my scope shows when the signal goes high. The time (X) is 50ns so it takes almost 200 ns before the signal is stable high. Using the transistor I am trying to square this up better, and well I want the scope to show it and I have no clue why it's not working.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 03:52:08 am
content: Quote from: Shock on April 23, 2017, 03:04:37 amThanks Shock.Done - see post 10 minutes ago. I didn't add what generates the load to it, I didn't think that was important. There's just a "pulse" (high/low) signal coming through that I want to use to power/trigger another circuit.Quote from: Shock on April 23, 2017, 03:04:37 amI tried over the diode (led) and got 0 nothing on the scope. Even tried to switch red/black wires around for the anode/cathode just in case I got it wrong. The led flashes and at best I see a constant voltage on the meter ...Quote from: Shock on April 23, 2017, 03:04:37 amYup - as I've also shown here I do have a nice scope line directly on the signal. I'm using the same line/settings for the transistor and getting what I'm writing here.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 03:58:39 am
content: Well, definitely a newbie alert. For the 10th time I think I went back and tried putting the scope on the signal. I put the red (signal) line on the led leg, and the ground on ground and NOW I get the NICE square graph I show here. Exactly what I wanted. Not sure why that didn't happen 4 hours ago when I began.

author: Shock
author_rank: Super Contributor
timestamp: April 23, 2017, 04:03:52 am
content: If you measure from the resistor to the ground you will just get a voltage potential between ground and after the voltage drop occurs.Here is a circuit I made in a simulatorplay around with this hopefully you can see what you are doing incorrectly. I show where I think you are taking a measurement from and where you can see the LED (a diode in this case) clearly switching.As I mentioned just don't hook up the grounds of your probes to two different voltages or a different potential from your signal source otherwise you will create a short circuit (unlike in the circuit sim). But the exact way your circuit is working also depends on where and how the source signal is connected as well.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 04:48:01 am
content: Thanks Shock - even your simulator doesn't produce the output I wantI went back happy to get on with my little experiment (playing/learning how to do a short up pulse from a longer pulse). And now I get what I had before and I cannot get it back to showing me "on off" from 0 to 5v. If I measure BEFORE the resistor I get a constant of 5v. It's like the current is going through the scope - there should not be a constant voltage there, the LED is flashing! If I measure like you do right after the resistor, (on the LED's first leg) I get what I'm just attaching. It's like it's going through the resistor and not through the rest of the circuit.I wonder if it's a scope issue (read: a bad setting).

author: Ian.M
author_rank: Super Contributor
timestamp: April 23, 2017, 04:48:43 am
content: So far I have deduced that the input signal is a square wave with amplitude 3.8V. I *HOPE* it goes between 0V and +3.8V, but its also possible its +/-1.9V or even has an asymmetric offset. Until you tell me otherwise I'll assume its from 0V (off) to 3.8V (on).Assuming that you are using he standard convention and 1M is actually 1 Megaohm, your base resistor is *FAR* too large. At low currents the gain of a 2N2222A sucks: the HFEcould be as low as 35 at Ic=0.1mA and will almost certainly be under 100. Assuming 0.6V Vbe (as Ib is so low), that would give you an Ib of 3.2uA and Ic of under 0.32mA.With a 1Meg scope input on the collector, keeping the LED slightly forward biassed, you'd only see about 0.6V difference at the collector between on and off, less if the 2N2222A gain is lower. And yes, some current *IS* going through the scope! - about 4uA.From what you've posted I'm guessing you probably have a green LED with a nominal Vf of around 2.1V so the 220R resistor would give about 14mA If if the collector was grounded.For switching applications you want the transistor to be well into saturation and the datasheet shows specs for a forced HFEof 10, so to sink 14mA collector current while staying fully saturated, you want 1.4mA base current. That will take Vbe up a bit to around 0.7V, so you'll need a base resistor of 2.2K to get enough drive instead of your 1Meg one. In practice a forced HFEof up to 37 would be tolerable (as HFE>75 @10mA Ic, and allowing 2:1 excess Ib), so your base resistor needs to be in the range 2.2K to 8.2K.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 05:36:55 am
content: Hello Ian,First of all, thank you for replying. I have to admit that some of what you write is a bit beyond my current level of comprehension right now. So I replaced the base resistor with a 2.2K resistor, and there's no difference when measuring over emitter/collector. And I do not understand how the base current would be impacted here. If the LED did not turn on/off based on the incoming signal, I can understand I would have to look at the current on this line and make sure it works with the transistor. I've had good results with the 1Mohm resistor and this transistor before coming from about 5v so it's sorta my "go to" to avoid adding too much extra current over the transistor.What my screendump does not show is all the labels. I've JUST gotten my first REAL scope (discount all the "self made" ones I've used over the last few years) and based on EEVBlog I went with the Rigol DS1054Z. I know enough to using triggers and getting basic signals plotted onto the screen, and I hope to grow into the more advanced features as time goes. I found the screen capture function but it only prints the graph, not the legend and other indicators on the screen. So let me see if I can address the specifics of your assumptions:Quote from: Ian.M on April 23, 2017, 04:48:43 amThe zero is at the second horizontal bar from the bottom. Each line is 1 volt. So the signal goes from +3v to +5. I cannot make sense of those numbers except if the scope is taking some of the load through it and measuring that. The simulator posted here more or less hits exactly on the simple setup I have. I hope this helps.So the quick version of this is, changing the resistor on the base doesn't change the voltage I'm seeing across the the E and C on the transistor. It's my guess what the scope is showing is NOT the right numbers.

author: Shock
author_rank: Super Contributor
timestamp: April 23, 2017, 05:47:55 am
content: Quote from: bitman on April 23, 2017, 04:48:01 amIt was a mock up to show you measurement and allow you to verify the behavior you're seeing. This is why you use a simulator, especially if you are unsure of what you are doing.QuoteIf you are measuring the voltage rail of 5V to ground you are always going to see it. As long as your voltage source is present (e.g. the 5V rail) the potential between that and ground is 5V. The current is changing when it is switched but if the 5V is a regulated voltage it will not change as long you don't exceed it's current handling capacity.If you want to see how a component is switching you need to measure directly across the component. Again please read my warnings about doing this (connecting the ground probe to a voltage above ground potential) due to how the source and power supplies are connected. If you are not sure you may create a short and also there is the chance to damage your oscilloscope. If you have no idea what I am talking about here you need to let us know.

author: Ian.M
author_rank: Super Contributor
timestamp: April 23, 2017, 05:49:25 am
content: Make sure the scope input is set to 'DC coupled'.Do you mean theINPUTsignal only swings from +3V to +5V? If it never goes below 0.5V, the transistor will never turn off properly. That's going to be a difficult one to fix properly - you could try adding a 2.7V Zener in series with the base resistor, cathode towards the input and adding a 10K pulldown resistor from the base to 0V.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 06:03:35 am
content: So in usual newbie manner I'll leave this thread by saying I take back my suspecion that the scope is showing the wrong thing. It seems to agree with the voltmeter, so well that leaves the human as the one who has a problem understanding. It's quite late here, so that is most likely a factor in why this makes no sense to me.Thanks everyone for replying. It's been very helpful. Clearly I have much further to go to understand what's going on here.Quote from: Shock on April 23, 2017, 05:47:55 amTHAT makes sense and just leaves me with the "how can I actually measure the total voltage as I know the input signal goes from 0v to almost 4v on it's pulses. It makes a lot of sense why measuring as I did would just show the potential voltage. When I initial posted this was one of the issues that was bothering me. How could I force the scope/meter to measure between the equipment vs. "the shortest path". I definitely have to rethink this - looks like this exercize is going to prove a lot more rudimentary than I initially thought. I've identified the problem - it's meQuoteI've tried that too. Initially I wanted two channels on the scope but I've stepped backwards and removed one of them to make this easier. I've placed the propes on each side of the LED and of course the voltage difference there is very small. Across the LED and resistor and I get a 2-5 volt differentiation that looks very strange to me. And of course if I measure across the transistor to the resistor I get the direct 5v constnat so that's outRight now I'm stuggling understanding what I'm seeing as it does not correspond with what I thought was going on. Now that I know it's my head that's something wrong with, and not the scope or how I'm using it, I can move on to reading some more to learn what seems obvious to others but not meI'm clearly expecting to see something I shouldn't. And I'll have to try to understand better what's going on.Quote from: Ian.M on April 23, 2017, 05:49:25 amI think I understand where our misunderstanding is. I'm NOT measuring the base current/voltage. I'm only measuring C/E. The transistor is "turning on/off" - the LED is blinking which is on the Collector side of the NPN. See above in regards to what I'm measuring. I'm sure it's supposed to look like that, I expected to see 0 to 5v as that's what the collector/emitter connects to, albeit the collector has to go through a led/resistor first. And as Shock pointed out, if I measure on a pin that's directly connected to 5v and then ground, it's only going to show me that - not the current that actually flows the other way. I think I understand that in one sense but it's clearly not sunk in yet. So back to the books and more experimentsThanks again everyone for replying.That's going to be a difficult one to fix properly - you could try adding a 2.7V Zener in series with the base resistor, cathode towards the input and adding a 10K pulldown resistor from the base to 0V.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: April 23, 2017, 06:07:29 am
content: Quote from: bitman on April 23, 2017, 05:36:55 amTo make a proper screenshot with the z-box that shows all relevant parameters for interpretation, you just need to stick a thumbdrive into the USB hole in the front panel, wait until the scope tells you it recognizes it, then press the little "printer" key right below the green Help button at the top right of the panel. You should get a .png image file saved onto the thumbdrive that looks exactly like your live scope screen -- the _entire_ screen with all markers etc. shown.If you are measuring with the probe tip on the Collector and the probe ground reference clip on the Emitter, you should see the signal go _low_ when the transistor switches on. (You are essentially measuring the voltage drop across the transistor, which should be minimal in the ON state and maximal in the OFF state.)You should be doing all normal testing with the probe set to 10x attenuation and the channel probe setting also matching this at 10x. If you are doing this then the scope is _not_ "taking some of the load" in this low frequency circuit. Connecting the 10x probe should not affect the circuit or the actual voltages at all. Of course we need to make sure that there are no misconnections of scope ground probes -- they are all connected together at the scope chassis and back to your mains ground through the mains cord ground pin. Typically your Function Generator may also have its "black" or shield output lead connected to ground also, so don't be fooled into creating a groundloop by misconnections of probe grounds.My guess is that the scope IS showing you the right numbers, and the problem lies in the interpretation of them. You certainly should be able to verify the voltage, duty cycle, symmetry and polarity of the input signal using the scope.

author: Shock
author_rank: Super Contributor
timestamp: April 23, 2017, 06:16:15 am
content: Keep with it, use the simulator.I'm reading between the lines on what you expect to see, it sounds like you want to drive the LED off the emitter or collector directly to ground then be able to bias the base however you like. If there is more to this circuit that your telling us let us know.As with the above poster says how you are measuring is what you are seeing does makes sense. I think you are just not sure on how to make and measure the circuit you expect to see.

author: Ian.M
author_rank: Super Contributor
timestamp: April 23, 2017, 06:26:29 am
content: If the scope probe is set to x1, you wont see more than about 4.3V at the transistor collector with the LED off, due to the scope input resistance dragging the voltage down a bit. If you switch the probe to x10 , the voltage will go up to about 4.5V due to the reduced loading.If your breadboard is under a bright light, these voltages could be lower due to the LED acting as a photodiode. Direct sunlight can cause as much as 20uA photocurrent which would drop the off state collector voltage by about 0.5V.If you want to see the full swing from 5V down to about 0.1V Vce_sat, you'll need to use the 2K2 base resistor and put a 10K resistor across the LED to eliminate its diode drop when the transistor is off.

author: alsetalokin4017
author_rank: Super Contributor
timestamp: April 23, 2017, 06:48:14 am
content: Here's an example scopeshot of the circuit from bitman's reply #3. I couldn't find a 1 meg resistor so I used 100k, and a BC337-25 transistor. The CH1 Yellow trace is the Collector and the CH3 Purple trace is the raw output from the FG. So I'm giving the circuit 5 volts into the 220R current-limiting resistor, and a 4 v positive square pulse train from the FG at 10 Hz, through the 100K to the Base of the transistor. All grounds are at the Emitter of the transistor. I did not use a bypass resistor on the Green superbright LED so the max voltage is roughly 5v - the diode drop of the LED. The minimum voltage varies with the degree of "turnon" of the transistor; that is determined by the base current which in turn is determined by the voltage output setting of the FG.It would be good practice for bitman to reproduce something like this scopeshot, and hopefully to understand the scope settings, the voltages, and their relationship to the activity of the circuit.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 03:09:08 pm
content: Quote from: alsetalokin4017 on April 23, 2017, 06:48:14 amThanks. First of, I don't use a signal generator - I guess if I had, I wouldn't have started this trek to begin with of figuring out how to square/clean the wave plus getting a short pulse when the signal goes up vs. a constant high signal for the whole pulse. Now that I've had a bit of time to think and sleep on things, I think I understand my issue. I failed to consider that each component has it's own v/i relationship depending on where in the circuit they are. I've been looking at this very holistic and high level, thinking I had a simple circuit that turned power on/off between 0 and 5v and I wanted to see that on the scope. In reality what I wanted to see was the actual curves but I got distracted when the voltage range wasn't "0 - 5v" but smaller versions of that, failing to realize that each component sees different voltage drops. Somehow knowing that and realizing that in the moment was two different things. Bottom line is, I dont _need_ to see 0-5v on the C/E - I just need to see the signal and that I can "easily" do and it's exactly what I want - clean and very little noise. It's just not at the 5v I thought, but since there's a 220ohm resistor, that wouldn't happenPart of my lesson learned here. I was so focused on the 5v I started to doubt the scope (my second week with it, so "scope not working" needs to be translated into "user have not configured it right").Thanks to EEVBlog and a few other channels, I managed to calibrate and set the probes etc. on the scope to 10x and calibrate the scope with that setting. I do IT and calibrating/adjusting new hardware just is part of my normal routine.So I can see both signals now. Actually I wasn't really looking to compare the signal in with the transistor signal. I know the signal in is "slow" rising - but I guess a screendump of that would be interesting (now that I know how to take one, thanks!). What I needed to compare was a side signal where I have a simple resistor and capacitor trying to pull low once the capacitor has charged. I wanted a 5-10 ns of high and the rest low, while the main signal line stayed high for the while cycle. It used to work, but I kept seeing negative voltages and positive voltages from the capacitor, and as I wanted to compare the signals, well I wanted to voltages to match (I thought they did) and hence this mis-adventure. I'm still trying to figure out how to do this "simple" setup the right way. Not asking for help on that - this thread was merely me thinking I was missing some basic configuration on the scope and getting bad data. I'm really really trying to keep to KISS here.I've tried a few simulators and so far not found them helpful (for me). I need to actually see things happen, make mistakes and see the consequences of that. So yes, I'm nervous if I cannot keep the scope ground on the ground signal because who knows if I short things out. If it wasn't for my current limiting power supply I would have had a smoking house already! From using the wrong transistor to turning IC circuits the wrong way. I've done it allBut it gives me the opportunity to learn. I've had the urge to just plugin a "nano" so many times and get it done. But I need a better understanding of the pure electronics to make larger IoT setups, so I need to understand "the basics" and obviously I'm having troubles there.Thanks again (all) for the replies. They've helped a lot.

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 03:35:31 pm
content: Most likely my final post on this thread. Comparing the signal in with the transistor is helping me make sense of a lot of the details in the comments here. "Pulling low" was a mystery to me - until I saw this and went "hmmm".The yellow line is showing from the collector to ground. The blue (?? color blind, I have NO idea) is the signal in line. On QuickPrint5 it's clear that they're opposite and I have been going "that cannot be right" for the last 10 minutes. But re-reading the replies here it's starting to daunt on me, that what I'm measuring is exactly this. Because of WHERE I measure the transistor, I'm actually seeing the "opposite", I'm seeing the transistor shorting when it gets the signal, so that will of course show as 0v even though voltage is flowing.This is going to take quite a while to process for me - I think I can make sense of it, but it's making me ask a lot more questions as things I thought I knew no longer make sense. So with this, I'll bug out of this thread and leave it for others to learn from (I hope). I know I learned a lot. Thanks again.

author: Ian.M
author_rank: Super Contributor
timestamp: April 23, 2017, 07:07:34 pm
content: Looks good. However your signal source seems a little glitchy. What circuit are you using for that?Re the colours - I'm assuming you'll do better if you have something to compare them to: You've got a cyan line (pale blue) and a yellow line. The cyan line is the same colour as the text under the left side icons and the yellow line is the same colour as the letters of the 'RIGOL' logo in the top left corner of the screen. The 'RUN'/'WAIT' next to 'RIGOL' is currently green (I don't know if it ever changes colour - RTFM).

author: bitman
author_rank: Unknown
timestamp: April 23, 2017, 10:49:01 pm
content: Quote from: Ian.M on April 23, 2017, 07:07:34 pmWell, it's work in progress. I really wanted to use a crystal, but somehow I cannot get my brain wrapped around it. Looks simple, but nothing has worked for me so far. So this setup is a simple 555 timer setup. I took a picture (https://goo.gl/photos/MKXuodLjaXxr29dU7) of the current (and sorry) setup that's not even close to what I wanted to do. I got stuck on just getting a frequency going right that the rest of the plans haven't really moved on yet. So far I just have a simple CD4020 counter which was supposed to help drive a few 7 segment displays and more. Anyway - I digress.The time was supposed to run at 600-800kHz at least which meant I started with a small 100ns capacitor and a few K ohms in resistance. But I quickly found that doing so wouldn't allow me to "play" with cutting the starting wave form off to just get a pulse on the rising edge and nothing more. I wanted that to do some sync later on with some 74HC circuits. As I back-tracked having issues with a clean signal, I lowered the signal to a few Hz by increasing the capacity to 47uf. I've aimed for a very simple astable setup with a duty cycle as close to 50% as I could make it. And yes, it occurred to me very late that getting a short pulse instead of a long one I needed to shorten could be achieved by changing the duty cycle - go sue me, that never occurred to me when I started *sigh*. I have a 1M ohm from pin 8 to 7. And a 10Kohm from pin 7 to 6, and 6 is connected to 2 where the 47uf capacitor goes to ground. Pin 4 is high, pin 5 has a very small capacitor 220pf (I see no difference when I remove it, add a larger or smaller cap there). I'm of course using the output on pin 3. This is pretty standard, and my "only" problem has been trying to make the duty cycle close to 50% which I now realize was a stupid thing to do.But as you can see on the wave form, it's "noisy", and on the raising and lowering there are some major jumps. It even seems to be fairly "slow" going to high and going to lowQuote from: Ian.M on April 23, 2017, 07:07:34 pmI can see the differences but not the color identity (Ie I cannot tell you what color - I see them as different colors than you). Only channel 2 and 4 are very much the same color to me. So yes, I can see that the controls match the colors and understand the purpose. I "left" electronics when I was very young and realized I was color blind, and reading resistors and capacitors was impossible just from the color coding. Without a meter I would still have no clue what capacity the resistors had - and yes, it's slow but I'm in no hurry. This may be why there's no alternative way to identify the channels on the controls (other than by color). To me, a symbol would be very very helpful. Circles, squares, triangle and a cylinder would have been great small symbols to use to make things faster/easier for guys like me. However, I'm pretty sure you cannot be an electrician by profession if you cannot read colors like me, so that may be the reason why it's just colors.Btw. I've begun to measure points I thought I knew what was going on at, and clearly I don't have a clue to a lot of it. So this scope is really coming in handyI'll be yelling at it some more, but in the end it's me that still has a far way to go.

author: rstofer
author_rank: Super Contributor
timestamp: April 24, 2017, 02:46:19 pm
content: You can find any number of rising edge pulse circuits via Google. The classic is 3 inverters and a NAND gate. You run your signal into one input of the NAND gate and into a chain of 3 inverters the output of which drives the second (delayed) input of the NAND gate. Depending on the logic family, you will have a very narrow pulse.This can all be built with just a single quad two-input NAND gate device.You can also use a capacitor-resistor differentiator connected through a diode (1N4148) heading to a Schmidt Trigger. You may need a pull-down resistor on the diode output. Too complicated...

author: bson
author_rank: Unknown
timestamp: April 25, 2017, 12:23:07 am
content: Quote from: bitman on April 23, 2017, 03:52:08 amYou can't scope across the LED... the ground clip needs to stay on ground, and all your probing is relative to this. Putting your ground probe elsewhere will short that point to ground!

author: Ian.M
author_rank: Super Contributor
timestamp: April 25, 2017, 12:54:37 am
content: @Bitman, re: Reply#21,The photo is unfortunately slightly out of focus but that 555 part number looks like it may be NE555. That's a bipolar part that causes massive glitches on the supply rail every time its output switches due to the shoot-through current in its output stage during transitions. Get a CMOS 555 (e.g. LMC555, TS555, ICM7555 etc.) which minimises the glitches, and gives better output levels (closer to the rails).Also you need decoupling right at the chips. The further away it is from the chip, the less well it works. I see what may be decoupling by the bus bar to the right of the 555, but nothing for the logic chip below it. All the chips need a 0.1uF disk ceramic capacitor directly across them between their power and ground pins. A bipolar 555 should have an additional 10uF or bigger electrolytic in parallel with the 0.1uF ceramic, again right at the chip, to attempt to keep the shoot-through current from glitching the supply rail.I cant really tell what you are doing with the circuit - a schematic of your pulse generator section would be nice. If you give us a better idea of what you actually need for a test signal we can suggest better or easier circuits to generate it.

author: bitman
author_rank: Unknown
timestamp: April 29, 2017, 08:12:34 pm
content: Quote from: Ian.M on April 25, 2017, 12:54:37 amThanks Ian, you've given me plenty to think about and learn from here.As to the purpose - learningI'm trying to create - strike that - understand how to create a sync'ed clock signal I can use for some logic circuits I want to use (buffers, registers etc). Thing real fancy and nothing that will make it past the bread-board. So while I understand the principles of the timer circuit, it seems very very rough, noisy and imprecise to me. It also found that a single clock signal wouldn't cut it, so I finally discovered "dividers" and it looks like it's exactly what I needed to create a few synchronized but slightly offset pulses so I can synchronize data/signal better. In essence I'm trying to build a simple bus - as a project to get some electronic principles under my skin. In the past I've simply connected in/out pins on a controller to a sensor or motor etc. - I need to make slightly more complex circuits as my next stage, and that means actually understand (prove) how small circuits work. Ie. amplifying signals and using pullup/down at the right places. I've already had to correct a lot of misunderstandings I had about signal processing. My purpose is to know enough to build very small circuits without needing a microcontroller where I'm comfortable.Yes, it's basic VERY CHEAP NE555P chips I'm using. All they've proven to me so far, that they suck at generating a consistent/stable frequency. Or maybe it's just me that screw it up - it could very well be bothI finally got a 1-2% duty cycle setup working, but still the frequency according to my scope is jumping quite a lot particular in the 100s of KHz. Hence my idea of using simple crystals. It got a handful or so of Quartz Crystal (VAPKER), unfortunately the smallest I can find is 4MHz and well, I think that's too fast based on my reading of the CMOS/74xx datasheets. However, that's what that divider is for - for now, I would just like to see a rather steady frequency that doesn't change with 1000s of Hz every second. I don't really care if it's 4MHz or 2MHz - I just want it steady. Taking all what you wrote, it's clear you understand why it's unstable right now - and it's my hope I get to that moment too. So far I'm reading a lot, watching a ton of youtube like EEVBlog attempting to gain a better understanding. I'm fumbling around slowly - day job only gives me a few hours a day (at best) to study/learn. And there are weeks when I'm on the road with no access to my small collection of components, breadboards etc. so things move slowly here which is OK. I'm in no real hurry.Thanks again. I'll need to google quite a bit of what you wrote to understand the answer. So I have a lot to work with here.

author: Ian.M
author_rank: Super Contributor
timestamp: April 29, 2017, 10:15:52 pm
content: Hmmm.Probably the easiest option if you want a crystal controlled oscillator, would be to use a 74HC4060. A CD4060 wouldn't be fast enough for a 4MHz crystal below 10v Vdd. The 74HC4060 needs a 5V supply (though you can also use it at 3.3V as long as you avoid the 74HCT variant) and consists of an input buffer section that can accept an extewrnal clock or be configured as a RC or crystal oscillator, followed by a chain of 14 flipflops each dividing the input frequency by two. Assuming a 4MHz crystal, Its highest frequency output is Q3, Fosc/16 or 250KHz and it also has outputs all the way down to Q13, Fosc/16384, or fractionally over 244Hz, except Q10, Fosc/2048 (1953 Hz) which isn't brought out to a pin.If you follow that by a 74HC4017 decoded decade counter, you can get up to ten sequential active high pulses on separate pins that you can combine with logic gates to get any possible sequence of overlapping or non-overlapped clocks, that should finally be gated through a D type latch clocked by the opposite clock edge to the 4017 to de-glitch any clock that's derived from more than one consecutive 4017 output.

author: bitman
author_rank: Unknown
timestamp: April 29, 2017, 11:42:22 pm
content: Quote from: Ian.M on April 29, 2017, 10:15:52 pmSo I don't have a 4060 - CMOS or otherwise. But I do have a CD4017 and reading it's data-sheet didn't seem to indicate a max frequency (it was a blank box, not sure what that meant). So I took a chance. Based on a different thread here, I figured out my "crystal problem" - turned out to be a power problem (5v wasn't connected to the chip so no wonder things didn't work!). It measured out at 4GHz straight on my meter - no change what so ever. My scope also showed a steady frequency down to 1KHz ranges (3 decimal points) so that was exactly what I had hopped for. I then connected it to my CD4017 and all 10 input lines all show 400KHz signals minus about 0.001KHz or so, but I get the same on all of them. It also produced duty cycles in the 2-12% range, somehow each line seems slightly different not only sync wise but in duty cycle. That's probably a property I wasn't aware of. Showing two lines on the scope clearly showed how each line was slightly shifted, so it's just a matter of figuring out what line to pick. It SEEMS to be something I can use. There's still a few aspects of the CD4017 I'm not sure I'm getting but at least it seems to do what I wanted - so I can get rid of the 555I also had a 8GHz crystal and a 16GHz crystal. The 8GHz works too - but 16GHz was too much for it I guess.It was strange - as I was searching around looking for CD4017 with an oscillator examples, all but a few hits were about CD4060 (or I guess the 74HC version). I never figured out what the 3 clock lines were sbout. The PDF I found was a scan I of the real data-sheet and it was so low res that I couldn't read the symbols. I did gather from the many many MANY pages I found that it's a popular chip, so I guess I need to see if I can get my hands on one or two of them.QuoteThis is what I love reading posts here. Stuff like using a logic gate to generate lower/different frequency waves would never have occurred to me. As I wrote above, the 4017 doesn't seem to overlap any of the pulses (except for the carry signal that still puzzles me). Maybe that's connected to the short duty cycle - no clue. Anyway, lots of of stuff to think about in the next couple of weeks while I'm on the road.

author: Ian.M
author_rank: Super Contributor
timestamp: April 30, 2017, 11:13:45 am
content: For a decent CMOS 4060 datasheet, tryhttp://assets.nexperia.com/documents/data-sheet/HEF4060B.pdfand for the 74HC4060 tryhttp://assets.nexperia.com/documents/data-sheet/74HC_HCT4060.pdfIf you want to see what's going on with the outputs of a '4017, as the ten sequential outputs are virtually identical apart from being time shifted, you cant really distinguish them on a single channel scope. If that's all you've got, ASK as there are a few tricks that can be used to mix in a marker pulse so you can see the relative timing.To see them properly, you need to use a scope with at least two channels, DC coupled, and keep channel 1 on the Q0 output, with rising edge triggering on channel 1. Probe around with channel 2, and you will see the timing relationships between the other signals and Q0 exactly as diagrammed in a '4017 datasheet.The carry signal is just the input signal divided by 10, with a 50% duty cycle. Its rising edge to trigger the next counter in the chain occurs fractionally after the tenth input clock pulse rising edge.Experiment with dividing by numbers other than 10 - e.g. to divide by 7 connect Q7 to MR.