Getting Started with Duinopeak SIM808 GPRS/GSM+GPS Shield-GPS Positioning

Prepare

Hardware

Required hardware as below:

  • Duinopeak SIM808 GPRS/GSM+GPS+Bluetooth all in one Shield
  • Active GPS Antenna
  • An Peakduino UNO or Arduino UNO
  • USB cable for your Peakduino UNO or Arduino UNO
  • 12V/9V/1.5A Power supply

Software

  • Arduino IDE(recommended version 1.56r2 or above)
  • Libraries for Duinopeak SIM808 Shield (For Duinopeak_Arduino_SIMCom libarary please download here, or on github)

Make sure your got everyting, let’s get started.

First of all we need hook up the hardware as below.

Note:

  • Make sure your external antenna has a good sight to receive the GPS signal, put the antenna outside the window of your room is need for this step.
  • The sketch use Software Serial PIN_TX 2,PIN_RX 3, so make sure you set the Serial jumper in correct postion.
  • Remember to plug the external power supply to your Arduino/Peakduino UNO, if you use Peakduino the VIN led should be light up.

Now setup the programming environment. You need install the Duinopeak_Arduino_SIMCOM libarary files first, then load the test sketch and upload to your Peakduino/Arduino UNO.

Here’s a quick example, which uses the Duinopeak_Arduino_SIMCom library to parse NMEA strings for position, altitude, time, and date.

#include “SIM900.h”
#include <SoftwareSerial.h>
//#include “inetGSM.h”
//#include “sms.h”
//#include “call.h”
#include “gps.h”

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.duinopeak.com
//this code is based on the example of Arduino Labs.

//Simple sketch to start a connection as client.

//InetGSM inet;
//CallGSM call;
//SMSGSM sms;
GPSGSM gps;

char lon[15];
char lat[15];
char alt[15];
char time[20];
char vel[15];
char msg1[5];
char msg2[5];

char stat;
char inSerial[20];
int i = 0;
boolean started = false;
#define BAUDRATE  9600

void setup()
{
//Serial connection.
Serial.begin(BAUDRATE);
Serial.println(“SIM808 Shield GPS testing.”);
//Start configuration of shield with baudrate.
//For http uses is raccomanded to use 4800 or slower.
if (gsm.begin(BAUDRATE)) {
Serial.println(“\nstatus=READY”);
gsm.forceON();    //To ensure that SIM908 is not only in charge mode
started = true;
} else Serial.println(“\nstatus=IDLE”);

if (started) {
if (gps.attachGPS()) //GPS attach
Serial.println(“status=GPSREADY”);
else Serial.println(“status=ERROR”);
stat = gps.getStat();
while (stat != 3 && stat != 2) {
stat = gps.getStat();
if (stat == 1)
Serial.println(“NOT FIXED”);
else if (stat == 0)
Serial.println(“GPS OFF”);
else if (stat == 2)
Serial.println(“2D FIXED”);
else if (stat == 3)
Serial.println(“3D FIXED”);
delay(3000);
}
delay(3000);
//Get data from GPS
gps.getPar(lon, lat, alt, time, vel);
Serial.println(lon);
Serial.println(lat);
Serial.println(alt);
Serial.println(time);
Serial.println(vel);
}
};

void loop()
{
//Read for new byte on serial hardware,
//and write them on NewSoftSerial.
serialhwread();
//Read for new byte on NewSoftSerial.
serialswread();
};

void serialhwread()
{
i = 0;
if (Serial.available() > 0) {
while (Serial.available() > 0) {
inSerial[i] = (Serial.read());
delay(10);
i++;
}

inSerial[i] = ‘\0’;
if (!strcmp(inSerial, “/END”)) {
Serial.println(“_”);
inSerial[0] = 0x1a;
inSerial[1] = ‘\0’;
gsm.SimpleWriteln(inSerial);
}
//Send a saved AT command using serial port.
if (!strcmp(inSerial, “TEST”)) {
//      Serial.println(“BATTERY TEST 1”);
//      gps.getBattInf(msg1,msg2);
//      Serial.println(msg1);
//      Serial.println(msg2);
//      Serial.println(“BATTERY TEST 2”);
//      gps.getBattTVol(msg1);
//      Serial.println(msg1);
stat = gps.getStat();
if (stat == 1)
Serial.println(“NOT FIXED”);
else if (stat == 0)
Serial.println(“GPS OFF”);
else if (stat == 2)
Serial.println(“2D FIXED”);
else if (stat == 3)
Serial.println(“3D FIXED”);
}
//Read last message saved.
if (!strcmp(inSerial, “MSG”)) {
Serial.println(msg1);
} else {
Serial.println(inSerial);
gsm.SimpleWriteln(inSerial);
}
inSerial[0] = ‘\0’;
}
}

void serialswread()
{
gsm.SimpleRead();
}

Open Arduino IDE and load the KZB_0030_SIM808_GPS sketch and upload to your Peakduino/Arduino.

Open the serial monitor when upload done, you will see the SIM808 shield automatic powering on and the status LED(important) light up, as below image.

If not check the pwr jumper location on the shield back side.

Then the program wait for 2D/3D fixing signal, this will taken 20 seconds-5 mins depending on your GPS signal strength. A successful fixed GPS postioning will look something like this:

Getting Started with Duinopeak SIM808 GPRS/GSM+GPS Shield-Call up

Make sure your got everyting ready, if not see Hookup Guide and AT Commands Simple Test, let’s get started.

