Programming the Intel Galileo: Getting Started with the Arduino - Compatible Development Board 1st Edition - eBook PDF all chapter instant download
Programming the Intel Galileo: Getting Started with the Arduino - Compatible Development Board 1st Edition - eBook PDF all chapter instant download
com
https://ebooksecure.com/download/programming-the-
intel-galileo-getting-started-with-the-arduino-
compatible-development-board-ebook-pdf/
https://ebooksecure.com/download/programming-arduino-getting-started-
with-sketches-tab-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/download/programming-with-stm32-getting-
started-with-the-nucleo-board-and-c-c-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/download/programming-arduino-getting-started-
with-sketches-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/download/programming-the-photon-getting-
started-with-the-internet-of-things-ebook-pdf/
ebooksecure.com
Programming the Photon: Getting Started with the Internet
of Things (Tab) 1st Edition - eBook PDF
https://ebooksecure.com/download/programming-the-photon-getting-
started-with-the-internet-of-things-tab-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/download/programming-the-raspberry-pi-third-
edition-getting-started-with-python-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/download/programming-arduino-next-steps-going-
further-with-sketches-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/download/the-neuroicu-board-review-ebook-pdf/
ebooksecure.com
https://ebooksecure.com/download/arduino-and-raspberry-pi-sensor-
projects-for-the-evil-genius-ebook-pdf/
ebooksecure.com
Copyright © 2017 by McGraw-Hill Education. All rights reserved. Except as permitted under
the United States Copyright Act of 1976, no part of this publication may be reproduced or
distributed in any form or by any means, or stored in a database or retrieval system, without
the prior written permission of the publisher.
ISBN: 978-1-25-964480-1
MHID: 1-25-964480-4.
The material in this eBook also appears in the print version of this title: ISBN: 978-1-25-
964479-5, MHID: 1-25-964479-0.
All trademarks are trademarks of their respective owners. Rather than put a trademark symbol
after every occurrence of a trademarked name, we use names in an editorial fashion only, and
to the benefit of the trademark owner, with no intention of infringement of the trademark.
Where such designations appear in this book, they have been printed with initial caps.
McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums
and sales promotions or for use in corporate training programs. To contact a representative,
please visit the Contact Us page at www.mhprofessional.com.
TERMS OF USE
This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in
and to the work. Use of this work is subject to these terms. Except as permitted under the
Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not
decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based
upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it
without McGraw-Hill Education’s prior consent. You may use the work for your own
noncommercial and personal use; any other use of the work is strictly prohibited. Your right
to use the work may be terminated if you fail to comply with these terms.
THE WORK IS PROVIDED “AS IS.” McGRAW-HILL EDUCATION AND ITS LICENSORS
MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR
COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK,
INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK
VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES
OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill
Education and its licensors do not warrant or guarantee that the functions contained in the
work will meet your requirements or that its operation will be uninterrupted or error free.
Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any
inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting
therefrom. McGraw-Hill Education has no responsibility for the content of any information
accessed through the work. Under no circumstances shall McGraw-Hill Education and/or its
licensors be liable for any indirect, incidental, special, punitive, consequential or similar
damages that result from the use of or inability to use the work, even if any of them has been
advised of the possibility of such damages. This limitation of liability shall apply to any claim
or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
CONTENTS
Preface
2 Getting Connected
Power the Board
Communicating with Your Board
Setting Up the Development Environment
Setting Up the Galileo on Windows
Setting Up the Galileo on OSX
Setting Up the Galileo on Linux
Hello World: Uploading Your First Code
Summary
3 Arduino-Style C Programming
What Is Programming?
Setup and Loop
Variables
Floats
Boolean
Char
Commands
If Statement
For Loops
While Loops
Arrays
Strings
Coding Best Practices
Indentation
Commenting Your Code
Whitespaces
Summary
4 Programming Outputs
Experiment 1: Understanding Digital Outputs
Experiment 2: Flashing an LED
Experiment 3: LCD
Experiment 4: Switching High-Voltage Appliances Using a Relay
Experiment 5: Controlling a Servo Motor
Summary
5 Inputs
Digital Inputs
Experiment 6: Reading a Switch
digitalRead ()
Local and Global Variables
Debouncing
Analog Inputs
Experiment 7: Reading a Potentiometer
analogRead
Const
map()
Variable Resistors
Experiment 8: Voltage Divider Circuits
Experiment 9: Reading Temperature
Summary
7 Internet-Connected Hardware
Experiment 10: Analyzing Sensor Data on the Cloud
Creating a Visual Dashboard
Experiment 11: Creating a Simple Web Server
Experiment 12: Creating a Web Server Using Express
Experiment 13: Reading GPIO Pins on the Web Server
Experiment 14: Controlling Digital Pins Using the Web
Experiment 15: Home Automation
Summary
Index
About the Author
Christopher Rush has a degree in computer science and has spent the last 10 years working
for an electronics distribution company as a product manager for single-board computing. He
is the author of 30 BeagleBone Black Projects for the Evil Genius™ and Programming the
Photon: Getting Started with the Internet of Things, both also published by McGraw-Hill
Education.
PREFACE
This book is the perfect introduction to programming the Intel® Galileo development
board. The Galileo was Intel’s first development board aimed for the maker market and based
around their own Intel Quark SoC. With built-in Internet of Things capabilities, this board
unleashes the powerful hardware expanding its capabilities to Internet-connected hardware.
The Intel Galileo is fully compatible with the Arduino™-style programming language
while also introducing its own libraries and features for connectivity. The board itself comes
with the Arduino footprint for connecting Arduino-compatible hardware such as shields. On
its own the board doesn’t really do much, but once you learn how to connect hardware it is
fully capable of acting as the brain of your projects, controlling things and sending data to
cloud services using the on-board Linux.
This book presents you examples using the popular Grove system by Seeed-Studio, which
allows you to interconnect hardware without the worries and frustration of dealing with
circuits and soldering. Most of the examples use the parts commonly found in the Intel
Galileo Grove Starter Kit.
The purpose of this book is to get you started with creating your own hardware projects
with the Intel Galileo. You do not need any previous experience with circuits or
programming, but general computer skills would be highly advantageous. Programming the
Intel® Galileo is written to give you a wide variety of experience and a basic understanding
of the capabilities of the Intel Galileo board. This book only covers the basics of how to
program the board, the assumption being that you will then expand those skills to create your
own exciting projects.
I would love to hear your thoughts and comments regarding this book, so I encourage you
to contact me through www.rushmakes.com or on Twitter @rushmakes. You can download all
the example code from the McGraw-Hill website www.mhprofessional.com/intelgalileo or
through my GitHub, https://github.com/ChristopherRush/Programming-the-Intel-Galileo.
Christopher Rush
Visit https://ebooksecure.com
now to explore a rich
collection of ebook and enjoy
exciting offers!
1
Introduction to the Intel Galileo
The Intel ® Galileo Gen 2 is a board based on the Intel Quark System-on-Chip (SoC)
X1000, a 32-bit Intel Pentium processor system, operating at speeds up to 400 MHz. This
Quark system is capable of supporting the Yocto 1.4 Linux distribution that opens up further
capabilities to the Intel Galileo board.
The board itself has a built-in Ethernet socket with additional support for Power over
Ethernet (PoE), a Universal Serial Bus (USB) 2.0 host port for adding USB devices, a micro-
SD slot for memory expansion, a mini PCI express (mPCIe) card slot, 20 digital input/output
pins (six PWM outputs with 8/12-bit resolution and six analog inputs with 12-bit resolution), a
micro-USB connection for USB client programming, an ICSP header, a JTag header, and two
reset tactile buttons, all of which you can see in Figure 1.1.
The Intel Galileo Gen 2 board also features an integrated real-time clock (RTC), with an
optional 3-V coin cell battery for operation between turn-on cycles of the board.
The Intel Galileo board also supports the use of Arduino™-compatible shields and can
operate at either 3.3 or 5 V using a jumper pin header on the board. The board has been
specifically designed to be hardware and software pin-compatible, with the Arduino shields
based around the standard Uno R3 Arduino board. The shield headers have digital pins 0 to
13, analog inputs 0 to 5, an ICSP header, and universal asynchronous receiver/transmitter
(UART) port pins that are all in the same location as those on the Arduino Uno R3.
Hardware Summary
The Gen 1 Intel Galileo board does not have an on-board regulator, so the power supply
has to be exactly 5 V. In contrast to this, the Gen 2 board has an on-board regulator, so it
may be powered with any suitable power supply providing between 7 and 15 V direct
current (DC). Some other properties of Gen 2 are as follows:
12 GPIOs fully native for greater speed and improved drive strength.
12-bit PWM for more precise control of servos and smoother response times.
12-V PoE capability.
Serial console UART header is compatible with FTDI USB convertors.
Console UART1 can be redirected to Arduino headers in sketches, which can eliminate
the need for soft-serial.
On-Board Linux
The Yocto 1.4 Linux distribution is installed on the Intel Galileo, and you can easily access the
various Linux functions with the system() call in the Arduino integrated development
environment (IDE) program.
Power
The Intel Galileo Gen 2 can be powered only via an external power supply. The power
adaptor can be connected by plugging a 2.1-mm center-positive plug into the board power
jack. The board can operate on an external supply between 7 and 15 V DC. The power pins for
the Intel board are as follows:
VIN: The input voltage to the Intel board. You can access the voltage supplied via the
power jack through this pin.
5 V: This pin outputs a regulated 5 V from the regulator board.
3.3 V: A 3.3-V supply is generated by the on-board regulator, which also provides the
power supply to the Quark microcontroller.
GND: Ground pins.
IOREF: This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. This can be either 3.3 or 5 V, depending on the IOREF jumper
position.
12-V PoE capability.
Buttons
There are two buttons on the Intel Galileo board with different functions:
Memory
The Quark X1000 microcontroller has 512 kB of embedded SRAM available. The board also
has an additional 256 MB of DDR3 RAM and 8 MB of flash to store the firmware and any
Arduino sketches. The on-board uSD slot supports uSD cards up to 32 G and can be used to
provide the complete Yocto 1.4 Linux image.
Serial: 0 (Rx) and 1 (Tx) pins, which are used to receive and transmit time to live (TTL)
serial data to the Galileo board.
Digital I/O: Digital pins 0 to 13 and analog pins A0 to A5 can all be used as a digital
input or output, using the pinMode(), digitalWrite(), and digitalRead() functions in
the Arduino IDE. All of these pins can operate at both 3.3- and 5-V logic.
PWM: Pins 3, 5, 6, 9, 10, and 11 provide 8/12-bit PWM output with the anlogWrite()
function in the Arduino IDE. The resolution of the PWM signal can easily be changed
with the function analogWriteResolution().
SPI: SPI header or ICSP header on other Arduino boards has three pins that support SPI
communication using the SPI Arduino library.
Analog inputs: Pins A0 to A5 each have analog input that can provide 10/12 bits of
resolution, which also can be changed using the analogReadResolution() function
within the Arduino IDE.
SDA and SCL: These support TWI communication using the wire library.
Communication
The Intel Galileo has a number of hardware features for communicating with a computer,
another Galileo board, Arduino, or any other microcontroller board while also being able to
communicate to devices such as phones and tablets. The board provides two UART
controllers: UART 0 to Galileo headers 0 and 1, and UART 1 to 6-pin 3.3-V USB TTL FTDI
header, optionally directed to Galileo headers 2 and 3.
The native USB port can also act as a USB host for connecting peripheral devices such as
mice, keyboards, or smart phones. The on-board uSD card reader slot is accessible through
the SD library functions. The communication between the Galileo and the SD card is provided
by an integrated SD controller and does not require the use of the SPI interface like on other
Arduino boards.
The on-board Ethernet interface is fully supported using the Ethernet library in the Arduino
IDE. Like other Arduino devices and shields, it does not require the use of the SPI interface
and library.
The Arduino software for the Intel Galileo includes a wire library to simplify the use of
TWI/I2C bus.
The board provides an mPCIe slot that allows the full-size and half-size (with adaptor)
mPCIe modules to be connected to the board and also provides an additional USB host port
via the slot. Any standard mPCIe module can be connected and used to provide applications
such as Wi-Fi or Bluetooth connectivity.
Programming
The Intel Galileo can be programmed with a special version of the Arduino software that has
been written specifically for the Intel board. It is possible to make certain requests to the Linux
Kernel with the system() calls within the IDE. This gives your Arduino sketches access to
powerful utilities like Python, Node js, OpenCV, and all sorts of other applications.
Note The Intel Galileo forgets the sketch after powering down or when the board has
rebooted. It is possible to boot the Galileo from the uSD card so as to restore the sketch
from the same card.
The default image of the Intel Galileo board comes flashed with Linux with libraries in the
user space for integrating the Arduino wiring platform. Arduino on the Intel Galileo runs a
little different from the usual Arduino microcontrollers. Arduino runs in the Linux Kernel
user space and is fully integrated with the IDE, which runs on your computer. The major
benefit of using this method on the Galileo board is that developers can build native
applications, install device drivers, change the Linux Kernel configuration, or even change
the whole Linux distribution altogether.
At this stage you might be wondering why you decided to purchase the Intel Galileo board
as opposed to other Arduino microcontrollers. With the Intel Galileo board, the Linux OS is
responsible for handling all the digital and analog Arduino headers, which means that it
avoids additional bridges that would normally need to be put in place and the Quark CPU does
all the processing rather than a microcontroller. The seamless integration allows the Arduino
APIs and Linux APIs to coherently exist and work together. This also means that in theory you
can run multiple Arduino sketches from the command line in Linux using the SD card to store
the sketches.
Summary
Looking at the hardware specification of the Intel Galileo, you see why it is a powerful board.
This is one of the first maker ’s boards Intel brought to market and they have done a great job
of putting the hardware together. The eradication of the need for a microcontroller is quite
unique and offers something different to the market. In the next chapter, we will look at how
to get connected to your board.
2
Getting Connected
In this chapter, we will look at the many ways in which you can connect your Intel Galileo
board and get started straightaway creating Internet-connected hardware projects. Blinking a
light-emitting diode (LED) is more commonly the first thing you will do when using a new
hardware development board, and it is confirmation that everything has been set up correctly
and is in perfect working order. For those of you who have programmed before, you will
know that your first step is to print “Hello World.” Getting an LED to blink on and off is our
way of saying “Hello World.” At the end of this chapter, you will learn the different hardware
features of the Intel Galileo board and what you will need to work with it, and how to install
the custom Arduino integrated development environment (IDE) program to upload the code
to the board.
Note If you are using an Intel Galileo Gen 1 board, make sure you power the board first
before connecting the USB data cable.
Connect the 5-V-DC power adaptor to the DC socket on the Intel Galileo board as shown in
Figure 2.1. Once plugged in and switched on at the main socket, the power LED should light
up green.
Figure 2.1 Powering up the Intel Galileo board.
The USB client port allows for serial communication to a computer through USB. This
provides a serial connection to the serial monitor or other application on your computer, and
it is also used to upload sketches to the board through the Arduino IDE. This will be our
preferred method of programming the Intel Galileo board and the one that we will show you
later on in this book.
The USB host port should not be confused with the USB client port. The USB host port
allows the Intel Galileo to act as a host for connected devices such as mice, keyboards, smart
phones, and many more devices. You can connect a USB hub to this USB port to expand the
number of ports up to 128 devices, if necessary.
One of the more advanced ways of communicating with your Intel Galileo is to use the on-
board mini PCI express (mPCIe) adaptor, which is a first for an Arduino device. This slot on
the board allows both full-size and half-size (with adaptor) mPCIe modules to be connected
easily to the Intel board and also can provide an additional USB host port. Any standard
mPCIe module can be connected to provide application features such as Wi-Fi, Bluetooth, or
cellular. Initially, the board provides support only for Wi-Fi using the mPCIe modules.
Getting connected to the Internet is important for projects involving the Internet of Things
(IoT); that is why the Intel Galileo board comes with an RJ45 Ethernet adaptor built onto the
board for fully wired networks. This is by far the easiest way to connect to your network and
the Internet, and also the quickest. Unlike standard Arduino shields, the Ethernet adaptor is
fully supported hardware and therefore does not require any SPI interface.
The on-board micro-SD card reader can be accessible through using the SD library, which
we will cover later on in this book. The communication between the Intel Galileo and the SD
card is provided by an integrated SD controller and does not require the use of SPI, unlike
other SD Arduino shields and boards. The native SD interface runs at up to 50 MHz depending
on the class of SD card being used.
Now you should have a good understanding of both the Galileo boards and their hardware
features; let us go ahead and set up the development environment. You will need to perform
the following steps in order to get started:
1. First, connect the Intel Galileo board to your selected DC power supply through the
barrel jack. Later on in the book you will learn how to connect the board through a
standard PP3 battery connector, but for a stable power source and reliable results use a
regulated power supply. When the board is plugged in and powered on at the main
socket, you should see the LEDs on the board light up. Once the board is powered on,
you can connect the USB client port to the USB port on your desktop or laptop
computer as shown in Figure 2.3.
Figure 2.3 Intel Galileo Gen 2 board connected to the USB and power ports.
2. Now that you have your Intel Galileo board powered up, it is important to make sure
that you have the latest firmware installed and up to date. Open up the Internet browser
on your computer and go to the following URL:
Visit https://ebooksecure.com
now to explore a rich
collection of ebook and enjoy
exciting offers!
https://downloadcenter.intel.com/download/24748/. In the left-hand column, find your
current operating system and download the firmware updater. Once it is downloaded,
extract its contents using ZIP software and run the firmware program. Select the
communications port in the drop-down box and click “Update Firmware” as shown in
Figure 2.4. The process may take up to 5 minutes, so this is a good time to make some
coffee before we proceed.
Note Make sure that a stable power supply is used to power the Intel Galileo board.
5. With your Galileo board powered through the DC barrel jack, connect the board from
the client USB port to your computer or laptop, if you have not done so already.
6. Open up the applications folder in the Mac operating system and double click the
Arduino (or Galileo if you have renamed it) to launch it.
Setting Up the Galileo on Linux
This set of instructions has been tested using Ubuntu; other types of Linux distributions may
differ slightly. To set up the Galileo and install the Arduino IDE, follow these simple steps:
Note If you are unsure which system you are running your Linux on, you can type uname
-m from the command line, which will return the system you are using; failing this, you
can just run the 32-bit download as this also works on the 64-bit system.
3. If prompted by your browser, save the .tgz file to your downloads folder directory.
4. Open up a terminal window by clicking its icon or using the shortcut Ctrl+Alt+T.
5. Change the current directory to that of where you downloaded the file to using the CD
command followed by the directory location and then decompress the file using the tar
program:
cd ~/Downloads
tar -xzf IntelArduino-1.6.0-Linux64.tgz -C ~/
6. Change the directory to where the extracted files have decompressed:
cd ~/Arduino-1.6.0
7. Now you can launch the Arduino IDE using the following command:
./Arduino
Troubleshooting Linux
Sometimes you may encounter some difficulties with the above steps. When launching the
application, there is a possibility you may get an error regarding Java not being installed on
the Linux distribution. You can install it with the following command in the terminal window:
sudo apt-get install default-jre
When the application has launched and the serial menu is grayed out, this could mean that
when you launch the Arduino IDE you need to have root privileges to access the serial port.
To do this, you can launch the program with the following command in terminal:
Sudo./Arduino
Hello World: Uploading Your First Code
Now that you have set up the board and installed the Arduino IDE, we need to check that
everything is in working order. The best way to do this is to upload your first program to the
board. At this point we are not interested in how things work or which part of the code does
what; we just want to upload an example to blink an LED on and off to make sure that all the
steps above have worked and the board is working as expected without any complications.
One of the good features about using the Arduino IDE is that it comes with a number of
examples to get started with. Upload a basic example using the following steps:
2. When you click the blink example, a new sketch window will open up with some code
in it. In the tool bar click the upload icon, which should start to compile all the code
and then send to the board.
3. It may take some time to compile and upload to the board; you will also see some text
in the console below the code, and you should see “Transfer complete.”
When you click the upload button, the Arduino IDE compiles the sketch, which means it
turned the code into a set of instructions that the Galileo board can understand. The Arduino
IDE then uploads that program to the board, which is then run. Now when you look at the
board you should see a green LED blinking on and off every other second. This LED is
located next to the USB host socket and next to the power LED, which should be on; see
Figure 2.7.
Figure 2.7 Blinking the on-board LED.
If you encounter any issues, you can always seek help from the Galileo support community
at https://communities.intel.com/community/makers or the Arduino Forum at
http://forum.arduino.cc.
Summary
In this chapter, we have looked at powering up the Intel Galileo board and installing the
Arduino IDE program. We have also uploaded our first sketch program; everything is
working as it should be, which is great. In the next chapter, we will look at the C
programming language that we will be using to program some hardware later on in the book.
Experienced programmers may want to skip the next chapter and head on over to Chapter 4,
where we will look at controlling outputs.
Other documents randomly have
different content
9. Resoglas and Trolitul: United States imports for 43
consumption, 1933-37
10. Synthetic resins classified under paragraph 11: United
States imports for consumption, 1931-37 49
11. Vinyl acetate resins: United States imports for
consumption, 1934-37 49
12. Mowilith resins: United States imports for consumption,
1932-37 49
13. Synthetic resins: United States production and imports,
1934-37 58
14. Comparison of the international trade of the United
States in synthetic resins and in certain raw
materials for resins, 1934-37 58
15. Tariff classification and rates of duty in Tariff act of 1930
upon certain articles made of synthetic resin 61
16. Manufactured articles n. s. p. f. in which synthetic resin
is the chief binding agent: United States imports for
consumption, 1931-37 62
17. Synthetic resins and other plastics: Properties that
affect appearance 66
18. Synthetic resins and other plastics: Molding properties 68
19. Synthetic resins and other plastics: Strength properties 70
20. Synthetic resins and other plastics: Heat properties 71
21. Synthetic resins and other plastics: Electrical properties 72
22. Synthetic resins and other plastics: Specific gravity,
specific volume, and resistance to other
substances 73
23. Synthetic resins: German exports, 1930-37 77
24. Synthetic resins: German exports, by countries, 1934-
37 78
25. Synthetic resins: Production in Great Britain, 1934 and
35 78
26. Synthetic resins: Imports into the United Kingdom,
1930-36 80
27. Synthetic resins: Exports from the United Kingdom, 80
1930-36
28. Synthetic resins: French imports, by types, and
countries, 1931 and 1933-37 81
29. Synthetic resins: French exports, 1931 and 1933-37 82
30. Manufactures of tar-acid resins: Production in Japan,
1929-35 84
31. Prices of gums and resins in the Netherlands, 1936 86
32. Synthetic resins: Netherland imports by countries 1931
and 1933-37 86
33. Crude naphthalene: United States production, 1918-37 88
34. Refined naphthalene: United States production and
sales, 1917-37 89
35. Naphthalene (all grades): World production, by
countries, 1933 and 1935 90
36. Naphthalene: German production, imports, exports,
and apparent consumption, 1928-37 92
37. Naphthalene: Production in Great Britain, in specified
years 92
38. Naphthalene: Exports from the United Kingdom, 1928-
36 93
39. Naphthalene: Belgian production, 1928-35 93
40. Naphthalene: Czechoslovak production, 1928-35 93
41. Crude naphthalene: Polish production, 1928-36 94
42. Naphthalene: Rates of duty upon imports into the
United States, 1916-38 95
43. Crude naphthalene (solidifying at less than 79° C.):
United States imports for consumption, 1919-37 96
44. Refined naphthalene (solidifying at or above 79° C.):
United States imports for consumption, 1919-37 96
45. Crude naphthalene (solidifying under 79° C.): United
States imports for consumption from principal
sources, in specified years 97
46. Crude naphthalene: United States production, imports,
and apparent consumption, in specified years 98
47. Phthalic anhydride: United States production and sales,
1917-37 100
48. Glycerin: United States production, 1919-37 103
49. Glycerin: United States production for sale, 1919-35 104
50. Glycerin: Imports and exports of principal countries,
1931 and 1933-37 105
51. Glycerin: United States imports for consumption, 1919-
20 and 1923-37 106
52. Crude glycerin: United States imports for consumption
from Cuba, 1919-37 107
53. Crude glycerin: United States imports for consumption
from Philippine Islands, 1925-37 107
54. Glycerin: United States exports, 1919-37 108
55. Refined glycerin: United States production, imports,
exports, and apparent consumption, in specified
years 108
56. Tar acids: Commercial and chemical names, boiling
points, and average percent in coal tar 109
57. Tar acids available in coal tar produced and distilled in
1936 110
58. Phenol: Estimated consumption by industries, 1936-37 111
59. Phenol: United States production and sales, in
specified years, 1918-37 112
60. Phenol: Estimated annual production, by countries,
1933-35 113
61. Phenol: Rates of duty upon imports into the United
States, 1916-37 114
62. Phenol: United States imports for consumption, 1910-
37 115
63. All distillates of tar yielding below 190° C., an amount of
tar acids equal to or more than 5 percent: United
States imports for consumption, 1918-37 115
64. Phenol: United States exports, 1918-24 116
65. Phenol: United States exports, 1934-36 116
66. Phenol: United States production, imports, exports, and
apparent consumption, in specified years, 1918-37 117
67. Meta, ortho, and para cresols: United States production 120
and sales, 1934
68. Refined cresylic acid: United States production and
sales, 1929-37 121
69. Cresol: German production, in specified years 122
70. Cresol: German imports and exports in specified years 122
71. Cresol: Production in Czechoslovakia in specified years 123
72. Cresylic acid: British exports, by countries, 1933-37 123
73. The cresols: Rates of duty upon United States imports,
1916-37 124
74. Cresylic acid: Rates of duty upon United States
imports, 1916-37 125
75. Metacresol, orthocresol, and paracresol, 90 percent or
more pure: United States imports for consumption,
1920 and 1923-37 125
76. Metacresol: United States imports for consumption by
principal sources, in specified years 126
77. Orthocresol: United States imports for consumption by
principal sources, in specified years 127
78. Paracresol: United States imports for consumption by
principal sources, in specified years 128
79. Crude cresylic acid: United States imports for
consumption, 1924-37 129
80. Refined cresylic acid: United States imports for
consumption, in specified years, 1919-37 129
81. Crude cresylic acid: United States imports for
consumption by principal sources, in specified
years, 1929-37 130
82. Refined cresylic acid: United States imports for
consumption by principal countries, in specified
years 130
83. The cresols: Comparison of production and imports,
1934 132
84. Formaldehyde: United States production and sales, in
specified years 134
85. Formaldehyde: United States exports to principal 135
markets, in specified years
86. Hexamethylenetetramine: United States production and
sales, 1923 and 1925-37 136
87. Hexamethylenetetramine: United States imports for
consumption, 1923-37 137
88. Urea: United States imports for consumption, 1919-20
and 1923-37 138
89. Urea: United States imports for consumption, by
countries, 1931 and 1933-37 139
90. Thiourea: United States imports through the New York
customs district, 1931-37 140
91. Vinyl acetate, unpolymerized: United States imports for
consumption, 1931-37 141
92. Naphthalene: German imports and exports, by
countries, 1929 and 1932-37 144
93. Crude naphthalene: Belgian imports and exports, 1932-
37 146
94. Refined naphthalene: Belgian imports and exports,
1932-37 147
95. Crude and refined naphthalene: Netherland imports
and exports, by countries, 1929 and 1932-37 148
96. Refined naphthalene: Canadian imports, by countries,
1928-29 and 1932-37 150
97. Naphthalene: Japanese imports by countries, 1928-29
and 1932-36 150
98. Crude glycerin: United States imports for consumption,
by countries, 1929 and 1931-37 151
99. Refined glycerin: United States imports for
consumption, by countries, 1929 and 1931-37 152
ILLUSTRATIONS
Chart. Derivation of certain synthetic resins 6
Preform press making pellets for use in molding 18
Vacuum cleaner parts of tar-acid resin illustrating the intricate
molded shapes possible 19
Radio cabinet and telephone sets of molded tar-acid resin 19
Cast phenolic resins. Standard shapes and small articles 20
fabricated from them
Laminating sheet press 22
Gears made of laminated tar-acid resin 22
Cocktail lounge using tar-acid laminated decorative materials 23
Thermostat case of molded urea resin 33
Scales case of molded urea resin 33
Airplane cockpit enclosures of cast acrylate resin 36
Spectacle lenses molded to optical prescription from acrylate
resin 37
Molded polystyrene resins 42
ACKNOWLEDGMENT
In the preparation of this report, the Commission had the services
of Paul K. Lawrence, Prentice N. Dean, and others of the
Commission’s staff.
1. INTRODUCTION
This survey deals with the several commercially important types of synthetic
resins covered by paragraphs 2, 11, and 28 of the Tariff Act of 1930 and with
the raw materials necessary for their production. It is made under the general
investigatory powers of the Tariff Commission as provided in section 332 of
that act.
The field of synthetic resins is a comparatively new one, most of its
commercial development having occurred within the past 10 years. In 1937
the domestic output was more than 160 million pounds as compared with
slightly more than 10 million pounds in 1927.
The first important patents on synthetic resins were granted about 25 years
ago. These patents covered phenolic resins probably intended for use as
substitutes for certain natural resins. It was soon found that these synthetics
offered possibilities of application vastly greater than the natural materials. At
first progress in their application was slow as is usually the case with new
products. During the World War the shortage of phenol promoted interest in
the use of the other tar acids as raw materials for synthetic resins and
intensive research developed resins from the cresols and higher boiling tar
acids. These resins possessed properties sufficiently different from those
made from phenol to establish them permanently.
In the meantime research on other types of resins was carried on in the
United States and in Europe. The tar-acid resins for molding were the only
commercially important ones on the market until about 1929. About that time,
however, new commercial products began to appear rapidly. Cast phenolic
resins became available as material for novelties of unusual brilliancy and
beauty, the urea resins to meet the requirements for light colored
thermosetting resins in molded articles, and the alkyd resins for use in new
surface coatings which replaced conventional paint materials.
Later there followed a number of thermoplastic materials offering new and
unusual properties. Vinyl resins found application in molded products and in
safety glass. The acrylate resins became the nearest approach to organic
glass yet developed. The polystyrene resins, long in the research stage, made
their commercial appearance in 1937. Resins from petroleum, from furfural,
from adipic acid, and from aniline are on the market. Many others are under
investigation and some of them will undoubtedly become important.
The versatility of synthetic resins is most unusual. In various uses they have
successfully displaced glass, wood, metal, hard rubber, bone, glue, cellulose
plastics, protein plastics, and conventional paint materials. They compete with
glass in shades and reflectors and offer properties which will increase their
use for this purpose. Cases for scales, radios, and clocks, formerly of wood
and metal, are now made of these synthetic resins.
Fundamental definitions.
The scope of this report has been stated to include synthetic resins up to
the point where they are further manufactured, and the raw materials used in
producing them. It was also stated that natural resins and synthetic plastics
other than resins, such as the cellulose compounds and modified rubber
compounds, are excluded. The boundaries of these categories are therefore
important.[1]
The term “resin” was formerly applied exclusively to a group of natural
products, principally of vegetable origin, although at least one important resin,
shellac, is of animal origin.[2] These natural resins are widely used in paints,
varnishes, and lacquers for decorative and protective surface coatings. They
also have extensive use in textile impregnation, adhesives, soap, paper, and
in cold-molded articles. In recent years the natural resins have had to compete
with synthetic products, and each gravitates toward uses which demand the
quality or combination of qualities which it can most completely supply.
A resin may be defined as a semisolid or solid, complex, amorphous
mixture of organic compounds with no definite melting point and no tendency
to crystallize. The resins are characterized by a typical luster and a conchoidal
fracture rather than by definite chemical composition. The term includes
natural resins, such as colophony (ordinary rosin), copal, damar, lac, mastic,
sandarac, shellac, etc., sometimes called gums or gum resins although none
of them are true gums.
A synthetic resin is a resin made by synthesis from nonresinous organic
compounds. The term includes materials ranging from viscous liquids to hard,
infusible, amorphous solids. As a rule synthetic resins possess properties
distinct from those of natural resins. The term “plastics,” sometimes applied to
synthetic resins, also includes many materials which are not resins.
A plastic is anything possessing plasticity; that is, anything which can be
deformed under mechanical stress without losing its coherence or its ability to
keep its new form. According to this definition the term includes such materials
as putty, cement, clay, glass, and metals, as well as certain modified natural or
semisynthetic products, such as cellulose acetate, cellulose nitrate, and
casein more commonly so designated. To speak of the plastics industries is
almost meaningless because of their enormous scope, including as they do
those producing cement, ceramics, confectionery and rubber, as well as those
producing the semisynthetic products mentioned.
The resin industry embraces two main types of materials, thermoplastic and
thermosetting. Thermoplastic materials are those which, although rigid at
normal temperatures, may be deformed and molded under heat and pressure.
Among such materials are the cellulose esters, acrylate resins, vinyl resins,
polystyrene resins, etc. The recent development of injection molding has given
thermoplastics a new significance.
Thermosetting substances are thermoplastic at some stage of their
existence, but become hard, rigid, and permanently infusible upon the
application of the proper heat and pressure. They are then irreversible
whereas the thermoplastics are reversible. Outstanding among the
thermosetting resins are tar-acid resins, urea resins, and the alkyd resins.
Tariff history.
The earliest mention of synthetic resins in the tariff laws of the United States
was the provision in group III of the Emergency Tariff Act of 1916 for a duty of
30 percent ad valorem and 5 cents per pound on synthetic phenolic resins.
None of the non-coal-tar synthetic resins were specifically mentioned prior to
the Tariff Act of 1930.
The Tariff Act of 1922 (par. 28) provided for synthetic phenolic resin and all
resinlike products, solid, semisolid or liquid, prepared from phenol, cresol,
phthalic anhydride, coumarone, indene, or from any other article or material
provided for in paragraph 27 or 1549. The rate of duty was 60 percent ad
valorem based on American selling price or United States value and 7 cents
per pound, with a provision that the ad valorem rate should be reduced to 45
percent 2 years after the passage of the act.
The Tariff Commission made two investigations of synthetic resins under
section 316 of the act of 1922. The first was undertaken April 16, 1926, upon
complaints of several domestic manufacturers, of unfair methods of
competition and unfair acts in the importation and sale of synthetic phenolic
resin, Form C, and articles made wholly or in part therefrom, in infringement of
the patent rights of the Bakelite Corporation. Following the investigation, the
Commission recommended on May 25, 1927, that this material (as described
under United States Patents No. 942,809 and 1,424,738) be excluded from
entry into the United States. Importers appealed from the findings of the
Commission to the Court of Customs Appeals, and the judicial proceedings
were ended on October 13, 1930, by denial of a writ of certiorari for the
Supreme Court of the United States to review the judgment of the Court of
Customs and Patent Appeals. The latter court had held, among other things,
that there was substantial evidence in support of each finding of the
Commission. On November 26, 1930, the Treasury Department issued an
order prohibiting the importation of synthetic phenolic resin, Form C, with
certain exceptions. (T. D. 44411.)
The second investigation by the Tariff Commission was instituted on
December 23, 1927, also under section 316 of the act of 1922. It concerned
unfair methods of competition and unfair acts in the importation into the United
States of laminated products of paper or other materials and insoluble,
infusible condensation products of phenols and formaldehyde. The
Commission recommended to the President that, until March 4, 1929,
inclusive, certain products covered by United States Letters Patent Nos.
1,018,385, 1,019,406, and 1,037,719 be excluded from entry into the United
States. These products were laminated cloth, paper or the like, combined with
insoluble, infusible condensation products of phenols and formaldehyde. The
order of the President prohibiting the importation was contained in T. D. 42801
issued June 11, 1928.
Under the Tariff Act of 1930, practically no changes were made in the
provisions of paragraph 28 that concern coal-tar synthetic resins. Paragraph 2
was extended to include, among other things, the resins (polymers) of certain
organic compounds. The only commercial products covered by this provision
are the vinyl resins. The rate of duty was 30 percent ad valorem on foreign
value and 6 cents per pound. Under the trade agreement with Canada, the
duty on vinyl acetate, polymerized or unpolymerized, and on synthetic resins
made in chief value therefrom was reduced to 15 percent ad valorem and 3
cents per pound (effective Jan. 1, 1936).
The Tariff Act of 1930 contains a provision, in paragraph 11, for synthetic
gums and resins not specially provided for, 4 cents per pound and 30 percent
ad valorem on foreign value.
Sources of information.
The data used in this report were obtained from a great variety of sources.
The several American and British trade journals were freely consulted as were
the various text books on this subject. Much of the information on the
domestic industry was obtained by personal contact with producers and by
correspondence. Field work included visits to most of the domestic producers
of resins and a representative group of fabricators. Information of this type
which was nonconfidential or which could be combined so as not to reveal
individual operations was invaluable. Even where it was such that it could not
be published it became part of the general background.
The data pertaining to the industry in foreign countries were, for the most
part, furnished the Tariff Commission by Department of Commerce
representatives stationed abroad, in response to inquiries by the Commission.
2. SUMMARY
Growth of the industry.
The coal-tar synthetic resin industry in the United States began on
a small scale some years before the World War. The output then was
confined to a few types of tar-acid resins and the applications were
quite limited until 1927, when certain of the basic patents expired.
The output of about 1.5 million pounds in 1921 had increased to
more than 13 million pounds in 1927 and the average unit value of
sales had dropped from 81 cents per pound to 47 cents. Production
continued to increase and the unit value to decrease annually until
1932 when general economic conditions forced a slight curtailment
for 1 year. Since then the annual increase in volume and variety has
been rapid. Production of non-coal-tar synthetic resins was started
on a small scale in 1929 when both urea and vinyl resins entered the
picture. Commercial production of the petroleum resins began in
1936 and of the acrylate resins in 1937. Table 1 shows the
production and sales of coal-tar resins and of non-coal-tar resins,
from 1921 through 1937.
Sales
Year Production Unit
Quantity Value
value
Pounds Pounds
Coal-tar resins:1
1921 1,643,796 1,674,456 $1,352,166 $0.81
1922 5,944,133 6,415,931 4,315,196 .67
1923-26 (2)
1927 13,452,230 13,084,313 6,094,656 .47
1928 20,411,465 20,778,856 7,211,958 .35
1929 33,036,490 30,660,513 10,393,397 .33
1930 30,867,752 24,014,093 7,323,656 .30
1931 34,179,000 29,343,000 7,862,000 .27
1932 29,039,000 23,891,000 5,001,000 .21
1933 41,628,485 31,657,653 7,238,560 .23
1934 56,059,489 43,350,876 10,126,849 .23
1935 90,913,162 65,923,334 12,777,195 .19
1936 117,301,780 86,213,735 17,056,099 .20
1937 141,098,844 108,284,175 20,165,064 .19
Non-coal-tar
resins:
1932 1,898,000 1,787,000 796,000 .45
1933 3,571,717 3,256,411 1,745,102 .54
1934 (2) 3,500,829 1,491,145 .43
1935 (2) (2) (2)
1936 15,611,041 14,766,640 3,591,467 .24
1937 21,005,869 18,891,277 5,680,600 .30
1 Does not include resins from adipic acid, coumarone and indene, hydrocarbon,
polystyrene, succinic acid and sulfonamides. With the exception of coumarone and
indene resins in recent years production of the resins not included was small.
2 Not publishable. Figures would reveal operations of individual producers.
Source: Compiled from annual reports of the Tariff Commission on dyes and
other synthetic organic chemicals in the United States.
International trade.
International trade in the synthetic resins has been small.
Germany has been the principal exporting country. There are a
number of reasons for the negligible movement of these materials in
international trade, the chief of which are active home markets in the
principal producing countries; the existence of patents of a basic
nature which limited trade to the owners and licencees under them;