DS18B20 Temperature Sensor Configuration

Dear all,
i do have a problem connecting a DS18B20 Temperature Sensor to my Raspberry pi 2b.
I connected VCC to 5V, GND to GND and Sig to GPIO 4.
Now i want to find out the serial number, however with no success:

First there is no /sys/bus/w1/devices/ and after giving some command i found online i see no serial number …

pi@fluiddpi:~ $ cd /sys/bus/w1/devices/
-bash: cd: /sys/bus/w1/devices/: No such file or directory
pi@fluiddpi:~ $ sudo modprobe w1-gpio
pi@fluiddpi:~ $ sudo modprobe w1-therm
pi@fluiddpi:~ $ cd /sys/bus/w1/devices/
pi@fluiddpi:/sys/bus/w1/devices $ ls
pi@fluiddpi:/sys/bus/w1/devices $ ^C

What am i doing wrong? :frowning:
Can someone help?

PS i used KIAUH to install Fluidd and klipper

It is never good to use the same colour for VCC and GND.
Did you check those cables twice already?

1 Like
  1. Call sudo raspi-config
  2. Activate the 1-wire interface
  3. Reboot
  4. Call lsmod | grep -i w1_ to verify that the needed Kernel modules are actually loaded

Hello, thank you for your answers.
Just before you wrote the answer i got the sensor to work in ssh.
I followed this thread w1-gpio & w1-therm in etc/modules not recognized. - Raspberry Pi Forums

But i am getting errors in Fluidd.
I added this to my printer.cfg

[temperature_sensor Chamber]
sensor_type = DS18B20
serial_no = 28-030897945420
ds18_report_time = 1.0
sensor_mcu = host_mcu

I am getting this error after restart:

Unknown config object ‘mcu host_mcu’

Already tried sensor_mcu = host but didnt work…

Post your klippy.log

klippy.log (381.6 KB)

i changed it to

[temperature_sensor Chamber]
sensor_type = DS18B20
serial_no = 28-030897945420
ds18_report_time = 1.0
sensor_mcu = mcu

But now i am getting …

MCU Protocol error

This is frequently caused by running an older version of the
firmware on the MCU(s). Fix by recompiling and flashing the
firmware.

Your Klipper version is: v0.11.0-148-g52f4e20c
MCU(s) which should be updated:

Up-to-date MCU(s):
mcu: Current version v0.11.0-148-g52f4e20c

Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.

mcu 'mcu': Unknown command: config_ds18b20

Not sure if i have to flash a newer firmware or i did something wrong in the config :X

Follow RPi microcontroller - Klipper documentation

Do you mean i have to setup a second mcu on my RPI only to display the temperature values?
Not sure if i want to touch a smooth running system only for that to be honest.
Are there other advantages or am i getting it wrong?

Because by setting

[temperature_sensor raspberry_pi]
sensor_type: temperature_host

i can see the RPi Temperature

See Klipper Architecture / Ecosystem for how Klipper works.
If you want to connect any additional hardware to the RPi’s GPIOs, like 1-wire, IMUs etc, then you have no other choice.

Be sure to mind the limitations listed here Configuration reference - Klipper documentation

Thank you for the hint. I was not aware of this.
I set the RPI as a second mcu and now the temperature sensor is working well.
Was less effort than expected in the end :slight_smile:

Hi! It is possible to use DS1821S? i think it´s not, because in config reference only exists DS18B20, could be added to klipper as they are very similar?