First of all we need hook up the hardware as below.

Hook up the shield. Insert the SIM card and make sure the power pin solder jumper closed.

Remember to plug the external power supply to your Arduino/Peakduino UNO, if you use Peakduino the VIN led should be light up.

Now open the Arduino IDE and load the GPRS Call Up Test sketch and upload to your Peakduino/Arduino UNO.

/*
GPRS Call Up Test

This sketch is used to test seeeduino GPRS_Shield’s callUp function.
to make it work, you should insert SIM card to Duinopeak GPRS
and replace the phoneNumber,enjoy it!

create on 2015/12/5, version: 0.1
by kevin liu(lryain.master@gmail.com)
*/

#include “SIM900.h”
#include <SoftwareSerial.h>
//We don’t need the http functions. So we can disable the next line.
//#include “inetGSM.h”
#include “sms.h”
#include “call.h”

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.duinopeak.com
//this code is based on the example of Arduino Labs.

//Simple sketch to call up

//We have to create the classes for SMSs and calls.
CallGSM call;
SMSGSM sms;

char number[20];
char phoneNumber[20] = “10086”;
byte stat = 0;
int value = 0;
int pin = 1;
char value_str[5];
#define BAUDRATE  9600

void setup()
{
//Serial connection.
Serial.begin(BAUDRATE);
Serial.println(“SIM808 Shield Call up testing.”);
//Start configuration of shield with baudrate.
//For http uses is raccomanded to use 4800 or slower.
if (gsm.begin(BAUDRATE))
Serial.println(“\nstatus=READY”);
else Serial.println(“\nstatus=IDLE”);
delay(3000);
Serial.println(“start to call …”);
call.Call(phoneNumber);
delay(30000);
Serial.println(“end up the call …”);

}

void loop() {
//nothing to do
}

O

Open the serial monitor when upload done, you will see the SIM808 shield automatic powering on and the status LED(important) light up, as below image.

 

Now, you should hear the ring up tones.

Getting Started with Duinopeak SIM808 GPRS/GSM+GPS Shield-Hookup and Simple Test

As we know, this Duinopeak SIM808 Shield design for use as an extension board of Peakduino/Arduino UNO, and it requires a external power supply.

Prepare

Hardware

Required hardware as below:

  • Duinopeak SIM808 GPRS/GSM+GPS+Bluetooth all in one Shield
  • GSM/GPRS Antenna
  • SIM Card converter set
  • Your A Smart phone headset(with microphone)
  • Your SIM card
  • An Peakduino UNO or Arduino UNO
  • USB cable for your Peakduino UNO or Arduino UNO
  • 12V/9V/1.5A Power supply

Software

  • Arduino IDE(recommended version 1.56r2 or above)
  • Libraries for Duinopeak SIM808 Shield (For GPRS libarary please download here, or on github)

Make sure your got everyting, let’s get started.

First of all we need hook up the hardware as below.

Hook up the shield. Insert the SIM card and make sure the power pin solder jumper closed.

Remember to plug the external power supply to your Arduino/Peakduino UNO, if you use Peakduino the VIN led should be light up.

Now setup the programming environment. You need install the libarary files first, then load the test sketch and upload to your Peakduino/Arduino UNO.

#include “SIM900.h”
#include <SoftwareSerial.h>
//#include “inetGSM.h”
//#include “sms.h”
//#include “call.h”

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.duinopeak.com
//this code is based on the example of Arduino Labs.

//Simple sketch to communicate with SIM900 through AT commands.

//InetGSM inet;
//CallGSM call;
//SMSGSM sms;

int numdata;
char inSerial[40];
int i=0;

void setup()
{
//Serial connection.
Serial.begin(9600);
Serial.println(“GSM Shield testing.”);
//Start configuration of shield with baudrate.
//For http uses is raccomanded to use 4800 or slower.
if (gsm.begin(9600))
Serial.println(“\nstatus=READY”);
else Serial.println(“\nstatus=IDLE”);
};

void loop()
{
//Read for new byte on serial hardware,
//and write them on NewSoftSerial.
serialhwread();
//Read for new byte on NewSoftSerial.
serialswread();
};

void serialhwread()
{
i=0;
if (Serial.available() > 0) {
while (Serial.available() > 0) {
inSerial[i]=(Serial.read());
delay(10);
i++;
}

inSerial[i]=’\0′;
if(!strcmp(inSerial,”/END”)) {
Serial.println(“_”);
inSerial[0]=0x1a;
inSerial[1]=’\0′;
gsm.SimpleWriteln(inSerial);
}
//Send a saved AT command using serial port.
if(!strcmp(inSerial,”TEST”)) {
Serial.println(“SIGNAL QUALITY”);
gsm.SimpleWriteln(“AT+CSQ”);
} else {
Serial.println(inSerial);
gsm.SimpleWriteln(inSerial);
}
inSerial[0]=’\0′;
}
}

void serialswread()
{
gsm.SimpleRead();
}

Open the serial monitor when upload done, you will see the SIM808 shield automatic powering on and the status LED(important) light up, as below image.

Try a command “AT” it returns “OK” as narmal response.

 

 

Now, this simple test can verify evething is OK and ready to use, congratulations!

Getting Started with Duinopeak SIM808 GPRS/GSM+GPS Shield-Overview

Introduction

SIM808 shield is a GSM and GPS plus Bluetooth three-in-one function shield for Peakduino/Arduino. It is based on the latest GSM/GPS/Bluetooth(optional) module SIM808 from SIMCOM, supports GSM/GPRS Quad-Band network and combines GPS technology for satellite navigation.It has high GPS receive sensitivity with 22 tracking and 66 acquisition receiver channels. Besides, it also supports A-GPS that available for indoor localization and bluetooth 3.0.

The GPRS/GSM Shield is configured and controlled via its UART using simple AT commands. Based on the SIM900 module from SIMCOM, it is like a cell phone. Besides the communications features, the GPRS/GSM Shield has 6 GPIOs, 2 PWMs and an ADC.

The module is controlled by AT command via UART and supports 3.3V and 5V logical level.

Feature

  • Quad-band 850/900/1800/1900MHz
  • GPRS multi-slot class12 connectivity: max. 85.6kbps(down-load/up-load)
  • GPRS mobile station class B
  • Controlled by AT Command (3GPP TS 27.007, 27.005 and SIMCOM enhanced AT Commands)
  • Supports Real Time Clock
  • Supply voltage range 5V ~ 12V
  • Integrated GPS/CNSS and supports A-GPS
  • Support Bluetooth 3.0
  • Onboard 3.0V to 5.0V logic level converter
  • Low power consumption, 1mA in sleep mode
  • Supports GPS NMEA protocol
  • Standard Micro SIM Card
  • Onboard USB port for firmware upgrade only(not for serial debug)

For details please refer to the SIM808 SPEC_V1507 doc.

Applications

  • M2M (Machine 2 Machine) Applicatoions – To transfer control data using SMS or GPRS between two machines located at two different factories.
  • Remote control of appliances – Send SMS while you are at your office to turn on or off your washing machine at home.
  • Remote Weather station or a Wireless Sensor Network – Make it with Peakduino and create a sensor node capable of transferring sensor data (like from a weather station – temperature, humidity etc.) to a web server (like pachube.com).
  • Vehicle Tracking System – Install GPRS+GSM+GPS Shield in your car and publish your location live on the internet. Can be used as a automotive burglar alarm.

Cautions

  • Make sure your SIM card is unlocked.
  • The product is provided as is without an insulating enclosure. Please observe ESD precautions specially in dry (low humidity) weather.
  • The factory default setting for the GPRS Shield UART is 19200 bps 8-N-1. (Can be changed using AT commands).

Here’s a quick overview of each pin mapping:

Pin Label In/Out Board Connection Pin Description
GND In Ground SIM808 module ground (0V reference)
SIM_RST In Arduino D9 Reset the SIM808 module
SIM_DTR In Arduino D8 Data terminal ready
SIM_PWR In Arduino D7 Enable or Disable the SIM module
RX In Arduino D0-D4 Serial data input
TX Out Arduino D0-D4 Serial data output
SIM_RI Out Arduino D6 Ring indicator – Output Low when incoming calls
VRTC In The button battery Backup power – keeps the RTC running (2.7-3.3V input range)
VBAT In On-board 4.0V regulator 4.0V power supply input

Layout:

Resources

Use Peakduino’s FTDI Basic interface

The FTDI Basic interface of Peakduino

The FTDI Basic interface of Peakduino can be used standalone as a USB to TTL conventer.

Upload or update the sketch of Arduino promini/pro etc.

Communicate with other MCU via Serial port.

FTDI switch

When switch to MCU on, Peakduino juse act as a ordinary Arduino compatible mainboard.

When switch to MCU off, isolate from the MCU and  FTDI, now you can use the FTDI standalone.

When isolate from the MCU and  FTDI, the FTDI chip still connect with the shield’s hardware serial pins, which we could use the USB to debug the shield freely without any efforts,  in previously case, this could be done by upload an empty program to free the hardware serial of the MCU or remove the MCU chip from the board.

Use Peakduino as a standalone FTDI Basic to upload the program for other Arduino.

  • Upload program for Arduino promini.
  • Upload program for Lilypad.

Use Peakduino as a standalone FTDI Basic to communicate with other device.

  • Communicate with a GPS module.
  • Communicate with a Blutooth module.

Use Peakduino as a USB to Serial conventer to debug a shield when switch to MCU off

  • Debug the GPS shield via Peakduino.
  • Debug the SIM808 GPRS shield via Peakduino, use AT command set.
  • Debug the BLE shield via Peakduino, use AT command set.

Peakduino UNO Geek Plus Quick Started Guide

Introduction

The Peakduino UNO is an Arduino-compatible development platform that enables quick-and-easy project prototyping. It can interact with real-world sensors, control motors, display information, and perform near-instantaneous calculations. It enables anyone to create unique, nifty projects.

The Peakduino UNO also serves as an excellent physical computing learning platform. We’ve designed the Peakduino UNO to be as easy-to-use as possible. It can be used to help teach both programming and electronics concurrently – two skills that are becoming significantly important in today’s high-tech world.

This tutorial aims to familiarize you with the Peakduino UNO and help you get started using it. To begin we’ll go over the ins and outs of the board, then we’ll explain how to install in, and finally we’ll go over how to use it with the Arduino software.

Requirements

Of course, to follow along with this guide, you’ll need a Peakduino UNO . You’ll also need a mini-B-to-A USB cable. The USB interface serves two purposes: it powers the RedBoard and allows you to upload programs to it.

You’ll also need a computer – Mac, PC, or Linux will do – with the Arduino IDE installed on it. You can download Arduino from their website. They’ve got installation instructions there, but we’ll also go over installation in this tutorial.

Meet the RedBoard

Below is an annotated image, and a quick overview, of all of the important stuff on the Peakduino UNO:

