I am trying to figure out why I cannot get temperature sensors working connected to my RPi2. I have followed almost every possible guide on the internets without luck and the answers* provided here does not seem to work for me. So now I am posting my own question to see if anyone can lead me the right way.
I have NOT tried to run device-tree-compiler becuase I am not fully aware how it works. Would this be necessary?
*Dallas 1-wire temperature sensor not working , DS18B20 no longer working
I have to admit that I am a total Linux-novice so I might be missing something fundamental here. I studied network engingeering and have been working as an IT-tech for a few years. Thought the Rapsberry Pi was going to be easy but it's been a humbling experience so far. :)
I have tried two different DS18B20's and another tempsensor(Pico T0-92). I get a steady current of 3.30 Volts between 3v3 and GRND. Between datapin and GRND I usually get 0.80 Volts, and beteween datapin and 3v3 is usually about 2.50. So I am assuming the sensors and connections are good. I have tried with 4.7K, 10K and without resistor with same results. I have successfully been turning LEDs on and off.
I have now done a fresh install of Raspbian Jessie. I have had the same issue in Raspbian Jessie Lite and Ubuntu Mate.
First thing I did was to update the system.
apt-get update apt-get upgrade reboot rpi-update reboot
I then found this thread and thought I would give the following a try: DS18B20 w1-gpio Device Tree gpiopin NOT = 4 . I started by modifying /boot/config.txt.
sdtv_mode=2 dtparam=i2c_arm=on dtparam=i2c_vc=on dtparam=spi=on dtoverlay=w1-gpio,gpiopin=21
followed by a reboot and connecting my sensors to gpiopin21(#40 on RPi) (Results does not change if using other gpiopin.)
lsmod now showing:
pi@raspberrypi:~ $ lsmod Module Size Used by cfg80211 389253 0 rfkill 16036 1 cfg80211 w1_gpio 3401 0 wire 24703 1 w1_gpio bcm2835_gpiomem 2860 0 snd_bcm2835 19802 0 cn 4258 1 wire bcm2835_rng 1763 0 i2c_bcm2708 4920 0 spi_bcm2835 7074 0 snd_pcm 73442 1 snd_bcm2835 snd_timer 18792 1 snd_pcm snd 50779 3 snd_bcm2835,snd_timer,snd_pcm uio_pdrv_genirq 2944 0 uio 7753 1 uio_pdrv_genirq i2c_dev 5671 0 fuse 80694 1 ipv6 338574 32
dmesg is showing me the same errors as before:
[ 4.573118] Driver for 1-wire Dallas network protocol. [ 4.617107] w1-gpio onewire@0: gpio pin 21, external pullup pin -1, parasitic power 0 [ 4.617196] w1_add_master_device: set_pullup requires write_byte or touch_bit, disabling
...and a bit further down.
[ 18.659585] w1_master_driver w1_bus_master1: w1_search: max_slave_count 64 reached, will continue next search. [ 64.663875] w1_master_driver w1_bus_master1: Family aa for aa.7aaaaaeaaaaa.af is not registered. [ 147.966042] w1_master_driver w1_bus_master1: Family aa for aa.eeaaaaeaaaaa.df is not registered. [ 148.303747] w1_master_driver w1_bus_master1: Family aa for aa.5eaaaaeaaaaa.ed is not registered.
...and that message keeps spamming dmesg.
EDIT, forgot to mention listed devices. (Where the serial is changing)
pi@raspberrypi:~ $ cd /sys/bus/w1/devices/ pi@raspberrypi:/sys/bus/w1/devices $ ls aa-d6baaaaaaaaa w1_bus_master1
And sometimes more gets added. (With only one sensor connected)
pi@raspberrypi:/sys/bus/w1/devices $ ls aa-6ebaaaaaaaaa aa-debaaaaaaaaa aa-f5baaaaaaaaa w1_bus_master1
Would be much appreciated if someone could shed some light on this for me or just try to point me in the right direction.
No need to beat around the bush, just call me an idiot if that is the case. :)