OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) 1-wire conflicts with OSPi’s use of GPIO 4

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #22554

    marknorgren
    Member

    I have been using 1-wire temperature sensors with my rPi and recently have setup OSPi to run on my board.

    Unfortunately OSPi’s use of GPIO pin 4 conflicts with the modules used for 1-wire sensors (w1-gpio, w1-therm)

    I believe this is the code with the hard coded GPIO pin 4:
    https://github.com/raspberrypi/linux/blob/rpi-3.6.y/arch/arm/mach-bcm2708/bcm2708.c#L80-L81

    Has anybody else ran into this issue? Does anyone have a recommendation on the best solution for this?

    I am not sure on how to recompile this module, so any pointers would be greatly appreciated!

    #25114

    Corvus13
    Member

    I know this is old but a solution has been found.
    Since Raspbian 2013-12-20
    Edit the file /boot/cmdline.txt as root and add config parameter bcm2708.w1_gpio_pin= (for example bcm2708.w1_gpio_pin=25)

    Then reboot RPi and you are all set.
    But remember pin number is real GPIO pin number not pin position on GPIO pin header.

    Source: http://www.raspberrypi.org/forums/viewtopic.php?f=37&t=40044&sid=307cd7e247a55360e5118b418ffd2b48&start=25#p477052

    #25115

    robgreen
    Participant

    and the same is my problem …
    I wanted to use GPIO interface 4 That is to Dallas DS18B20 1-wire temperature sensor

    I wanted to connect to the pins free of raspberry specifically …

    PIN17 3.3V
    PIN25-GND
    and
    GPIO4? which alternatives???

    OSPI 1.4 uses the first 8 pins on the 3.3V column … and the first 5-pin on the 5V column
    see attached image

    someone was able to use the digital sensor DS18B20 with OSPI ??

    #25116

    Ray
    Keymaster

    Corvus13’s post says a solution has been found, by changing the 1-wire pin to another pin (other than GPIO 4 which is already used by OSPi).

    #25117

    robgreen
    Participant

    ok thanks
    I’ll try the solution

    the dubious was
    to be obliged to use the pins in the same column 3.3V

    so I understand that I can use

    pin 17 3.3v
    pin 20 ground
    pin 22 GPIO25 (with edit config parameter)

    #25118

    Ray
    Keymaster

    the dubious was
    to be obliged to use the pins in the same column 3.3V

    I don’t think I understand what you mean. To clarify, if you look at the picture you attached, OSPi occupies these pins:
    (first 8 pins on the 3.3V column): 1, 3, 5, 7, 9 (Ground), 11, 13, 15 (these are pin numbers, not GPIO names)
    (first 5 pins on the 5V column): 2, 4, 6, 8, 10
    So these pins should not be used for connecting to your temperature sensor. You can use any other pin.

    #25119

    robgreen
    Participant

    ok
    I’m sorry if I reply yet…
    but the first 8 are
    (first 8 pins on the 3.3V column): 1, 3, 5, 7, 9 (Ground), 11, 13, 15. stop

    I hope 17 is free, otherwise, I do not have to give pin power 3V…

    #25120

    Ray
    Keymaster

    You are right, I accidentally typed an extra 17. I’ve corrected it. 17 (3.3V) is free. Actually it doesn’t matter because all 3.3V pins are internally connected so there is no issue with them being free or not.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) 1-wire conflicts with OSPi’s use of GPIO 4