# data[].attributes.body
Record experimental results, compare to theoretical ones

# data[].attributes.headline
Info on programming and connection of accelerometer to Arduino circuit board.

# data[].attributes.subject
Info on programming and connection of accelerometer to Arduino circuit board.

# data[].attributes.body
-The link below has some helpful information on both the programming of an accelerometer and the process of physically connecting it to the arduino board. (Though we may not use the same accelerometer shown in the article).

# data[].attributes.attachment_link.readable_text
This article explains how Arduino works from an electronic design perspective.

Most articles explain the software of Arduinos. However, understanding hardware design helps you to make the next step in the Arduino journey. A good grasp of the electronic design of your Arduino hardware will help you learn how to embed an Arduino in the design of a final product, including what to keep and what to omit from your original design.

Components Overview

The PCB design of the Arduino UNO uses SMD (Surface Mount Device) components. I entered the SMD world years ago when I dug into Arduino PCB design while I was a part of a team redesigning a DIY clone for Arduino UNO.

Integrated circuits use standardized packages, and there are families for packages.

The dimensions of many SMD resistors, capacitors, and LEDs are indicated by package codes such as the following:

SMD package code for discrete components such as resistors, capacitors, and inductors. Image courtesy of Wikimedia.

Most packages are generic and can be used for different parts with different functionality. The SOT-223 package, for example, can contain a transistor or a regulator.

​

In the table below, you can see a list of some components in the Arduino UNO with their respective package:

Arduino UNO System Overview

Before we can understand the UNO's hardware, we must have a general overview of the system first.

After your code is compiled using Arduino IDE, it should be uploaded to the main microcontroller of the Arduino UNO using a USB connection. Because the main microcontroller doesn't have a USB transceiver, you need a bridge to convert signals between the serial interface (UART interface) of the microcontroller and the host USB signals.

The bridge in the latest revision is the ATmega16U2, which has a USB transceiver and also a serial interface (UART interface).

To power your Arduino board, you can use the USB as a power source. Another option is to use a DC jack. You may ask, "if I connect both a DC adapter and the USB, which will be the power source?" The answer will be discussed in the "Power Part" section from this article.

To reset your board, you should use a push button in the board. Another source of reset should be every time you open the serial monitor from Arduino IDE.

I redistributed the original Arduino UNO schematic to be more readable below. I advise you to download it and open the PCB and schematic using Eagle CAD while you are reading this article.
Arduino_UNO_R3.zip
The Microcontroller

It is important to understand that the Arduino board includes a microcontroller, and this microcontroller is what executes the instructions in your program. If you know this, you won't use the common nonsense phrase "Arduino is a microcontroller" ever again.

The ATmega328 microcontroller is the MCU used in Arduino UNO R3 as a main controller. ATmega328 is an MCU from the AVR family; it is an 8-bit device, which means that its data-bus architecture and internal registers are designed to handle 8 parallel data signals.

ATmega328 has three types of memory:

Flash memory: 32KB nonvolatile memory. This is used for storing application, which explains why you don't need to upload your application every time you unplug arduino from its power source.

SRAM memory: 2KB volatile memory. This is used for storing variables used by the application while it's running.

EEPROM memory: 1KB nonvolatile memory. This can be used to store data that must be available even after the board is powered down and then powered up again.

Let us briefly go over some of this MCU's specs:

Packages:

This MCU is a DIP-28 package, which means that it has 28 pins in the dual in-line package. These pins include power and I/O pins. Most of the pins are multifunctional, which means that the same pin can be used in different modes based on how you configure it in the software. This reduces the necessary pin count, because the microcontroller does not require a separate pin for every function. It can also make your design more flexible, because one I/O connection can provide multiple types of functionality.

Other packages of ATmega328 are available like TQFP-32 SMD package (Surface Mount Device).

Two different packages of the ATmega328. Images courtesy of Sparkfun and Wikimedia.

Power:

The MCU accepts supply voltages from 1.8 to 5.5 V. However, there are restrictions on the operating frequency; for example, if you want to use the maximum clock frequency (20 MHz), you need a supply voltage of at least 4.5 V.

