Wednesday, April 25, 2012

Dragrove Daughter Board

I found out why the Dragino doesnt want to boot once the Dragrove daughter board is plugged in. According to the Dragino schematic (Page 2, top left corner), Pin 4 on the Router connector (Dragino CON5), is the COLD reset pin via the daughter board. Using the Dragrove daughter board schematic as a reference, you can see that Pin 4 of the Router Connector links to Pin 7 of the Sensor connector (Dragino CON4) and to Pin PD4 of the ATMEGA micro-controller on the daughter board. 


My guess is that one of two things could be happening. Either the default code programmed on it is broken, or it wasnt programmed at all. In any case, Pin PD4 is set to HIGH when the board is powered. That causes the Dragino to COLD reset nonstop, which doesnt allow it to boot. The solution is to link a wire between Pin 4 and Ground. Use the following image as a reference for your jumper: 


This solution forces Pin 4 to LOW, which then allows the board to boot.

Once the Dragino boots, then you can SSH into it (and continue the tutorial), as instructed in the Wiki

Ive been working with Ubuntu, so for SSH its simple. 

Type in the terminal:
~$ ssh root@192.168.255.1
Then login with the password you set (or the default if you didnt set it). That allows you to get the Daughter board upgrade script from the SVN server. 
Then using a tftp-server you can upload your Arduino hex files to the daughter board. Make sure when you compile your code to include a line in there to set Pin PD4 of the ATMEGA to LOW. Remember to set the board type in the Arduino IDE as <Arduino Diecimila or Duemilanove w/ATmega168>.
#define COLD_RST (4)

void setup(){

pinMode(COLD_RST, OUTPUT);
digitalWrite(COLD_RST,LOW);
}

void loop(){
//return 0;
}
Flash the Daughter board using this guide, or as an alternative, you can unplug the daughter board from the Dragino and upload the bootloader with an AVRISP MKII. Afterwards, you can remove the grounding jumper. Just remember to add this piece of code to each sketch.

No comments:

Post a Comment