Meet the Pinguino!

Meet the Pinguino!

Pic32-Pinguino

There’s more than just one 32-bit PIC based “Arduino-compatible” on the block and this one, the Pinguino, is a board that I was pretty interested in – mostly because it’s from a maker (for makers) not a company so much and the efforts towards an open source tool chain. I emailed the designer and maker of this board asking about its history, the differences between their board and the chipKIT Uno32. Keep reading for a fantastic overview with Jean-Pierre Mandon and Tsvetan Usunov.

PT: Thanks for answering these questions!

Jean-Pierre Mandon: Great to see you are interested with Pinguino. We are now working on the next release which should include a lot of great stuff (OTG support for Android ADB, zigbee low cost shield and more…).

We wouldn’t try to claim that the Pinguino is a “100% Arduino compatible board” as Microchip said for the chipKIT. Our goal is to add functionality to the original Arduino board as we did for 8 the bit version. CDC support is one of those improvements (just use it with simple instructions) and OTG for the PIC32 will be managed in the same spirit.

And of course, one of our main restrictions and challenges was to provide an Open Source chain. Some month ago, we decided to build (from the GCC source) our own tool chain for PIC32, the next step will be to port Pinguino on the OLIMEXINO board (ARM) with the same functionalities.

Finally, the goal of Pinguino is not to be a Microchip board but to be used on many different boards without the need of low level knowledge of the micro-controller used.


Pic32-Pinguino-1

PT: What’s history behind the Pinguino?

Jean-Pierre: Pinguino project started in 2008. The main goal was to make a development board you can build in your garage. This tool was originally designed for art students (one of my jobs is a teacher in the robotic lab of the Aix en provence school of art). You can build a Pinguino with a $4 micro-controller that has a real USB system (the 8 bits version works with a 18F2550 or 18F4550 ) with only a few components, even on a beadboard.

I built the IDE from scratch with Python and the SDCC compiler. SDCC wasn’t a C++ compiler, so to keep compatibility with Arduino language, I used a python preprocessor translator for the C++ instructions for the C language. Since beta 2, users can add their own libraries to the IDE and some of them are licensed by their creator. (Servo, LCD etc…)

Since Beta 1, interrupt can be used in Pinguino, a callback function gives the user the ability to use all the interrupt of the chip.

As Pinguino 8 bit is not distributed, most of the people using this board built it themselves, creating their own version. A lot of different design exists and some commercial board are compatible with the bootloader and the Pinguino IDE.

In 2009, I decided to port Pinguino to the 32 bit Microchip micro-controller. The main problem was to find an open source tool chain for the board. The first design was originally made by Fred Eady from EDTP. Fred designed a breadboard board (Emperor 460) that became the first Pinguino32 board. The Pinguino IDE has been adapted to work with both the lite version of the Microchip compiler and Code sourcery MIPS. After some effort to incorporate the Microchip compiler to the Pinguino tool suite, we decided that the best solution was to build from the GCC source to create a real open source compiler for Microchip 32 bit chip. The current version of the compiler 32 bits of Pinguino is based on GCC 4.5.2 and binutils 2.21. Newlib is used as the main C library.

In 2011, Olimex decided to build a Pinguino board in the Arduino spirit to keep compatibility with existing shields. We asked to Tsvetan Usunov to build this board keeping the idea that Pinguino must be open hardware and open software, so the design should be available even if a 32 bit board is hard to build in a garage.

This board was first presented in Nuremberg for Embedded world this year. 3 months later, Microchip and Digilent started the chipKIT board with a modified version of the Arduino IDE and a 100% compatibility (so they say). chipKIT is quite the same board as we designed, but I think our board is better!

The main differences are:

  • Industrial power supply from 9 to 24Vcc
  • Low noise
  • Ultra low power voltage regulator
  • Li-Ion charger integrated on board
  • micro-sd card reader
  • UEXT connector which give ability to use low cost UEXT modules from OLIMEX or home-made
  • USB OTG with power management

We are currently working on the next release of the IDE. This release integrates OTG support, Zigbee support, CDC support for PIC32. I am working on an Android class to use Pinguino 32 as an ADB host allowing the use of devices since Android 1.6. My next task will be to write the code to use the Pinguino 32 as an Android gadget for versions since 2.3.4. This job should be easy as the board need to be a Host board to work with the ADK.

With chipKIT, the goal of Microchip is probably to replace Atmel micro-controller by Microchip micro-controller. With Pinguino our goal is to give the ability for the user to try out many concepts without extensive knowledge. The zigbee library for example can be used with only 3 instructions ( zigbee.init, zigbee.send, zigbee.read ) and the spirit must be the same for Android ADB, ADK etc… If you already used Microchip libraries, I am sure you will understand what I wanted to explain :-)

We want to incorporate in the IDE that not only the Arduino language uses but everything which is useful, so you are not spending time studying datasheets. For the IDE, we are working on a port for ARM devices with the OLIMEXINO board.

