Author Topic: Sloppy hardware work or to be expected?  (Read 5099 times)

0 Members and 1 Guest are viewing this topic.

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Sloppy hardware work or to be expected?
« on: December 17, 2013, 08:09:35 am »
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, with the DMM wire pair clipped to the square wave out and ground would 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...

But my 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 error when I abuse it by boldly clipping a pair of DMM wire carrying a 32KHz pulse dangling 1 inch away from the SDA/SCL line?  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?

Thanks
Rick
« Last Edit: December 17, 2013, 08:16:38 am by Rick Law »
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Sloppy hardware work or to be expected?
« Reply #1 on: December 17, 2013, 10:20:04 am »
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)
The larger the government, the smaller the citizen.
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5127
  • Country: nl
Re: Sloppy hardware work or to be expected?
« Reply #2 on: December 17, 2013, 11:08:14 am »
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  :)

Keyboard error: Press F1 to continue.
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8270
Re: Sloppy hardware work or to be expected?
« Reply #3 on: December 17, 2013, 12:55:01 pm »
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.
 

Offline george graves

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: us
Re: Sloppy hardware work or to be expected?
« Reply #4 on: December 17, 2013, 01:11:27 pm »
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."

Not relevant.  Totally different ballpark.

Tac Eht Xilef

  • Guest
Re: Sloppy hardware work or to be expected?
« Reply #5 on: December 17, 2013, 01:20:21 pm »
But my 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?

...

What do you think?

I 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.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Sloppy hardware work or to be expected?
« Reply #6 on: December 17, 2013, 03:39:47 pm »
Did you put pull-up resistors on the i2c bus ? How 'hard' are they ? They may be too soft... Put 1k
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: Sloppy hardware work or to be expected?
« Reply #7 on: December 17, 2013, 05:36:50 pm »
Thankyou for all your replies.  I am combining this into one big re-reply.

What's the impedance of your multimeter?

It 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.

I 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.


Already did, nothing exceeding the normal scope noise.  The scope is the Hantek USB 6022BE - a rather noise one to begin with.

Did you put pull-up resistors on the i2c bus ? How 'hard' are they ? They may be too soft... Put 1k


A pair of 3K pull up for SDA/SCL.

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.
...
(1) I plan to add 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.

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.
I 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.  But I 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.

But my 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?
...
Thanks, 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...)
 

Online SeanB

  • Super Contributor
  • ***
  • Posts: 16283
  • Country: za
Re: Sloppy hardware work or to be expected?
« Reply #8 on: December 17, 2013, 06:00:24 pm »
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.
 

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3441
  • Country: us
Re: Sloppy hardware work or to be expected?
« Reply #9 on: December 17, 2013, 06:29:01 pm »
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.

Exactly 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)
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: Sloppy hardware work or to be expected?
« Reply #10 on: December 17, 2013, 06:57:30 pm »
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)
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: Sloppy hardware work or to be expected?
« Reply #11 on: December 17, 2013, 07:28:37 pm »
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.
I love the smell of FR4 in the morning!
 

Online enz

  • Regular Contributor
  • *
  • Posts: 134
  • Country: de
Re: Sloppy hardware work or to be expected?
« Reply #12 on: December 18, 2013, 08:42:17 am »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf