From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

How to get myRio i2c to run at 5v

Hey guys,

 

I've been trying to design a control system for a medical device, and have run into some issues with i2c. After a lot of wasted time debugging, we realized the code was fine, but the issue actually lies on the sensor High Input being at 4 V, but the myRio manual claims i2c output runs at 3.3V.

 

Is there any setting to change the output voltage? I don't see any options in the Vi.

0 Kudos
Message 1 of 5
(3,000 Views)

Also to provide more information, when in debugging mode, LabView verifies every signal is OK up until the i2c read Vi, but throws an error after waiting for a while with no response. 

 

Our suspicion is that because the output voltage doesn't cross the input threshold of the sensor, it's never returning the initial Ack to confirm it's sending data. I don't think it's any of the trivial settings (like bus speed or slave address) because I asked a few of my friends with more labview experience to look at my code and said it was right.

0 Kudos
Message 2 of 5
(2,998 Views)

Check page 23 of the manual.  Your output high is 3.465 V maximum.  That's a good way to tell you can't set it any higher.

 

The sensor you have, take a look at its spec sheet to see what it defines as a high for the input. Most devices have a 2 V minimum for this.

 

The group that has contracted you to do this work might want to consider looking into getting a product designed for a professional application instead of one designed for educational purposes as well.

0 Kudos
Message 3 of 5
(2,967 Views)

Thanks for the reply,

 

As I noted above, I did check the manual, and saw that it runs at 3.3 V. Was just curious if I could force it to 5 v given the digital output high is 5 v.

 

As for the device, this project is strictly for research purposes, so we went after an affordable embedded system.

0 Kudos
Message 4 of 5
(2,963 Views)

Typically, "low" is less than a V.  The TTL standard defines it as less or equal to 0.8V.  "high" is 2.0V or higher.  Some devices work with the 5V range.  I've also seen 24V.  Outputting anything higher than 2V meets the standard.

 

If your sensor is TTL complaint, it should accept the 3.3V as an input.  You'll know for sure by checking its spec manual.

 

I know you read the manual to see the 3.3V.  I wasn't sure if you read page 23 because that makes it rather apparent there aren't any settings to increase the value to 5V.  If it maxes at 3.465V, it can't reach 5V.  You'd be forced to look at external circuitry and hope it can respond at a high enough frequency to work with your I2C desgin.  But, this might be something you're able to avoid by simply looking at the spec manual.  If it accepts inputs with the 2V level, there's likely something else that's a problem.

0 Kudos
Message 5 of 5
(2,950 Views)