Sloppy hardware work or to be expected? - Page 1
Forum section: electronics / beginners

author: Rick Law
author_rank: Super Contributor
timestamp: December 17, 2013, 08:09:35 am
content: Well, I come to realize I don't have the experience to gauge if this is expected or is this a "not good enough" design. So, I am back to ask for advice from someone more experience than I. I am not sure how to ask, so allow me to explain first with an analogy:All HDD has area set aside to replace the bad sectors. So, an HDD with one bad sector really is not sloppy hardware but is an "expected imperfection" that the HDD designer build in a "work around."I have a similar error situation that I am unable to gauge if it is to "expected" and so just built in a good work-around, or a sloppy design that I should improve...Here is the situation:I made a DS1307 clock doing I2C communication. The chip has a square-wave output option and 56 bytes of NVRAM. The frequency of squarewave is 1Hz, 4KHz, 8KHz and 32KHz. My construct runs well. The SquareWave out pin is next to the SDA and the SCL pin, so it is noise sensitive.It works well: Clock runs, NVRAM works, so forth. The sqaurewave also work nicely - with a pair of header for test points about 1-inch from the DS1307 chip. Below 32KHz, I had no problem thus far. When at 32KHz clock AND with DMM probe clipped to the squarewave out (and ground), I have one error in 3.3million transmits of 56bytes NVRAM. (No error unless DMM clips attached!)The coax scope clips did not cause a problem (thus far) - I did over 5million reads (of 56bytes each read) without error. At 4 and 8KHz (2x1.5million runs each) without error. But at 32KHz, withthe DMM wire pair clipped to the square wave out and groundwould generate enough noise to cause an error. Three tests of 1.1million 56bytes reads, one test returned a single read error (3.3million reads of 56bytes, 11 bytes in a single 56bytes read did not come out right).I can easily handle that by software with a work around; Plus, I really don't expect to clip a DMM on it all the time to check and see if 32KHz is really 32KHz...Butmy goal is a learning exercise. If it could be better, I want to give it a good try. What do you think? Is that kind of error something to be expected? -or- if I should do a better job?I suppose another way to ask it is - if I buy a very well designed and very well contructed one, should I expect such an errorwhen I abuse it by boldly clipping a pair of DMM wire carrying a 32KHz pulse dangling 1 inch away from the SDA/SCLline?If a reasonable well constructed/design one can take such punishment, I would go back to see how I can do better.What do you think?ThanksRick

author: Stonent
author_rank: Super Contributor
timestamp: December 17, 2013, 10:20:04 am
content: What's the impedance of your multimeter? When working on my geiger counter it says to use a 10M-Ohm or higher impedance meter or it will pull too hard on the circuit. The cheap meter I started with before I knew that only had a 1M-Ohm impedance and it almost acted like a short. (Testing a low current 900V circuit)

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 17, 2013, 11:08:14 am
content: Just a few thoughts...1) You will need error handling in the software anyway.2) You don't know if the error was because of the DMM connected, a lost neutrino, a barking dog or whatever.3) How often are you going to read? One error in 1 million when you read every second is 11.5 days.Go for it

author: amyk
author_rank: Super Contributor
timestamp: December 17, 2013, 12:55:01 pm
content: It's not really necessary to care about effects of test equipment on the circuit you're designing. There's a reason why high input impedances on voltage-measuring devices and low ones on current measuring are preferred.

author: george graves
author_rank: Super Contributor
timestamp: December 17, 2013, 01:11:27 pm
content: Quote from: Rick Law on December 17, 2013, 08:09:35 amNot relevant. Totally different ballpark.

author: Unknown
author_rank: Unknown
timestamp: December 17, 2013, 01:20:21 pm
content: Quote from: Rick Law on December 17, 2013, 08:09:35 amI think that, since you have an oscilloscope, the place to start your learning exercise is to use it to look at what happens to the signal when you connect your DMM to it.

author: free_electron
author_rank: Super Contributor
timestamp: December 17, 2013, 03:39:47 pm
content: Did you put pull-up resistors on the i2c bus ? How 'hard' are they ? They may be too soft... Put 1k

