Suggestion to probe the crystal with a x1 probe reminded me of a story when a bloke had his ATMega 169 device RTC drift at least 1 hour per year with a precision 32 kHz crystal but when he probed it, he would see nothing wrong. Ultimately this was solved by adding some extra caps, against the actual datasheet. Turned out his oscilloscope probe would introduce just enough stray capacitance into the oscillator to stabilize and show correct frequency! Atmel would later confirm that to have been a hardware bug.
@EEVblog6 ай бұрын
Learned that at my first job at 18yo. Classic.
@smayds6 ай бұрын
Damned stray capacitance, absolute bane of the electronic engineer's existence!!
@GodzillaGoesGaga6 ай бұрын
We used to add a trimmer cap on Xtals so that we could calibrate them. We needed high accuracy timers for logging events. We would time them in software and give the %error.
@NullReference1196 ай бұрын
IIRC Paul Carlson, of Mr. Carlson's Lab, mentioned this in regards to the old school oscillator sections in radios before crystals were common. Those were often tuned using measured caps and might even use gimmicks (two pieces of wire twisted together for a bit of pf) for extremely fine tuning. I don't remember exactly what he said, but I do remember that you had to be extremely careful when coupling in a probe to align them because more often than not if you weren't aware of the issue you'd align the circuit to only work with the probe attached. OT: Dave does anyone do a version of a gimmick in circuit anymore? Or are they rightfully replaced with pots?
@michaelmoorrees35856 ай бұрын
As a youngster, back in the late 1970s, experience this when testing TTL circuits. It wasn't working, but when probing it with the scope, it suddenly worked. In those cases, it was often a timing "race" problem.
@robpayne19566 ай бұрын
Any short cut advice from you Dave is absolutely wanted and needed by all of us amateur Hobbyists and any advice from you is something I need for sure and I'm confident I am not the only one. Thank you Dave for all your learned advice and please continue any of these little tutorials you can come up with. You have taken me from what the hell does a transistor do anyway to actually building something that actually works for what I intended however simple that may be. Thanks Dave for all you do.
@electroquests6 ай бұрын
I absolutely agree! They don't teach such stuff in grad school
@todayonthebench6 ай бұрын
To answer the question of "Why are these so big?" The crystal physically vibrates, it is piezoelectric. Similar to a tuning fork, the oscillation frequency is dependent on two factors, physical dimensions and the speed of sound in the material. So lower frequency more or less inherently means larger crystal. But how can the crystal oscillator packages be so much smaller then? The crystal oscillator packages are smaller since they don't actually resonate at their output frequency. But rather at some multiple of said frequency. Halving a frequency is a simple D-latch away. And this is sometimes even done on a lot of chips relying on an external crystal. (A chip might only run at up to 10 MHz, but can use a 40 MHz crystal, or other external clock signal.)
@larzblast6 ай бұрын
The one thing that Dave didn't answer. Hahahah. Nice one!
@todayonthebench6 ай бұрын
@@larzblast Well, someone has to actual answer the question. Tangential answers aren't answers to the initial question, but are rather trivia that could be potentially useful.
@SpeccyMan6 ай бұрын
Surely it is the crystal itself that vibrates. Not, as you put, the "crystal oscillator."
@todayonthebench6 ай бұрын
@@SpeccyMan True. Slight phrasing error there, but hopefully understandable.
@jcc4tube6 ай бұрын
What about 32.768 Khz watch crystals? They seem tiny compared to typical Mhz crystal cans but they are low frequency. Are they using some other vibration mode or something?
@mikeselectricstuff6 ай бұрын
Important to remember that MCU sleep modes won't work properly with an external osc (you could manually disable an external osc in software, but fiddly as you'd need to switch between internal RC and external when sleeping and waking)
@todayonthebench6 ай бұрын
Yes, a lot of MCU are not going to go to sleep if feed by an external oscillator, a design oversight in my own opinion. It isn't hard to design an MCU capable of gating the clock from entering various resources during sleep mode. Effectively toggling these features off. And/or adding the ability for the clock distribution to divide down the clock to something sufficiently slow for idle operation. Same for switching over to internal RC oscillators during sleep. There is many ways to skin this cat, but it is a bit silly that a lot of MCUs can't really do any of this on their own.
@mikeselectricstuff6 ай бұрын
@@todayonthebench You'd still need to power down the external osc, but might be nice if the MCU had an enable signal to do this automatically in sleep
@todayonthebench6 ай бұрын
@@mikeselectricstuff Having the ability to configure an IO pin for enabling an external oscillator would be a wonderful feature. I were though thinking more of the times one distributes the same system clock between multiple chips and still want to put the MCU to sleep while other stuff runs. However the above idea of enabling an external oscillator still would work, more or less just a gate needed, but could be nice to integrate that "gate" onto the MCU. (now technically the first clock pulse could be corrupt, so a synchronized delay to skip the first cycle would be ideal, something a simple D-latch almost could accomplish on its own, just need a tiny bit more logic.) But in the end. External oscillators/clocks and MCU sleep modes are rarely a trivial combination, even if relatively simple logic could make it a trivial task.
@MishTheMash6 ай бұрын
This kind of video is like crack: Short, detail nuanced, classic Dave.
@EEVblog6 ай бұрын
Should I charge by the gram?
@MishTheMash6 ай бұрын
@@EEVblog Magic Smoke dealer, just to keep above RBA interest rise.
@bryede6 ай бұрын
However, if you're starting out with crystals, you're probably looking for how the load caps relate to the crystal capacitance. A lot of people just guess at it but it can throw your accuracy off.
@_2N22226 ай бұрын
Of course I like such design tips! Although I knew that it is typically possible to drive such an oscillator circuit with an external clock signal, I was not aware of the pitfall that the enable signal may short the X1 pin. I learned something.
@rockpadstudios6 ай бұрын
I like the short circuit tips (not short circuits)
@LazerLord106 ай бұрын
I went down the rabbit hole on this when designing a board with a crystal for the first time. I ended up giving up and just going with the default value and hoping for the best. I think it ended up working fine.
@troutrou06 ай бұрын
Yes Dave, I just love these little design tip video, hoping to see many more of them ! 🙂 Well that particular one I already knew about as it's often stated by the manufacturers themselves in their datasheet.. Generally speaking I like whatever video where you convey practical information to design stuff.. "Fundamental Fridays", "Top 5 Jelly bean XYZ", that kind of thing. Being a failed engineer, I never got a job in R&D and eventually changed career completely to work in aviation now, nothing to do with electronics anymore. So I have zero real world, professional experience in designing stuff. So to me the greatest added value of your channel is that people like me can benefit from real world, practical knowledge and experience from an actual design engineer, soak as much practical info as possible so as to somewhat compensate for my personal lack of experience. Obviously there is more to your channel than that. In my case it was your enthusiasm for electronics that revived my interest 12 years ago or something, which led me to build my first decent lab, acquire lots of gear and start living the passion fully at long last ! I am 46 now, and feel I enjoy at last what's been my passion since I was a boy. Never too late ! :-)
@ChrisSmith-tc4df6 ай бұрын
MEMS oscillators are available in small, but easy to solder SOT surface mount packages from SiTime and Analog Devices with as few as 3 pins. They are also flexible enough that with a bypass capacitor and some creative soldering, one can even bodge one in on the pads where a problematic crystal was before. Some offer field programmability, so that one can just keep unprogrammed blanks on-hand and just program in the needed frequency just before soldering. They are little problem solvers sometimes.
@mikeselectricstuff6 ай бұрын
But don't use them if you care about jitter - I found that using a MEMS osc on a W5500 ethernet chip caused 1% rx packet loss
@HwAoRrDk6 ай бұрын
And also some MEMS oscillators stop working when exposed to helium gas. Ask Apple about that one. 😉 (There was a story a few years ago about a hospital MRI technician who discovered their new iPhone died after leaving it in a room where some helium had been vented during servicing the MRI scanner.)
@ChrisSmith-tc4df6 ай бұрын
@@mikeselectricstuff Yeah, not all of them use a sufficiently high enough VCO frequency with an optimized divider strategy.
@ChrisSmith-tc4df6 ай бұрын
@@HwAoRrDk Definitely a cautionary tale for Clowns in Tech 🤪
@RogerWilco4866 ай бұрын
The phase noise is real @@mikeselectricstuff
@chizzt6 ай бұрын
Just a wee note. Microchip's PIC MCUs often offer the choice of FS or non FS crystal oscillator options. The FS stands for 'Full Swing' and gives you a rail to rail swing on the X1/X2 pins. In non FS mode the voltage on the pin goes up and down just enough to operate the Crystal. Advantages and disadvantages to each mode, in terms of current, dissapation, noise ,etc. You takes your choice.
@fedimakni12006 ай бұрын
We need more circuit design tip videos. 🎉🎉🎉
@mikeselectricstuff6 ай бұрын
Handy tip for setting cap value for external crystals - the amplitude on X1 and X2 should be similar for happiest operation ( use a x100 probe for low-power xtals like 32.768kHz watch xtals
@TriodeTetrode6 ай бұрын
Hello Mike. Reading your comment I remember now when I couldn't measure STM32 nucleo board 32.768 kHz crystal, but measuring 8 MHz crystal was fine. I was using 10x probe. I haven't seen any normal oscilloscope to have 100x probe, must have to buy extra. I also know that stray capacitance of the probes is like 16 pF. I was obviously overloading crystal circuit. Just wondering why lower frequency crystals are more sensitive to stray capacitance? Also instead of 100x probes can I use some op amp as buffer for measuring?
@echelonrank39276 ай бұрын
alternatively use a NP0 trim capacitor to set accurate frequency value like inside a classic quartz watch
@mikeselectricstuff6 ай бұрын
@@TriodeTetrode For 32Khz you can make a crude x100 probe with a 90M resistor hung off the end of a x10 probe - not super accurate but good enough
@crackwitz6 ай бұрын
Short little circuit design tips? Much appreciated!
@_S13_6 ай бұрын
Yes these tips are really great! Keep them coming. Here is a free tip for you that might be interesting: How to convert any fixed voltage regulator with external feedback resistors in to an adjustable regulator that can be easily controlled with an MCU. Applies to switching regulators as well. You can do this by biasing the feedback pin with a DAC (or a filtered PWM + buffer from the MCU for example) and a resistor. The resistors sits in between the DAC and the feedback input of the regulator. It then becomes a fairly simple resistor network calculation together with the 2 existing feedback resistors, and thus you can calculate the output swing of your regulator.
@111chicane6 ай бұрын
Excellent educational video, typical for the early years of this channel. Love it! Keep it up, please!
@reedreamer95182 ай бұрын
You are right Dave! I just fixed a dead Channel Master rotator control that uses a PIC16F57-IP with an external 4.00 MHz crystal oscillator. The power on reset looked okay on the scope, but the chip just didn't seem to want to tick over. From watching your video, I got the idea to look for stray capacitance around the oscillator's load caps. Actually, I sucked the solder blobs off the caps and re-soldered things a little more tidy and - Bob's your uncle, it works! Thanks Dave!
@kevincozens68376 ай бұрын
This is useful information for young players and reminders for the not so young. When dealing with X1 and X2 you must pay close attention to the datasheet. Some microprocessors or microcontrollers, for example, require the grounding of either X1 or X2 before you feed the other pin with a signal from an external oscillator. If one of X1 or X2 needs to be grounded you will see it in the datasheet.
@DerIchBinDa6 ай бұрын
Funny this pops up, I am just in the process to see if I wanna use an Crystal or an Oscillator for rather space constrained project. Thx Dave! Any tips for us hobbyists is very welcome!
@rudolphriedel5416 ай бұрын
I am using TG2520SMN oscillators in a circuit and these have "Clipped Sine" as output so these require a DC-cut capacitor at the output. And they need a by-pass capacitor. So my BOM count did not get reduced when switching from a crystal to an oscillator for a more precise frequency without the need to fiddle with the capacitors. And then there is that oscillators need a supply voltage which limits their use, the TG2520SMN for example needs VCC in the range of 1.7V to 3.63V.
@mikedjames6 ай бұрын
I spent time working on crystal oscillators. Some of are "quite analog"- they have AGC to facilitate startup (feeding energy rapidly into a high Q resonant system , you need to get a lot of energy in fast) such that they shut down if you overdrive them with an exterrnal clock.. so you also have to tell the chip you are using an external clock .. and these often needed drive on X2. One key figure is equivalent series resistance (lower means higher Q factor) cheapest crystals often have high ESR and the oscillator will not start reliably even if it runs when you disturb it by poking it with a scope probe. I once saw the aftermath in a factory where purchasing ignored ESR value bought a cheap crystal. The factory was closed, staff sacked, production ended, machines gone, row after row of pallet stacked with unsellable CDROM drives sitting there in the silent space... Also the cheapest crystals can be less accurately cut than a ceramic resonator- I have a Chinese USB logic analyzer that had a worse than 100ppm clock frequency error. As I was using it to time an AIS distress beacon where the accuracy needed was about 10ppm ..I had to buy a clock oscillator module from a reputable USA vendor to get it better.. the 10ppm oscillator ended up 3ppm accuracy in fact (could have bought a Temperature Compensated Crystal Oscillator module to do even better)
@mikeissweet6 ай бұрын
Good tip indeed! Never put too much thought into it, usual just seeking out the application curcuit
@pupperozucca49946 ай бұрын
6 years in EE university and nobody thought me that. Thx Dave
@kensmith56946 ай бұрын
BTW: If you need a frequency and half that frequency, you can get SOT23 sized inverting D flip-flops. It is smaller than a 2nd oscillator
@toxanbi6 ай бұрын
Have you ever read a datasheet on any MCU? Almost any of them cover this option.
@GodzillaGoesGaga6 ай бұрын
You weren’t paying attention. Almost every datasheet talks about using an Oscillator vs an Xtal. All an XTAL is is a high-Q resonant tank of a Colpitts oscillator. You need an amplifier output and an amplifier input. Ie one of the Xtal pins will be an input.
@pupperozucca49946 ай бұрын
I was paying attention to my EE classes and they did not talk about X1 and X2. Probably because they knew they are in every MCU datasheet...
@GodzillaGoesGaga6 ай бұрын
@@pupperozucca4994 Ok fair enough. I didn’t mean to be rude, my apologies if I was a bit snarky.
@BRUXXUS6 ай бұрын
Oooh, I’ll echo what many others are saying in the comments- I love any of these kinds of videos where you share your knowledge and experience with us! Thanks!
@georgegonzalez24766 ай бұрын
Back in WW2, military radios came with a big box of crystals. Dozens of them, each one the size of a fig newton. So I'm a bit surprised to see modern people complaining about the "large" size of crystals nowadays. They're now like 1/500th the volume of a WW2 crystal. They got only slightly (HC-6) smaller during the CB craze. You had to buy a receive and XMIT crystal for each channel you wanted, that cost around $18 big US bucks back then! And we were reasonably happy.
@jvovnoboy6 ай бұрын
Beware of jitter/phase noise specs! Most of the low cost oscillators have high jitter. Need to make sure that the receiving chip can handle that. It also can be more susceptible to supply ripple and noise
@Darphi016 ай бұрын
Yes please Dave. I'd love to see circuit tips on your Chanel. Maybe also do a series for the young ones who are just starting out in electronics.
@sinewave33236 ай бұрын
I love how you explains things! Its genius n comical! Thanks so much for making these videos! It helps me learn!
@TheHuesSciTech6 ай бұрын
Great video, I do this all the time out of sheer laziness! I appreciate the warnings in the video though about lines getting shorted out, and the comments section here is also educational for me.
@Remowylliams6 ай бұрын
I do like short useful tips, provided they give enough info to make the viewer/user of said tip knowledgeable enough to use it effectively. It being sourced by Dave you can bet no worries on the latter score. Cheers.
@galinvayov6 ай бұрын
I use two converters, SPI to two UART, in one of my devices. They of course require a crystal. Two separate is a waste. One is connected to a crystal, from its X2, I supply a clock to X1 of the second integrated circuit.
@horiamorariu6 ай бұрын
Very useful condensed material. Thanks Dave! And, for designers that actually need a crystal oscillator, remember that the value of the load capacitors is very important, if you want to achieve precision. A tip here (and I do not make any advertisement): use the latest version of Saturn PCB. It includes the Crystal Load Capacitors and PPM calculator. Cheers!
@TheM4man6 ай бұрын
Hot tip: meany MCU/SOC integrated oscillators like in the SiLabs EFR/EFMs have tunable internal caps - so you just tune in the frequency by adjusting a code. :)
@simonhopkins38676 ай бұрын
I lost interest in my hobby electronics. But this got me thinking about it again. Keep them coming bud.
@ksbs20366 ай бұрын
Dave, I think these short design vblogs are great. It's nice having a range of articles to watch. Sometimes I have ten minutes to spare, other times I have a half hour. I get to choose from a buffet of excellence. Thanks
@--------------hhhhh6 ай бұрын
noob question: does this mean that one could synchronize two identical audio DACs (finished products, each of them in its enclosure etc) by substituting the crystal of one of them for an external oscillator and then connecting XO to the second DAC XI? that audio DACs are synchronized is important in multichannel audio systems and most cheap consumer DACs don't have master clock inputs/outputs. thanks!
@EEVblog6 ай бұрын
Yep, that should work.
@Filip31466 ай бұрын
I would put a bigger asterisk on this piece of advice, as also Dave hints at it. The safer bet is to just read the datasheet and look for the spec that tells you what an external clock should be (shape, amplitude, phase noise, etc.) and not try to connect a clock directly. "Working" is always a relative term with something like this depending on what your IC is. A Pierce oscillator has the load caps and crystal in its feedback path, so *to an extent* it doesn't care too much about power supply and layout. A clock source will do, and it will absolutely have poor performance if not powered correctly, and you still need to make sure you are not overdriving the clock input (which is also a concern with driving crystals - that is why you sometime see a series resistor also on the output of the inverter or a programmable power output for fancier chips). You might even need a separate LDO for an external oscillator so your BOM might actually increase significantly. Unless there is a separate datasheet note at least hinting to what the amplitude of an external clock should be, it might not be wise to design it in.
@SeanBZA6 ай бұрын
When doing the external clock remember the input needs to be via a resistor and small capacitor as well, so the internal bias is not upset. 1k and 100pf ceramic, right there by the input pins, will probably work, and also if you want the clock out use a buffer right there, as most of those clock drivers can barely drive a 100pf load, because of the tiny mosfets inside the chip that are doing the drive limiting on the crystal. So slap one of those tiny single gate inverters right next to the pin, and use that as buffer. Seen a lot of times the crystal gets lazy, and simply unsoldering it, turning it around and soldering back in gets it working again. You also get, for those places where you are constrained, a crystal with built in capacitors, though often enough you will probably want to use a SAW resonator in place of the crystal, 3 pins, and all the capacitors there already. Not as stable, but good enough for most clock generation, providing you do not want to have a real time clock off that signal.
@MalinDixon6 ай бұрын
Really good advice. It's so easy to use an oscillator and too many people try to design their own with a crystal and get into problems. Also, there are often designs with more than one crystal at one frequency where just one would do. For most crystals that aren't the 32.768 kHz "tuning fork" ones, the frequency in MHz is 1664 divided by the thickness in microns. That makes a 3.579545 MHz crystal nearly 0.5 mm thick. That may not sound a lot, but that sort of crystal (know as "AT cut") works best when it is much longer than its thickness. In an HC49/4 crystal, which is about 7 mm long, that means that the crystal has to be made thinner at the ends to make it work. There is also the risk that the crystal can oscillate at it's 3rd overtone, which would be about 10.5 MHz. Also the crystal in the low height HC49/4 has to be made as a narrow rectangle, not a circle or wide rectangle. In the narrow rectangle, the oscillations, which are minute physical movements, have to be near the edges, while in other shapes the oscillations are biggest in the centre and tail off towards the edges, so the edges aren't affecting the oscillation. For those reasons it makes a lot of sense for small crystals or oscillators to have a higher frequency oscillator, and to divide the frequency. That tiny packaged oscillator will probably have a 28.63 MHz crystal in it, which is divided by 8. That makes the crystal 58 µm thick, and if it's 2 mm long, it's around 40 times as long as it's thickness so that'll work better. It's not going to oscillate at the 3rd overtone which would be over 70 MHz as the amplifier won't have gain at that frequency. Two slight warnings. Some little oscillators don't have built-in decoupling capacitors, so I would suggest treating them like and IC and making sure that there's 10 nF or 100 nF across the power supply near to the oscillator. Secondly, the X2 output can be made with very low drive capability. A lot of oscillator circuits have a resistor between the output of the inverter and the crystal. That resistor can prevent unintended overtone oscillation, and mean that the crystal is driven with a more sinusoidal waveform. If that resistor is effectively built into the IC, then the drive capability will be worse if you're trying to drive any long wires.
@button-puncher6 ай бұрын
Thanks for the tip Dave. Could you use a differential probe to measure the crystal directly? Making sure to be very careful with the leads to minimize capacitance? I've got a Nixie clock kit with a 32kHz oscillator that keeps TERRIBLE time. Loses 5 minutes a week. I used a programmable oscillator to replace the crystal in a Korg DT-1 Pro guitar tuner. Made a 60Hz display for my generator that I could see from across the room. Governor will hunt at times causing it to ping pong back a forth.
@EEVblog6 ай бұрын
Likely not diff probes are 1M impedance, that will upset the circuit. At a minimum use a x10 probe on X2.
@button-puncher6 ай бұрын
@@EEVblog Thanks Dave. I appreciate it. I'll give that a shot.
4 ай бұрын
IC oscs, while smaller. are $$ and have limited fanout. It's almost always going to be cheaper to discrete, but sometimes board volume is limited. Experimentally validate an xtal, 2 caps, and large value load resistor to see if it will work and be stable enough.
@vamsichikati6 ай бұрын
Excellent tip. Was struggling hard to control time drift on my board for rtc application. Thank you
@ralphj40126 ай бұрын
Some micro datasheets also specify the load capacitance range of the crystal. Use one even slightly outside of that range, even one stated to be the same frequency, and the micro will not start / run properly, irrespective of the value of the load capacitors.
@sidharthap6 ай бұрын
I've always loved all your design related content. I really miss it. U barely do n e thing like the power supply design videos. Do more please!!!
@nigeljohnson98206 ай бұрын
Some of the 32768 Hz circuits use the tiny 1uW crystals. These require a series resistor in the external crystal circuit to stop the crystal from over dissipating. Such over drive results in the crystal failing after a period of operation as the crystal breaks due to stress. This type of failure can happen after days, weeks, or even months of apparent successful continuous operation. A tip that may help determine if a crystal is close to over dissipation is to slightly increase the supply current to the chip containing the crystal oscillator amplifier. The frequency of an overdriven will fall slightly under such conditions, while the frequency of an under driven crystal will rise slightly. To reduce emi from the metal case of a crystal, it was common practice to loop a wire over the crystal case with both its ends soldered to ground. A cheaper, less satisfactory solution was to physically solder the crystal can to the PCB ground plane. This was bad practice, as the heat of soldering had the effect of permanently changing the crystal frequency. There was a version of the HC18U case that had a third wire welded to the top of the crystal can. This could be bent over and soldered down to PCB 0 volts, to ground the can of the crystal. It is surprising how much RF energy can be detected with a high impedance oscilloscope probe from the can of an ungrounded crystal. That which is not revealed by an oscilloscope probe, can often be detected using a search coil connected to a spectrum analyser.
@CMTEQ6 ай бұрын
Great circuit design tip, I have used one of those smd crystal from LCSC before, they work quite well. Please bring more of these short design tip, they are very valuable. Thank you Dave.
@echelonrank39276 ай бұрын
for accuracy use a 33pF NP0 trimcap on X1 to adjust frequency
@KeritechElectronics6 ай бұрын
Not to mention how fascinating these things are inside! It's like a teeny tiny tuning fork, as seen in the Open Circuits book by Eric Schlaepfer and Windell Oskay.
@zvotaisvfi86785 ай бұрын
"relatively unstable circuit...." These Are the Key Words Here I Wish Could Be Seared Into Every Heart and Mind....
@zvotaisvfi86785 ай бұрын
2:59
@MartinE636 ай бұрын
More of this please Dave. Sub 10 min videos are much appreciated.
@frankwalsh13796 ай бұрын
Thanks Dave! I’m a professional engineer and was always wondering why sometimes a ‘single ended’ resonator could be used on X1 pin !
@00Skyfox6 ай бұрын
Always like circuit tips and fundamentals!
@muratkancaoglu32846 ай бұрын
Oscillators are suitable for non-battery powered applications as they're relatively high on consumption. STM32 G0 series have enable pin controller to actually disable crystal during sleeping.
@kensmith56946 ай бұрын
You can make an extremely low powered Xtal oscillator if you need to. It only works at lowish frequencies. Basically, the inverter than makes it go is made with very small MOSFETs
@menash546 ай бұрын
Short design tip video are great! Hope to see more. I like the long, deep diving video too, but always have the time
@qutube1006 ай бұрын
Very interesting, circuit tips is the way to go boss short and sweet!
@electroquests6 ай бұрын
Thanks Dave, I always learn something new, recently I did face issues with crystal oscillators
@nowster6 ай бұрын
That EN signal isn't exposed externally, so it might be wise to put a 10k resistor between the oscillator output and X1.
@Gameboygenius6 ай бұрын
It's probably just controlled by the /CE input? And 10M you mean? 10k would change the frequency noticeably. But it doesn't matter either way because X1 is grounded so it won't oscillate, or work as an inverter, when disabled.
@EEVblog6 ай бұрын
Chip Enabled, pin 1
@nowster6 ай бұрын
@@EEVblog Surely that's for bus multiplexing?
@aviandragon13906 ай бұрын
It's disabling the chip by removing the clock signal. He showed the schematic.
@kensmith56946 ай бұрын
10K is a bit big if you are working at high frequencies.
@rocketman221projects6 ай бұрын
You can also get ceramic resonators in small SMD packages with built in load capacitors for applications where a 0.5% frequency tolerance is acceptable.
@nigeljohnson98206 ай бұрын
A known fault on the early 80HC85 processor was a leakage current on the X1 crystal pin. The processor crystal oscillator was designed with its X1 input biased mid rail, with a small Schmitt hysteresis action around the mid voltage bias point. presumably to limit parasitic oscillation when driven with an external oscillator. Unfortunately the X1 suffered a leakage current that was sufficient to drive the oscillator outside the hysteresis window, this stopped the crystal from starting to oscillate. Sometimes switching the circuit off and on again provided a sufficient kick to allow the oscillator to start. Once started, the processor would run without a problem. The leakage current was temperature dependent, so diagnosing the fault took some time. The moral of the story is that PCB leakage currents can stop an oscillator from starting, if they get into the high impedance amplifier input. I have seen a guard ring track from the oscillator output used to protect such inputs from stray leakage currents. A problem that can be observed if the PCB is subject to dew point, where a film of condensation may form on the PCB, providing a path for such currents.
@frankmccann296 ай бұрын
Glad I stopped in you made me remember something, thanks. 😊
@theIpatix6 ай бұрын
This reminds me that I once tried to get rid of noise on an old toy keyboard (musical), and my friend ended up swapping the crystal. We tried all kinds of configurations: We increased the load capacitance, we removed the capacitors entirely, and it just would not stop working. Well, we did not measure how stable the clock was, but I guess a bit of stray capacitance was enough to keep the crystal going!
@Morbuto6 ай бұрын
Something cool I discovered recently, some of the super-cheap chips from WCH (CH582 in particular) have digitally configurable load capacitors built in. Presumably to reduce BOM cost (and assembly) by fractions of a cent, but certainly convenient!
@andreyselectronics1496 ай бұрын
2:08 Well, then it's a great thing that oscilloscope manufacturers have largely agreed to phase out switchable probes, so you can't accidentally use a X1 instead of X10 probe.
@blanchehermine6 ай бұрын
Some MCUs like STM32 have clock output capability, so you can output your 32768 Hz on the dedicated pin and probe it with oscilloscope without affecting the crystal frequency.
@tom_bull6 ай бұрын
Yes! More of these, please.
@marcinp.81086 ай бұрын
The guestion is: should it be inverter, buffer or two inverters in series? I see many different diagrams. Some diagrams shows single inverter, while numbers shows buffer... I know that double inverter works. In case of singlge element it shoulb be... (commin sense says buffer).
@owenimholte38356 ай бұрын
Thanks Dave! I'm curious how to use a crystal oscillator in a "standalone" sort of way? For instance if I just want to create some oscillations, what do I do? Apply a DC voltage to x1? Apply an AC voltage to x1 and it tries to resonate or something like that?
@steve42lawson6 ай бұрын
Heck yeah I like your quick design tips!! Thank you!
@pushpendrakhaira93376 ай бұрын
a lowpass filter in the form of 330 ohm resistor maybe needed on one side. Or you can have 3.57 oscillate at 3x freq. common with 65c02 cpu because its fast.
@kensmith56946 ай бұрын
Trap for the new guys: You may find many oscillators of the same size in surface mount. Loot at the foot prints carefully. Nobody seems to agree with anybody about what the footprint of a SMD oscillator should be. You may need to make a slightly odd footprint is you want to have a 2nd source.
@cedricb23446 ай бұрын
a crystal/oscillator manufacturer told me to check datasheets of chips to verify if oscillators are compatible before choosing an oscillator instead of a crystal. For video for example it seems oscillators are not a valid choice.
@tvelektron6 ай бұрын
like this kind of "quick" information. One detail unsettles me: the internal mosfet that is controlled by the enable signal can short-circuit x1. I would be afraid that the output of the external oscillator gets short-circuited and damaged. Or there are completely confusing interactions when the same scillator is used for several circuit parts.
@derekloudon87316 ай бұрын
These short videos are a very helpful refresher to us old farts.
@volkerraum34946 ай бұрын
You asked if we are interested in more electronics design tipps ? YES PLEASE (at least me) 🙂
@tenlittleindians6 ай бұрын
Want to know the difference between a crystal and a crystal oscillator? It's 2 pins, that's the difference. 2 pin crystal cases are just crystals. 4 pin cases have the oscillator circuit built into the same metal can that holds the crystal.
@abitofabitofabit44046 ай бұрын
Check the datasheet for the ECS-33B2 in the 4-pin 3225 case. Odd pins are connected to each their side of the crystal, while even pins are lid grounds.
@simno3456 ай бұрын
Not all the time. Some SMD crystals have 4 pins, 2 being NC, just there for mechanical support. Of course they use the diagonally opposite pins, just to complicate layout 😐
@axelurbanski28286 ай бұрын
Sometime the problem is that most nobody knows, the cristal is a mechanic componet. With Vibration the cristal can stop or jump for a short time.
@echelonrank39276 ай бұрын
i repaired a Xtal that broke inside the can once. about 1/3 cracked off where one lead was. this was inside a beaten up remote control that belonged to a gym LOL
@axelurbanski28286 ай бұрын
@@echelonrank3927 a long time ago i am dev a controller Hard and Software. This get so hard punshes that the crystal stop the oszilation. Later we use a caramic resonator, that work fine.
@grahammuppet6 ай бұрын
Thank you, I always wondered how this was done
@l3p36 ай бұрын
In general, why do some boards have multiple crystals of the same value? And even if they differ, why not use a frequency divider? Or do I overvalue things being aligned with each other?
@EEVblog6 ай бұрын
If you have different chips dong different things, they usually don't need to be synchronous. Also, one chip might want to use a sleep mode or something.
@lizardkeeper1006 ай бұрын
I was just thinking about this subject today and how annoying I find crystals to work with I will need to look into oscillators
@PsiQ6 ай бұрын
i've been trying to get my colleagues to use a DCDC daughter board (like the external one-part-oscillator) or at least add an "option" area with in+out pins around the dcdc area to allow to connect that instead of the onboard components multiple times now. Somehow always something isn't working or running out of spec.. and the components they use are too small to easily handsolder for no reason. its easier to do when you can actually see them.. ..then a new batch of PCBs gets done with 2 weeks waiting time and then they find another error and they go into the bin. Or the components reach end of lifetime "suddenly" before the release version. Now if you have the (test)pins you can just throw on a small pcb with whatever components are available in ten years and try different versions, even power externally. Looking for defects and repairs are also easier with just A-B swapping modules. As large as possible, as small as needed. Doesnt help when you stuff everything into one place and then need to add large areas and extra layers for cooling hotspots.
@ТарасКорж-г4т6 ай бұрын
Hi, Dave, let's say you have one resonator properly connected to X1 and X2, where X1 is input and X2 is output. Can I wire that X2 output to X1 of another controller to avoid having multiple resonators? (I did it in a quick prototyping once and it worked, but I guess this would not be recommended due to an additional capacity and load on X2)
@kensmith56946 ай бұрын
Some data sheets may tell you. You may find an external oscillator costs less than two crystals
@AkwkyAkass4 ай бұрын
One downside, possibly. Set my mcu's RTC osc. to bypass mode, getting 32kHz clock from the external oscillator, which claimed 300nA current typical in datasheet. Turns out that reading was with the clock output disabled. It will actually drain 1.3uA when on. Twice as much as using the internal oscillator in the MCU. Less pain, though.
@mickeyfilmer55516 ай бұрын
All tips are useful especially to us who have learnt electronics from the likes of you, Big Clive , electroboom and so on. I find any tip or tricks of the trade are most welcome- especially when it might mean the difference between success and the puff of blue smoke...! (That expensive puff of blue smoke as I have found to my cost!!)
@GNARGNARHEAD6 ай бұрын
I didn't know you did electronics content, neat
@kevincozens68376 ай бұрын
Welcome to channel. If you want to see more of Dave's electronics content look through his past videos for ones listed as Fundamental Fridays.
@kendallshore57336 ай бұрын
That's a ripper idea! I wonder if that'd work in situations where the microcontroller crystal drive circuit has died?
@Chupacabras2226 ай бұрын
Crystal oscillator has 10mA current consumption. It can be sometimes a very big disadvantage.
@ChrisJackson-js8rd6 ай бұрын
neat I definitely misunderstood the reason for the guard traces lol i like the short little circuit tip videos
@Sysshad6 ай бұрын
@EEVblog Thanks Dave, i like your content but this was confusing for me: 06:24 "You do not need to use an external crystal and the load capacitors, you can replace it with some external crystal" Dont you mean a resonator here?
@jeremiahbullfrog92886 ай бұрын
How did you find this part? We use 3.686400MHz crystals and the HC-49 surface mount package is awful! We've been searching for a smaller package (with reliable availability) for a long time but these lower frequencies are hard to find
@EEVblog6 ай бұрын
I just searched LCSC
@marcdraco21896 ай бұрын
Dave, can you make a playlist of these little tips? Maybe even make just the bare bones? X1 = Clock in. X2 = ! Clock out. Boom shalaka!
@abitofabitofabit44046 ай бұрын
Another vote for a Tips & Traps for Young Players series!
@eemonster6 ай бұрын
what about pwm ic's that have a freq based on a capacitor and resistor.
@kensmith56946 ай бұрын
Lets not forget that the most useful chip in the universe is the 555 timer
@Scrogan6 ай бұрын
I’d like to see a video on DTMF, and also why anyone would use it in the current century.
@borayurt666 ай бұрын
Yes, please keep them coming. Short? I can take 20 minutes as short too.
@ventusprime6 ай бұрын
YES give dave give us more , if not this channel on the 2nd chanel
@IanScottJohnston6 ай бұрын
Getting board layout and the load caps wrong can certainly catch you out, especially using the old school 74LS04 Xtal circuit……..more than a couple times saw a 6.144MHz Xtal intermittently double oscillating at over 12MHz. Usually with a particular brand of 74LS04. Wierd!
@JAKOB19776 ай бұрын
When are your review video on Siglent SDS800X HD gonna land?
@ncooper84386 ай бұрын
Why are the capacitors needed, is it to initiate oscillation when the power is applied?
@sgctactics6 ай бұрын
I'm down for short circuit tips, always good to know more ways to fry chips. Jokes aside, it'd be like altium academy, but with dave instead. Who can say no to that?
@Quemedices6846 ай бұрын
For battery operated mcu, the consumption of oscillators are usually a no-no