riku2015
Posts: 8
Joined: Wed Dec 31, 2014 4:03 pm

DS2406 reset problem

Fri Jan 23, 2015 8:22 pm

heya,

im using 1-wire trough i2c master.
also using owfs to control ds2406 via latch alarm (111)

problem is ds2406 default alarm is 331, and i keep getting reset there.
i managed to see, there is a line problem, when i use other stuff on this house the 1-wire line gets alot interference, i have managed to fix them all trough soft and external components(including the gpio interference problems all fixed).

but this ds2406 problem im desperate, i tried today many different caps and none of them seem to work i have mixed line using cat5 cable, length is more than 20meters at moment.
all works fine, but when i turn off fluorescent tube then it resets all ds2406 into alarm state 331 and then all goes crazy becouse that wrong setting. I repeat when i TURN OFF, this only happen when turn off them.

so question is, is there any component i should try near those switches? if yes whithone and how ?
Other way might be possible, if the alarm state can be setup to default 111 instead 311 (i dont know if this hardware or owfs soft thing, i have compiled from source so i might check out code)
Third way is just do a script what keeps echoing setting 111 > alarm, but that is not good...
Fourth option is just code them differently to poll every 0.1sec PIO instead latch from alarm but that is 1wire bandwidth waste + cpu intensive.

i hope someone understand what i try to explain:)

hampi
Posts: 223
Joined: Fri May 31, 2013 11:29 am
Contact: Website

Re: DS2406 reset problem

Fri Jan 23, 2015 8:52 pm

Ideally you could use a scope or a logic analyser to see what goes wrong. First thing to do is to try with a shorter cable and make sure that there are no ground loops. If the problem is RFI (radio-frequency-interface) ferrite beads on the cable or RC-filter might help. The 1-wire can be laborious because the same data wire works also as power supply line to the chip. That makes things somewhat complicated.

riku2015
Posts: 8
Joined: Wed Dec 31, 2014 4:03 pm

Re: DS2406 reset problem

Fri Jan 23, 2015 9:56 pm

can u give example of rc-filter, what is optium component values?
i have some ferrite rings, i could install them, any specific way to put em? endpoint or startpoint, how many turns etc?
also have scope but i keep that as last resort couse its well :D big and lol too complicated, i think its just a voltake spike what keep resetting em, so if there someone else haved same problems how he has fixed it

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: DS2406 reset problem

Fri Jan 23, 2015 10:10 pm

You could try adding a Schottky diode at the end of your network. It's documented in a number of places.

Return to “Interfacing (DSI, CSI, I2C, etc.)”