Jump to content

Recommended Posts

Posted

Hi, All!

 

I have modified w1-therm kernel module. Now device directory contains two more files w1_read and w1_convert_all.

post-4339-0-63978500-1484829823_thumb.png

 

You can read sensor memory without triggering temperature conversion using the first one and you can trigger the temperature conversion on all sensors (implemented using "skip ROM") with the second one.

 

I needed this modification to speed up sensor reading. Now I start temperature measurement on all sensors (it takes 750ms on 18B20) and then read the results. Earlier reading sensor (using w1_slave) required 750+ms for each sensor. Here is the result for my 10sensors 1wire network (using the usual w1_slave required 8.5sec, with new features of the modified w1_term reading required 1.2sec).

post-4339-0-06344200-1484829835_thumb.png

 

I have tested it on the Orange PI PC Plus board with 10 DS18B20 sensors in the network.

 

Is anybody interested? What should I do to share my work? 

 

P.S. The patch is here https://github.com/sov1178/linux/commit/3775c3506830cd3c5b60e79f57ed15f2ac86a4f8

Posted

nice job!

Thanks!

 

create a pull request the armbian git?

Not yet. Putting w1_convert_all into slave directory is not right conceptually (but it was the simplest way to do :)) and I suspect it might not work correctly with multiple one-wire masters configuration. I should get the ds2482s-800 next week, so I will be able to test modified w1-therm with the multiple masters configuration.

 

So I will make some additional tests, and probably I will make some changes. Then I will create a pull request.

Posted

Putting w1_convert_all into slave directory is not right conceptually (but it was the simplest way to do :))

I have fixed it :) Also now it should work across multiple masters on w1 bus. Here is the sensor (DS18B20) and w1 bus directories:

 

post-4339-0-77864400-1484902992_thumb.png

 

So to start temperature measurements read '/sys/bus/w1/w1_therm_convert_all' file. Then you can read your sensors using 'w1_read'.

 

The sources are here (two modules modified - 'wire' and 'w1-therm'):

 

w1_therm.c https://github.com/sov1178/linux/commit/e0a8ecfd409ffb14fe382804fdc180e6c52413e0

w1.c https://github.com/sov1178/linux/commit/512aa7ba450856c84c877b5574346d046f0a9c98

 

I will wait until I will have chance to test it with the multiple masters using ds2482s-800 (probably a week or two) and if everything will be ok I will make pull request.

Posted
On 20.01.2017 at 0:06 PM, sov1178 said:

I will wait until I will have chance to test it with the multiple masters using ds2482s-800 (probably a week or two) and if everything will be ok I will make pull request.

It took a bit more time then two weeks :) But I have made ds2482-800 board this week and tested modified modules with the multiple w1 masters configuration. Everything is ok.

 

Also I added a new feature - now it is possible to trigger the temperature conversion of the sensors on the individual w1 master. And finally I made a pull request...

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines