Comparing a "phase" at 3MHz - Page 1
Forum section: electronics / beginners

author: Infraviolet
author_rank: Super Contributor
timestamp: June 10, 2023, 12:41:17 pm
content: Another separate trouble in my current project... Hopefully this should be the last nasty surprise of the high frequency world which I discover in the course of this project.I've got a 3MHz sine wave signal (the output of the 3MHz amplifier I was working on, thanks for the help there) and I need to compare whether it is roughly in phase, or in anti-phase with a 3MHz square wave. That is to say I'm trying to check whether the 3MHz sine wave is in phase with the square wave, or inverted relative to it.In an ideal world I'd use op amps, but these signals are proving too fast for any I have to hand.I've also failed with comparators (LM393), seems the comparators I have are too slow to operate from the signal.I tried using a 4066 analog switch IC with the square wave on the control pin and then feeding the sine wave in to one of the switched pins with the other switched pin pulled to ground and meaurements taken there. But the 4066 seems to induce huge distortions in signals this fast, capacitance somewhere I think judging by the shapes of the severaly distorted waveform.I also considered a 4066 for sample and hold purposes at the time of a peak, but again the distortion it introduced was enormous, large than even the strongest signal.I thought of trying to massively amplify the sine wave and then use logic gates, but the amount of amplification needed would be very large indeed, as I need to be able to know if it is in phase or antiphase from signal strengths of +/- 20mV peak to peak to 1.4V peak to peak. Logic gate ICs look like a good solution or these speeds, but I'd somehow have to get the signal up to logic levels of voltage, for any input signal size. Is there any easy way to make a crude comparator (input signal versus a carefully selected static voltage rail) from transistors?What should I try, the trouble is that at a 3MHz frequency everything either I'm used to can't keep up (op amps...), and capacitors cease to be something to damp out fast vibrations and instead become plain short circuits.What avenues of approach have I got for this problem? All the things I can think of only work at lower frequencies.ThanksP.S. to be clear the phase is only ever in phase or in antiphase, its not quite perfectly so its a few tens of degrees out, but this situation is still evry much a digital output of in or anti, not a continuous output of phase difference.

author: radiolistener
author_rank: Super Contributor
timestamp: June 10, 2023, 02:56:31 pm
content: Quote from: Infraviolet on June 10, 2023, 12:41:17 pmjust use second channel on oscilloscope. But first check and calibrate it with your cables, because there is a phase delay in the cable, so if you use cables with different electrical length they will have different phase delay, you're needs to take it into account. Use square wave with a sharp edge for phase delay calibration in order to get more precise result.Since you're want to compare phase between sine wave and square wave, I suggest to use trigger for sine wave, so it's zero crossing will be exactly at the center of the oscilloscope screen and you can easily find delay between screen center and square wave edge.

author: tggzzz
author_rank: Super Contributor
timestamp: June 10, 2023, 03:09:54 pm
content: It would help if you mentioned the Vac and Vdc of the signals.Comparators are slower responding with small differential signals (i.e. small Vac). Probably the simplest solution is to get faster comparators.Alternatively, if your two input signals are V1 and V2, then create an inverted version of one of them, say V2I. Then, depending on the phase, either V1+V2 or V1+V2I will be roughly constant and the other will exhibit larger voltage swings.

author: dmills
author_rank: Super Contributor
timestamp: June 10, 2023, 03:26:36 pm
content: Diode ring mixer?Fast comparator and nand gate then lowpass will give you a voltage proportional to phase difference.Lots of ways to do this, just remember that your 3MHz square wave will have a mess of harmonics out to several tens of MHz and you need to respect that in the layout.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 10, 2023, 05:35:53 pm
content: radiolistener, sorry, should have been mroe clear, I've already done that with the scope for checking the signal, this is about doing it in a circuit such that it outputs some simple (varying only when the relative phases of the square wave and the sine wave change, not varying as fast as the square and sine actually oscillate) digital or analog output signal.tggzz, I can make an inverted version of the square wave pretty easily, but low pass filtering the V1+V2 and V1+V2Inv would surely gvie the same longer term average voltage for both. Also, can you recommend and faster comparator types which are relatively "generic" (that is to say other types with same pinout and performance if they go out of stock)?dmills, the diode ring mixer, can that be run with capacitors rather than transformers to provide DC blocking? Also, would it fail whenever the variable amplitude sine wave signal has amplitudes under a diode drop (yes I can get some Schottky to make it smaller than the usual 0.7V, but schottky's still have a drop) in size?Thanks

