Go Down

Topic: Strange behaviour when connecting to proto-shield (Read 1 time) previous topic - next topic

snotra

My Yùn is behaving very strangely when I connect a proto-shield http://arduino.cc/en/Main/ArduinoProtoShield to it.

The project involves an accelerometer and some other components, which are soldered to the proto-shield by me.

I have tried running some example sketches. Blink works (blinks the on-board LED). YunDataLogger (the example under Bridge) does not run when the proto-shield is connected. No sketch involving Serial communication (i.e printing stuff to the Serial monitor) works. They all seem to get stuck at Serial.begin() .

I have no idea how to proceed with this, since I can come up with no reasonable explanation for why the serial communication should not work in this instance. It is located on the Yùn itself, not on the proto-shield, so it should not be affected by what is connected to the various pins. Any help or suggestions would be very welcome!


federicofissore

Only thing that comes to my mind is about interrupting serial communication between linux and 32u4 by using rx/tx pins

snotra

So, I updated according to http://arduino.cc/en/Tutorial/YunSysupgrade

It didn't solve the problem, not that I really thought it would but leave no rock unturned and all that. Is it possible the mere fact that there is a pin connecting from the protoshield to 0 and 1 is causing this problem? I can't see how it should, but it's the only thing I can think of.

The problem arose after I had to resolder all the components on the proto-shield for various reasons. Before that the serial connection seemed to work alright, but the connection to the components was not working that well so they had to be replaced.


federicofissore

Can you slightly bend those two pins so that they don't plug into the yun and verify?

snotra

This did not solve the issue.

Also: When the proto-shield is connected the ON and USB LEDs on the Yùn don't light up, which they do when it is not. Could it be an issue of improper power supply to the proto-shield?

The only sketch I have been able to work so far is blink, so I guess the issue is either in serial or in the bridge. I tried running Datalogger without any Serial monitor output and without initializing Serial. This did not work either.


sonnyyu


...
Also: When the proto-shield is connected the ON and USB LEDs on the Yùn don't light up, which they do when it is not. Could it be an issue of improper power supply to the proto-shield?

The only sketch I have been able to work so far is blink, so I guess the issue is either in serial or in the bridge. I tried running Datalogger without any Serial monitor output and without initializing Serial. This did not work either.


It is very unlikely problem is coming from improper power supply since blink is still working.  You did not tell us what group pins has been used at proto-shield. The Federico's method is the best bet, slightly bend pins by group and test.


snotra

Alright, I can tell you what pins are used:

Vin (battery is not connected atm, but it makes no change connecting it), 3.3 V, GND, GND, A1, AREF, 2, 3, 4, 5, 6

I'll try to bend out some pins at a time and see what happens.

snotra

So, the problem seems to be in the Bridge, because the following code runs
Code: [Select]


#include <FileIO.h>

int led = 13;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  Serial.println("hej");
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}


But this

Code: [Select]

#include <FileIO.h>

int led = 13;

// the setup routine runs once when you press reset:
void setup() {
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);
  Serial.begin(9600);
  Bridge.begin();
 
}

// the loop routine runs over and over again forever:
void loop() {
  Serial.println("hej");
  File dataFile = FileSystem.open("/mnt/sd/datalog2.txt", FILE_APPEND);
  dataFile.println("hej");
  dataFile.close();
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}


does not.

snotra

Alright, after some bending of pins I have found that it is likely the 3.3V or 5V pin causing the Bridge.begin() command to hang.

Any ideas as to how I can proceed from here?

I should also add that Bridge.begin() takes a very long time to run even when it does run.

snotra

Per good forum behaviour I want to conclude the thread with the solution.

I had accidentally shorted the ground and 3.3V pins on the proto-shield. I re-soldered that connection and now everything works.

Thank you all for the suggestions. I would never have found the error if it wasn't for the suggestion to bend the pins one by one.

Go Up