Annotated image of RedBoard

Supplying Power

The Peakduino UNO can be powered via either the USB or barrel jack connectors. If you choose to power it via USB, the other end of the USB cable can be connected to either a computer or a (5V regulated) USB wall charger.

The power jack accepts a center-positive barrel connector with an outer diameter of 5.5mm and inner diameter of 2.1mm. Our 12V adapters are good choices if you’re looking to power the Peakduino UNO this way. Any wall adapter connected to this jack should supply a DC voltage between 7 and 15V.

USB is usually the easiest way to power the board, especially when you’re programming it, because the USB interface is required for uploading code too. Why would you use the barrel jack? Usually it’s because you need more power. A USB port is usually only allowed to supply 500mA, if you need more than that a wall adapter may be your only choice.

USB and barrel jack wires connected

It is acceptable to connect both a barrel jack and a USB connector at the same time. The Peakduino UNO has power-control circuitry to automatically select the best power source.

Download/Install Arduino

Before you plug the Peakduino UNO into your computer, you’ll need to install Arduino first.

Installing Arduino

To begin, head over to Arduino’s download page and grab the most recent, stable release of Arduino. Make sure you grab the version that matches your operating system.

Download Arduino!

The installation procedure is fairly straightforward, but it varies by OS. Here are some tips to help you along. Checkout the sparkfun’s Installing Arduino tutorial if you get really stuck.

Windows Install Tips

The Windows version of Arduino is offered in two options: an installer or a zip file. The installer is the easier of the two options, just download that, and run the executable file to begin installation. If you’re prompted to install a driver during installation, select “Don’t Install” (the Peakduino UNO doesn’t use the same drivers). Don’t forget which directory it installs to (defaults to “Program Files/Arduino”).

Windows Installer

Windows install steps. Click the image to get a bigger view.

If, instead, you choose to download the zip file version of Arduino, you’ll need to extract the files yourself. Don’t forget which folder you extract the files into! We’ll need to reference that directory when we install drivers.

Mac Install Tips

The Mac download of Arduino is only offered in a zip file version. After the download is finished, simply double-click the .zip file to unzip it.

Mac Install Screenshot

Following that, you’ll need to copy the Arduino application into your applications folder to complete installation.

Linux Install Tips

As you Linux users are no doubt aware, there are many flavors of Linux out there, each with unique installation routines. Check out the sparkfun’s Linux section of the Installing Arduino tutorial for some helpful links for an assortment of Linux distributions.

For Ubuntu and Debian users, installing Arduino should be as easy as running a little “apt-get” magic, with a command like:


COPY CODE

sudo apt-get update && sudo apt-get install arduino arduino-core

And other Linux distros aren’t too dissimilar from that.


With Arduino downloaded and installed, the next step is to plug the Peakduino UNO in and install some drivers! Pretty soon you’ll be blinking LEDs, reading buttons, and doing some physical computing!

Install FTDI Drivers

Once you have downloaded and installed Arduino, it’s time to connect the Peakduino UNO ​to your computer! Before you can use the board, though, you’ll need to install drivers.

Windows Driver Installation

After initially plugging your Peakduino UNO in, your computer will try to search for a compatible driver. It may actually succeed! The FTDI drivers are pretty common, so Windows Update may know a little something about them. If the drivers do automatically install, you should see a little bubble notification saying so:

Driver Success!

If your computer failed to find drivers, we’ll have to install them manually. Check out Sparkfun’s Windows FTDI Driver Install guide for driver install instructions.

Mac Driver Installation

If you’re lucky, the FTDI drivers should automatically install on Mac OS X, otherwise you’ll have to manually install the drivers. Check out the Mac FTDI Driver Installation guide for help installing the drivers.

Mac Driver installation

In short, the process involves heading over to the FTDI driver website, and downloading the most up-to-date VCP drivers. Then you’ll simply run the “FTDIUSBSerialDriver_v2_2_18.dmg” file you downloaded, and follow the installation prompts.

Linux Driver Installation

Linux is actually pretty good about automatically installing the drivers. If you have any trouble, check out our Linux FTDI Driver guide.


Now it’s time to breathe easy! You’ll only have to run through this driver installation process once, the first time you connect the board to your computer. Now it’s time to upload a sketch!

Uploading The LED Wing Test Sketch

Now it’s finally time to open up the Arduino software. You’ll be presented with a window that looks a little something like this:

Lets upload a Blink sketch to make sure our new Peakduino UNO setup is totally functional. Go up to the File menu in Arduino, then copy and paste the code below.

/*
LED Wing Test
Turns on all LEDs on for 100 millisecond, then off for 100 millisecond, Sequentially and repeatedly.

More information about your Peakduino UNO, check
the documentation at http://duinopeak.com/content/getting-know-about-peakduino-uno-geek-plus-…

This example code is in the public domain.

modified 8 May 2016
by Kevin Liu
*/

void setup() {
// put your setup code here, to run once:
for (int i = 0; i < A7; i++) {
pinMode(i, OUTPUT);
digitalWrite(i, LOW);
}
}

void loop() {
for (int i = 0; i < A7; i++)
{
digitalWrite(i, HIGH);
delay(100);
}

for (int i = 0; i < A7; i++)
{
digitalWrite(i, LOW);
delay(100);
}
}

Before we can send the code over to the Peakduino UNO , there are a couple adjustments we need to make.

Select a Board