I met Melonee Wise ( Willow garage ) at the last campus party in Valencia and we talked about ROS and how we could embed it in Pinguino32 to drive robots.


Pic32-Pinguino-2

Tsvetan Usunov: Regarding the hardware side, here are the differences:

  1. The chipKIT Uno32 uses a LM1117 regulator, this means up to 15 volts power supply and NO low power as the LM1117 requires 5 mA to operate, we use DCDC which allow up to 30V input power supply and use ultra low power LDOs so the total consumption is around 20-30uA if you put the PIC to sleep
  2. he chipKIT uses FT232 while PIC32 has USB peripherals which is enormously stupid and is just a waste of board space to pay for something which PIC32 already has, Pinguino has USB and USB-OTG i.e. they can also act as a USB host, so it natively supports the Android ADK
  3. Pinguino has a li-po charger built in and switches between external-usb-battery power supply automatically, without using jumpers, this means Pinguino can be used as handheld device (on battery power) when connected to USB or external power. It will charge the battery automatically and start taking power from the USB or Power jack as soon there is power applied.
  4. All components on Pinguino are carefully selected to work on -25+85C. This is industrial temperature grade while Uno32 is 0-70C commercial temp grade
  5. Our PIC32 is with 256K flash, Uno32 is 128K flash
  6. Pinguino has microSD card for data logging , Uno32 does not
  7. Pinguino has a Real Time Clock, the Uno32 does not
  8. Pinguino has separate voltage regulators on the analog and digital parts to make less noise, the Uno32 does not have separate analog vreg

Generally speaking, PIC32-PINGUINO is the most sophisticated Arduino-like derivate on the market, looking at the schematic for the chipKIT Uno32 was designed to be cheap for production, but even there they failed with the FT232 on the board, which shows only that their software guys are no very capable if they cant use the internal USB peripherals instead of putting a useless USB RS232 converter, which only cripples the PIC32 USB power.

When we created PIC32-PINGUINO we had low power, industrial and noise-immune design in mind. If we had to make something like Uno32, we would probably do it cheaper ;) Actually there is PIC32-MICRO on the way which is with low power design, has USB-OTG, SD-CARD and all PIC32 ports available on the breakout headers. It will be about EUR12-15 retail, this new board will not be industrial grade, it will take power only from USB or by external 5-15V regulator and it is designed with breadboarding in mind for home use, we will have first prototypes next week and production in October.

For the software side JP can tell you more but here is what I noticed:

  1. Pinguino uses GCC but JP had to rewrite all PIC related libraries as Microchip didn’t want to open them, at first, we thought that was bad as slowed down the project, but later we discovered that with the GCC we are free from any vendor
  2. Pinguino can and will support the CortexM3 architecture, this means a new board with STM32, NXP, TI etc. Vendors could add (relatively easy) as the Pinguino is more open to new architectures than Arduino

This means HARDWARE platform independence, i.e. you are not attached to specific silicon vendor, you can move your project easily through different hardware platforms using one PINGUINO IDE :)


Jean-Pierre: Regarding hardware, I think Tsvetan enumerated most of the difference between the Pinguino and chipKIT. I just want to add that we have the UEXT connector. This connector is magic, you can use UART2, I2C or SPI to drive an external shield without using space on the top of the board. The Zigbee module is a good example and we have a lot of projects ( bluetooth, wifi module which are currently under software development). I plan to design a special UEXT module that can be cascaded (for example zigbee and bluetooth, the first one using SPI, the second one using UART2).

Regarding power supply, I created some tests (here).

I think USB OTG is the most important thing as we couldn’t have developed an Android interface with a USB/serial converter and a lot of our future projects that are based on USB Host (for example, interfacing cheap webcam, mouse to be used as line follower for robotic, keyboard etc…. )

On the software side, our compiler is GCC based and C++ support is on the way. The C library is based on Newlib and totally open source. chipKIT compiler is based on GCC but the C library is based on the mips library. We can’t hope to have the source of this library, and even if some low level function have to be improved on our compiler, I think Newlib is a best choice for the user. I didn’t read the license agreement for the chipKIT, but I am not sure you can develop commercial application with this “free environment” (as usual with Microchip).

All the libraries used in Pinguino32 were written from scratch except header files for the processor and runtime. Microchip gave the Pinguino project a full license for those files authorizing to reproduce and distribute this files.

Regarding development, as said Tsvetan, our goal is to port Pinguino to other platform and keep a good compatibility within 8 bit system. For example, the Android library will be ported to the 8 bit platform with a USB host chip giving the ability for home-made user interfaces Android with a 18F chip. The goal of Pinguino is to be a set of tools, independent of the platform used.

After Android, I plan to port the FLAC library for PIC32 Pinguino to use it as an audio recorder or player without any shield.


Editor’s note: I assisted Jean-Pierre Mandon and Tsvetan Usunov with the text of this interview language/structure since english is not their native language.

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged

current: @adafruit - previous: MAKE, popular science, hackaday, engadget, fallon, braincraft ... howtoons, 2600...

View more articles by Phillip Torrone
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK