WELCOME TO THE ONLY AVAILABLE LIBRARY FOR THE LM95071 TEMPERATURE SENSOR
Arduino*/Teensy** Library for reading temperatures from the SPI Temperature Sensor from TI
The Sensor comes in a SOT-23 package and requires three Pins from the uC board (Arduino/Teensy)
Datasheet: http://www.ti.com/lit/ds/symlink/lm95071.pdf
Description: The library uses the SPI library from Arduino (internally called) to communicate with the sensor via two pins of the SPI port (CLK and data) of the uC. A third cable is necessary as a Chip Select pin (Active low) and therefore cascading devices are possible.
Usage:
- Declare a pin from the uC connected to the CS pin (Pin 1) of the sensor --> SS_Pin
- Instantiate as many devices as you have connected using LM95071 device(SS_Pin).
- Initialize the library with the begin() method --> device.begin();
- Query the value using the method getTemperature() --> device.getTemperature(); The result from the conversion is saved in a float variable.
- Connections: Pin 3 (SI/O) of LM95071 is connected to MISO pin, Pin 4 (SC) is connected to SCK from the SPI port.
Notes:
a. Debugging is possible via the serial port to observe the raw conversion of data. The second parameter of the object declaration defines if it is needed or not. If debugging is needed use: DEBUG_ON otherwise leave the second parameter blank or use DEBUG_OFF
If you find any issues with the implementation please let me know
Cheers! 🍺
dzalf
#TODO
- Method to query manufacturer's ID
- Method to set the device into sleep mode
- Test fast SPI lib on these devices
-
Tested on Arduino Pro Micro and Leonardo.
On these boards Pin 17 corresponds to the SS port from the SPI and it is connected to the Rx data from the serial port. Therefore, you must remove the resistor and connect this pin to pin 1 from the sensor. (I have no idea why they decided to wire the SPI like this 😒) I indeed tried using different pins for the SS signal however it didn't work for unknown reasons. Still investigating this.After recent further testing this issue has been resolved. Possibly the latest version of the Arduino IDE made the compiler/linker solve this issue. Successfully tested with other pins -
- Tested on Teeensy 3.2. No wiring problems since all pins are available thanks to Paul's great design 😎
Unfortunately, the Tindie shop had to be closed. Thank you to all of you who purchased something from it. We appreciate your support. P&D