• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

1-Wire sensors randomly failing

Status
Not open for further replies.

SUPER COPTER

New Member
Hi, i'm having a wired problem. I have a custom made telemetry equipment: it consists basically on a pic32 microcontroller (Pinguino board), a SIM900 modem, in I2C 16x2 LCD and a DS2482 1-wire to I2C bridge.
The DS2482 chip is connected to a (multiple) DS18B20 temperature sensor 1-wire network.
So here is my problem: Sensors work fine (discovering and temperature reading) at the office at work, but when installing them in some other places sometimes they fail to read de sensors (find them).
First i thouth it could be something with my 1-wire search algorithm. Cheched it but didn't find anything. Then i even thought it could be a problem with my I2C libraries. Cheched them, added some verification routines. Problem persisted.
So I'm thinking it could be some noise problem in the 1-Wire line?
I checked with an oscilloscope and it looks noisy, but I dont think it could be enough to get a (random) zero in the line.
I don´t even know what would be causing the noise (or whatever it is) to make it fail and study the problem.
Any clue or ideas?
 

SUPER COPTER

New Member
thanks for the reply, i will try and see that with the oscilloscope, but what if the 5V line itself is noisy? Also, I understand the DS2482 comes with internal pullups. If i was sure the problem is noise (not even knowing if it was line noise or electromagnetic noise) I would even try to add a strong pullup transistor (which is supported by the chip with the PCTLZ pin). but i'm not sure that noise is causing the problem, it doesnt look too severe (doesnt look clean either).
 

alec_t

Well-Known Member
Most Helpful Member
i'm not sure that noise is causing the problem
It would be relatively simple to add a ton more decoupling to the supply rails, hopefully to get a cleaner supply. I'd try that before looking elsewhere for the cause.
 

Pommie

Well-Known Member
Most Helpful Member
Do you have the external MOSFET and active pullup turned on as that device powers everything parasitically.

Mike.
 

SUPER COPTER

New Member
It would be relatively simple to add a ton more decoupling to the supply rails, hopefully to get a cleaner supply. I'd try that before looking elsewhere for the cause.
yes I did a whole set of experiments with diferent types of capacitors. I tried filtering with parallel 2200uF capacitor directly to the 5V line, smaller 1, 10 and 100nF capacitors and even an lc filter like this:

Didn't notice any change... Even tried to power the sensors and I2C 1Wire bridge with an external lm7905. Nothing worked.

Do you have the external MOSFET and active pullup turned on as that device powers everything parasitically.

Mike.
I haven't hooked up the external mosfet. I understand that sensors are powered by the 5V line (and GND), and data line is only for 1Wire communications.



Today I studied the problem with an oscilloscope and discovered some stuff. but still can't make a conclusion about this... Is seems that there are 2 thing happening.
1. Ground isn't really ground:


here we can see at data communication when the bus is pulled to low, some bits don't stay at 0v as long as they should... Here's another image (it also looks that there are some negative peaks??):


2.There seems to be an intermitent noise in the bus:

First image looks fine (except for the misterious negative spike)... but then:


Look at all that noise (just when the bus is pulled low).....

OK so till here, one would think there's a psu noise problem, but as i said before, i tried LOTS of filtering options. In fact, i noticed (and this may be the most interesting discovery) that noise persists in the 1Wire line even when disconnecting the positive rail from the supply (tried this with a battery).

The noise observed had a (kind of) cyclic nature: It appeared and then disappeared. The noise looked just line the one seen in the last image.

The 1Wire line has an UTP CAT6 cable. I'm just using the twisted pairs as one wire for pair (as i'm not using a differential signal). So one possible theory would be that the UTP cable is acting as an antenna or something like that (is this possible?) BUT the problem (corrupt 1Wire data) seems to happen even when connecting sensors directly.



Also, at first (havn't had this problem today) i was having this wired problem which conssisted on the sensors (i suppose after reading some corrupted data) pulled the bus low untill disconnecting and reconnecting them (and so on till next corrupted data).
I understand this is not normal 1Wire behaviour, as i have seen the data lines bridged to ground and coming back after releasing.

UPDATE:
here's a screenshot when using a cheap chinese power supply:

a total mess...
 
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top