28
Initial Review – Goldilocks Arduino-compatible with ATmega1284P
arduino, atmega1284p, atmel, board, compatible, freetronics, goldilocks, part review, review, tronixstuff Commenti disabilitati su Initial Review – Goldilocks Arduino-compatible with ATmega1284P
Introduction
In March this year we discussed a project by Phillip Stevens to crowd-fund an Arduino-compatible board with an ATmega1284p microcontroller – the “Goldilocks”. After being funded at a rapid rate, and subjected to some community feedback – the boards have now been manufactured and delivered to those who pledged. If you missed out – there’s some more available for direct sales. We ordered five and now have them for the subject of this review – and two to give away. So let’s examine the board and see what’s new.
What is it?
After hitting the limits of the Arduino Uno with respect to SRAM, CPU speed and not wanting to lose compatibility with existing projects by changing platforms, Philip decided to shift the MCU up to the ATmega1284P. This offers eight times the SRAM, four times the flash memory and EEPROM – and is also clocked at 20 MHz instead of the usual 16 MHz on Unos, etc. After the original design was announced, it was the victim of some pretty heavy feature-creep – however with Freetronics as the manufacturing partner the final result is a nicely-finished product:
Now let’s rip open the packaging and examine the board in greater detail. From the images below you can get the gist of things… starting with the top you can see the ATmega1284P next to the microSD card socket. There’s a JTAG connector for the 1284P on its left – and below that a 32.768 kHz crystal for RTC use. And like other Freetronics boards a large prototyping area has been squeezed in below pins D0~7 that also has the power and I2C lines at the edge. Furthermore note that all I/O pins are brought out to separate holes in alignment with the header sockets. And my favourite – a switch-mode power supply circuit that can offer up to 2A of current – great for GSM shields.
Another point of interest is the ATmega32U2 microcontroller which is for USB duties – however it can be used as a separate “board” on its own, with a separate reset button, ICSP breakout and the ports are broken out logically:
Furthermore the 32U2′s SPI bus can be wired over to the main 1284P to allow communication between the two – simply by bridging the provided pads on the PCB you can join them. Also on the bottom you can see how each I/O pin can be disconnected from the I/O areas and thus diverted if necessary. It really is a testament to the design that so much of the board is customisable, and this attention to detail makes it stand apart from the usual Arduino-compatibles out there.
One thing that did strike me was the retina-burning intensity of the onboard LEDs – however you can disable them by cutting the provided track on the PCB. For a complete explanation of the hardware side of things, check out the user guide.
Using the Goldilocks
One of the main goals was to be Arduino Uno R3-compatible, and from initial examination this is certainly the case. However there are a couple of differences, which you can find out more about in the user guide. This is not the first board for an Arduino user, but something chosen after getting some experience. Installation was very easy, it should be plug-and-play for the non-Windows crowd. However if you’re part of the silent majority of Windows users then the required U2duino Programmer.inf file for the Device Manager will be found in the production_firmware folder of the software download available on the product page. Furthermore no matter your OS – don’t forget to install the Arduino IDE Goldilocks board profile.
Before getting too excited and uploading your sketches, you can examine the the ATmega1284p bootloader monitor which allows for memory dumps, port testing, and more. Simply connect up your board, load the Arduino IDE, select the board and COM: port then open the Serial Monitor. By sending “!!!” after a board reset, a simple menu appears – which is shown in the following video:
Now for a quick speed test. We’ll use a sketch written by Steve Curd from the Arduino forum. It calculates Newton Approximation for pi using an infinite series:
// Pi_2 by Steve Curd // December 2012 // This program approximates pi utilizing the Newton's approximation. It quickly // converges on the first 5-6 digits of precision, but converges verrrry slowly // after that. For example, it takes over a million iterations to get to 7-8 // significant digits. #define ITERATIONS 100000L // number of iterations #define FLASH 1000 // blink LED every 1000 iterations void setup() { pinMode(13, OUTPUT); // set the LED up to blink every 1000 iterations Serial.begin(57600); } void loop() { unsigned long start, time; unsigned long niter=ITERATIONS; int LEDcounter = 0; boolean alternate = false; unsigned long i, count=0; float x = 1.0; float temp, pi=1.0; Serial.print("Beginning "); Serial.print(niter); Serial.println(" iterations..."); Serial.println(); start = millis(); for ( i = 2; i < niter; i++) { x *= -1.0; pi += x / (2.0f*(float)i-1.0f); if (LEDcounter++ > FLASH) { LEDcounter = 0; if (alternate) { digitalWrite(13, HIGH); alternate = false; } else { digitalWrite(13, LOW); alternate = true; } temp = 40000000.0 * pi; } } time = millis() - start; pi = pi * 4.0; Serial.print("# of trials = "); Serial.println(niter); Serial.print("Estimate of pi = "); Serial.println(pi, 10); Serial.print("Time: "); Serial.print(time); Serial.println(" ms"); delay(10000); }
The Goldilocks was compared with a standard Arduino Uno, with the following results (click image to enlarge):
As you can see from the results below, the Goldilocks theoretical extra 4 Mhz of speed is shown in the elapsed time between the two boards – 4433 ms for the Goldilocks vs. 5562 ms for the Uno, a 25.4% increase. Looking good. We’ll leave it for now – however for more information you can review the complete user manual, and also discuss Goldilocks in the Freetronics customer forum.
Competition
Two of our twitter followers will be randomly selected on the 14th of September, and will each receive one Goldilocks board. So follow us on @tronixstuff for a chance to win a board, and also keep up with news, new articles and items of interest. Board will be delivered by Australia Post standard air mail. We’re not responsible for customs or import duties, VAT, GST, import duty, postage delays, non-delivery or whatever walls your country puts up against receiving inbound mail.
Conclusion
The Goldilocks is the board that can solve many problems – especially when you’ve outgrown your Uno or similar board. We look forward to using it with larger projects that burn up SRAM and exploring the possibilities of using the two microcontrollers at once. There’s a whole bundle of potential – so congratulations to Phillip Stevens, Freetronics and all those who pledge to the funding and supported the project in general. And to join in – you can get your own from Freetronics. Full-sized images are on flickr. And if you made it this far – check out my new book “Arduino Workshop” from No Starch Press.
In the meanwhile have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS using the links on the right-hand column? And join our friendly Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other – and we can all learn something.
The post Initial Review – Goldilocks Arduino-compatible with ATmega1284P appeared first on tronixstuff.