Bananian

1wire parasite - pullup missing?

3 1559
itsmee  
Edited by itsmee at Jan 04, 2016 12:36

Hi,

seems I'm unable to get a parasite 1wire DS1820 up and running on banana pi. Hope somebody can push me the right direction.

- DS1820 wired with two cables & running on Rasp Pi
- script.fex adepted, /sys/bus/w1/devices/10- shows the device
- getting CRC but temp of t=85000 permanantly

I'm suspecting that its related to the pullup that i had to configure in rasp pi, but can't get it going. It seems its not the w1-gpio / w1-therm kernel modules that raspberian uses.
I've added the port22: line assuming that the '1' means pullup. Didn't change the behavior.

Config A)
  1. bin2fex /tmp/mmcblk01p1/script.bin /tmp/script.fex
  2. echo "[w1_para]" >> /tmp/script.fex
  3. echo "gpio = 22" >> /tmp/script.fex
  4. echo "port:22<0><1><default><default>" >> /tmp/script.fex
  5. fex2bin /tmp/script.fex /tmp/mmcblk01p1/script.bin
Copy the Code



Config B)
  1. cat /tmp/script.fex
  2. [w1_para]
  3. gpio = 22
  4. gpio_used = 1
  5. gpio_pin_1 = port:PB20<1><default><default><default>
  6. gpio_pin_2 = port:PB21<1><default><default><default>
  7. gpio_pin_3 = port:PB20<1><default><default><default>
  8. gpio_pin_4 = port:PI03<1><default><default><default>
  9. gpio_pin_5 = port:PB22<1><default><default><default>
  10. gpio_pin_6 = port:PB23<1><default><default><default>
  11. gpio_pin_7 = port:PI14<1><default><default><default>
  12. gpio_pin_8 = port:PI10<1><default><default><default>
  13. gpio_pin_9 = port:PI13<1><default><default><default>
  14. gpio_pin_10 = port:PI12<1><default><default><default>
  15. gpio_pin_11 = port:PI11<1><default><default><default>
  16. gpio_pin_12 = port:PH05<1><default><default><default>
  17. gpio_pin_13 = port:PH03<1><default><default><default>
  18. gpio_pin_14 = port:PH00<1><default><default><default>
  19. gpio_pin_15 = port:PH01<1><default><default><default>
  20. gpio_pin_16 = port:PH01<1><default><default><default>
  21. gpio_pin_17 = port:PI19<1><default><default><default>
  22. gpio_pin_18 = port:PH02<1><default><default><default>
  23. gpio_pin_19 = port:PH02<1><default><default><default>
  24. gpio_pin_20 = port:PI20<1><default><default><default>
  25. gpio_pin_21 = port:PI21<1><default><default><default>
  26. gpio_pin_22 = port:PI17<0><1><default><default>
  27. gpio_pin_23 = port:PH20<1><default><default><default>
  28. gpio_pin_24 = port:PH21<1><default><default><default>
  29. gpio_pin_25 = port:PI16<1><default><default><default>
  30. gpio_pin_26 = port:PI16<1><default><default><default>
  31. gpio_pin_27 = port:PI18<1><default><default><default>
  32. gpio_pin_28 = port:PH05<1><default><default><default>
  33. gpio_pin_29 = port:PI21<1><default><default><default>
Copy the Code


Both show very similar results:
  1. # gpio readall
  2. +----------+-Rev3-+------+--------+------+-------+
  3. | wiringPi | GPIO | Phys | Name   | Mode | Value |
  4. +----------+------+------+--------+------+-------+
  5. |      0   |  17  |  11  | GPIO 0 | ALT4 | Low   |
  6. |      1   |  18  |  12  | GPIO 1 | IN   | Low   |
  7. |      2   |  27  |  13  | GPIO 2 | ALT4 | Low   |
  8. |      3   |  22  |  15  | GPIO 3 | IN   | High  |
  9. |      4   |  23  |  16  | GPIO 4 | IN   | Low   |
  10. |      5   |  24  |  18  | GPIO 5 | IN   | Low   |
  11. |      6   |  25  |  22  | GPIO 6 | ALT4 | Low   |
  12. |      7   |   4  |   7  | GPIO 7 | IN   | Low   |
  13. |      8   |   2  |   3  | SDA    | ALT5 | Low   |
  14. |      9   |   3  |   5  | SCL    | ALT5 | Low   |
  15. |     10   |   8  |  24  | CE0    | IN   | Low   |
  16. |     11   |   7  |  26  | CE1    | IN   | Low   |
  17. |     12   |  10  |  19  | MOSI   | IN   | Low   |
  18. |     13   |   9  |  21  | MISO   | IN   | Low   |
  19. |     14   |  11  |  23  | SCLK   | IN   | Low   |
  20. |     15   |  14  |   8  | TxD    | ALT0 | Low   |
  21. |     16   |  15  |  10  | RxD    | ALT0 | Low   |
  22. |     17   |  28  |   3  | GPIO 8 | IN   | Low   |
  23. |     18   |  29  |   4  | GPIO 9 | ALT4 | Low   |
  24. |     19   |  30  |   5  | GPIO10 | OUT  | High  |
  25. |     20   |  31  |   6  | GPIO11 | ALT4 | Low   |
  26. +----------+------+------+--------+------+-------+
Copy the Code
  1. cat /sys/bus/w1/devices/10-0008030b40a9/w1_slave
  2. aa 00 4b 46 ff ff 0c 10 87 : crc=87 YES
  3. aa 00 4b 46 ff ff 0c 10 87 t=85000
Copy the Code

This is the main instruction I followed - followed by the two major raspberry settings.

http://www.kompf.de/weather/pionewiremini.html
  1. dtoverlay=w1-gpio,gpiopin=4,pullup=on
  2. sudo modprobe w1-gpio pullup=1
  3. sudo modprobe w1-therm
Copy the Code


Thanks for any advice!

ItsMee

What resistor value are you using for the pullup on the DS's data pin?

If using a higher value,try with 1k.

itsmee  
sashijoseph replied at Jan 05, 2016 12:18
What resistor value are you using for the pullup on the DS's data pin?

If using a higher value,try  ...

Hi,

I'm using 4,7k as recommend for Raspberry Pi in multiple posts - and as working with Raspberry pi. Wouldn't mind testing 1k, but would need to buy that.
Any specific reason you recommend 1k? You have parasite running on Banana pi? Can you provide details on your SW config?

ItsMee

The DS requires around 1ma during it's measurement period and thus requires a strong pullup atleast during this period.
4.7k may or may not work in all cases of parasite powering.
With the DS in standard mode 4.7k will always work.

You could first try the standard mode and see if it's working with the BPi.

Once that's confirmed,then try with the parasite mode with a lower value resistor.
If you have a couple more of 4.7k,you could tie all three in parallel to arrive at 1.5k

You have to log in before you can reply Login | Sign Up

Points Rules