Download PDF Parts List View on YouTube Download Code

What looks like an Arduino Mega 2560, has 76 I/O ports, WiFi and Bluetooth, 16-bit Analog to Digital Converters, USB A and USB-C ports, and a Real Time Clock?  It’s the Arduino GIGA, the most powerful Arduino yet!

Today we will take a look at the GIGA and at some of its more interesting features.

Introduction

With features like those already mentioned, plus many more, plus a dual-core microcontroller with mind-boggling specifications, the GIGA only resembles the Mega 2560 in form factor. It inherits its features from the Arduino Pro line of IoT controllers, specifically the Portenta series of microcontroller modules.

The GIGA has many features we haven’t seen in hobbyist-level microcontroller boards, and it will find use within IoT devices, process control applications, and robotics.  Its two superfast cores can even run MicroPython and C++ independently, allowing for some very advanced designs.

Let’s explore this amazing new microcontroller in depth.

Arduino GIGA R1 WiFi

The Arduino GIGA R1 WiFi board is packaged in a small cardboard box. The board includes a small antenna and a plastic carrier that conveniently holds the board during experimentation.

Arduino GIGA Specifications

Here is an outline of the specifications of the Arduino GIGA:

Microcontroller

The Arduino GIGA is based on a STM32H747XIH6 Microcontroller. This microcontroller has two cores:

  • 32-bit Arm® Cortex®-M7 core with double-precision FPU and L1 cache up to 480 MHz
  • 32-bit Arm® 32-bit Cortex®-M4 core with FPU up to 240 MHz

The STM32H747XIH6 includes a full set of DSP instructions and a Memory Protection Unit (MPU).

WiFi & Bluetooth

The Arduino GIGA uses a Murata® 1DX Wi-Fi/Bluetooth Module with the following capabilities:

  • Wi-Fi 802.11b/g/n 65 Mbps
  • Bluetooth Low Energy (version 5.X via Cordio stack, version 4.2 via Arduino Stack)

Memory

There are three memory storage devices on the Arduino GIGA, with a total of five memory areas.

  • STM32H747XI – 2MB Flash & 1 MB RAM
  • AT25SF128A-MHB-T – 16 MB NOR Flash
  • AS4C4M16SA – 8 MB SDRAM

Input/Output

The Arduino GIGA has a wide variety of I/O pins:

  • Digital I/O Pins: 76
  • Analog input pins: 12
  • PWM pins: 12
  • Analog output pins (DAC0/DAC1): 2
  • USB Host: USB 2.0 A
  • USB Peripheral: USB-C®
  • Logic level: 3.3V
  • VRTC: To power the RTC while the board is off
  • OFF pin: To turn off the board

Communication

There are also many communications options on the GIGA:

  • 4x UART
  • 3x I2C
  • 2x SPI
  • 1x CAN (an external transceiver is required)

USB Ports

There are two USB connectors on the Arduino GIGA:

  • USB-A – USB Host for keyboards, mice, and USB mass storage devices.
  • USB-C – Programming and HID (emulates mice and keyboards)

Arduino GIGA Pinout

The GIGA has the same form factors as the Arduino Mega 256o and Arduino Due. The pinouts are compatible with its predecessors, but it should be noted that the GIGA is a 3.3-volt logic device and is not 5-volt tolerant.


There are also additional; connectors for a DSI display and an Arducam camera. These connectors can also be used as additional I/O ports.

Getting Started with the GIGA

Before you can start using the GIGA, you’ll need to set up your Arduino IDE. 

I’m illustrating the process with the current IDE 2.0, but you may also use the older IDE 1.8 if you wish.

Installing the Boards Manager

The first step you’ll need to take is installing the Arduino GIGA Boards Manager. You can do that by opening the Boards Manager in your Arduino IDE and searching for “GIGA”.

If you don’t get any results, you will need to update your Boards Manager. You likely received a message about there being updates for it when you opened the IDE.

Once you find the GIGA board manager, click on it to install it.  

When the installation is finished, the Arduino GIGA should now be one of the boards available to you. Select it and look at the example code that Arduino provides with the board manager when it is installed.

Resolving the LINUX DFU Problem

I struggled to get the IDE to work correctly with the GIGA under Ubuntu Linux. I soon found out that all of my Linux computers experienced the same error, a complaint about the licensing level of the DFU (Device Firmware Update) connection.