author: langwadt
author_rank: Super Contributor
timestamp: June 10, 2023, 05:55:30 pm
content: Quote from: dmills on June 10, 2023, 03:26:36 pmI think XOR would be better

author: dobsonr741
author_rank: Frequent Contributor
timestamp: June 10, 2023, 07:09:28 pm
content: OP, are you building a PLL? When you say ‘comparing phase’ sounds like a solution, would be helpful to know the original problem you are solving.

author: tggzzz
author_rank: Super Contributor
timestamp: June 10, 2023, 07:21:13 pm
content: Quote from: Infraviolet on June 10, 2023, 05:35:53 pmPlease don't interleave multiple responses in one post; deinterleaving them is an unnecessary pain.Long term average, yes. Short term average, no. You can add voltages without (slow) opamp circuits!IYou know what's important to you. Use TAoE and/or DigiKey parametric searches to find what you want.

author: Weston
author_rank: Regular Contributor
timestamp: June 10, 2023, 07:37:02 pm
content: Try using one of the phase comparators on the 74HC4046 VCO/PLL chip. You don't need to use the VCO or anything, but the phase comparators are useful. The signal input can be AC coupled and the datasheet says it should work with a p-p voltage down to 11mV for a 3V supply.The type 1 comparator is an XOR gate and will give you the phase/voltage relation you need to determine if the signal is out of phase or in phase.This is basically the same as if you used a discrete comparator to digitize the input signal and an XOR logic gate, but lower BOM/cost.With any analog mixer your phase reading will be proportional to the input signal amplitude, which can cause challenges.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 10, 2023, 08:28:20 pm
content: 4046 sounds an interesting idea, CD... cmos versions say they can handle up 18MHz according to the datasheet. By having this digitisation it should be able to work independently of signal amplitude so long as the signal is large than the 20 or so mV I could expect with 5v power? I'm ordering some immediately.In the meantime, is a comparator built from discrete transistors at all feasible? That or a DIY schmitt trigger with the high and low levels both calibrated for the same reference voltage? I've got plenty of logic gates to hand to feed the signal in to once digitised by this "1 bit ADC".

author: Infraviolet
author_rank: Super Contributor
timestamp: June 10, 2023, 08:33:07 pm
content: tggzzz, you mean trying to peak detect on the waveform after adding instantaneous voltages? I had been thinking that V1+V2 would give a wave (lets say V1 is in phase with V2) of amplitude A, centred about a voltage rail. Has been thinking that as V1+V2Inv would have a smaller amplitude B but the same centreing, low pass filtering couldn't see a difference of the two. But low pass pass filtering a peak detection could though.

