clock poop - Page 1
Forum section: electronics / beginners

author: andyturk
author_rank: Frequent Contributor
timestamp: August 08, 2012, 05:48:28 am
content: A question for the EEVBlog brain trust...I've got a 32kHz oscillator module that does it's thing fairly nicely at 1.8 volts. The first image is what the output looks like on my DS1102E. The second image is the same signal zoomed in. It's not exactly square, but it's good enough.The rest of my circuit runs at 3.3 volts, so I run the 32kHz clock through a TI TXB0106 (http://www.ti.com/product/txb0106) to shift it up to 3v3. The third image is what the clock looks like after the conversion. Notice that little bit of "poop" on the rising edge? Where'd that come from?Fourth image is zoomed in on the weird part. It's not really an overshoot, but almost as if something has to catch its breath around 2.5v before heading all the way up to 3.3. It seems pretty sloppy for such a low frequency signal.Is this an artifact of the TXB0106 or level converters in general? My board layout?

author: JuKu
author_rank: Frequent Contributor
timestamp: August 08, 2012, 06:23:59 am
content: Is your output floating? If not, what is the connection there? Is the output side supply decoupled good enough?

author: amyk
author_rank: Super Contributor
timestamp: August 08, 2012, 10:22:35 am
content: 32kHz is really low frequency, even accounting for all the harmonics I think you should see something squarer on your scope. Do post the board layout.

author: PA0PBZ
author_rank: Super Contributor
timestamp: August 08, 2012, 10:44:41 am
content: Any reason why you use that TI thing? One transistor seems more than enough to do that level conversion...

author: KTP
author_rank: Frequent Contributor
timestamp: August 08, 2012, 11:53:28 am
content: Your scope trace indicates the part is working as intended. From the TI data sheet:"The output one shots detect rising or falling edges on the A or B ports. During a rising edge, the one shot turnson the PMOS transistors (T1, T3) for a short duration, which speeds up the low-to-high transition. Similarly,during a falling edge, the one shot turns on the NMOS transistors (T2, T4) for a short duration, which speeds upthe high-to-low transition. The typical output impedance during output transition is 70 ? at VCCO = 1.2 V to 1.8 V,50 ? at VCCO = 1.8 V to 3.3 V and 40 ? at VCCO = 3.3 V to 5 V."Your input signal has such a slow rise time (like 1us per volt!) that this one shot speed up circuit in the TI device finishes while the input signal is still just moping along taking it's own sweet time. Thus the signal spikes, then drops back and the output buffer follows the slow input. I think the data sheet specified a maximum recommended rise time on the input side of 40ns per volt.

author: andyturk
author_rank: Frequent Contributor
timestamp: August 08, 2012, 03:21:05 pm
content: @KTPI guess I should have RTFD. Actually, I did briefly, but glossed over that part. Looks like the translator is working fine and the real issue is why the oscillator module is putting out such a non-square signal. The Pericom datasheet (http://www.pericom.com/assets/Datasheets/KD_1-8V.pdf) says that rise and fall times should be 15ns. Looks to me like it takes about 4 usecs to swing between 10% and 90% of the supply voltage.@PA0PBZThe TXB0106 seemed like a reasonable choice because I have five data signals (4 UART signals plus a shutdown) that I need to convert--three inputs and two outputs. I had one buffer left over, so hooked that one up to the oscillator just for fun. I could have used two 4-bit parts, but the single 6-bit seemed like the way to go.@amykSchematic and layout attached. Please be gentle... this was my first ever attempt at laying out a board and soldering SMD parts. The egregiously tiny voltage regulator was obviously a mistake (but it looked so big in Eagle!). I was able to solder it, but had to use a *lot* of tongue angle.@JuKuThere are are decoupling caps around the voltage regulator, but since the board was so small and used so few parts, I figured I could get away without the recommended decoupling caps for the level translator.------Aside from trying my hand at SMD stuff, the main goal of this project is to break out a Panasonic 1326 Bluetooth module.

author: JuKu
author_rank: Frequent Contributor
timestamp: August 08, 2012, 03:26:36 pm
content: C1

author: andyturk
author_rank: Frequent Contributor
timestamp: August 08, 2012, 03:30:53 pm
content: Quote from: JuKu on August 08, 2012, 03:26:36 pmI was starting to wonder about that too. I put it in because someone else had one in a reference circuit somewhere, but maybe it isn't necessary. Or maybe I soldered in the wrong cap. I'll bust out the soldering iron and take it off...

author: KTP
author_rank: Frequent Contributor
timestamp: August 08, 2012, 04:03:34 pm
content: LOL at C110nF will take 6us to charge up if the oscillator can supply 3ma(use the formula I = C*dV/dt rearranged to dt = C*dV/I )As Jamie says on Mythbusters "there is your problem"

author: andyturk
author_rank: Frequent Contributor
timestamp: August 08, 2012, 04:28:11 pm
content: Quote from: KTP on August 08, 2012, 04:03:34 pmAt least I posted in the noob forum, right?Anyway, I wiped C1 off the board and that did indeed clean up the 1v8 signal. It looks pretty decent now (see first attached image). However, the 3v3 version still has the poop and the slow rise from 2.0v to 3.3v.

author: KTP
author_rank: Frequent Contributor
timestamp: August 08, 2012, 04:51:32 pm
content: Quote from: andyturk on August 08, 2012, 04:28:11 pmSorry, I was just teasing. Sometimes reference designs do have wrong/strange components.I have no idea now why the rise time is still so long from 2v to 3.3v There must be something else going on here we are not seeing.

author: KTP
author_rank: Frequent Contributor
timestamp: August 08, 2012, 04:59:53 pm
content: So what are you driving with the level converted clock out from the TI part? In that Rigol scope picture do you just have the 10x scope probe hooked directly to the output pin with it not connected to anything else?It looks like you are trying to drive a load larger than this part can handle...thus after the internal higher power one shot push pull transistors turn off, you are having the slow rise time because of this weak driver.Again, from the TI data sheet:"The TXB0106 is designed to drive capacitive loads of up to 70 pF. The output drivers of the TXB0106 have lowdc drive strength. If pullup or pulldown resistors are connected externally to the data I/Os, their values must bekept higher than 50 k? to ensure that they do not contend with the output drivers of the TXB0106.For the same reason, the TXB0106 should not be used in applications such as I2C or 1-Wire where an opendraindriver is connected on the bidirectional data I/O. For these applications, use a device from the TI TXS01xxseries of level translators."

author: andyturk
author_rank: Frequent Contributor
timestamp: August 08, 2012, 05:59:10 pm
content: Quote from: KTP on August 08, 2012, 04:59:53 pmFor this breakout board, the 32kHz clock is only needed at 1.8v for the bluetooth module (which won't boot without it). I pushed it through the txb0106 because eventually I'll need that for an RTC clock, but right now it's just floating. I figured it would be a good predictable signal to check for to make sure things are working as planned.I think maybe the txb0106 is making things more complicated. Originally, I thought it would be easier to use because it would "magically" figure out which direction the signals were going. That meant I could use one package for three inputs and three outputs: 4 UART signals plus a shutdown line (clock is extra credit). None are particularly high speed and none are bidirectional. Maybe the next rev of this breakout board should use simpler level translator like a SN74AVC4T774.

author: free_electron
author_rank: Super Contributor
timestamp: August 08, 2012, 07:27:09 pm
content: put a 1Kiloohm pull up resistor AFTEr the level shifter.

author: bingo600
author_rank: Super Contributor
timestamp: August 08, 2012, 07:39:52 pm
content: @feDid you see this in the above posts ?QuoteAlthough im not an elecrtonics expert i read your 1K suggestion as a "bad idea" , maybe 68K or 100K or ?/Bingo

author: KTP
author_rank: Frequent Contributor
timestamp: August 08, 2012, 07:57:11 pm
content: Quote from: free_electron on August 08, 2012, 07:27:09 pmBad idea. free_electron didn't read the data sheet. This part has a 4K output impedance at the very minimum (there is a 4K in series with the output on the chip schematic).If you use a 1K pull-up to 3.3V you won't ever be able to go low.

author: free_electron
author_rank: Super Contributor
timestamp: August 08, 2012, 08:29:06 pm
content: correct. i didn't read the datasheet.just did now. what a weird device. just when you think 'this is perfect for i2c they blurt out in the datasheet : sorry can't do that ... we got 4k there...if they had made this thing with 100 ohm instead ...you also cna;t control this thing from open drain sources ... it needs push pull drivers with 2ma strength .... what a weird thing...

author: andyturk
author_rank: Frequent Contributor
timestamp: August 08, 2012, 09:00:22 pm
content: Quote from: free_electron on August 08, 2012, 08:29:06 pmAw crap.I think that means I'm sunk for this board rev. I just looked at the specs for the Pan13xx modules to find that they only handle up to 300 microamps. At least I think that's how to interpret the specs (see attachment). Well, at least I got some nice soldering practice.I can hear Dave's voice, "... trap for young playas."So when you experienced engineers start thinking about hooking some parts together, how do you go about reading those datasheets? There's a lot of info to digest and it's pretty easy to skip over stuff that doesn't seem "important".I've been checking for supply voltage, and even occasionally making sure that logic levels line up. I totally missed the I/O current issue until reading free_electron's post just now. Is there a short list of three or four datasheet items that I should get into the habit of checking all the time?

author: KTP
author_rank: Frequent Contributor
timestamp: August 08, 2012, 09:07:06 pm
content: Quote from: andyturk on August 08, 2012, 09:00:22 pmIf the experienced engineers didn't also make mistakes, every teardown tuesday circuit board would have rev 1.0 on the silkscreen. Don't beat yourself up too much.

author: andyturk
author_rank: Frequent Contributor
timestamp: August 08, 2012, 09:22:09 pm
content: @KTPNo self-flagellation here. I'm just envious of free_electron's ability to spend a couple of minutes glancing at the txb0106 datasheet and then declare it "weird". I stared at it for much longer period and thought I knew enough to use it in a circuit. I mean, engineering is easy, right? </sarcasm>But for a few bucks in parts (assuming bluetooth module can be re-used) I learned something and had a blast in the process. Getting the boards done cost only $5 (and that's for 3 copies) through OSHPark. The only downside is that it'll take another 2 weeks to get the next rev of boards back.

author: KTP
author_rank: Frequent Contributor
timestamp: August 08, 2012, 09:52:08 pm
content: Quote from: andyturk on August 08, 2012, 09:22:09 pmMatching sources with loads (checking input and output impedances and calculating timing) is probably 90%? of EE. So engineers are drawn to the sections on the data sheet where it lists things like maximum output current, input capacitance (charging up input capacitance takes time), etc. Other things are important, like temp range, etc. but if you always have in mind the questions "can my circuit drive this input?" and "can this output drive my circuit?" it goes a long way toward removing some of the magic.Even the black magic RF stuff is mostly about (impedance) matching sources and loads to eliminate reflections and maximize power transfer.

author: JuKu
author_rank: Frequent Contributor
timestamp: August 09, 2012, 08:34:05 am
content: Quote from: andyturk on August 08, 2012, 09:00:22 pmSome things we catch, some we don't and we use a lot of very thin wire to hack v1 boards.You want to get a one gate buffer and hack it to your board to see how the rest of the system works.And don't be too hard on yourself, things like that are easy to miss with the whole design in mind.Quote from: KTP on August 08, 2012, 09:52:08 pmYMMV, but I think that is less than 5% of it. Yes, you have to do that too, but there are circuit design, PCB layout, debugging, documentation, programming, system design, product design, ESD, EMI, testing and quite a few other areas with issues to look at, too.Here, I might have seen the issue but just as likely not. A logic output driving only one port will surely do it if voltages are compatible, right? The level translator is indeed a bit unusual so I might have looked more closely but on the other hand, what kind of logic output can't drive 2mA?Besides, sometimes projects are unlucky: I've got to rev.6 once; once I'm done at the forum, I have to write the client and tell him that there will be rev.3 on the current project.

author: andyturk
author_rank: Frequent Contributor
timestamp: August 09, 2012, 07:34:09 pm
content: Well whaddya know?!?! The sucker actually works!I spent most of yesterday fiddling with the one board I soldered up. It was spewing out trash on the logic analyzer so I started looking for weirdness (that's what lead to this thread). After the topic of drive current came up, that seemed like a possible explanation for why the board wasn't working.I woke up this morning and realized that I got the UART signals "backwards". I'd hooked the bluetooth TX to the dev board TX (and so on for the other signals). It should have been TX on the dev board to the bluetooth RX (and so on). This wasn't part of the board layout though, just breadboard jumpers. I switched 'em around, powered up the dev board and Boom! it worked!BEAUTY.With the signals the wrong way 'round, that bidirectional level translator didn't know which side was actually generating the signal. A normal buffer would have just replicated the input to the output, but these bidirectional things were probably flipping back and forth each time they saw a rising edge.More photos here:Smugmug gallery

author: brendan-petrol
author_rank: Contributor
timestamp: August 10, 2012, 03:18:12 am
content: Where did ya get the PCB made?

author: andyturk
author_rank: Frequent Contributor
timestamp: August 10, 2012, 05:37:20 am
content: Quote from: brendan-petrol on August 10, 2012, 03:18:12 amOSH Park. $5 USD for three copies of the board. Shipped.

author: brendan-petrol
author_rank: Contributor
timestamp: August 10, 2012, 05:57:18 am
content: That's not bad!How big is that board?I normally get mine from iTead studio... Dave did a video on them and he wasn't too impressed, but apparently they fixed him up and i've not had a problem with them - but always keen to find new places!

author: andyturk
author_rank: Frequent Contributor
timestamp: August 10, 2012, 06:05:05 am
content: Quote from: brendan-petrol on August 10, 2012, 05:57:18 amOSHPark is frickin' awesome! It takes a couple of weeks for the round trip. If you're using Eagle (which I am), you can just upload the board file without messing around with gerbers.This board is about 1 inch square.