A thread on the Arduino Forum discusses this problem and offers solutions. While I did not experience the problem using Microsoft Windows, apparently, some people have. If you do, then you should check out the thread, as you may find your answer there.

Under Linux, the solution seems to be to add a “rules” file and then update the system to use it.   Here is how I fixed the issue on my computers:

    • Close Arduino IDE
    • Open File Manager
    • Navigate to /etc/udev/rules.d
    • Open a Terminal
    • Type the following:
  • sudo nano 60-arduino-renesas.rules
    • Nano editor opens
    • Enter the following text:
  • SUBSYSTEMS==”usb”, ATTRS{idVendor}==”2341″, MODE:=”0666″
    • Press Ctrl-W to Write the file
    • Press Ctrl-X to Exit
    • You can do a ls to list the files to confirm that the new file exists.
    • At the command line, type the following two lines (press enter after each line):
  • udevadm trigger
  • udevadm control –reload-rules
  • Restart the Arduino IDE
  • Try to upload a sketch – it should work now!

I have created a “Cheat Sheet” that you can use to simplify inputting the commands. I illustrated its use in the video that accompanies this article. It’s in the ZIP file with the code.

Using the Real-Time Clock

The Arduino GIGA has a built-in Real Time Clock (RTC), along with provisions for a backup battery.   We can use the clock in our Arduino code.

Battery Backup

There are three solder pads on the side of the Arduino GIGA board that are labeled as follows:

  • OFF – Connecting this pin to ground will power down the GIGA. You can use this to implement a power switch.
  • GND – A ground connection.
  • VRTC – Connection for a backup battery for the clock.

You can connect a battery between the GND and VRTC pins, observing polarity, of course.  

While Arduino does not specify which battery to use, they refer to it as a “coin cell”. I tried with a 3-volt battery, and it worked correctly.

Manual RTC Code

The first example we will try is a simple sketch that sets the clock manually. You can use it as the basis for a more advanced program.  This code was provided by Arduino.

It’s a pretty basic sketch and does not require additional libraries.

The function RTCset creates a data structure that sets the time.  It is set for December 18, 2022 at 14:52.  You can, of course, change this, but we are just using this as a test.

RTCset is called in the Setup, so every time the GIGA is reset, the clock will revert to its original date and time.

Load the sketch to your GIGA and run it. You will see the time displayed every second on the serial monitor.

You can test out the operation of the clock and backup battery using this sketch, which I did in the video accompanying this article. Here is how you go about doing this:

  • Connect a battery to the VRTC and GND terminals. You will probably have to solder on a connector (I used Dupont pins) to do this.
  • Run the sketch and observe the output.
  • Remove and replace the USB-C cable. This will power off and on the board and reset the time.
  • Now edit the sketch and remove the call to RTCset. This will prevent the sketch from setting the time.  You should see the time increment from its last reading instead of reverting to the original time.
  • Pull the USB-C, wait a few seconds, and put it back in. The clock reading should persist, as the battery backed up the RTC.
  • Try the above without the battery. The clock will revert to January 1, 1970, which is the first date in Linux time.

This is a great way to become familiar with the clock’s operation.

WiFi RTC Code

Another way to set the time on the RTC is to get a time reference from an Internet Time Server.  These servers use Network Time Protocol (NTP) and can be referenced to the cesium atomic clock that sets the world’s standard time.

Here is a sketch to do just that. It has a second file, arduino_secrets.h, which you will use to enter your network credentials. 

This is another Arduino-provided sketch, although there were some errors at the beginning (it didn’t reference the arduino_secrets.h file correctly). The version below has been corrected:

This is actually an adaptation of a much older sketch that can be used with most microcontrollers. Two of its principal functions are the sendNTPpacket function, which formats data to send to the NTP server, and the parseNtpPacket function, which formats the received data.

Running the sketch should produce an output on the serial monitor that shows the correct time.

Working with USB-A

The feature of the new Arduino GIGI R1 WiFi board that I am the most intrigued by has to be the USB-A connector.  This connector allows you to use a USB mouse, keyboard, or mass-storage device with your Arduino, opening up many possible applications.

Let’s perform a few experiments with the USB-A connector.

USB Drive with FAT32

You will need a USB mass storage device, such as a USB thumb drive, to perform these experiments.

The drive must be formatted with FAT32; this is important, as the Arduino library we are using can only read FAT32-formatted devices.

Verbatim has a utility that can be used to format FAT32 devices over 32GB. Unfortunately, this is only available for Microsoft Windows.

