Electronics & 3D Design and Python Programming

Welcome to a world of creation and innovation!

Month 1: Electronics Fundamentals & First Steps with ESP32

Week 1: Introduction to Electronics

Class 1: What is Electronics?

Introduction

Welcome to the course! We'll go over what to expect, and most importantly, how to stay safe in the lab. We'll explore what electronics are and look at some cool everyday examples.

Basic Concepts

We'll learn about three key ideas: Current, Voltage, and Resistance. Imagine electricity like a river: Voltage is the water pressure, Current is the flow of the water, and Resistance is like rocks in the river, slowing the flow down.

Key Components

We'll get our hands on some fundamental components like the Protoboard, Resistors, LEDs, and Jumper Wires. We’ll learn what they look like and what they’re used for. Datasheet

Protoboard placeholder

Protoboard

Resistor placeholder

Resistor

LED placeholder

LED

Jumper Wires placeholder

Jumper Wires

Practical Activity

We'll learn how to identify different components and how to connect a simple circuit to light up an LED, using a resistor to protect it from too much current.

Materials

9V batteries, battery connectors, resistors (220-330 Ohm), various color LEDs, protoboards, jumper wires.

Example/Exercise

"Light Up Your First LED": Connect an LED to a battery using a resistor on a protoboard.

Suggested Project

No project yet, this class is just an introduction!


Class 2: Measuring Electricity & the Multimeter

Review

We'll quickly go over the concepts from the last class and answer any questions you have.

The Multimeter

We'll learn what a multimeter is and how to use it to measure voltage, current, and resistance.

Ohm's Law (Very Basic Intro)

We'll get a super simple introduction to Ohm's Law: $V = I \times R$. We'll understand the relationship between voltage, current, and resistance without doing any complex calculations yet.

Practice with the Multimeter

We'll practice measuring the voltage of a battery, the resistance of a resistor, and checking the continuity of wires.

Practical Activity

We'll build a simple circuit with an LED and a resistor, then use the multimeter to measure the voltage at different points and the current flowing through the LED.

Materials

Multimeters, batteries, resistors, LEDs, protoboards, jumper wires.

Example/Exercise

"Circuit Detective": You'll measure values in pre-built circuits (some correct, some with errors) to identify what's wrong.

Suggested Project

No project yet.

Week 2: Microcontrollers & Your First Program

Class 1: Intro to Microcontrollers & the ESP32

What is a Microcontroller?

We'll use an analogy: a microcontroller is like a "mini-computer" that can control physical things. We'll also talk about the difference between a microcontroller and a regular computer.

Meet the ESP32

We'll get a physical look at the ESP32 board, and identify its main parts like the USB port, pins, and reset button. Datasheet

Why the ESP32?

We'll talk about why the ESP32 is a great choice for our projects, especially because of its built-in Wi-Fi and Bluetooth capabilities.

Installing Drivers & Board in Arduino IDE

We'll go through a step-by-step guide on how to install the USB drivers and add the ESP32 board to the Arduino IDE's board manager.

Materials

ESP32 board (one per student or pair), USB cables, computers with Arduino IDE pre-installed.

Example/Exercise

"Connect Your Brain": You'll connect the ESP32 to your computer and verify that it's recognized by the operating system.

Suggested Project

No project yet.


Class 2: Your First Program: "Hello World!" (Blink)

Introduction to Arduino IDE

We'll explore the Arduino IDE interface, the toolbar, and the serial monitor, so you can start writing your own code.

Basic Sketch Structure

We'll learn about the two main parts of an Arduino sketch: the setup() function and the loop() function. We'll explain what each one does.

Your First Program: Blink

We'll write, compile, and upload the classic "Blink" code to make the built-in LED on the ESP32 flash on and off.

Coding Concepts

We'll introduce key coding concepts like pinMode(), digitalWrite(), and delay(), which are essential for controlling electronics.

Practical Activity

You'll modify the code to change how fast the LED blinks.

Materials

ESP32, USB cables, computers.

Example/Exercise

"Light Rhythm": Change the values in the delay() function to create different blinking patterns, like a fast flash or the "SOS" signal.

Suggested Project

No project yet.

Week 3: Controlling Outputs & Digital Inputs

Class 1: Controlling External LEDs with the ESP32

Review

We'll review the "Blink" program we wrote for the built-in LED.

Connecting an External LED

We'll learn how to connect an external LED to a digital pin on the ESP32 using a resistor on the protoboard.

Programming

We'll adapt the Blink code to control the external LED instead of the built-in one.