author: Rick Law
author_rank: Super Contributor
timestamp: December 17, 2013, 05:36:50 pm
content: Thankyou for all your replies. I am combining this into one big re-reply.Quote from: Stonent on December 17, 2013, 10:20:04 amIt is an UT61E, it did not list frequency measurement but norminal impedance for AC is 10MOhm. The frequency measurement is an "ALT Key" triggered function. It was in parallel with the USB-Scope. The scope impedance is 1MOhm norminal. So 10M//1M, overall load impedance would be 900K-ish.When the scope ran alone, I noted no error in an overnight run (4 to 5 million 56 byte reads) under the same condition. Perhaps when it got pull further down, it was just enough. When it is done with this round of torture test, I will put an 800K resistor as load soldered on (no dangling wire as long antenna) and see how that goes.Quote from: Tac Eht Xilef on December 17, 2013, 01:20:21 pmAlready did, nothing exceeding the normal scope noise. The scope is the Hantek USB 6022BE - a rather noise one to begin with.Quote from: free_electron on December 17, 2013, 03:39:47 pmA pair of 3K pull up for SDA/SCL.Quote from: PA0PBZ on December 17, 2013, 11:08:14 am(1)I plan toadd software error handling in the codes.But I feel if I just "cheated"by ignored the error. When doing it merely for fun, I don't want to feel I didn't do a complete job. Thus I want to know from more experience hands if this kind of error rate is an expected thing or not. (I didn't find much real-world data on I2C error rate research including reading a PDF from Phillips, the inventor of I2C.)(2) Dog (next door) did bark... Would I2C error be good justification to shoot the dog? A side thought - the darn "test-bed" is resting 6 inches away from an Laserjet 5P and some printing did occur. I know from prior work it affected my ATMEGA doing ADC volt-reading.(3) I have no plan on using the clock in any demanding role if any at all. That is not the point tho. As a learning exercise, I just want to see if my work is passing the smell test as reasonable work.Quote from: amyk on December 17, 2013, 12:55:01 pmI kind of thought that. Particularly when I have no plans on using the square wave nor would I want to continue to verify what frequency it is at. ButI was trying to get a measure of the "quality of my work". So I was thinking along the line - if I had buy one that was professionally designed and built, would it be as "error prone". I think 3.3million read and just one error, it is "ok to use" for me. I like to think of it as good work, but came to realize I really don't know how to judge.Quote from: Rick Law on December 17, 2013, 08:09:35 amThanks, all! From your comments, I get the sense that it is below par. I think I will go back to tinkering with it some more to find a way of allowing it to hook up to the scope and my DMM and see if I can get it to complete at least 10million read-56bytes test without error. (That would be a full day's worth of read/compare.) See if I get there and then see where I go from there.I think I need to modify the "test" by first "quantify the noise" I inject. "A dangling DMM probe wire" really is uncontrolled. I need more thought there. Good time to think a bit more since my soldering iron died right after I completed that PCB. I ordered a temperature controlled one but until the replacement iron arrives, there is not much else I can do but to think about it...Thanks again! I welcome more thought and advice.Looking forward to testing myself to see if I can beat that problem (or see how far I can decrease the error rate...)

author: SeanB
author_rank: Super Contributor
timestamp: December 17, 2013, 06:00:24 pm
content: Is it not possible to add a CMOS inverter right next to the chip, and use it as a drive for everything else. The square wave output will then drive a very short line and then the buffered outputs will be a lot more robust. A lot of CMOS parts are very noise sensitive, and you probably have enough 50/60Hz and harmonics picked up from the probe leads to interfere with the I2s comms every so often. Extra bypassing caps will also help for both the RTC and the bus buffer.

author: Rick Law
author_rank: Super Contributor
timestamp: December 17, 2013, 06:29:01 pm
content: Quote from: SeanB on December 17, 2013, 06:00:24 pmExactly my thought right after posting the other reply! Wow, I think I am learning... SeanB, thanks. It is reassuring to know I am down the right path.Damn, I need the replacement iron... (and resupply of prototyping boards)

author: Neilm
author_rank: Super Contributor
timestamp: December 17, 2013, 06:57:30 pm
content: My first thought was is there sufficient decoupling around the chip? If there is a change when speed is increased, that is my first thought. (Although 32kHz is not that fast)

author: poorchava
author_rank: Super Contributor
timestamp: December 17, 2013, 07:28:37 pm
content: I guess you could try different pull-up values on SQW output. The datasheet doesn't say what is the current sink capability of the output or what is the on-state resistance.Adding a buffer won't hurt either.

author: enz
author_rank: Regular Contributor
timestamp: December 18, 2013, 08:42:17 am
content: Handheld Multimeters often have quite a bit of input capacitance (a couple of nano Farads is not uncommon).Check your signals with the scope while you attach the Multimeter probes and look for changes of signal waveforms.