This step is required to tell the Arduino IDE which of the many Arduino boards we have. Go up to the Tools menu. Then hover over Board and make sure Arduino Uno is selected.

Board Selection

Select a Serial Port

Next up we need to tell the Arduino IDE which of our computer’s serial ports the Peakduino UNO is connected to. For this, again go up to Tools, then hover over Serial Port and select your Peakduino UNO’s COM port.

Port Selection

If you’ve got more than one port, and you’re not sure which of the serial ports is your RedBoard, unplug it for a moment and check the menu to see which one disappears.

Upload!

With all of those settings adjusted, you’re finally ready to upload some code! Click the Upload button (the right-pointing arrow) and allow the IDE some time to compile and upload your code. It should take around 10-20 seconds for the process to complete. When the code has uploaded, you should see something like this in your console window:

alt text

When everything done, you will see the effect below:

Something Wrong?

Uh oh! If you didn’t get a “Done Uploading” message, and instead got an error, there are a few things we can double-check.

If you got an avrdude: stk500_getsync(): not in sync: resp=0x00 error in your console window.

Upload error

Either your serial port or board may be incorrectly set. Again, make sure Arduino Uno is the board selection (under the “Tools > Board” menu). The serial port is usually the more common culprit here. Is the Serial Port correctly set (under the “Tools > Serial Port” menu)? Did the drivers successfully install? To double check your RedBoard’s serial port, look at the menu when the board is plugged in, then unplug it and look for the missing port. If none of the ports are missing, you may need to go back to driver installation.

Peakduino UNO Geek Plus VS Arduino UNO R3

What Is The Peakduino UNO Geek Plus?

Arduino is one of the most popular physical computing platforms available today. It’s an amazing tool for both experienced and budding electronics enthusiasts. It’s part hardware, part software, and part community; all of which come together to create a well-supported, solidly-designed electronics platform.

The best part: the entire Arduino project – both hardware and software – is open-source. The schematics, hardware design files, and source code are all freely available for viewing and modification. Released under a Creative Commons Share Alike license, anyone is free to riff on the hardware design and produce their own version. That’s what we’ve done with the Peakduino UNO Geek Plus. It still looks and acts just like an Arduino Uno, but is slightly modified to make the board better-suited to our purposes.

Arduino Uno PTH on the left, RedBoard on the right

An Arduino Uno PTH (left, blue) next to a Peakduino UNO Geek Plus.

In this tutorial, we’ll take an in-depth look at the major similarities and differences between the two boards. Stated briefly, here’s the key info:

Key Differences

  • USB connector: Arduino Uno uses a USB type B connector, while the Peakduino UNO Geek Plus uses the smaller mini-B connector. Each connector requires a different USB cable.
  • USB-to-Serial Transciever: The Arduino Uno uses an ATmega16U2 loaded with custom firmware to convert between USB and serial. The Peakduino UNO Geek Plus uses the FTDI FT231X. This difference is only really prevalent wheninstalling drivers because each requires a different driver file.
  • Digital and Analog Pins: The Arduino Uno has 14 digital I/Os and 6 analog I/Os, the Peakduino UNO Geek Plus has 14 digital I/Os and 8 analog I/Os.
  • SMD vs PTH: The Arduino Uno comes in two versions through-hole (PTH) or surface-mount (SMD). The Peakduino UNO Geek Plus is only offered in SMD. The Peakduino UNO Geek Plus takes this a step further, by making every component surface-mount. No sharp edges on the bottom of the board!
  • Color: It won’t have any real influence on the operation of the Arduino, but it certainly affects the board’s swag-factor. Cool blue or White, Duinopeak Golden balack?
  • Price: Because we are the Opensource Hardware Factory manufacture the board in-house, here in Shenzhen, China, we can offer competitive price.

Key Similarities

  • ATmega328: The main microprocessor on both boards is the popular ATmega328. This is they key-est of similarities.
  • IDE interaction/Board Selection Type: The ATmega328 on both boards is loaded with the same bootloader (Optiboot). That means, when you program the board, you can still select Arduino Uno under the Tools > Boardmenu.
  • Outline and Connector Layout: Both boards are the same shape, and the female header connectors are all placed in the same locations. All shields and enclosures will be compatible with both boards.
  • Operating Voltage: Both boards operate at 5V, and have an on-board 3.3V regulator. They can be powered either through USB or with a 7-15V barrel jack power supply.

Compare and Contrast

The Peakduino UNO Geek Plus, Arduino Uno SMD, and Arduino Uno PTH have a lot in common. They really share more similarities than they do differences. Here’s a tabled overview:

Peakduino UNO Geek Plus Arduino Uno SMD Arduino Uno PTH
Top View
Bottom View
Dimensions 2.7 x 2.5″ (68.61 x 63.72mm) 2.7 x 2.1″ (68.58 x 53.34mm) 2.7 x 2.1″ (68.58 x 53.34mm)
Color Golden Black Blue/White Blue/White
USB Connector Mini-B Type B Type B
USB-to-Serial Chip FTDI FT231X ATmega16U2 w/ custom firmware ATmega16U2 w/ custom firmware
Drivers (Windows) FTDI VCP Drivers Arduino USB Driver Arduino USB Driver
Windows Compatibility 8 (32 & 64-bit), 7 (32 & 64-bit), Vista (32 & 64-bit), XP (32 & 64-bit), 2000, 98 * 8 (32 & 64-bit), 7 (32 & 64-bit), Vista (32 & 64-bit), XP (32 & 64-bit) 8 (32 & 64-bit), 7 (32 & 64-bit), Vista (32 & 64-bit), XP (32 & 64-bit)
Mac Compatibility OS X, OS 9, OS 8 OS X OS X
Linux Compatibility Yes Yes Yes
Main Microprocessor ATmega328 ATmega328 ATmega328
MCU PTH or SMD SMD SMD PTH
VIN Range (Recommended) 7-12V 7-12V 7-12V
Operating Voltage 5V 5V 5V
Digital I/O Pins 14 14 14
Analog Inputs 8 6 6
Arduino Board Selection Arduino Uno Arduino Uno Arduino Uno
Retail Price $22.95 $29.95 $24.95