Digital Pin Concept

We'll learn how the pins on the ESP32 can be configured as an output, which means they can send signals to control components like LEDs.

Practical Activity

You'll make an external LED blink.

Materials

ESP32, protoboards, LEDs, resistors, jumper wires, USB cables, computers.

Example/Exercise

"Simple Traffic Light": Program three LEDs (red, yellow, green) to turn on in sequence, just like a basic traffic light.

Suggested Project

A "Simple Night Light" (a future idea, not for this class).


Class 2: Digital Inputs: Buttons & Control

Digital Input Concept

We'll learn how to read the state of a button, whether it's pressed or not pressed, to give our circuit an input from the physical world.

Connecting a Button

We'll learn how to connect a button, using an external pull-down resistor or the ESP32's internal pull-up resistor to ensure a stable signal.

Programming

We'll use the digitalRead() function to read the state of the button.

Application

We'll program a circuit where a button can turn an LED on and off.

Practical Activity

You'll build a circuit where pressing a button turns on an LED, and releasing it turns it off.

Materials

ESP32, protoboards, buttons, LEDs, resistors, jumper wires, USB cables, computers.

Example/Exercise

"Smart Switch": Program the circuit so that each time you press the button, the LED's state changes (from on to off, or off to on).

Suggested Project

A "Click Counter" that displays the number of clicks on the Serial Monitor.

Week 4: Analog Inputs & Sensors

Class 1: Analog Inputs: Potentiometers & LDRs

Analog Input Concept

We'll learn how to read variable values (not just ON/OFF) from analog components. [Image of analog signal vs digital sign

Potentiometer

We'll learn what a potentiometer is, how it works, and how to connect it to an analog pin on the ESP32. Datasheet

Analog Reading

We'll use the analogRead() function to read the variable value from the potentiometer. We'll also use the Serial Monitor to print the values and understand the range (0-4095 for ESP32).

Practical Activity

You'll read the value of a potentiometer and display it in the Serial Monitor.

Materials

ESP32, protoboards, potentiometers, jumper wires, USB cables, computers.

Example/Exercise

"Light Volume": Use the potentiometer to control the brightness of an LED.

Suggested Project

A "Manual Brightness Control" for a light.


Class 2: Basic Sensors: LDR (Light Sensor)

LDR (Light Dependent Resistor)

We'll learn what an LDR is and how it works. We'll connect it in a voltage divider circuit so the ESP32 can read its value with an analog pin. Datasheet

Application

We'll create a "light sensor" that can detect if it's light or dark.

Programming

We'll read the LDR's value and use conditional statements (if/else) to make decisions, for example, turning on an LED when it gets dark.

Practical Activity

You'll build a circuit with an LDR and an LED that turns the LED on when it gets dark.

Materials

ESP32, protoboards, LDRs, resistors (10k Ohm), LEDs, jumper wires, USB cables, computers.

Example/Exercise

"Automatic Night Light": You'll refine the circuit to make a more reliable automatic night light.

Suggested Project

A "Light Alarm" that sounds a buzzer if the light changes dramatically.

Month 2: Motor Control & Sensors for the Boat Challenge

Week 5: PWM & Servomotors

Class 1: Brightness Control with PWM (LED)

PWM (Pulse Width Modulation) Concept

We'll learn about PWM, a simple way to simulate a variable voltage by sending fast pulses of electricity. Think of it like a faucet that opens and closes very quickly.

PWM Pins on ESP32

We'll identify the specific pins on the ESP32 that support PWM.

Programming

We'll use the analogWrite() or ledcWrite() functions (for ESP32) to control the brightness of an LED using PWM.

Practical Activity

You'll use a potentiometer to control the brightness of an LED with PWM.

Materials

ESP32, protoboards, LEDs, resistors, potentiometers, jumper wires, USB cables, computers.

Example/Exercise

"Fade In/Fade Out": Program an LED to gradually increase and decrease in brightness.

Suggested Project

An "Interactive Ambient Lamp".


Class 2: Intro to Servomotors

What is a Servomotor?

Servomotors are special motors that let us control their angular position with great precision. Datasheet

Applications

We'll discuss how servomotors are used in robotics and for steering control.

Connecting a Servomotor

We'll learn how to connect a servomotor to the ESP32, paying attention to its power and signal pins.

Programming

We'll use a library like Servo.h (or the ESP32 equivalent) to move a servo to specific angles like 0, 90, and 180 degrees.

Practical Activity

You'll program a servomotor to move to 0, 90, and 180 degrees.