Digital I/O:

This MCU has three ports: PORTC, PORTB, and PORTD. All pins of these ports can be used for general-purpose digital I/O or for the alternate functions indicated in the pinout below. For example, PORTC pin0 to pin5 can be ADC inputs instead of digital I/O.

There are also some pins that can be configured as PWM output. These pins are marked with "~" on the Arduino board.

Note: The ATmega168 is almost identical to the ATmega328 and they are pin compatible. The difference is that the ATmega328 has more memory-32KB flash, 1KB EEPROM, and 2KB RAM compared to the ATmega168's 16KB flash, 512 bytes EEPROM, and 1KB RAM.

ATmega168 pinout with Arduino labels; the ATmega168 and ATmega328 are pin compatible. Image courtesy of Arduino.

Arduino UNO R3 pinout. Image courtesy of GitHub.

ADC Inputs:

This MCU has six channels-PORTC0 to PORTC5-with 10-bit resolution A/D converter. These pins are connected to the analog header on the Arduino board.

One common mistake is to think of analog input as dedicated input for A/D function only, as the header in the board states "Analog". The reality is that you can use them as digital I/O or A/D.

ATmega328 block diagram.

As shown in the diagram above (via the red traces), the pins related to the A/D unit are:

AVCC: The power pin for the A/D unit.

AREF: The input pin used optionally if you want to use an external voltage reference for ADC rather than the internal Vref. You can configure that using an internal register.

Internal register settings for selecting the Vref source.

UART Peripheral:

A UART (Universal Asynchronous Receiver/Transmitter) is a serial interface. The ATmega328 has only one UART module.

The pins (RX, TX) of the UART are connected to a USB-to-UART converter circuit and also connected to pin0 and pin1 in the digital header. You must avoid using the UART if you're already using it to send/receive data over USB.

SPI Peripheral:

The SPI (Serial Peripheral Interface) is another serial interface. The ATmega328 has only one SPI module.

Besides using it as a serial interface, it can also be used to program the MCU using a standalone programmer. You can reach the SPI's pins from the header next to the MCU in the Arduino UNO board or from the digital header as below:
11<->MOSI
12<->MISO
13<->SCK

TWI:

The I ² C or Two Wire Interface is an interface consisting of only two wires, serial data, and a serial clock: SDA, SCL.

You can reach these pins from the last two pins in the digital header or pin4 and pin5 in the analog header.

Other Functionality:

Other functionality is included in the MCU, such as that offered by the timer/counter modules. You may not be aware of the functions that you don't use in your code. You can refer to the datasheet for more information.

Returning to the electronic design, the microcontroller section has the following:

ATmega328-PU: The MCU we just talked about.

IOL and IOH (Digital) Headers: These headers are the digital header for pins 0 to 13 in addition to GND, AREF, SDA, and SCL. Note that RX and TX from the USB bridge are connected with pin0 and pin1.

AD Header: The analog pins header.

16 MHz Ceramic Resonator (CSTCE16M0V53-R0): Connected with XTAL2 and XTAL1 from the MCU.

Reset Pin: This is pulled up with a 10K resistor to help prevent spurious resets in noisy environments; the pin has an internal pull-up resistor, but according to the AVR Hardware Design Considerations application note (AVR042), "if the environment is noisy, it can be insufficient and reset may occur sporadically." Reset occurs if the user presses the reset button or if a reset is issued from the USB bridge. You can also see the D2 diode. The role of this diode is described in the same app note: "If not using High Voltage Programming it is recommended to add an ESD protection diode from RESET to Vcc, since this is not internally provided due to High Voltage Programming".

C4 and C6 100nF Capacitors: These are added to filter supply noise. The impedance of a capacitor decreases with frequency:
$$Xc$$ = $$\frac{1}{2 \pi f C}$$
The capacitors give high-frequency noise signals a low-impedance path to ground. 100nF is the most common value. Read more about capacitors in theAAC textbook.