author: radiolistener
author_rank: Super Contributor
timestamp: June 10, 2023, 08:48:08 pm
content: Quote from: Infraviolet on June 10, 2023, 05:35:53 pmNote, that adding inverter or a low pass filter add phase delay, so the output phase will be different than input.So, if you compare phase with square wave passed through inverter or low pass filter or even a piece of wire, then you will get wrong result.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 10, 2023, 09:09:53 pm
content: My situation is such that so long as the output (constant) voltage waveform can be worked backwards from in microcontroller software at a later point to know what the phase difference was before inverting (or any other process, even the slightest filtering makes a very clear phase diference at these freqs, though lengths of wire on the scale of breadboards don't chnage it appreciably) I'm ok. I don't mind the measured phases being different to the true ones, as long as they areconsistentlyso. If I get a "they're in anti-phase" result but know there was a 180 degree shift that's ok, I can have software calculate back to what it really was so long as the extra shift is consistent over time and over minor variations in device properties. The tough task here is about getting the amplitude of the fast 3MHz sine wave as well as information that can be worked back to calculate the sine wave's in-phase vs anti-phase status as versus the square wave 3mHz waveform in to a microcontroller in the form of a number of analog or digital DC signals.

author: tggzzz
author_rank: Super Contributor
timestamp: June 10, 2023, 09:28:39 pm
content: Quote from: Infraviolet on June 10, 2023, 08:33:07 pmPeak detection on its own seems unlikely to be a sufficient discriminator.Why don't you let us in on the secret of the input waveforms: voltages, frequencies, amplitudes etc. All it needs is a photo of your scope's screen plus description of what you think important/unimportant, fixed and variable.That will rule in/out some of the suggestions made by myself and others.

author: radiolistener
author_rank: Super Contributor
timestamp: June 10, 2023, 09:37:39 pm
content: Quote from: Infraviolet on June 10, 2023, 09:09:53 pmyou can use high-speed comparator in order to convert sine wave into square wave. Since you're needs just 3 MHz, this is pretty low frequency, so you can use something likeTLV3501.You can find Chinese modules withTLV3501and SMA connectors on aliexpress, here is how my one works at 10 MHz:You're mentioned, that there is needs to work with 20 mVpp signal, as you can see, it works ok with 20 mVpp sine and produce 2.44 Vpp square wave on the output...

author: TimFox
author_rank: Super Contributor
timestamp: June 10, 2023, 10:38:05 pm
content: This device has been around for almost 50 years, and may still be in production.https://www.onsemi.com/download/data-sheet/pdf/mc1496-d.pdfThe last bit of prose in the datasheet discusses phase detection, but they don't give an example circuit.

author: David Hess
author_rank: Super Contributor
timestamp: June 11, 2023, 10:26:13 am
content: Any fast multiplier will work, including the 1496, RF mixer, or synchronous demodulator. For logic level signals, an XOR gate will work.A cycle by cycle decision could be made by delaying one signal 90 degrees, say with an integrator, and then using that to drive a sampler (sample and hold, diode bridge sampler, whatever) to sample the output of the other signal, a form of sampling phase detector.

author: Weston
author_rank: Regular Contributor
timestamp: June 11, 2023, 06:03:52 pm
content: Quote from: Infraviolet on June 10, 2023, 08:28:20 pmHaving the input signal vary over such a large range is a bit of a design challenge. Any DC offset in the comparator or overdrive dispersion is going to distort the waveform and cause phase and duty cycle errors. At the lower bound of 20mV it would probably not be practical to make a comparator from discrete transistors. You might even need a relatively high performance IC based comparator.The datasheet for the 74HC4046 says it should work. Also, it seems to have better low signal performance at low supply voltages, I assume thats related to biasing / offsets related to the supply voltage. So try running it at 3V?It would add complexity, but if you have issues with the lower end of your signal range, is might make sense to have an amplifier with automatic gain control buffering the input signal to amplify it to a constant amplitude. It would make an analog phase comparator more precise (by normalizing the input amplitude so your output volts/degree is constant) and make a digital phase comparator more precise by reducing issues with comparator offset and dispersion at low signal levels.

author: Terry Bites
author_rank: Super Contributor
timestamp: June 12, 2023, 04:49:01 pm
content: Have a look at the veritable AD8302. Its a magnitude and phase analyser in a single ic.Its so easy to use it makes you well up. (We love you Barry Gilbert....)Low cost $10ish modules abound, egwww.amazon.co.uk/ad8302/s?k=ad8302A bloody bargain.It can do your 3MHz while buffing its nails but you may have to increase the input caps for low frequency (3MHz) working!

author: Infraviolet
author_rank: Super Contributor
timestamp: June 12, 2023, 08:44:36 pm
content: 4046's and TLV3502 (dual version) are on their way to me. I have an odd idea with diodes as switches which I'm going to try until the ICs turn up, will post more about it after trying. I'm going to give a try to each of those options before worrying about other ideas for getting the phase difference measurement from my signals."Why don't you let us in on the secret of the input waveforms"Sorry I haven't described the system in full yet, I tend to see threads as a one problem area per thread discussion, but here goes:The system is a PCB based resolver, I've challenged myself to make it all without relying on any special single function chips (there are resolver processing chips already manufactured) or highly specialised components (the type where supply suddenly disappears, this has been on my mind for even the smallest projects since the chip crisis propagated through as far as small volume buying is concerned).The underlying principle is working REALLY well so long as the rotor is close to the coils (exactly as expected and intended given how little power it is needing), but due to ratios of inductance to capacitance for getting LC tank circuits to have decent Q factors, and with my L being limited by how much coil geometry I can fit in to certain areas of a PCB, I am forced up to 3MHz to make this work. In an ideal world I'd be down at several hundred KHz where I'm more familiar and can use pretty typical op amps, but L and C didn't want to play nicely.I transmit a 3MHz signal from one coil and another receives it, the amplitude and "phase" of the receivied signal are controlled by the angle of a metal rotor. By "phase" I mean in-phase vs anti-phase, never does the signal shift by other relative phases*. And as far as "phase" goes I don't care about phase diferences induced in pre-transmitted or post-received areas of circuits, as they stay consistent with angle. I'm getting a receievd signal which is a sine wave, a pretty clean one indeed once I eliminated some excessive length wires and made sure to probe with the pointy tip and ground ring of an o-scope probe rather than the hook-in-cover and ground-clip part. Its amplitude after amplification (with transistors) can vary, depending on rotor angle, from around 20mVpp to 1.5Vpp (I may have quoted slightly different numbers at some points as these exact values vary with design iterations and I'm working on further improvements, but given the noise I'm seeing on signals of under 5mVpp being able to measure signals down to 20mVpp seems feasible. With further amplification measuring down to 20mVpp, despite more ampliciaftion, would be desirable as it would improve angular resolution). I can, where necessary, use capacitors to couple this 3MHz sine, whatever its amplitude at the time, on to any different reference centre level of voltage I please (within the limits of Gnd to 5V I'm designing for the final system to need as its own supply rails).The "phase" of the recieved sine signal vs the phase of the generated (pre-outgoing) square signal tells me which half of the angular region the rotor is in, 0 to 180 or 180 to 360.I can upload o-scope traces tomorrow perhaps, but all they show is a sine wave, amplitude variable with angle, which goes in or out of phase with the other signal (square wave, 0v to 5V, but can easily make lower voltage or inverted copies) depending on which half of the angular range it is in.I have been working with reasonable success on peak detecting methods to track the amplitude of the signal and convert that in toa fairly constant DC level output, that level only varyng when the angle of the rotor changes. I am looking to get a similar DC level (analogue or, given I only care about in-phase vs anti-phase, digital) output to tell me whether the phase matches or opposes. I would do this by processing, separately from the peak detecting which ofcourse destroys phase information, the same amplified signal as is fed in to the peak detector, and comparing it with the signal going to the transmitting coil.My initial hope, as I mentioend early in this thread was using a 4066 analogue switch to quickly let signal received through when the transmitted waveform was high and block them when it was low, but to my unfortunate surprise this added huge distortions to the signal with spikes and other curves far out sizing the desired signal even near maximum amplitudes. Then I tried the comparators (overly slow ones in hindsight)which I had lying around from previous (slower speed) projects. Being short of ideas, and not knowing what sort of search terms would let one find things about comparing if fast signals (everything is so much easier when slower) phases, at that point I started this thread, however with the ideas you've listed I've quite a few more things to try now, thanks for all the tips.Thanks*probing various signals in other places the physics is as expected, the transmiting (driving) coil's signal is 90degrees (phase) ahead of the received (driven) as is always true for resonance, but there are delay elsewhere in the circuit which make the phase at the easiest to measure pre-transmitted point and the most practical post-recieved-post-amplified point close to 180 degrees (phase) apart. I see no plausible reason for, and have found no examples in testing of, these other delays to phases varying, so they can be ignored as constant when using phase diferences to know which half of angular positions the rotor is in.P.S. the AD8302, very good value on those adapter boards, cheaper than the chip itself. Will give that a go if these solutions don't work.

author: tggzzz
author_rank: Super Contributor
timestamp: June 12, 2023, 09:22:12 pm
content: Quote from: Infraviolet on June 12, 2023, 08:44:36 pmI presume you realise the 4046 phase comparators (plural) require full-swing CMOS inputs.Those comparators have 1.5ns output transistion times, which imples significant energy at 250MHz. You will need to use good quality construction techniques.The quickest way to try an idea is often to simulate it using, e.g. LTSpice.QuoteThat often leads to theXY problem, which (for good reason) pisses a lot of people off. Avoiding the XY problem requires clear thinking and good taste.QuoteThe design details matter: schematic showingallrelevant components isnecessary. A beginner is less likely to understand what constitutes "relevant".The construction details matter: photographs are necessary. Solderless breadboards can, even with a sound design, cause problems.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: June 12, 2023, 09:57:44 pm
content: I badly wanted to understand what Infraviolet is aiming to achieve. After much deliberation, consulting with ChapGPT, I think it's a rotary angle to DC voltage converter, coils fabricated out of PCB. DC output is to be proportional to anlge, should include the 0-360 degree range.Is that right?

author: Infraviolet
author_rank: Super Contributor
timestamp: June 12, 2023, 10:46:05 pm
content: "I think it's a rotary angle to DC voltage converter, coils fabricated out of PCB. DC output is to be proportional to anlge, should include the 0-360 degree range."Yes, Though I'm happy enough to have the DC voltage on one output vary between 0 and 180 and go through the same range again between 180 and 360, with another output to indicate which range the first is meauring from, and I expect this multiple output situation is simpler to build.P.S. out of interest, how many very bizarre responses did ChatGPT try to suggest first?

author: dobsonr741
author_rank: Frequent Contributor
timestamp: June 12, 2023, 10:55:39 pm
content: I've asked chatGPT to summarize, then I asked what are the inputs and outputs. Nothing off mark, it really helped. No offense, but in your writeup the intent and low level details/design detours are heavily intertwined.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 13, 2023, 12:26:22 am
content: "No offense, but in your writeup the intent and low level details/design detours are heavily intertwined. "None taken, will try to remember to avoid that for the next long reply I write.

author: Weston
author_rank: Regular Contributor
timestamp: June 13, 2023, 02:43:57 am
content: Quote from: tggzzz on June 12, 2023, 09:22:12 pmThe phase comparator inputs on the 74HC4046 can be AC coupled. From the datasheet, section 8.2: "The input signal can be coupled to the self-biasing amplifier at pin SIG_IN, when the signal swing is between the standard HC/T family input logic levels. Capacitive coupling is required for signals with smaller swings"They also provide the required peak to peak AC voltage levels on pg 17 of the datasheet.https://assets.nexperia.com/documents/data-sheet/74HC_HCT4046A.pdf

author: tggzzz
author_rank: Super Contributor
timestamp: June 13, 2023, 07:44:11 am
content: Quote from: Weston on June 13, 2023, 02:43:57 amIt seems the HC4046A variant isverydifferent to the original, e.g. the A variant has three phase comparators, not two.It looks, at a quick glance, that the phase comparator inputs have the same voltage spec as the other inputs.In general the voltage swing required for digitalinputsis smaller that the voltage swing provided by the digitaloutputs; it looks like that is the case here too. But I'm sure you realise that!EDIT:The OP hasn't bothered to tell us the voltages in his circuit, so who knows.Thanks langwadt!

author: langwadt
author_rank: Super Contributor
timestamp: June 13, 2023, 08:56:55 am
content: Quote from: tggzzz on June 13, 2023, 07:44:11 amehh, first post says 20mV p-p to 1.4V p-p

author: tggzzz
author_rank: Super Contributor
timestamp: June 13, 2023, 09:00:56 am
content: Quote from: langwadt on June 13, 2023, 08:56:55 amCorrect. My mistake.I may have subliminally remembered it when making my comment about "full swing" inputs.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 21, 2023, 02:41:12 am
content: A CD74HC4046AE is working a treat for this, gives an output waveform with a very clearly different duty cycle (hence different low pass filtered voltage) depending on whether the sine signal is in phase vs in anti-phase with the square wave.But it does seem to introduce some problematic, though much milder than other solutions, spiking on to the signal coming in to Sig_in (pin 14).The spikes don't matter much when the signal is at maximum amplitudes, but when the sine signal is small the spikes are enough to really upset trying to peak detect the sine signal's level (in a different branch of the circuit). So I need to eliminate them. I doubt an extra buffer after the present Buffer_out and before going to the 4046 would help, as the spikes here are getting back across the existing buffer already, they'd probably get back across an extra buffer too.I tried putting some resistance before the coupling cap which brings the sine signal in to pin 14, it reduces the spiking somewhat but not enough. I'm not sure how big a resistor (R27 in schematic) I could dare to add there for fear of weakening the input signal to the point that the 4046 might not be able to read it.I attach a diagram of the relevant areas of the circuit, how might I go about preventing those spikes from propagating back to the transistor buffer's output and even its base? (In the schematic, measurements at Sine_Sig_Source and Buffer_Out)I don't think they are propagating through the ground or power rails because the spikes stop appearing on a scope trace measured at the transistor's emitter (or base) whenever I disconnect the wire leading from there to the coupling cap.ThanksEDIT: scope pics attached, all taken at the Bufer_out point, worst spikes are with R27 as zero ohms, smallest spikes when R27 is replaced by an open circuit (obviously not a workable circuit for use, but shows how spikes reduce if the 4046 SIG_IN doesn't connect to here, although also shows they don't fully vanish, maybe a scope probe effect even despite using the spikes and spring grounds rather than hooks and ground clips), medium spikes when R27 is at 1K. Similar spikes can be seen on the signal if measured at sine_sig_source, again particuarly bad where there is no resistor before the 4046's input.

author: tggzzz
author_rank: Super Contributor
timestamp: June 21, 2023, 07:18:22 am
content: Quote from: Infraviolet on June 21, 2023, 02:41:12 amThose issues might be a consequence of your construction and probing techniques. Photos of those would help.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 21, 2023, 03:47:41 pm
content: Seems the noise spieks do vary somewhat with exactly how the probes are contacting the (currently breadboarded) circuit, they can get a bit smaller with some luck in contact quality. But they definitely are there now, and weren't there before the 4046 was added, and they are there now even when no probes are near the 4046.However, to get better relatively phased inputs the 4046 I added a small cap (68pF) from the "Wire_to_cap" area to ground. This forms a low pass filter with the 1K which annoyingly attenuates the signal a bit,but very usefully lets me get the phase perfectly matched up so they are precisely in phase or in anti-phase at the 4046 rather than a few tens of degrees out. Seems a side effect of this phase adjusting cap is that it reduces those noise spikes quite a bit further.

author: tggzzz
author_rank: Super Contributor
timestamp: June 21, 2023, 03:59:28 pm
content: Quote from: Infraviolet on June 21, 2023, 03:47:41 pmIf that's a solderless breadboard, it is par for the course. Those things are, IMNSHO, the work of the devil.This is what I wrote yesterday:https://www.eevblog.com/forum/testgear/siglent-sds1202x-e-crosstalk-between-channels/msg4919881/#msg49198812N3055's response is gratifyingEDIT: youdohave effective decoupling, don't you?

author: Infraviolet
author_rank: Super Contributor
timestamp: June 21, 2023, 04:15:40 pm
content: Decoupling where? Every IC I'm using has a 10u and 100n pair of ceramics in the shortest possible route between its power and ground. The general power and ground rails from which each transistor is fed have plenty of 10u and 100n caps between them. No individual wires anywhere longer than a few cm, and caps always within under a cm of where they are decoupling.On a finished PCB I'd usually have all this decoupling, and get it closer still, mm from the relevant pins where the pins are close together.P.S. I can see the disadvantages of breadboard, but in early stages of prototyping it still feels very helpful, something you don't have to desolder parts from every time something is changed, and which doesn't take the planning required for stripboards (honestly harder than laying out PCBs I usually find, to the extent I only use stripboards thesedays for very basic things which simply need to be quickly made in to permanent "tools" rather than finished circuits, like adapters between pinouts or trivial parts of testing or programming jigs).

author: tggzzz
author_rank: Super Contributor
timestamp: June 21, 2023, 05:42:23 pm
content: Quote from: Infraviolet on June 21, 2023, 04:15:40 pmHavingleads"always within under a cm" on a solderless breadboard is quite an achievement. I'd like to see a photo of that!"A few cm" => a few tens of nH. What's the di/dt due to the output's load R+C? Is there any extra di/dt due to switching "shoot through" on the devices you are using?QuoteYou have to realise when the disadvantages ofanyconstruction technique are causing you problems. Where there are problems, any apparent ease has become moot!If you read my refs, you will realise I have similar views about stripboard.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 23, 2023, 12:08:10 am
content: Just to check about the 74hc4046:A) where I don't need any of the VCO functionality I can take the inhibit pin high and the whole chip does nothing but provide the phase comparator?B) it is possible to use the VCO parts of a 4046 for frequency generation applications entirely independently of what the phase comparator section is doing? Whilst the chip is marketed as a PLL, it can in practice be used as a single chip solution for generating a square wave output used for something entirely separate to the signals which the phase comparator part is processing?ThanksP.S. breadboard layout, mostly I'm not using wires on it, in many places the resistors run between the relevant holes, although Isuppose each side f the resistor is perhaps a 1.5cm wire. I've got each logically separate part of the circuit close together and only a very small numebr of longer wires between them. I produced some small PCBs which plug in to breadboard ends to provide power and ground to the side rails on both sides. For getting caps close to ICs, most of the ICs used here have Vcc and Gnd at opposite corner, I put one leg of each ceramic cap in Vcc, the other leg in the empty row "above" Vcc (imagine where pin 17 would be on a 16pin DIP), then run a cut section of 0.7mm solid core wire with striepdp ends directly from this row 17 down to the gnd pin, might be closer to 2cm for 16 pin chips actually, but not much more. Pin 16 of Vcc and row 17 for ground then take short 1cm jumper wires from their rows to power and ground rails on the right hand side of the IC. I think that phase shifting cap is doing enough to cure most of the noise spikes for now though. I looked over your refs, the scope probe accessory seemd mostly like a useful insulating cover to go over the probe spike and coiled springy grounding wire (this style i.stack.imgur.com/PSo3N.jpg) I'm presently using, I can see how it would make poking the probe in easier to avoid the risk of shorting nearby exposed resistor legs to ground when doing so. The list of prototyping methods seemed more aimed at what one does at the stage after breadboarding, rather than a substitute for it, the stage at which I go order first iteration PCBs. I was agreeing with your mentions of stripboard issues, but also pointing out that the other methods are all also based around soldering which isn't so practical when you're at the point of wanting to rapidly swap parts in and out for trial and error tweaking.

