|
Building and Using Sanguino Devices - Part I
Part II
|
|||||||
This web page documents my work with the Sanguino computing devices. I became interested in them originally by looking at Brian Riley's Wulfden which has a page showing the Sanguino and offering kits for sale. I looked more carefully at the photos he offered, and recalled my experiences with building the Bare Bones Board. Then I looked over the kit assembly instructions at sanguino.cc. I also looked at the NYC Resistor website a little bit to see how that connects to the Sanguino. I couldn't see anything obvious. For example, there were no classes devoted to constructing and using the Sanguino. But I like the idea of working with the Freeduino platform, and the Sanguino seemed an interesting device to use. So I went ahead and ordered a kit. | |||||||
Building the Sanguino
|
|||||||
A closeup view of the serial programming header. Do you see the text at each end of the header marked "grn" and "blk"? That tells you which wire colors should be on each end when you plug in the FTDI programming cable. |
|||||||
Before installing the ATMega 644P chip, I plugged in a 12v, 800 mA wall wart to the power connector and checked that the green LED came on. It did. I also checked Atmega pin 10 for 5v. I measured 4.99v which is fine. I plugged in the FTDI programming cable and checked that the green LED also came on for that. It did. Then I installed the 644P chip. I had not previously put any sketches on the chip or otherwise used it in any way. When this is properly done (with pin 1 of the chip oriented correctly on the socket), and power is applied immediately after, the red LED will start blinking. It is connected to digital 0. I believe this applies to kits purchases from Brian Riley at Wulfden.org. |
|||||||
I looked around my workbench for a sufficiently large breadboard for the Sanguino. My 3M brand breadboard, a really good one with a triplet of boards on it, has power rails which are just a little too wide for the board. So I next turned to my Global Specialties PB-102 Proto-board, and after clearing out the circuit that had been resident on that, the Sanguino just about fit. The wire connections shown in the photo make no sense and are not used. I rearranged them into a real circuit when I actually put my first sketch on it. The Proto-Board costs more to buy than the Sanguino kit itself. Cheaper dual breadboards will still likely exceed the cost of the Sanguino, and a larger breadboard is bulky.
|
|||||||
Sanguino 1.1 Software Setup and Initial Device Testing Update: Sanguino creator Zach Smith suggested I look at the auto-reset jumper. He added a note to the assembly/build instructions on sangino.cc to emphasize that you must install the auto-reset jumper or you will have to press the reset button each time you upload a sketch. Although on my board the jumper was indeed on the pins, theoretically enabling the auto-reset feature, it didn't seem to be working for me. I pried the Sangiono off the breadboard and inspected my soldering work on those pins. It seemed fine. I also looked at the preferences.txt file used by the Arduino-0012 software, but saw nothing obviously related to auto-reset functionality. By the way, this board feels like it will take a "Gorilla" bar to get it off a breadboard. I hope I won't have to do this too much more. Since the soldering was okay, I plugged it back in and replaced the pink jumper with a white one, mainly to make it show up better in future photos. The new jumper seems to have helped to get auto-reset working! So if you have trouble with auto-reset, consider replacing the jumper with a different one. But also read below for more details that could influence this. A nice feature of the Arduino-0012 IDE is that it will offer you a "help" type URL specific to the general issue you are experiencing, such as uploads that are failing. In my case I was pointed to the troubleshooting guide. So, at this point, I know I can successfully upload a sketch to the Sanguino (with some fussing), and digital 22 and 23 work as expected. Considering the device has 40 pins this is not a thorough test, but it is a very good sign of great things to come. So, at this point, I know I can successfully upload a sketch to the Sanguino (with some fussing), and digital 22 and 23 work as expected. Considering the device has 40 pins this is not a thorough test, but it is a very good sign of great things to come. |
|||||||
/*
* Blink_Sanguino
*
* The basic Arduino example. Turns on an LED for one second,
* then off for one second, and so on...
*
* http://www.arduino.cc/en/Tutorial/Blink
*
* Modified by Bob Cochran for the Sanguino board.
* It causes two different LEDs, connected to
* digital 22 and 23 respectively, to blink.
*
* You may copy and use this code for any purpose.
*
*/
int ledPin = 22; // LED connected to digital pin 22
int ledPin2 = 23; // LED connectedto digital pin 23
void setup() // run once, when the sketch starts
{
pinMode(ledPin, OUTPUT); // sets the digital pins as outputs
pinMode(ledPin2, OUTPUT); //
}
void loop() // run over and over again
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
digitalWrite(ledPin2, HIGH); // turns on the red LED
delay(1000); // wait 1 sec
digitalWrite(ledPin2, LOW); // turns off the LED
delay(1000); // wait another 1 sec
}
| |||||||
Saved By The P4 When I returned to my workplace the next Monday, I could find no sign of the FTDI cable. I must expect that now and then. |
|||||||
Closeup of P4 To Sanguino Connections |
|||||||
Running lite_brite At this time, I have not carefully investigated all the code that is in the Sanguino software "testers" directory for Sanguino software releases 1.1 through 1.3. There are a few more sketches there to play with and learn from. |
|||||||
If you have comments my email address is given below, slightly modified to confuse spammers. You should be able to figure out how to reconstruct the address. Robert L. Cochran ( cochranb a tt speakeasy.net ) | |||||||