Materials

ESP32, servomotors (e.g., SG90), protoboards, jumper wires, USB cables, computers.

Example/Exercise

"Servo Sweep": Make the servo motor move continuously from 0 to 180 degrees and back again.

Suggested Project

A "Simple Camera Control" that uses a servo to move a sensor or a camera.

Week 6: Advanced Motor Control

Class 1: Servo Control with a Potentiometer

Integration

We'll combine what we learned about potentiometers and servomotors to control a servo's position by turning a knob.

The map() Function

We'll learn how to use the map() function to convert a range of values (like the 0-4095 range from the ESP32's ADC) to another range (like the 0-180 degrees a servo can move).

Practical Activity

You'll control the position of a servomotor by turning a potentiometer.

Materials

ESP32, servomotors, potentiometers, protoboards, jumper wires, USB cables, computers.

Example/Exercise

"Basic Robotic Arm": Simulate the movement of an arm or a scoop with the servo and the potentiometer.

Suggested Project

A "Level Indicator" where the servo points to a level based on an analog value.


Class 2: DC Motors & Drivers (L298N)

What is a DC Motor?

DC motors are motors that spin continuously. We'll learn how they work. Datasheet

Why a Motor Driver?

We'll explain why the ESP32 can't provide enough current to power a DC motor on its own, and why we need a "H-bridge" (a motor driver) to do the heavy lifting.

Meet the L298N (or similar)

We'll introduce the L298N motor driver and identify its input and output pins and power connections. Datasheet

Connecting the Components

We'll learn how to connect a DC motor to the L298N driver and then connect the driver to the ESP32.

Programming

We'll program the ESP32 to control the direction and speed (using PWM) of a DC motor.

Practical Activity

You'll make a DC motor spin in one direction, then the other, and vary its speed.

Materials

ESP32, small DC motors, L298N motor drivers (or smaller alternatives), protoboards, jumper wires, USB cables, computers, external power supply for the driver (e.g., a 9V battery).

Example/Exercise

"Wheel Control": Use two buttons to control a DC motor's spin (forward/backward).

Suggested Project

A "Simple Mobile Base" with just one motor.

Week 7: Ultrasonic Sensor & Mini-Project

Class 1: Ultrasonic Sensor HC-SR04 (Distance)

How the HC-SR04 Works

We'll learn about the principle of sonar: the sensor sends out a sound wave and measures how long it takes to bounce back, telling us the distance to an object. Datasheet

Connecting the Sensor

We'll connect the sensor's Trigger and Echo pins to the ESP32.

Programming

We'll use a library like NewPing or implement the logic manually with pulseIn() to measure distances.

Serial Monitor

We'll display the measured distance on the Serial Monitor.

Practical Activity

You'll measure the distance to various objects and display it in the Serial Monitor.

Materials

ESP32, HC-SR04 sensor, protoboards, jumper wires, USB cables, computers.

Example/Exercise

"Distance Meter": You'll measure different distances around the classroom.

Suggested Project

A "Proximity Alarm" that turns on an LED or buzzer if an object is too close.


Class 2: Integrating Sensors & Actuators (Mini-Project)

Review & Combination

We'll combine everything we've learned so far: buttons, LEDs, DC motors, and the ultrasonic sensor.

Guided Mini-Project: "Obstacle-Avoiding Car"

We'll build a very basic robot car that uses the ultrasonic sensor to stop or reverse when it detects an obstacle.

Encouraging Problem Solving

You'll be encouraged to find and fix small errors in your wiring and code.

Materials

ESP32, DC motor, L298N driver, HC-SR04 sensor, protoboards, jumper wires, USB cables, computers, small wheels (optional).

Example/Exercise

"Movement Logic": Program the car to move forward and stop if it detects something less than X cm away.

Suggested Project

A "Line-Following Robot" (if we introduce the infrared sensor later).

Week 8: 3D Design & 3D Printing

Class 1: Introduction to 3D Design (Tinkercad)

What is 3D Design?

We'll look at examples of objects created with 3D design and 3D printing.

Tinkercad

We'll introduce the Tinkercad interface, which is online and very user-friendly. We'll create our accounts and get started.

Basic Tools

We'll learn how to use basic shapes (cube, cylinder, sphere), and how to move, rotate, and scale them. We'll also learn how to group shapes and create holes.

Practical Activity

You'll design a simple keychain with your initials or a basic shape.

Materials

Computers with internet access, projectors.

Example/Exercise

"Build Your Name": Design the initials of your name in 3D.