author: tggzzz
author_rank: Super Contributor
timestamp: June 23, 2023, 08:57:17 am
content: Quote from: Infraviolet on June 23, 2023, 12:08:10 amElectrically it is equivalent to the image you didn't show us. Sometimes mechanically the mechanism I made is more convenient, especially if the ground is further away. The main point was to illustrate the consequences of using a 6" lead.With manhattan, it is easy to bend two pieces of wire (one for tip one for shield), solder them to the circuit, then insert/remove the probe as needed.QuoteDead bug, rats nest and manhattan are suitable for breadboarding.Soldering takes negligible time compared with design, collecting components, measuring results - andespeciallywondering whether your results are a consequence of your design or construction technique. I've seenfartoo many people chasing their tails over what turns out to be a problem with using solderless breadboards.I prefer techniques that allow me to concentrate on my design's problems, rather than being misled by avoidable varying parasitic artefacts.

author: Terry Bites
author_rank: Super Contributor
timestamp: June 23, 2023, 05:39:23 pm
content: Here's a classic high speed zero crossing finder for a logic level signal:You can find both edges of a pulse with an exor or xnor and a delay.Use gates as non inverting delay. Delay from input edge to output rising edge and pluse width will depend on the propagation delay and rise time of the gates.If needs be, you compensate for that with a small delay in the other channel.Are you being denyed 10c RF transistors, are you being held prisoner somewhere. Can we help?

author: Infraviolet
author_rank: Super Contributor
timestamp: June 23, 2023, 11:00:12 pm
content: 10c RF transistors, what type are you talking about? I can buy some if I knew some exmaple part numbers, but didn't know what they'd do better than the ones I've already got.The 4046 seems a good solution now, if I wanted to use logic level chips I'd have to add in extra amplification stages before them, whereas with the 4046 I can feed straight from the low level analogue signal and perform the phase comparison from that. The 4046 does in one chip what would otherwise take multiple devices, even if I'm not using all its functionality.