The pcDuino

Introduction

I only bought a pcDuino because it was on sale at Maplin for £11.99 and the board looked interesting as a combination of an 'Arduino' and a computer running Linux. In the Maplin branded box there was the board itself and a paper manual and for the price I can't complain that nothing else was included. The board isn't an Arduino as such, more closer to Single Board Computers such as the Raspberry Pi, but the pcDuino emulates an Arduino Uno and has the advantage that there are 6 analog inputs, something the Rasp is lacking. Now for more detailed information about the pcDuino but take note that this page will only be dealing with V2.

You can email me at james.boshikoopa@gmail.com

To return to the main interfacing page please click here.

The pcDuino spec. is as follows:

Allwinner A10 SoC @ 1GHz intergrating an ARMv7 cortex A8 single core processor with Mali 400 GPU.

1GB DDR3 @ 800MHz.

4GB built-in flash (older version had only 2GB). The printed manual clearly has the 2GB Tipp-Ex out and corrected as 4GB.

MicroSDHC SD card up to 32GB.

On-board full-size HDMI port (manual claims up to 720p 60Hz but 1080p 60Hz is the actual limit).

Full-size host and micro USB OTG (2.0); OTG can be used to connect to a PC for debugging and upgrading as well as powering the board.

Micro USB for 5V power (recommended to use at least a 2A power supply).

Ethernet 10/100M RJ45.

802.11b/g/n wi-fi implemented as a module attached to the board.

ADC/UART/GPIO/PWM/12C/SPI/debug port header. Support for 1 lot of I2C but fixed at 200KHz. Only one SPI device supported: SPI0. UART is /dev/ttyS1 in Linux.

Debugging port (3V3, 8-N-1, no handshaking, 115200, all flow controls off. In Linux debug port is /dev/ttyS0).

On-board switches: reset, upgrade, back, home, menu (the last 3 are 'Android buttons').

Arduino Uno compatible headers but at 3.3V logic level so most likely you will need some form of converter rather than just being able to plug a shield in. The headers are labelled on the underside. On-board 2K2 pull-up resistors. 6 PWM capable pins on the Arduino-like headers.

On-board LED's: LED 1: power on. LED 2: USB? LED 3: RX. LED 4: TX. LED 5: CLK (GPIO13).

Can upgrade the O/S by putting in an SD card with a Linux image on it and booting the board which will upgrade the O/S and takes at least 2 minutes.

The pcDuino runs Linux Ubuntu 'Lubuntu V12.07' and is easy to use; plug in a keyboard and mouse into a hub and the hub into one of the USB OTG ports, connect a TV or monitor to the HDMI port and apply power to the 5V USB socket (I tested with a Logitech wireless keyboard and mouse). The version of Linux that comes with the pcDuino is pre-loaded with various apps: disk utility, file mananger, Chromium, Arduino IDE 1.5.3 beta pcDuino), Scratch, XBMC, etc. The special version of the Arduino IDE is what you use to program the Arduino side of the pcDuino and it's a big advantage to be able to do the Arduino programming on the board itself as opposed to, say the Intel Galileo in which you need to use a PC (although with the pcDuino large sketches may takes some while to build). The included Arduino IDE has pcDuino specific example sketches as well as others and other boards can be selected so it should be possible to program an attached Arduino. After 'uploading' a sketch it's run in a terminal window titled with the sketch name but as a .cpp file; a .cpp file is created in /home/ubuntu/Arduino for the project. You need to close the terminal window to return to the IDE at which point the IDE will say it has 'Done uploading'. It's important to remember that the sketch will only run while the launched window stays open.

While most of the examples should be familiar there are some subtle differences such as the Blink example which turns digital pin 13 on and off repeatedly but on the pcDunio it will flash LED5 'CLK'.

It is possible to run a program at boot and stop the GUI from loading on boot; for more information please see:

https://learn.sparkfun.com/tutorials/pcduino-hookup-guide

The linked site also has information about changing the O/S. The photos on the site linked above appear to be for pcDuino V1 which has a second USB type A connector instead of the Wi-fi module.

The pcDuino takes around 59 second to get to the desktop with all of the icons displayed and 7 seconds from power on before any text appears on the screen (screen resolution defaults to 640x480 before switching to 1920x1080).

Fortunately a schematic is available for the board with links as follows (second link is in PDF format):

http://learn.linksprite.com/hardware-knowledge/pcduino-circuit-diagram/

https://s3.amazonaws.com/pcduino/Hardware/PC+Duino_V01-20130128.pdf

Advanced use

The pcDuino has a debug port which is accessible on a 3 pin header marked 'P3' located above the menu, home and back buttons. This is the pinout:

1 RX (square pad - look on board underside)

2 GND

3 TX

Note: the included booklet labels the square pad as pin 3 and wrongly states that TX has the square pad.

To interface with debug port you will need to use a USB to UART converter such as the FT232RL module; make sure it's set to 3.3V. Connect TX of the pcDuino to RX of the UART module and RX of the pcDuino to TX of the UART module and pcDuino GND to UART module GND. With the use of software such as Putty you will be able to view system messages while the pcDuino boots and once booted you will be dropped into the bash interface where you can issue Linux commands. On a related note I was puzzled that the pcDuino's Arduino IDE doesn't appear to have a working serial monitor and even one of the examples used printf to output text to the window that opens when you 'upload' a sketch. You can however simulate the IDE's serial monitor by making use of the RX and TX pins (on J11) which, like with a real Arduino, are located on D0 and D1 respectively. You will need to connect the pcDuino RX to TX of a USB to UART converter (in 3.3V mode) and TX of pcDuino to RX of the UART module (don't forget also to connect the GND connections). Use Putty or something similar and you'll be able to view text send by the Serial object from an Arduino sketch as well as be able to send text to a sketch.

Tips and tricks

Make sure your TV/monitor is connected to the pcDuino and turned on before booting the board otherwise you may not getting any video output.

If the pcDuino randomly blanks the screen try using a higher current rated power supply.

A sketch 'uploaded' on a pcDuino only runs for as long as you keep the program window open.

All content of this and related pages is copyright (c) James S. 2018