It also would be a good idea to name your mass storage device “usb”. The sketches we are using are provided by Arduino and, unfortunately, they hard-coded the USB device name instead of making it a variable.  If you don’t want to edit the files, you can just name your device “usb”; it’s much easier!

Read USB Directory

The first sketch we will check out is one provided by Arduino that reads the directory from a FAT32-formatted USB mass storage device.

The sketch Arduino provided initially worked, but it broke when they updated the library and also renamed it. The following sketch, and the others in this section, reflect that name change.

You’ll need to install the Arduino_USBHostMbed5 library from your Library Manager.

The sketch is pretty straightforward. One thing to note is that to use the USB-A port you must set I/O port PA_15 HIGH first.

The opendir function, called on line 52, is what actually reads the directory.  All the code runs in the Setup, and there is nothing in the Loop.

Load the sketch to your Arduino GIGA and observe the serial monitor – you can reset the board if you miss it. You should see the contents of your USB mass storage device.

Write File to USB Device

The second sketch, also provided by Arduino, will write a text file to the USB mass storage device.

As with the previous sketch, this corrected version uses the proper name for the Arduino_USBHostMbed5 library. 

The sketch is pretty simple, and it starts by enabling the USB-A port using the same method as the previous sketch used.

On line 54, a fopen function is called to open the file after mounting it.  The “w+” in the parameters indicates that the file is open for writing or appending – if “numbers.txt” doesn’t exist, it will be created; if it already exists, it will be appended to.

The sketch simply places the numbers 0 through 9 in the new text file.

Load the sketch and run it. You can observe the writing process on the serial monitor.

After the sketch has finished running, you can power down the Arduino GIGA and insert the USB storage device into a computer to read its contents. You should see a text file named “numbers.txt,” and the file should; contain the numbers 0 through 9.

This is a very useful technique for building devices such as dataloggers.

Read File from USB Device

The final USB sketch we will look at reads the contents of a text file and displays the results on a serial monitor. Once again, it’s an Arduino-supplied sketch that has been corrected to reflect the correct library name.

You’ll notice that this sketch is quite similar to the previous one, as file writing and reading operations are nearly identical.  

On line 53, we use the fopen function with the “r+” parameter, indicating that we are opening the file for reading.

The sketch is looking for a file named “Arduino.txt”, remember, that name is case-sensitive. You should create a small text file with that name and load it onto the USB mass storage device.

Load it up and observe your serial monitor. You should be seeing the contents of your text file.

Using the 16-bit ADCs

The Analog to Digital Converters, or ADCs, on the Arduino GIGA are 16-bit units with a very high sampling rate. 

Although they can be addressed with the traditional analogRead command, you will get far greater performance using another method, the Arduino_AdvancedAnalog library.  You’ll need to install this library using your Library Manager.

ADC Hookup

In order to demonstrate the operation of the ADC, we will need an analog voltage source that we can measure.  Remember, this cannot exceed 3.3 volts; higher voltages will damage your Arduino GIGA!

A simple way of doing this is to hook up a potentiometer, as shown here:

Click on the wiring diagram to open a larger image

Any linear taper potentiometer with a resistance of 10k or higher will work here.

ADC Sketch

Here is a sketch, the only one today NOT from Arduino, that will illustrate the use of the  Arduino_AdvancedAnalog library.

After including the library, we define the pin we use on the ADC, pin A0. We then create an object called adc1 to represent the A-to-D converter.

We also define a variable to hold time readings (in milliseconds); we will use this to limit the amount of data we send to the serial monitor to avoid flooding it.

In the Setup, we start the serial monitor and the ADC. Note the parameters used for the ADC. You can experiment with the settings to see how it affects the output.

The function adc_print_buf creates a data buffer with the current reading and then prints its contents to the serial monitor.  We call this function every millisecond within the Loop.

Load the sketch to your Arduino GIGA and observe the output on the serial monitor as you rotate the potentiometer. This is a 16-bit Analog to Digital Converter, so the range will be from 0 to 65,635.

Using the DACs & Build a Waveform Generator

The final Arduino GIGA experiment is to use the 12-bit DAC to create a waveform generator. This is a really neat application, and the code has been provided, once again, by Arduino.

The waveform generator is capable of the following waveforms:

  • Triangle
  • Square
  • Sine
  • Sawtooth