PIN13: This is connected to the SCK pin from the MCU and is also connected to an LED. The Arduino board uses a buffer (the LMV358) to drive the LED.

ICSP (In-Circuit Serial Programming) Header: This is used to program the ATmega328 using an external programmer. It's connected to the In-System Programming (ISP) interface (which uses the SPI pins). Usually, you don't need to use this way of programming because bootloader handles the programming of the MCU from the UART interface which is connected using a bridge to the USB. This header is used when you need to flash the MCU, for example, with a bootloader for the first time in production.

The USB-to-UART Bridge

As we discussed in the "Arduino UNO System Overview" section, the role of the USB-to-UART bridge part is to convert the signals of USB interface to the UART interface, which the ATmega328 understands, using an ATmega16U2 with an internal USB transceiver. This is done using special firmware uploaded to the ATmega16U2.

From an electronic design perspective, this section is similar to microcontroller section. This MCU has an ICSP header, an external crystal with load capacitors (CL), and a Vcc filter capacitor.

Notice that there are series resistors in the D+ and D- USB lines. These provide the proper termination impedance for the USB signals. Here is some further reading about these resistors:

Z1 and Z2 are voltage-dependent resistors (VDRs), also called varistors. They are used to protect the USB lines against ESD transients.

The 100nF capacitor connected in series with the reset line allows the Atmega16U2 to send a reset pulse to the Atmega328. You can read more about this capacitor here.

The Power

For a power source, you have the option of using the USB or a DC jack. Now it's time to answer the following question: "If I connect both a DC adapter and the USB, which will be the power source?"

The 5V regulator is the NCP1117ST50T3G and the Vin of this regulator is connected via DC jack input through the M7 diode, the SMD version of the famous 1N4007 diode (PDF). This diode provides reverse-polarity protection.

The output of the 5V regulator is connected to the rest of 5V net in the circuit and also to the input of the 3.3V regulator, LP2985-33DBVR. You can access 5V directly from the power header 5V pin.

Another source of 5V is USBVCC which is connected to the drain of an FDN340P, a P-channel MOSFET, and the source is connected to the 5V net. The gate of the transistor is connected to the output of an LMV358 op-amp used as a comparator. The comparison is between 3V3 and Vin/2. When Vin/2 is larger, this will produce a high output from the comparator and the P-channel MOSFET is off. If there is no Vin applied, the V+ of the comparator is pulled down to GND and Vout is low, such that the transistor is on and the USBVCC is connected to 5V.

The LP2985-33DBVR is the 3V3 regulator. Both the 3V3 and 5V regulators are LDO (Low Dropout), which means that they can regulate voltage even if the input voltage is close to the output voltage. This is an improvement over older linear regulators, such as the 7805.

The last thing I'll talk about is the power protection that is provided in Arduino UNO.

As mentioned above, VIN from a DC jack is protected from reverse polarity by using a serial M7 diode in the input. Be aware that the VIN pin in the power header is not protected. This is because it is connected after the M7 diode. Personally, I don't know why they decided to do that when they could connect it before the diode to provide the same protection.

When you use USB as a power source, and to provide protection for your USB port, there is a PTC (positive temperature coefficient) fuse ( MF-MSMF050-2) in series with the USBVCC. This provides protection from overcurrent, 500mA. When an overcurrent limit is reached, the PTC resistance increases a lot. Resistance decreases after the overcurrent is removed.

Reading the Rugged Circuits post about protection in Arduino is very useful.

You should now be more familiar with the Arduino UNO's electronic design and have a better understanding of its hardware. I hope this helps your design projects in the future!

# data[].attributes.attachment_link.title
Understanding Arduino UNO Hardware Design - Technical Articles

# data[].attributes.attachment_link.description
This article explains how Arduino works from an electronic design perspective. Most articles explain the software of Arduinos. However, understanding hardware design helps you to make the next step in the Arduino journey.

# data[].attributes.body
The propellant has a burn time of 1.7s, which is the time period for which the motors produce thrust.

