From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview, I2c, ADT7420

Solved!
Go to solution

Hi, 

 

I'm completely new to using I2c in LabVIEW and I'm currently trying to connect up a ADT7420 temperature sensor (this is on a mikroe 3636 dev board) to an Arduino Uno. I'm trying to create a user interface for my project but I'm really struggling to find help on how-to hook up this specific temperature sensor. Ive attached my block diagram so far, its incredibly basic but i hope I'm sort of on the right tracks 

 

Any help would be greatly appreciated 

 

 

0 Kudos
Message 1 of 3
(1,001 Views)
Solution
Accepted by topic author Yepmop

Hi Yepmop,

 

The toolkit that you are using simply sends the arduino serial comands and reads them back. For it to work you need to deploy the firmware that comes along with the toolkit. You should find the firmware at this path on your PC:

 

C:\Program Files (x86)\National Instruments\LabVIEW 2020\vi.lib\LabVIEW Interface for Arduino\Firmware\LIFA_Base\LIFA_Base.ino

 

You can then open it up with the Arduino IDE and deploy it to your device. By default it uses a baud rate of 115200. It is defined in the LabVIEWInterface.h file in the same directory, in case you need to change it. Looking at regular Arduino examples online, everyone is using some open source libraries to communicate with the ADT7420. For example this thread:

https://forum.arduino.cc/index.php?topic=157330.0

So you will likely have to write a bit of code to get it working how you want it. You should also be using the following connections (toolkit default):

Uno Pin A4 - ADT74020 SDA
Uno Pin A5 - ADT74020 SCL
Uno Pin 3.3V - ADT74020 Vdd
Uno Pin GND - ADT74020 GND

Based on the data sheet of the ADT7420, you will likely want something like below to get you started. You will likely want to pull A1 and A0 to GND as well, to result in an address of 0x48. Page 19 of the data sheet shows exactly what you need to send to the ADT7420 to read back the temperature as a 16bit number:

1. Write 1 byte. Address: 0x48. Data: 0x00 (specifies to read MSB of Temperature value)
2. Read 2 bytes: Address: 0x48. (You will receive the MSB first and then the LSB)

Data sheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adt7420.pdf


Arduino ADT7420 Example.png

0 Kudos
Message 2 of 3
(953 Views)

Thank you for your help, that makes a lot more sense. ill crack on with that tomorrow! 

0 Kudos
Message 3 of 3
(947 Views)