You can also adjust the frequency of the waveform, albeit in some very discreet steps. The waveform generator is controlled using your computer’s keyboard, with a menu displayed on the serial monitor.

This code requires the same Arduino_AdvancedAnalog library used in the ADC sketch, so if you haven’t installed it yet, you will need to do that. Just search for it in your Library Manager.

Scope Hookup

In order to monitor the output of this project, you will need to hook up a scope to the DAC0 output on the Arduino GIGA, as illustrated here:

Click on the wiring diagram to open a larger image

You could monitor the output with an audio amplifier if you don’t have access to an oscilloscope. You should be able to distinguish the different types of waveforms if you have a good ear.

Waveform Generator Code

Here is the sketch Arduino has provided for the waveform generator. Note that in the sketch they refer to “DAC1”, but this is an error, the sketch actually points to the A12 pin, which is DAC0.

The sketch works by building up one cycle of the selected wave. This consists of 256 samples.

When a user selects a waveform using the keyboard, the sketch runs through a switch statement to determine which key was pressed.  If it was a waveform selection, then a cycle of the desired waveform is created using mathematics.

If a frequency change is selected, the sketch determines if it is an increase or decrease. It then doubles or halves the frequency from a range of 1 kHz to 64 kHz. 

Load up the sketch and use the menu displayed on the serial monitor to select a waveform type.  Observe the output on the oscilloscope.

While this is just a demo sketch, it could be reworked to create a useful piece of test equipment.

Conclusion

The Arduino GIGA is certainly a powerful board with great potential. It has obvious robotics and process control uses and is compatible with the Arduino IoT Cloud.

As it retains the same form factor as the Mega and Due boards, it can be used to upgrade designs based on those products, keeping in mind that this is a 3.3-volt logic device and won’t necessarily work with existing shields.

Right now (March 2023), the software and libraries for this board are in their infancy. I tried several more examples Arduino provided, but they wouldn’t work, probably because the libraries involved are still in the early development stage.

I was particularly disappointed that I couldn’t get the camera to work, despite buying the exact camera they used in their examples.

But these are the growing pains of a new board, and it is indeed an excellent piece of hardware. Once the software catches up, I predict the Arduino GIGA will become a valuable addition to anyone’s workshop and the heart of many amazing projects.

Parts List

Here are some components that you might need to complete the experiments in this article. Please note that some of these links may be affiliate links, and the DroneBot Workshop may receive a commission on your purchases. This does not increase the cost to you and is a method of supporting this ad-free website.

Arduino GIGA R1 WiFi – Arduino Store

 

Resources

Code & Cheat Sheet – All the code used here, plus the “cheat sheet” for the Linux fix

Arduino GIGA R1 WiFi – The entry point for Arduino’s GIGA documentation.

Verbatim FAT32 Formatter – A Windows utility for formatting devices over 32GB with FAT32.

 

Arduino GIGA R1 WiFi
Summary
Arduino GIGA R1 WiFi
Article Name
Arduino GIGA R1 WiFi
Description
The new Arduino GIGA is the most powerful Arduino yet. With a whopping 76 I/O ports and a USB-A host connector, this board will find a home in robotics, IoT, and process control applications.
Author
Publisher Name
DroneBot Workshop
Publisher Logo
Tagged on:
Subscribe
Notify of

5 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Michel
1 year ago

Hi Bill,

In the “Resolving the LINUX DFU Problem” section the command:

udevadm control –reload-rules

should be read,

udevadm control ––reload-rules

instead. Am I right?

Have a nice day.

Michel

Last edited 1 year ago by Michel
Michel
1 year ago

Hi Bill,

You are absolutely right! Thank you. I really appreciate what you do for us. You do an amazing work to help us understand all those technologies. Thumbs up!

Michel

Rodolfo
7 months ago

Hi Bill, I appreciated your video introduction, thanks for the remarkable presentation (as usual). At last I managed to have a camera working (original OV7675), and report here my findings for anyone interested. Arduino side: 1) Giga HW I/F seems OK 2) Arducam_dvp library and its example seems to be effective 3) OV7675 only seems to work in GRAYSCALE mode, no way for me to decode a color image Viewer side: 4) no way for me to get the Processing example code working 5) the library example (“extras” folder) provides a Python code that eventually worked 6) 320×240 requires odd… Read more »

Mukesh Patel
21 days ago

Excellent resource for Arduino Giga. Can you add topic of how to increase PWM frequency in R1 Giga ?

Thanks