Go Down

Topic: GBoard Pro sketch not working without FOCA programmer connected (Read 680 times) previous topic - next topic

RudiAhlers

Jul 14, 2014, 02:51 pm Last Edit: Jul 14, 2014, 07:33 pm by RudiAhlers Reason: 1
I have a GBoard Pro (link or link2), which has a built-in SIM900 module, SD Card slot, Xbee slot and a lot of breakout PINs, but no USB programmer. So I need to use a FOCA programmer (link)

The problem is, that the sketch (in fact, any sketch) doesn't run if the FOCA programmer isn't connected, and the Arduino Serial Monitor isn't open on my laptop.

The Gboard Pro can take 7V - 23V, so I connected a 9V "wallwart" to it.


Here's a simple sketch, which should enable two LED's, but it doesn't:

Code: [Select]

int ledState = LOW;             // ledState used to set the LED
long previousMillis = 0;        // will store last time LED was updated
long interval = 1000;           // interval at which to blink (milliseconds)

void setup()
{
 Serial.begin(115200);
 Serial.println("Gboard Pro Test");

 pinMode(A2, OUTPUT); // LED Connected to Analog PIN 3
 analogWrite(A2, 255);

 pinMode(A1, OUTPUT); // LED Connected to Analog PIN 0
 analogWrite(A1, 255);
}

void loop ()
{
 unsigned long currentMillis = millis();

 if(currentMillis - previousMillis > interval) {
   // save the last time you blinked the LED
   previousMillis = currentMillis;  

   // if the LED is off turn it on and vice-versa:
   if (ledState == 0)
   {
     ledState = 255;
     Serial.println(ledState);
   }
   else
   {
     ledState = 0;
     Serial.println(ledState);
   }
   // set the LED with the ledState of the variable:
   analogWrite(A1, ledState);
 }
}




According to the Arduino Troubleshooting guide (http://arduino.cc/en/guide/troubleshooting#toc5), the "Arduino Deicimila or earlier" should have a 10K resistor tied to ground, which I tried, but that didn't work either.

Quote

Why doesn't my sketch start when I'm powering the board with an external power supply? (Arduino Diecimila or earlier)

Because the RX pin is unconnected, the bootloader on the board may be seeing garbage data coming in, meaning that it never times out and starts your sketch. Try tying the RX pin to ground with a 10K resistor (or connecting RX directly to the TX pin).


Can anyone help with this please?

RudiAhlers

As a test, I connected the FOCA to the Gboard Pro, without connecting the USB cable to my laptop, and the LED's still didn't turn on. i.e. the sketch still doesn't run. As soon as I connect the USB cable to my laptop, the LED's light-up.

So I connected a PCDuino (similar to a Rasbery Pi) to the USB cable and the LED's lit-up as well, confirming the sketch runs.

Thus is seems that the USB cable sends some signal through to the FOCA, which in turns let the sketch run. But I don't know what. The PCDuino isn't running the Arduino IDE at all.

Lastly, I connected a "battery bank" (used to charge cellphones) directly to the USB cable, which is connected to the FOCA, which in turn is plugged into the GBoard Pro, and the LED's lit-up, again confirming the sketch run.

This makes me think that I need a 2nd power source, but that doesn't make much sense?

RudiAhlers

For anyone who wants to know, the 3.3v regular close to the MEGA2560 MCU seems to be faulty. it only gives 2.9v, and not 3.3v. Interestingly, another GBoard Pro has the same problem, but the regular gives 2.5v.

Is there anyone else with such a board, who can confirm that their board can run without a programmer connected to it? I want to see if this is a design flaw, or just a bad batch of boards.

ricardo_bollo

#3
Aug 27, 2014, 02:49 pm Last Edit: Aug 28, 2014, 11:38 am by ricardo_bollo Reason: 1
Yes. I can confirm I have come across the same problem. I did not find any solution to this problem. If somebody could help, I would appreciate it.

Thanks in advance.

ricardo_bollo

Solved.

The Atmega chip on the Gboard or Gboard Pro needs 3,3V to operate and run sketches. The Atmega chip gets the 3,3V from the Foca board when this one is connected. However, when the Foca board is removed, the Atmega chip no longer has 3,3V and hence the problem.

The solution is to connect 3,3V to the VCCIO PIN. You can step down a higher voltage, like the one on the power socket (7-23V), through a Zener or voltage divider..

Go Up