Next we’ll look in-depth at the most significant differences between the Peakduino UNO Geek Plus and Arduino Uno.

USB Connectors and Drivers

Both the Arduino Uno and Peakduino UNO Geek Plus interface with computers via USB, but the connectors are different. The Arduino Uno uses the larger, square-ish type-B connector. Type-B USB connectors are often found on USB printers, or other devices where size is not an issue.

Arduino Uno connector and cable

The Peakduino UNO Geek Plus uses a mini-B USB connector. Mini-B connectors are lower-profile USB connectors, which might be found on cameras, MP3 players, and cell phones.

Redboard connector and cable

Obviously, you’ll need a cable that matches the connector on the development board. The Arduino Uno would require an A to B cable, while a Peakduino UNO Geek Plus would require an A to mini-B cable (or you could cover both bases with a Cerberus cable).

USB-to-Serial Converter

The second difference between the boards is how they manage to convert USB coming from your computer into a serial protocol the Arduino can understand. Arduino serial communication is critical for uploading sketches and sending/receiving information via the Serial Monitor. The Uno uses an Atmel processor – the ATmega16U2 – loaded with custom firmware, to convert USB to (and from) serial.

Before the Arduino Uno was released previous versions of the development platfurm used a dedicated USB-to-serial transceiver: FTDI’s FT232RL. Call us nostalgic, but we really preferred the robust reliability of the FT232RL over the ATmega16U2 solution. So when we designed our own version of the Arduino platform, we decided to revert back to the FT232RL for our USB-to-serial needs.

About 99% of the time these ICs should be of no concern to your everyday Arduino hacking. Once drivers are installed, each should transparently convert data between your Arduino and computer. The difference between the two USB/Serial transceivers is most apparent when you’re first connecting the board to your computer.

USB Driver Installation

For Windows users in particular, each board requires a unique driver to be installed before being usable. There are plenty of installation tutorials for both chips (our guide on installing FTDI drivers and Arduino’s guide for theirs).

The most up-to-date version of the FTDI drivers can be downloaded directly from the chip manufacturer’s webpagewhere they host installation guides of their own. There should be no shortage of driver-installation support out there.

Once the board is connected to your computer and the drivers are installed, the two chips should be almost invisible. For the most part, we don’t really care how the Arduino communicates with our computer, just that it does.

SMD vs PTH

The Arduino Uno comes in two forms: surface mount (SMD) and through-hole (PTH). Both versions are very similar, the only significant difference comes from what package the ATmega328 processor comes in. SMD components are generally easier to mass assemble (though harder to manually assemble), so the SMD version of the Uno is either cheaper, more readily available, or both.

Arduino Uno SMD vs PTH

An SMD Arduino Uno (left) and the regular PTH version. The ATmega328 processors are highlighted on each board, they look different, but are actually (pretty much) the same thing.

The Peakduino UNO Geek Plus is only offered in one form: surface mount. The design actually takes the SMD choice even further by making every component SMD (the Arduino UNO SMD still has PTH connectors, for example), but the main focus of the SMD vs. PTH debate centers around the package of the microcontroller (as highlighted in the image above).

SMD Pros and Cons

Pros: No Snags, Lower Cost

The absence of PTH components on the Peakduino UNO Geek Plus means a nice, smooth surface on the bottom of the board – there’s no danger of being pricked by pointy solder joints.

On top of that, eliminating exposed joints on the bottom of the board also protects the components from accidental shorts. As any hobbyist with a messy desk could attest, stray wire clippings and other metals strewn across workbenches are a common source of accidental short circuitsStandoffs or Arduino holders will help prevent against this if you’re using an Arduino board.

Con: Hard to Swap µCs

Microcontrollers (µCs) – in this case the ATmega328 – are usually the most expensive component in a design. A µC failure* is hard to overcome, and it usually requires either replacing the component or just recycling the board.

The nice thing about the PTH Arduino is the ATmega328 is socketed, so if it blows up* replacing the chip is as easy as prying it out and sticking in a new one.

The ability to easily remove the ATmega328 has other advantages as well. For example, if you’re looking to build a project using the IC, you can prototype in the development board and eventually transfer the microcontroller out of the Uno to a custom board.

*: Microcontroller failure on all of these boards is a big “if”. The ATmega328 is a very resilient microcontroller. You really have to try to fry the IC, or even just a single I/O pin on it. A failure in the power circuitry (voltage regulators specifically) is much more likely.

Getting started with Peakduino UNO – Geek Plus Editon

Are you tired of mediocre Arduino mainboards,  it’s poor quality and you do not know what is going on.  Our 6 years experience as a result, we need a better one far more than the exist Arduino boards, simple, beautiful, stable, practical, functional, it is best we can easily understand the state of its work. Yes, such ideal Arduino mainboard has been born – Peakduino UNO – Geek Plus Editon.

