You will need to calibrate the sensors to get real/absolute
measurements out of these devices, in my experience.
I used them for datalogging and they were +-3C between the three of
them I had.
They were self heating by the read process, so you need to let them
stabilize before calibrating and then read them at the same (slow >
60s) intervals as when calibrating.
I calibrated them to 0C and 60C, determining offset and scaling for
each of them. Although the thermometers were not very linear to this
simple calibration, they were OK to +- about 1C within the range.
I would highly recommend the Maxim DS18B20 as mentioned in the link by
Chuck if you need something more accurate. They cost under $2 in the
waterproof version.
Hat-down to the analog designers @ Maxim designing them so precise
within this wide temperature and voltage range (±0.5°C Accuracy from
-10°C to +85°C @ Vdd=3-5.5V) <-- the probe + reference + A/D convertor
are at the same hot/cold temperature and at variable voltage for about
$1 per sensor delivered. Amazing, in my opinion.
I hope it helps, Tomas
On Mon, 2017-01-16 at 23:48 -0800, Michael C. Robinson wrote:
> I am using a Raspberry Pi 3 2016 Model B.
>
> I'm trying to use USB TEMPer2 Thermometers to detect the temperature
> of ice water and the temperature of nearly boiling water. I am not
> getting the correct temperatures.
>
> pi@raspbypi:~/project $ cat temper-pi.txt
> http://www.linuxjournal.com/content/temper-pi
> pi@raspbypi:~/project $
>
> pi@raspbypi:~/project $ lsusb
> Bus 001 Device 010: ID 0c45:7401 Microdia
> Bus 001 Device 009: ID 0c45:7401 Microdia
> Bus 001 Device 008: ID 0c45:7401 Microdia
> Bus 001 Device 007: ID 0409:0058 NEC Corp. HighSpeed Hub
> Bus 001 Device 005: ID 0a81:0205 Chesen Electronics Corp. PS/2
> Keyboard+Mouse Adapter
> Bus 001 Device 011: ID 0c45:7401 Microdia
> Bus 001 Device 006: ID 0c45:7401 Microdia
> Bus 001 Device 004: ID 0409:0058 NEC Corp. HighSpeed Hub
> Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
> SMSC9512/9514 Fast Ethernet Adapter
> Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> pi@raspbypi:~/project $
>
> pi@raspbypi:~/project $ lsusb -t
> /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
> |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
> |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class,
> Driver=smsc95xx, 480M
> |__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
> |__ Port 1: Dev 6, If 0, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 1: Dev 6, If 1, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 4: Dev 11, If 0, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 4: Dev 11, If 1, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 3: Dev 5, If 0, Class=Human Interface Device,
> Driver=usbhid, 1.5M
> |__ Port 3: Dev 5, If 1, Class=Human Interface Device,
> Driver=usbhid, 1.5M
> |__ Port 4: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M
> |__ Port 1: Dev 8, If 0, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 1: Dev 8, If 1, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 2: Dev 9, If 0, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 2: Dev 9, If 1, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 4: Dev 10, If 0, Class=Human Interface Device,
> Driver=, 1.5M
> |__ Port 4: Dev 10, If 1, Class=Human Interface Device,
> Driver=, 1.5M
> pi@raspbypi:~/project $
>
> pi@raspbypi:~/project/temper-python $ cat take_temps.bash
> #!/bin/bash
>
> while (true)
> do
> > sudo temper-poll -p
> > sleep 10
> done
>
> @raspbypi:~/project/temper-python $ ./take_temps.bash
> Found 5 devices
> Device #0 (bus 1 - port 4): 25.1°C 77.1°F
> Device #1 (bus 1 - port 2): 24.1°C 75.3°F
> Device #2 (bus 1 - port 1): 21.5°C 70.7°F
> Device #3 (bus 1 - port 4): 23.8°C 74.9°F
> Device #4 (bus 1 - port 1): 23.2°C 73.8°F
> Found 5 devices
> Device #0 (bus 1 - port 4): 25.1°C 77.1°F
> Device #1 (bus 1 - port 2): 24.1°C 75.3°F
> Device #2 (bus 1 - port 1): 21.5°C 70.7°F
> Device #3 (bus 1 - port 4): 23.8°C 74.9°F
> Device #4 (bus 1 - port 1): 23.2°C 73.8°F
> Found 5 devices
> Device #0 (bus 1 - port 4): 25.1°C 77.1°F
> Device #1 (bus 1 - port 2): 24.1°C 75.4°F
> Device #2 (bus 1 - port 1): 21.5°C 70.7°F
> Device #3 (bus 1 - port 4): 23.8°C 74.9°F
> Device #4 (bus 1 - port 1): 23.2°C 73.8°F
> Found 5 devices
> Device #0 (bus 1 - port 4): 25.1°C 77.1°F
> Device #1 (bus 1 - port 2): 24.1°C 75.4°F
> Device #2 (bus 1 - port 1): 21.5°C 70.7°F
> Device #3 (bus 1 - port 4): 23.8°C 74.9°F
> Device #4 (bus 1 - port 1): 23.2°C 73.8°F
> Found 5 devices
> Device #0 (bus 1 - port 4): 25.1°C 77.1°F
> Device #1 (bus 1 - port 2): 24.2°C 75.5°F
> Device #2 (bus 1 - port 1): 21.5°C 70.7°F
> Device #3 (bus 1 - port 4): 23.8°C 74.9°F
> Device #4 (bus 1 - port 1): 23.2°C 73.8°F
> Found 5 devices
> Device #0 (bus 1 - port 4): 25.1°C 77.1°F
> Device #1 (bus 1 - port 2): 24.2°C 75.5°F
> Device #2 (bus 1 - port 1): 21.5°C 70.7°F
> Device #3 (bus 1 - port 4): 23.8°C 74.9°F
> Device #4 (bus 1 - port 1): 23.2°C 73.8°F
> ^C
>
> Please note the following changes to Raspbian, Jessie I believe...
>
> pi@raspbypi:~/project/temper-python $ cat /boot/cmdline.txt
> dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1
> root=/dev/mmcblk0p7 rootfstype=ext4 elevator=deadline fsck.repair=yes
> rootwait quiet splash plymouth.ignore-serial-consoles
> usbhid.quirks=0x0c45:0x7401:0x4
>
> pi@raspbypi:~/project/temper-python $ cat /etc/udev/rules.d/99-
> tempsensor.rules SUBSYSTEMS=="usb", ACTION=="add",
> ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7401", MODE="666"
>
> The above changes allow non non root users to use temper-python and
> they should prevent problems with the sensors being identified as
> keyboards?
>
> The following is an excerpt out of dmesg:
>
> [ 206.199665] usb 1-1.2.1: new low-speed USB device number 14 using
> dwc_otg
> [ 206.317607] usb 1-1.2.1: New USB device found, idVendor=0c45,
> idProduct=7401
> [ 206.317619] usb 1-1.2.1: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [ 206.317626] usb 1-1.2.1: Product: TEMPer2_M12_V1.3
> [ 206.317633] usb 1-1.2.1: Manufacturer: RDing
> [ 206.409673] usb 1-1.2.4: new low-speed USB device number 15 using
> dwc_otg
> [ 206.527634] usb 1-1.2.4: New USB device found, idVendor=0c45,
> idProduct=7401
> [ 206.527645] usb 1-1.2.4: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [ 206.527653] usb 1-1.2.4: Product: TEMPer2_M12_V1.3
> [ 206.527659] usb 1-1.2.4: Manufacturer: RDing
>
> I noticed that the Linux Journal article is old and that the sensors
> I
> have are likely newer than when the article was written. The seller
> said Linux compatible, but is that true?
> _______________________________________________
> PLUG mailing list
> [email protected]
> http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug