Other Parts Discussed in Thread: CC2541, TMP451, TMP006
Hi All,
I am working on a project to get local temperature using TMP451 and CC2541. Can anybody tell how to proceed with this?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello Don,
Look at the sensorTag project as a reference which is included in the BLE Stack. There is also a temperature sensor within the CC2541, but the TMP451 might be more accurate and wont be affected by self heating as much as the CC2541 might be.
http://processors.wiki.ti.com/index.php/SensorTag_User%27s_Guide
Hi Eirik,
I would like to use the local temperature sensor within TMP451.I think i have to use SMbus protocol to get the temperture data.Is ter any particular registers to be set inorder to get the Temperature reading through SDA and SCL lines?
Regards
Don
Hello Don,
No, they call it Two-Wire Serial interface. Look at how the hal_irtemp.c is implemented in the SensorTag code. Should be very similar although not the same.
I could not find a nice address table for I2C in the TMP451 user guide, but they are listed throughout the document. For example the slave address address byte consists of seven address bits, and a direction bit indicating the intent of executing a read or write operation. The TMP451 has a device address of 4Ch (1001 100b). This is slightly different from the usual implementation in the SensorTag code where you use the same address for read and write operations. But it should be easy to implement.
The rest of the register addresses is given in the data sheet:
http://www.ti.com/lit/ds/symlink/tmp451.pdf
The TMP451 has multiple 8-bit registers that hold temperature measurement results. The eight most significant
bits (MSBs) of the local temperature sensor result are stored in register 00h, while the four least significant bits
(LSBs) are stored in register 15h (the four MSBs of register 15h). The eight MSBs of the remote temperature
sensor result are stored in register 01h, and the four LSBs are stored in register 10h (the four MSBs of register
10h)
Hi Eirik,
The TMP006 implemented in Sensortag profile uses the irtempserviceprofile.Do i need to use the same profile to send temp data onto the bluetooth device.I just need to get the temperature data and send it over bluetooth to a central device.
The TMP006 uses the tha same SMBus Protocol and so i think i can just follow the method of what is implemented in sensortag.Is that the right way to proceed?
Regards
Don
Hello Don,
Yes you can use the irtempserviceprofile as as starting point. But you should change the UUID used and maybe other things that makes sense to change such as the name of the service.
The SMBus protocol is derived from I2C so they are quite similar. It is put well in a paragraph on wikipedia:
"The SMBus was defined by Intel in 1995. It carries clock, data, and instructions and is based on Philips' I²C serial bus protocol. Its clock frequency range is 10 kHz to 100 kHz. (PMBus extends this to 400 kHz.) Its voltage levels and timings are more strictly defined than those of I²C, but devices belonging to the two systems are often successfully mixed on the same bus."
Hello Eirik,
Do you have some sample code of TMP451 implementation using SMBus Protocol on cc2541. Can i use Battery profile to send out the temperature data onto the Central device.I think this will be more easy rather than going for temperature profiile.
Can i reuse the hal_irtemp.c for TMP451 by changing the device address and configuration parameters.? Is the implementation same as that of TMP006
Thanks & Regards
Don