The Peakduino UNO Geek Plus can be programmed over a USB Mini-B cable using the Arduino IDE: Just plug in the board, select “Arduino UNO” from the board menu and you’re ready to upload code. Peakduino UNO Geek Plus has all of the hardware peripherals you know and love: 14 Digital I/O pins with 6 PWM pins, 8 Analog Inputs, UART, SPI and external interrupts. We’ve also broken out the SDA, SCL and IOREF pins that showed up on the UNO R3, so the Peakduino UNO Geek Plus will be compatible with future shields. This version adds an SMD ISP header for use with shields.

Feature

  • ATmega328 microcontroller with Optiboot (UNO) Bootloader
  • USB Programming Facilitated by the Ubiquitous FTDI FT231X
  • Input voltage – 7-15V
  • 0-5V outputs with 3.3V compatible inputs
  • 14 Digital I/O Pins (6 PWM outputs)
  • 8 Analog Inputs
  • ISP Header
  • 32k Flash Memory
  • 16MHz Clock Speed
  • All SMD Construction
  • R3 Shield Compatible
  • Black Golden PCB!
  • Full LED Wing with Switch
  • 3 Power LED Indicator(3.3v, 5v, Vin)
  • Extra Analog PINs A6 A7
  • FTDI Basic Interface
  • MCU bypass for debugging the Shield
  • Custom accepted for batch

With these features, you can test your mainboard without extra shields or equipments, just upload the test sketch and see it done! It’s also can be used as a FTDI basic breakout, for flash or upload the programming other boards, like Arduino promini, Arduino pro, etc. To the FTDI the most practical function is that it can be used for debugging the shields via FTDI when bypass the MCU’s hardware Serial port.

 

PIN Mapping

Layout Overview

Resources

For more information on the Duinopeak Peakduino UNO Geek Plus, check out our product page. We’ve also got:

  • Pin Mapping – An image of the pinmapping.
  • Layout– An image of the layout.
  • Schematics – An image of the schematic.
  • FTDI Drivers – Though they’re included with Arduino installs, this is where you’ll find the most up-to-date FTDI VCP drivers.
  • for Windows* 2016-06-23 2.12.18 2.12.18

We believe that it will be your best Arduino Mainboard.  If you’re already in love with it, or if you want to improve it, make it more practical and you want to batch customize your own version, we are very welcome! Please contact at lryain.master@gmail.com.

Become our distributor

Thank you for your interest in becoming our distributor. We know that spreading your knowledge and enthusiasm are vital to the growth and success of our company. Because of this, we want you to share in our success!

To be our distributor, please send the cooperation offer to lryain.master@gmail.com

Getting started with Duinopeak GPS Logger Shield-µSD Card GPS Logging for NEO-M8N

Now that we have good GPS data, the final step is to start logging it to a µSD card.

Like the last example, this sketch uses TinyGPSplus-for-Neo-M8N, it also uses Arduino’s built-in SD library.

The code is hosted on codebender and embedded below. If the embed below doesn’t load for you, check out the example code in our GitHub repository.

/******************************************************************************
This example uses SoftwareSerial to communicate with the GPS module on
pins 8 and 9, then communicates over SPI to log that data to a uSD card.

It uses the TinyGPSplus-for-Neo-M8N library to parse the NMEA strings sent by the GPS module,
and prints interesting GPS information – comma separated – to a newly created
file on the SD card.

Resources:
TinyGPSplus-for-Neo-M8N Library  – github.com/SensorsIot/TinyGPSplus-for-Neo-M8N
SD Library (Built-in)
SoftwareSerial Library (Built-in)

Development/hardware environment specifics:
Arduino IDE 1.6.7
GPS Logger Shield v2.0 – Make sure the UART jumper is set to SW-UART
Peakduino UNO, Arduino Uno, RedBoard, Pro, Mega, etc.
******************************************************************************/

#include <SPI.h>
#include <SD.h>
#include <TinyGPS++.h>

#define ARDUINO_USD_CS 8 // uSD card CS pin (pin 8 on Duinopeak GPS Logger Shield)

/////////////////////////
// Log File Defintions //
/////////////////////////
// Keep in mind, the SD library has max file name lengths of 8.3 – 8 char prefix,
// and a 3 char suffix.
// Our log files are called “gpslogXX.csv, so “gpslog99.csv” is our max file.
#define LOG_FILE_PREFIX “gpslog” // Name of the log file.
#define MAX_LOG_FILES 100 // Number of log files that can be made
#define LOG_FILE_SUFFIX “csv” // Suffix of the log file
char logFileName[13]; // Char string to store the log file name
// Data to be logged:
#define LOG_COLUMN_COUNT 8
char * log_col_names[LOG_COLUMN_COUNT] = {
“longitude”, “latitude”, “altitude”, “speed”, “course”, “date”, “time”, “satellites”
}; // log_col_names is printed at the top of the file.

//////////////////////
// Log Rate Control //
//////////////////////
#define LOG_RATE 5000 // Log every 5 seconds
unsigned long lastLog = 0; // Global var to keep of last time we logged

/////////////////////////
// TinyGPS Definitions //
/////////////////////////
TinyGPSPlus tinyGPS; // tinyGPSPlus object to be used throughout
#define GPS_BAUD 9600 // GPS module’s default baud rate

