WIFI-Shield not pulling MISO line low properly

Good morning,

I have tried to connect the Arduino Wifi Shield (http://arduino.cc/en/Main/ArduinoWiFiShield) to the Arduino Robot (http://arduino.cc/en/Main/Robot), but have problems with the communication between them. I set up the Wifi Shield as required for SPI communication and checked the respective communication lines on an oscilloscope. It seems that the MOSI, CLK, SS etc. all work fine, but as soon as the MISO comes into play, it gives problems.

Initially, I powered the robot only by means of the USB connection and the MISO line would not go high at all; which is required.

Later on, I used the on board batteries to power the robot, and the line would go high.

I compared the oscilloscope readings from Arduino Uno=>Wifi Shield; with Arduino Robot=>Wifi Shield and noticed that the signals look exactly the same, except for one difference. When connected to the robot, the Wifi Shield does attempt to pull the MISO line low at exactly the same instances as for the Uno, however, it does not pull them down completely to 0V, but only to about 3.5V. I assume that this is the reason why the two do not work together currently.

Is this still a power related issue? Is it noise related? What do I have to do to make the Wifi Shield pull the MISO line down completely when transmitting data?

Thanks
Stefan

Any suggestions?

I'd first check all the power supply connections between the boards, make sure each
board is getting power and ground and that the voltage isn't drooping under load -
remember the robot's motors will take large currents when starting up or changing
direction and the supply must be able to hold up against this.

I did check that all Vcc and GND connections are made. Is it possible that my problem is power related?

How can I supply more power? Would it be an option to power the Wifi shield from a seperate source?

however, it does not pull them down completely to 0V, but only to about 3.5V. I assume that this is the reason why the two do not work together currently.

It sounds like something is holding the line up. This implies that some other output is trying to drive the line high while another is trying to drive it low. This could potentially damage one or both of the two outputs.
Check the circuits and check that the device not using the SPI bus has its driver disabled with the appropriate chip enable pin.

Stefan,

I have also tried to connect Arduino Robot with WiFi shield and encountered the same problem. I firstly connected Arduino UNO and WiFi shield with wires and identified necessary pin connections. It was OK and WiFi shield worked fine. Next I connected Arduino Robot with WiFi shield by modifying pin assignment, namely SS and handshake. Since MISO, MOSI, CLK pins are defined on ICSP connector, I connected these signal pins without modifying pin assignments.

In Arduino UNO + WiFi shield case, MISO signal was generated by WiFi shield as a response to MOSI signal. It worked. In contrast, in case of Arduino Robot + WiFi shield case, MISO SIGNAL CORRUPTED. Looking at oscilloscope, no valid signal was observed as if the MOSI pin is connected to very low impedance input (at Robot). However, if a wire was disconnected from Arduino Robot, then a correct signal was observed on a oscilloscope. It was the same signal that I have observed at MISO between WiFi shield + UNO.

It lead me a small conclusion that something was wrong with MISO input at Arduino Robot. I checked the reference design and find the MISO connection was as follows;


| | | | <Arduino Robot |
| | | | Controller> |
PA11/SPIO-MISO o------o A4 B4o---------o------------o-------o11PD0/MISO/PCI
TxB0108 ICSP1 ICSP1 NT3 PB3 |
AT32UC3A1256 (Level converter) ATMEGA32U4-AU |
| | | | |
| | | | |


You can see the pin connection is very simple. Just two CPU pins are connected via TxB0108 level converter. It is hard to think there is a mismatch. I have checked with a tester that in Arduino Robot Controller, ICSP1 pin is connected to 11PD0/MISO at ATMEGA32U4-AU.

It is not usual but I have tried to insert an open emitter buffer circuit or make ICSP1 latched up with VCC but failed to observe correct signal. Within ATMEGA32U4-AU, there is an option to make MISO input pulled up but the result was the same.

With those trials and debugs, I had few ways to step further. Does anybody give me an advise?

As a result, from an arduino sketch level, although no ack. was returned from WiFi shield to Arduino Robot, a LINK green lamp became ON at WiFi shield after sending ESS-ID and WPA to WiFi shield. It means that WiFi shild is working by finding a target WLAN base station!

Masayoshi

Hi,

I actually got mine working. The problem is that you cannot have the robot screen and the Wifi Shield connected to the robot. What happened with mine was that the level shifter on the Wifi Shield broke.

My solution was to remove the screen, connect the shield (a new one) and it worked.

This is what my headers in the Wifi/utility/spi_drv file look like:

#define DATAOUT     11 // MOSI
#define DATAIN      12 // MISO
#define SPICLOCK    13 // sck
#define SLAVESELECT TKD3//10 // ss
#define SLAVEREADY  TKD5//7  // handshake pin
#define WIFILED     TKD4//9  // led on wifi shield

I connected the 6-ports ICSP sockets to each other (robot to shield) and soldered the other three TKD connections as above.
Now it is working perfectly fine, but without the screen.

Hope this helps.
Regards
Stefan

Hi

Thank you so much for your prompt response!. I should try! Also thank you for providing pin definitions. For information, my current setting for Robot control is as follows;

#define DATAOUT 16 // MOSI
#define DATAIN 14 // MISO
#define SPICLOCK 15 // sck
#define SLAVESELECT 6 // ss - TKD4
#define SLAVEREADY 21 // handshake pin -TKD2
#define WIFILED 22 // TKD3

I will debug this next week and let you know the result.

Masayoshi

Stefan

My solution was to remove the screen, connect the shield (a new one) and it worked.

Today I removed the screen, connected the WiFi shield and upload the sketch. It worked!
The Robot returned the valid SSID, MAC. When the WiFi base station is put off, then the Shield reports this.

So MISO is also connected to the display. I did not notice it. Anyway thank you very much for your advise!!

I am glad you got yours working as well!

For a more detailed guide check here: http://arduinorobothelp.wordpress.com/