0
\$\begingroup\$

I am using an arduino wifi shield and a TMP102 with an arduino uno rev2.

With boards older than rev3 you have to add a jumper from the 3.3V to the IOREF pin for the wifi shield, see here: http://arduino.cc/en/Guide/ArduinoWiFiShield

But when I do that the temperature sensor would only read -0.06 celsius as if its address would be different. (It is using i2c, its ADD0 is grounded, just like here: http://bildr.org/2011/01/tmp102-arduino/ )

Without the jumper the sensor is working fine, but the wifi needs the jumper for starting up.

What should I do to make them work together?

\$\endgroup\$
2
\$\begingroup\$

Jump to TLDR below for a shorter answer:

The Arduino Uno Rev2's 3.3v line is powered from the FT232R usb to serial chip's 3v3 internal regulator. Max draw on this is under 50mA. Pretty pathetic actually, which is why there was a move to a dedicated regulator in the Rev3.

The Wifi Board does not connect to the 3v3 pin. Normally, it is powered by 5v, has it's own 3v3 regulator, and uses a TI TXB0108 Level Translation chip. It takes two arbitrary (with a certain range) voltages, and allows level translation to communicate between the two. The main chip on the Wifi Board is a 3v3 device. So are SD Cards.

So here is the problem. Sloppy, idiotic, inconsistant notation by Arduino.

The Arduino Rev3 does not add the IORef pin listed on the Official Schematic. As noted online, in adding the IORef, they said that it's for future expansion. 5v Boards, like the default Arduino UNO or AVR based ones, ioref is tied to 5v. For the newer 32bit Due runs at 3.3v. It's IORef is tied to 3.3v.

Revision 3 of the board has the following new features: 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible both with the board that use the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V.

The Wifi Board's schematic shows that the IORef pin goes to the TXB0108's Pin 19, VccB (The side that communicates with the Arduino. VccA is for the wifi chip). It also shows... that the jumper is tied to 5v.

enter image description here

Now, why would they tell you to jump ioref to 3.3v, or use the jumper, when the UNO rev2 and rev1 are 5v IO devices? Or when the jumper ties ioref to 5v, and they know that will cause problems? Go fig. There really shouldn't be a reason. Everything on that board is supposed to be powered and externally communicated at 5v, so unless you have a 3.3v modified board or Due or something, you shouldn't. A REV2 board will with ioref tied to 3.3v will power half of the TXB0108 and a cap, along with your TMP102 and it's pull up resistors

But there is still a problem. The Arduino, the TXB0108, and the TMP102, even at full current draw, should still be less than 50mA from the FTD232R. The TXB0108 and the TMP102 are both under 1mA at while fully active. Something is causing the 3v3 line to go down low. It could be that the Wifi boards schematic isn't correct either, the ioref could be tied to something else as well. Maybe a bad board. Or you have a short that's causing it to go down. Maybe the capacitor on the rev2 board, near the power header where ioref would be, is shorting out against the wifi boards ioref pin. Since you have 3.3v jumpered to it, your essentially shorting out or tainting the 3.3v line.

enter image description here


TLDR; First, check the 3v3 line when jumpered. It should not be less than 3.3v while everything is on. Make sure you have no shorts and nothing else (except the wifi board and tmp102 board) connected. (anything more would require a logic analyzer or oscilloscope, to see if there is corruption on the i2c data lines.) Also, make sure that the ioref pin is not sorting out on the capacitor underneath it.

Then, due to the information above, if (and at this point that's a big IF, I don't trust Arduino Documentation) the ioref is on the board according to the schematic, just connect it to 5v, either through the jumper on bottom, or using a wire from the 5v to the ioref header. Given the level translation chip, that's how it is intended to work, and it should work.

\$\endgroup\$
  • \$\begingroup\$ @Passersby: this is a great, very well researched answer, but the "just connect it to 5v" bit worries me... Not "if all else fails you could connect it to 5v though if the schematics are correct and there was no reason to connect it to 3v3v in the first place"? I guess I'd have more "AT YOUR OWN RISK" signs up for the OP... \$\endgroup\$ – angelatlarge Apr 2 '13 at 4:44
  • \$\begingroup\$ @angelatlarge I say that, because that's how the ioref pin is supposed to work, and that's how it works for the Uno rev3, which has ioref tied to 5v. \$\endgroup\$ – Passerby Apr 2 '13 at 6:23
1
\$\begingroup\$

Its possible that the WiFi shield is drawing too much power from the 3.3V regulator. Once you jump the IOREF pin the WiFi shield powers on, the voltage on the 3.3V rail drops and the temperature sensor goes into a brown-out or power down state. Try measuring the voltage on the 3.3V rail with the IOREF pin jumped. If its a ways below 3.3V this could be your problem. Another possibility is to power the temperature sensor with a separate power source and see if that solves it

\$\endgroup\$
  • \$\begingroup\$ I was thinking that, but according to their docs the 3.3V is used as a reference voltage. This would entail that WiFi shield imput impedance on that 3.3V line should be high, not causing any voltage droop, right? \$\endgroup\$ – angelatlarge Apr 2 '13 at 2:39
  • \$\begingroup\$ @angelatlarge there are issues with documentation on the ardiuno schematics. And probably a short circuit. Look at my answer. \$\endgroup\$ – Passerby Apr 2 '13 at 4:05
0
\$\begingroup\$

I had the same problem with the wifi shield and an ML8511 UV sensor (inconsistent readings) and I noticed that where it was supposed to be 3.3V I was getting 4.85V after jump wiring the IoRef to the 3.3V pin.

After reading this post I realized that the solution was to jump wire the 5V with the IoREF and not the 3.3V.

I did it and now the system is working fine, the readings that I get are according to what other devices are measuring and problem solved.

So I guess that Arduino documentation was wrong when it said to jump wire 3.3 to IoREF.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.