Skip to content
Merged
42 changes: 42 additions & 0 deletions hardware_guide/Archtecting/3D Printing/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# A General Overview of 3D Printing

3D printing, also known as additive manufacturing, is a transformative technology that builds three-dimensional objects layer by layer from a digital file. It allows for the creation of complex and custom shapes without the need for traditional manufacturing molds or tooling.

## Core 3D Printing Technologies

There are several methods of 3D printing, each with unique advantages and materials. The most common types include:

### 1. Fused Deposition Modeling (FDM)

This is the most widely used and accessible form of 3D printing. FDM printers work by extruding a thermoplastic filament through a heated nozzle, melting it, and depositing it layer by layer on a build platform. The layers fuse together as they cool to form a solid object.

- **Common Materials (Filaments):**
- **PLA (Polylactic Acid):** Biodegradable, easy to print, and affordable. Ideal for prototypes and non-functional parts.
- **ABS (Acrylonitrile Butadiene Styrene):** Strong, durable, and temperature-resistant. Often used for functional parts like car components or phone cases.
- **PETG (Polyethylene Terephthalate Glycol):** A good balance between the ease of printing of PLA and the strength of ABS. It's food-safe and has good chemical resistance.
- **TPU (Thermoplastic Polyurethane):** A flexible, rubber-like material used for creating objects that need to bend or stretch.

### 2. Stereolithography (SLA)

SLA was the world's first 3D printing technology. It uses an ultraviolet (UV) laser to cure and solidify a liquid photopolymer resin in a vat, layer by layer. SLA is known for producing parts with extremely high detail and smooth surface finishes.

- **Common Materials (Resins):**
- **Standard Resin:** Excellent for high-detail prototypes and models.
- **Tough/Durable Resin:** Simulates the properties of ABS plastic, designed for functional parts that can withstand stress.
- **Flexible Resin:** Creates bendable, rubber-like parts.

### 3. Selective Laser Sintering (SLS)

SLS uses a high-powered laser to sinter (fuse) small particles of polymer powder. As the laser draws a cross-section of the object onto the powder bed, it fuses the material together. The unfused powder provides support for the object, eliminating the need for dedicated support structures.

- **Common Materials (Powders):**
- **Nylon (PA 11, PA 12):** The most common material for SLS. It produces strong, durable, and functional parts suitable for end-use applications.

## The General Workflow

The process for turning a digital idea into a physical object is consistent across technologies:

1. **Modeling:** A 3D model is created using CAD (Computer-Aided Design) software or downloaded from an online repository. The final model is typically exported as an STL or STEP file.
2. **Slicing:** The 3D model file is imported into a "slicer" program. This software slices the model into hundreds or thousands of thin, horizontal layers and generates a machine-readable file (like G-code) with instructions for the printer.
3. **Printing:** The instruction file is sent to the 3D printer, which begins building the object layer by layer.
4. **Post-Processing:** After printing, parts often require some form of cleanup. This can include removing support structures (FDM/SLA), washing in a solvent (SLA), curing with UV light (SLA), or cleaning off excess powder (SLS).
33 changes: 33 additions & 0 deletions hardware_guide/Archtecting/CAD/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# What is CAD?

Welcome to the world of Computer-Aided Design (CAD)! If you're new to this, don't worry. This guide will give you a basic understanding of what CAD is and why it's essential for our Robotic Arm project.

## The Basics

At its core, **CAD is the use of computers to create, modify, analyze, or optimize a design.** Instead of drawing blueprints by hand on a drafting table, we use specialized software to create digital 2D drawings and 3D models.

Think of it like digital sculpting or building with virtual LEGOs, but with incredible precision and power.

## Why Do We Use CAD?

Using CAD offers several key advantages for a hardware project like ours:

1. **Precision:** We can design parts with exact measurements, ensuring everything fits together perfectly.
2. **Visualization:** A 3D model allows us to see what the robotic arm will look like from every angle before we build anything. We can even simulate its movement to check for collisions or other issues.
3. **Easy Modifications:** If a part doesn't work as expected, we can quickly modify the digital model and 3D print a new version. This is much faster and cheaper than re-making a physical part from scratch.
4. **Collaboration:** Team members can easily share designs and work on different parts of the arm simultaneously.
5. **Manufacturing:** The digital models we create can be directly sent to manufacturing machines, like 3D printers or CNC mills, to create the physical parts.

## Our CAD Software: Fusion 360

For this project, we use **Autodesk Fusion 360**. It's a powerful, cloud-based tool that combines industrial and mechanical design, simulation, collaboration, and machining into a single package. It's a great choice for projects that involve both electronic and mechanical components.

## What's in this Folder?