/////////////////////////////////
// GPS Serial Port Definitions //
/////////////////////////////////
// If you’re using an Arduino Uno, Mega, RedBoard, or any board that uses the
// 0/1 UART for programming/Serial monitor-ing, use SoftwareSerial:
#include <SoftwareSerial.h>
#define ARDUINO_GPS_RX 3 // GPS TX, Arduino RX pin
#define ARDUINO_GPS_TX 2 // GPS RX, Arduino TX pin
SoftwareSerial ssGPS(ARDUINO_GPS_TX, ARDUINO_GPS_RX); // Create a SoftwareSerial

// Set gpsPort to either ssGPS if using SoftwareSerial or Serial1 if using an
// Arduino with a dedicated hardware serial port
#define gpsPort ssGPS  // Alternatively, use Serial1 on the Leonardo

// Define the serial monitor port. On the Uno, Mega, and Leonardo this is ‘Serial’
//  on other boards this may be ‘SerialUSB’
#define SerialMonitor Serial

void setup()
{
SerialMonitor.begin(9600);
gpsPort.begin(GPS_BAUD);

SerialMonitor.println(“Setting up SD card.”);
// see if the card is present and can be initialized:
if (!SD.begin(ARDUINO_USD_CS))
{
SerialMonitor.println(“Error initializing SD card.”);
}
updateFileName(); // Each time we start, create a new file, increment the number
printHeader(); // Print a header at the top of the new file
}

void loop()
{
if ((lastLog + LOG_RATE) <= millis())
{ // If it’s been LOG_RATE milliseconds since the last log:
if (tinyGPS.location.isUpdated()) // If the GPS data is vaild
{
if (logGPSData()) // Log the GPS data
{
SerialMonitor.println(“GPS logged.”); // Print a debug message
lastLog = millis(); // Update the lastLog variable
}
else // If we failed to log GPS
{ // Print an error, don’t update lastLog
SerialMonitor.println(“Failed to log new GPS data.”);
}
}
else // If GPS data isn’t valid
{
// Print a debug message. Maybe we don’t have enough satellites yet.
SerialMonitor.print(“No GPS data. Sats: “);
SerialMonitor.println(tinyGPS.satellites.value());
}
}

// If we’re not logging, continue to “feed” the tinyGPS object:
while (gpsPort.available())
tinyGPS.encode(gpsPort.read());
}

byte logGPSData()
{
File logFile = SD.open(logFileName, FILE_WRITE); // Open the log file

if (logFile)
{ // Print longitude, latitude, altitude (in feet), speed (in mph), course
// in (degrees), date, time, and number of satellites.
logFile.print(tinyGPS.location.lng(), 6);
logFile.print(‘,’);
logFile.print(tinyGPS.location.lat(), 6);
logFile.print(‘,’);
logFile.print(tinyGPS.altitude.feet(), 1);
logFile.print(‘,’);
logFile.print(tinyGPS.speed.mph(), 1);
logFile.print(‘,’);
logFile.print(tinyGPS.course.deg(), 1);
logFile.print(‘,’);
logFile.print(tinyGPS.date.value());
logFile.print(‘,’);
logFile.print(tinyGPS.time.value());
logFile.print(‘,’);
logFile.print(tinyGPS.satellites.value());
logFile.println();
logFile.close();

return 1; // Return success
}

return 0; // If we failed to open the file, return fail
}

// printHeader() – prints our eight column names to the top of our log file
void printHeader()
{
File logFile = SD.open(logFileName, FILE_WRITE); // Open the log file

if (logFile) // If the log file opened, print our column names to the file
{
int i = 0;
for (; i < LOG_COLUMN_COUNT; i++)
{
logFile.print(log_col_names[i]);
if (i < LOG_COLUMN_COUNT – 1) // If it’s anything but the last column
logFile.print(‘,’); // print a comma
else // If it’s the last column
logFile.println(); // print a new line
}
logFile.close(); // close the file
}
}

// updateFileName() – Looks through the log files already present on a card,
// and creates a new file with an incremented file index.
void updateFileName()
{
int i = 0;
for (; i < MAX_LOG_FILES; i++)
{
memset(logFileName, 0, strlen(logFileName)); // Clear logFileName string
// Set logFileName to “gpslogXX.csv”:
sprintf(logFileName, “%s%d.%s”, LOG_FILE_PREFIX, i, LOG_FILE_SUFFIX);
if (!SD.exists(logFileName)) // If a file doesn’t exist
{
break; // Break out of this loop. We found our index
}
else // Otherwise:
{
SerialMonitor.print(logFileName);
SerialMonitor.println(” exists”); // Print a debug statement
}
}
SerialMonitor.print(“File name: “);
SerialMonitor.println(logFileName); // Debug print the file name
}

You may need to edit the gpsPort and SerialMonitor objects, toward the top of the code to get the example to work correctly on your Arduino. The sketch defaults to using SoftwareSerial for the GPS, which should work for most boards – as long as the UART-Select jumper is set as SW-UART(D2-D7).

Before uploading the code, plug a µSD card into your GPS Logger Shield. Push it in gently until you hear a click. Then release, and let it latch into place.

Once that’s in place, upload and run! You can check the serial monitor for debugging data, or just trust that the logger is logging.

Once the GPS module gets a good fix, the Arduino will start logging longitude, latitude, altitude, speed, course, date, time, and the number of visible satellites into a CSV file. The data is set to log once every five seconds, but that’s easily tunable if you need more or less data.

Open the serial monitor you will see outputs as below:

After letting it log for a bit, turn off your Arduino, load the SD card into your computer, and check for a GPSLOG###.CSVfile. Open it up in a spreadsheet program, or just use a text editor to see what your Arduino logged.