ds18b20 and GPIO 4

114 views
Skip to first unread message

Anthony Lawrence

unread,
Oct 13, 2013, 6:41:16 PM10/13/13
to quick2wi...@googlegroups.com
Hi,
I built built Q2W RPi Interface Board, 2 x I2C Port Expander and  4-channel relay board and suffered no problems. Even the Chronodot, which i was worried about, hangs of the end and does what it does. 
Unfortunately the ds18b20 temp sensor modules are hard coded to GPIO 4 which your interface board uses as I2c_interrupt. If I want the ds18b20  to work I need to disable the I2C which I don't wish to do. 
Can you suggest an easy a way around changing how w1-gpio module accesses the pin? 

Some of the solutions I have seen are over 12 months old and involve recompiling the kernel with w1-gpio-custom inserted in the tree. This module allows the pin No. to be passed as parameter. Is this still the way to go? 
This would mean I would need to compile and distribute for each raspian release. Has the raspian  kernel been updated to handle this harcoding? 

Your thoughts would be appreciated
Sincerely
Anthony Lawrence

Toshi Bass

unread,
Oct 23, 2013, 5:08:24 PM10/23/13
to quick2wi...@googlegroups.com
Hi Anthony

I cannot offer any software solution, however I faced the same problem, which I put down to poor design of the otherwise great expansion boards, they could have chosen any other spare gpio, in reality the i2c interupt that uses gpio4 is only used for (edge detection) this is when an input goes from HIGH to LOW (falling edge) or LOW to HIGH (rising edge) try google for explanation, in any case if your not using i2c edge detection in your programs then you can remove the jumper, your port expanders will still work fine, then to connect 1 wire ds18b20 sensors you need to intercept the GPIO4 connection before the connection to the quick2wire board.

Hope it Helps

Toshi Bass

Reply all
Reply to author
Forward
0 new messages