This `CAD` directory is where we store all the digital blueprints for the robotic arm. As you explore, you'll find different types of files, primarily:

* **`.f3d` / `.f3z`**: These are the native project files for Fusion 360, containing the editable 3D models and assemblies.
* **`.stl`**: These are "mesh" files exported from the models, specifically for 3D printing.
* **`.pdf` / `.dxf`**: These are 2D drawings, useful for manufacturing or documentation.

Feel free to explore the subdirectories to see how the different components of the arm are organized!
1 change: 1 addition & 0 deletions hardware_guide/Archtecting/CAD/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[Introduction to Tinkercad Circuits](https://www.youtube.com/watch?v=9RF_BZ1Cg4k)
62 changes: 62 additions & 0 deletions hardware_guide/Components/Buttons/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

# Buttons and Switches

A button or switch is a simple component that controls the flow of current in a circuit by opening or closing the connection.

## How They Work

- **Normally Open (NO):** This is the most common type of push button. The circuit is disconnected (open) by default. When you press the button, it completes the circuit (closes it), allowing current to flow.
- **Normally Closed (NC):** The circuit is connected (closed) by default. When you press the button, it breaks the circuit (opens it), stopping the current flow.

## The Problem of Floating Pins

When you connect a button to a microcontroller's input pin, you need to know its state: is it pressed or not pressed? This corresponds to a digital HIGH or LOW.

If you just connect a button to an input pin and VCC (e.g., 5V), the pin will be HIGH when pressed. But what about when it's not pressed? The input pin is not connected to anything, which is called a **floating state**. In this state, the pin can randomly read HIGH or LOW due to electrical noise, leading to unreliable behavior.

To fix this, we must use **pull-up** or **pull-down** resistors.

## Pull-up and Pull-down Resistors

These resistors ensure the input pin is always in a known, stable state.

### 1. Pull-down Resistor

- **How it works:** A resistor (typically 10kΩ) is connected from the input pin to Ground (GND).
- **Behavior:**
- When the button is **not pressed**, the resistor "pulls" the input pin's voltage down to GND. The pin reads **LOW**.
- When the button **is pressed**, it connects the input pin directly to VCC (5V), overriding the resistor. The pin reads **HIGH**.

![Pull-down Resistor Diagram](https://www.upesy.com/wp-content/uploads/2021/09/pull-down-resistor-schematic.png)

### 2. Pull-up Resistor

- **How it works:** A resistor (typically 10kΩ) is connected from the input pin to VCC (5V).
- **Behavior:**
- When the button is **not pressed**, the resistor "pulls" the input pin's voltage up to VCC. The pin reads **HIGH**.
- When the button **is pressed**, it connects the input pin directly to GND, overriding the resistor. The pin reads **LOW**.

![Pull-up Resistor Diagram](https://www.upesy.com/wp-content/uploads/2021/09/pull-up-resistor-schematic.png)

**Note:** The logic is inverted with a pull-up resistor (pressed = LOW).

## Internal Pull-ups

Most microcontrollers (including Arduino and Raspberry Pi) have **internal pull-up resistors** that you can enable in your code. This is extremely convenient as it means you don't need to add an external resistor to your circuit.

**Arduino Example:**
```cpp
// Enables the internal pull-up resistor on pin 2
pinMode(2, INPUT_PULLUP);
```

When using `INPUT_PULLUP`, you simply wire the button between the input pin and GND. The pin will be HIGH when not pressed and LOW when pressed.

## Debouncing

When you press a mechanical button, the metal contacts can bounce against each other for a few milliseconds before settling. A microcontroller is fast enough to read these bounces as multiple, separate presses.

**Debouncing** is the technique used to handle this, ensuring only one press is registered.

- **Software Debouncing:** The most common method. After detecting a press, you can add a small delay (e.g., 50ms) in your code and then read the button state again to make sure it's still pressed.
- **Hardware Debouncing:** Can be done by adding a small capacitor to the circuit.
3 changes: 3 additions & 0 deletions hardware_guide/Components/Buttons/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[How to Use a Button with an Arduino](https://www.youtube.com/watch?v=yBgMJssXqHY)
[How to Use a Slide Switch with an Arduino](https://www.youtube.com/watch?v=0ZXYRU9KPG8)
[Usando Botões de Pressão ](https://www.youtube.com/watch?v=ohZ4pQ6KCPA)
62 changes: 62 additions & 0 deletions hardware_guide/Components/LEDs/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

# LEDs (Light Emitting Diodes)

An LED is a semiconductor light source that emits light when current flows through it. They are one of the most common components in electronics, used for everything from simple indicators to lighting.

## How an LED Works

- **Diode:** An LED is a type of diode, which means it only allows current to flow in one direction.
- **Polarity:** Because it's a diode, an LED has polarity. It has a positive lead (**anode**) and a negative lead (**cathode**).
- **Anode (Positive):** This is typically the longer leg.
- **Cathode (Negative):** This is typically the shorter leg. The flat edge on the side of the LED also indicates the cathode.

If you connect an LED backwards, it will not light up and can be damaged.

![LED Polarity Diagram](https://www.build-electronic-circuits.com/wp-content/uploads/2013/08/led-polarity.png)

## Why You MUST Use a Resistor with an LED

An LED has very little internal resistance. If you connect it directly to a voltage source (like a 5V pin on an Arduino), a very large amount of current will flow through it, instantly destroying the LED. This is called thermal runaway.

To prevent this, you **must** always use a **current-limiting resistor** in series with the LED.

### How to Calculate the Resistor Value

You can use Ohm's Law (V = I * R) to find the right resistor value.

**R = (Vs - Vf) / I**

- **R:** The resistance you need (in Ohms).
- **Vs:** The voltage of your power source (e.g., 5V for an Arduino).
- **Vf:** The LED's forward voltage. This is the amount of voltage the LED "drops" when it's on. It varies by color (see chart below).
- **I:** The desired current for the LED (in Amperes). A safe and common value for most 5mm LEDs is 20mA, which is **0.020A**.

### Typical LED Forward Voltages (Vf)

| Color | Forward Voltage (approx.) |
| :--- | :---: |
| Red | 1.8V - 2.2V |
| Green | 2.0V - 2.4V |
| Blue | 3.0V - 3.4V |
| White | 3.0V - 3.4V |
| Yellow | 2.0V - 2.2V |

**Example Calculation (Red LED with 5V source):**

- Vs = 5V
- Vf = 2.0V (average for a red LED)
- I = 0.020A (20mA)

R = (5V - 2.0V) / 0.020A

R = 3V / 0.020A

R = 150 Ω

The closest standard resistor value is 220Ω, which is a perfect choice as it provides a little extra protection.

## Types of LEDs

- **Through-Hole:** The standard LEDs with two legs, common in breadboarding.
- **Surface Mount (SMD):** Tiny LEDs that are soldered directly onto a circuit board.
- **RGB LEDs:** These combine three separate LEDs (Red, Green, and Blue) in a single package. By controlling the brightness of each color, you can create any color in the spectrum.
2 changes: 2 additions & 0 deletions hardware_guide/Components/LEDs/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[How to Blink an LED with Arduino ](https://www.youtube.com/watch?v=FKekzzj5844)
[How to Fade an LED with Arduino analogWrite](https://www.youtube.com/watch?v=QCZISwDi_Qo0)
40 changes: 40 additions & 0 deletions hardware_guide/Components/Motors/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# Motors in Electronics

Motors are essential components in robotics and many electronic projects. They convert electrical energy into mechanical motion.

## Types of Motors

There are many different types of motors, each with its own characteristics and best use cases.

### 1. DC Motors

- **What they are:** The most common type of motor. They have two terminals, and when you apply a DC voltage, the shaft spins.
- **Control:** The speed is controlled by varying the voltage. The direction is changed by reversing the polarity of the voltage.
- **Use Cases:** Fans, toys, robot wheels.
- **Note:** They are not precise. You can control the speed and direction, but not the exact position of the shaft.

### 2. Servo Motors

- **What they are:** A DC motor combined with a position feedback sensor (usually a potentiometer) and a small controller circuit. This allows for precise control of the shaft's angular position.
- **Control:** They are controlled by sending a series of pulses (Pulse Width Modulation, or PWM). The width of the pulse determines the angle of the shaft (e.g., 1ms pulse for 0 degrees, 2ms for 180 degrees).
- **Use Cases:** Robotic arms, steering systems in RC cars, pan-tilt camera mounts.

### 3. Stepper Motors

- **What they are:** These motors rotate in discrete steps. The shaft moves a specific number of degrees per step (e.g., 1.8 degrees per step).
- **Control:** They are controlled by energizing internal coils in a specific sequence. This requires a dedicated stepper motor driver (like an A4988 or DRV8825).
- **Use Cases:** 3D printers, CNC machines, scanners, and any application requiring precise, repeatable positioning.

### 4. Brushless Motors

- **What they are:** A more advanced type of motor that uses electronic commutation instead of mechanical brushes. This makes them more efficient, durable, and quieter.
- **Control:** Requires a dedicated Electronic Speed Controller (ESC) to operate.
- **Use Cases:** Drones, electric vehicles, high-performance RC cars.

## Motor Drivers

A microcontroller (like an Arduino or Raspberry Pi) cannot power a motor directly because motors require more current than the microcontroller's GPIO pins can supply. You **must** use a motor driver.

- **What it does:** A motor driver is an intermediate circuit that takes a low-current control signal from the microcontroller and delivers a higher-current signal to the motor.
- **Common Examples:** L298N (for DC and stepper motors), A4988 (for stepper motors), DRV8825 (for stepper motors), ESCs (for brushless motors).
2 changes: 2 additions & 0 deletions hardware_guide/Components/Motors/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Control a DC Motor with Arduino](https://www.youtube.com/watch?v=XrJ_zLWFGFw)
[How to Use a Vibration Motor with Arduino](https://www.youtube.com/watch?v=3hoBwa0ccys)
67 changes: 67 additions & 0 deletions hardware_guide/Components/Potentiometers/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

# Potentiometers

A potentiometer is a three-terminal variable resistor. It acts as a voltage divider and is commonly used to provide a variable analog signal to a microcontroller, for example, to control volume, brightness, or the position of a servo motor.

## How a Potentiometer Works

Inside a potentiometer, there is a resistive track and a sliding contact, or **wiper**. As you turn the knob, the wiper moves along the track.

It has three pins:

1. **Pin 1 (CCW - Counter-Clockwise):** One end of the resistive track.
2. **Pin 2 (Wiper):** The middle pin, connected to the sliding contact.
3. **Pin 3 (CW - Clockwise):** The other end of the resistive track.

![Potentiometer Diagram](https://www.build-electronic-circuits.com/wp-content/uploads/2013/09/potentiometer-schematic-symbol-and-breadboard-layout.png)

## Using a Potentiometer as a Voltage Divider

This is the most common way to use a potentiometer with a microcontroller.

1. **Connect the outer pins to power:**
- Connect Pin 1 to Ground (GND).
- Connect Pin 3 to your voltage source (e.g., 5V or 3.3V).

2. **Connect the center pin to an analog input:**
- Connect Pin 2 (the wiper) to an analog input pin on your microcontroller (e.g., A0 on an Arduino).

### What Happens?

- When the knob is turned all the way to the GND side (Pin 1), the wiper is close to GND, and the voltage on the analog pin will be close to 0V. The microcontroller will read a value close to 0.
- When the knob is turned all the way to the VCC side (Pin 3), the wiper is close to VCC, and the voltage on the analog pin will be close to 5V. The microcontroller will read its maximum analog value (e.g., 1023 for a 10-bit ADC on an Arduino).
- At any position in between, the wiper picks up a voltage that is proportional to its position along the resistive track, providing a smooth range of analog values.

## Reading the Value

You use the `analogRead()` function on a microcontroller to read the voltage from the wiper pin.

**Arduino Example:**

```cpp
// Connect the potentiometer's center pin to A0
int potPin = A0;

void setup() {
Serial.begin(9600);
}

void loop() {
// Read the analog value (from 0 to 1023)
int potValue = analogRead(potPin);

// Print the value to the Serial Monitor
Serial.println(potValue);

delay(100); // Wait a bit before the next reading
}
```

## Types of Potentiometers

- **Linear Taper:** The resistance changes linearly as you turn the knob. If you turn the knob 50% of the way, the resistance is 50% of the total. These are used for most sensor control applications.
- **Logarithmic (Audio) Taper:** The resistance changes logarithmically. This is used for audio applications (like volume controls) because human hearing is also logarithmic.

## Using a Potentiometer as a Rheostat

A potentiometer can also be used as a simple two-terminal variable resistor (called a rheostat). You do this by using only the wiper (Pin 2) and one of the outer pins (Pin 1 or 3). In this configuration, it can be used to control the current in a circuit, for example, to vary the brightness of an LED.
1 change: 1 addition & 0 deletions hardware_guide/Components/Potentiometers/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[How to Use a Potentiometer with Arduino analogRead](https://www.youtube.com/watch?v=Wa8CjGsOFzY)
9 changes: 9 additions & 0 deletions hardware_guide/Components/Power/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Power Component Overview

The power component is a critical part of the robotic arm, providing the necessary energy for all its operations. A well-designed power system ensures stable and reliable performance of the robotic arm.

## Key Components

* **Power Source:** This can be a battery pack or a power adapter, depending on the application's requirements for portability and power intensity.
* **Voltage Regulators:** These components ensure that a stable and consistent voltage is supplied to all the electronic components of the robotic arm, such as the microcontroller and sensors.
* **Power Distribution:** This involves the wiring and connections that distribute power from the source to the various components of the robotic arm.
1 change: 1 addition & 0 deletions hardware_guide/Components/Power/tutorials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[How to Power an Arduino Project](https://www.youtube.com/watch?v=I7MrL5Q7zvY)
Loading
Loading