Suggested Project

A "Simple Phone Stand" (just a base).


Class 2: Preparing for 3D Printing & First Parts

3D Printing Concepts

We'll learn how a 3D printer works, talking about the filament, extruder, and heated bed.

Slicing

We'll learn what a "slicer" program (like Cura) is. We'll cover basic concepts like infill, supports, and layer height.

Exporting from Tinkercad

You'll learn how to export your design as an .STL file.

Loading into Slicer & Preparing

We'll open the .STL file in the slicer, set up some basic parameters, and generate the .GCODE file that the printer understands.

First Print (Demonstration)

We'll print the keychains or a simple piece you designed.

Practical Activity

Each student or group will prepare their own .STL and .GCODE files for a simple piece.

Materials

Computers with Tinkercad and slicer software (Cura), a 3D printer (if available), filament.

Example/Exercise

"Mini-Box for a Component": Design a small box for an LED or a resistor.

Suggested Project

A "Simple ESP32 Case" (a future idea).

Month 3: The Da Vinci Boat Challenge - Intensive Design & Prototyping

Week 9: Analysis of the Challenge & Conceptual Design

Class 1: Analysis of the Challenge and Conceptual Design of the Boat

We'll discuss the requirements and limitations of the Da Vinci boat challenge. In groups, we'll brainstorm and sketch ideas for the hull, the paddle system, and where the electronics will go. We'll also divide tasks within each group (e.g., 3D designer, programmer, assembler).

Da Vinci Boat Challenge placeholder Boat Sketch placeholder

Materials

Whiteboard, markers, paper, pencils.

Example/Exercise

"Boat Schematic": Each group must present a detailed sketch of their design.


Class 2: 3D Design of the Hull & Structural Components

We'll begin designing the boat's hull in Tinkercad. We'll also design the supports for the motors, ESP32, battery, and other electronic components. We'll briefly discuss the importance of hull shape and weight distribution for buoyancy.

Materials

Computers with 3D design software, rules, calipers (if available).

Example/Exercise

"Design the Keel": Design a keel or stabilizer for the boat.

Week 10: Propulsion System Design & Electronics Integration

Class 1: Design of the Propulsion System (Paddles) & Transmisión

We'll design the paddles and the mechanism to connect them to the motor. We'll also think about how to 3D print the parts and if they'll need supports.

Materials

Computers with 3D design software.

Example/Exercise

"Gear Design": Design a pair of simple gears (if the mechanism requires it).


Class 2: Electronic Integration & Wiring of the Boat

We'll draw the electrical schematic and wire the ESP32, motor driver, DC motors, and battery. We'll introduce the concept of remote control using the ESP32's Wi-Fi or Bluetooth. You'll program the ESP32 to interpret commands and control the boat's motors.

Materials

Computers with 3D design software, ESP32, motor drivers, DC motors, batteries, protoboards, jumper wires, USB cables, cell phones/tablets for control testing.

Example/Exercise

"Basic Movement Control": Program the boat to move forward when it receives a "forward" command and backward when it receives a "backward" command.

Week 11: Printing Prototypes & Water Testing

Class 1: Printing Prototypes & Initial Assembly

We'll generate the .GCODE for our designed parts and start printing the most critical ones. We'll then assemble the first printed parts and electronic components to check for fit and functionality.

Materials

3D printers, filament, computers, printed parts, electronic components, assembly tools, a container of water.

Example/Exercise

"First Assembly": Mount the motor and paddles on the printed hull.


Class 2: Water Testing & Design Adjustments

We'll test the boat's buoyancy and propulsion in a container with water. Based on the results, we'll modify the 3D design and/or the programming for better performance.

Materials

Boat prototypes, container with water, computers, tools.

Example/Exercise

"Paddle Optimization": Test different paddle designs to see which one offers better propulsion.

Week 12: Final Refinement & Presentation

Class 1: Final Refinement & Preparation for the Challenge

We'll make our final modifications to the design and code, and focus on aesthetics and finishing touches. We'll also do a final safety check and complete a full test of the boat.

Materials

Finished boats, finishing materials, tools.

Example/Exercise

"Final Checklist": Each group will go through a checklist before the challenge begins.


Class 2: Challenge Strategy & Final Boat Presentation

We'll review the rules and criteria for the challenge and discuss our strategies. Each group will present their final boat, explaining their design choices and the challenges they overcame.

Materials

Finished boats.

Example/Exercise

"Challenge Simulation": Perform a small simulation of the challenge in the classroom.

General Class Notes