# data[].attributes.body
Examples of viable analogue accelerometers:
https://www.element14.com/community/groups/sensor-technology/blog/2013/12/02/adding-sensors-to-our-rocket

# data[].attributes.body
- Single stage engine
- 24mm diameter
- Maximum lift weight of less than 10oz.
- Total Impulse: 16.8Ns
- Estimated weight: 1.61oz (45.6 grams).
- Aditional technical specifications :
https://estesrockets.com/product/001567-d12-5-engines/
https://www.apogeerockets.com/Rocket_Motors/Estes_Motors/24mm_Motors/Estes_Motors_D12-5
https://www.rocketreviews.com/estes-d12-5112.html

# data[].attributes.body
- Payload size (should be able to fit inside model rocket).
- Payload weight (should be minimized to allow for rocket to achieve largest possible maximum height).
--> Knowing that each engine can lift a maximum weight of 10 ounces (283.5g). Taking into account that each engine package have two engines, they can lift a maximum weight of 20 ounces (567 grams). And the weight of both engine combined is already of 91.2 grams.
--> So the rest of the rocket can maximum weight 475.8 grams.
- Available components - which components are available to us in the electronics lab?

# data[].attributes.body
Design electronic circuit to measure:
- Change in atmospheric pressure as rocket ascends.
- Acceleration of rocket.
Use collected data to:
-Identify maximum height attained by rocket.
-Identify maximum acceleration of rocket.
- Compare these results to simulation data.
Additional Features:
-On/Off indicatior for charge of battery.
-Audible component to aid in retrieval of rocket.

# data[].attributes.body
The briefing sheet says that the Warwickino is an Arduino Uno microcontroller, which is shown in the link. Under the 'Getting Started' heading, there is also another link contains some information about the software used to programme the microcontroller.

# data[].attributes.attachment_link.readable_text
Programming

You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar; see these instructions for details.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available in the Arduino repository. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:

On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then rese ing the 8U2.

On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode.

Warnings

The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed.

Differences with other boards

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.

Power

The Arduino Uno board can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND and Vin pin headers of the POWER connector.

The board can operate on an external supply from 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

The power pins are as follows:

Vin. The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.

5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

GND. Ground pins.

IOREF. This pin on the Arduino board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs to work with the 5V or 3.3V.

Memory

The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).

Input and Output

See the mapping between Arduino pins and ATmega328P ports. The mapping for the Atmega8, 168, and 328 is identical.
PIN MAPPING ATmega328P
In addition, some pins have specialized functions:

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.

PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.

SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI library.

LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the analogReference() function. There are a couple of other pins on the board:

AREF. Reference voltage for the analog inputs. Used with analogReference().

Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.

Communication

The Arduino Uno has a number of facilities for communicating with a computer, another Arduino board, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The 16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is required. The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

A SoftwareSerial library allows serial communication on any of the Uno's digital pins.

The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino Software (IDE) includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI communication, use the SPI library.

Automatic (Software) Reset

Rather than requiring a physical press of the reset button before an upload, the Arduino Uno board is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino Software (IDE) uses this capability to allow you to upload code by simply pressing the upload button in the interface toolbar. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Uno is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Uno. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.

The Uno board contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for details.

Revisions

Revision 3 of the board has the following new features:

1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible with both the board that uses the AVR, which operates with 5V and with the Arduino Due that operates with 3.3V. The second one is a not connected pin, that is reserved for future purposes.

Stronger RESET circuit.

Atmega 16U2 replace the 8U2.

# data[].attributes.attachment_link.description
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using Arduino ISP or similar; see these instructions for details. The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available in the Arduino repository.

# data[].attributes.body
Record measurements to compare with simulation values.

# data[].attributes.body
To help retrieve rocket after landing in a field

# data[].attributes.body
Shows state of charge of the battery

# data[].attributes.body
Elevation and the corresponding atmospheric pressure:
https://www.pdblowers.com/tech-talk/elevation-versus-atmospheric-pressure/

# data[].attributes.body
Based around a Warwickino:

# data[].attributes.body
Maximise power efficiency & height gained - weight?