Study sheet: Grade 8 Coding and Robotics

Course Outline

  1. Electricity and Program Structure
  2. Embedded Systems and Arduino
  3. The IPO Cycle and Ports
  4. Digital LED Output
  5. Digital Pushbutton Input
  6. Analog Inputs and Outputs
  7. FreeCAD Interface and Setup
  8. Construction and Drawing Tools
  9. Shapes and Complex Outlines
  10. Constraints and Degrees of Freedom
  11. Fillets and Datum Planes
  12. Mounting Bracket Workflow

1. Electricity and Program Structure

Key Concepts & Definitions

  • Voltage : The electrical potential difference, or electrical pressure, between two points, measured in volts, and it does not flow by itself.
  • Current : The flow of electrons through a circuit, measured in amperes or milliamperes.
  • Resistance : A material’s opposition to the flow of current, measured in ohms.
  • Program statement : A single instruction or command line in a program, and text-based statements usually end with a semicolon.

Essential Points

πŸ“ Formula β€” Ohm’s Law relates voltage, current, and resistance as V=IΓ—RV = I \times R, so resistance can be calculated as R=VIR = \frac{V}{I}.

Memory Hook

Voltage is pressure, current flows, and resistance opposes.

2. Embedded Systems and Arduino

Key Concepts & Definitions

  • Embedded system : Specialised circuitry built to perform one specific, dedicated job with software tailored to that purpose.

β˜… Must-know

πŸ“Œ A microprocessor is only a processing brain that needs separate motherboard, memory, and I/O controllers, whereas a microcontroller combines a processor, memory, and I/O ports on one self-contained chip.

  • The Arduino Uno uses an ATmega 8-bit microcontroller, operates at 5V, and accepts a recommended input voltage of 7–12V through its barrel jack.

Further detail

  • The Arduino Uno has 14 digital I/O pins, 6 analog input pins labelled A0–A5, 32 KB of flash memory, 2 KB of SRAM, and a 16 MHz clock speed.

Memory Hook

A microprocessor needs separate parts; a microcontroller combines them.

3. The IPO Cycle and Ports

Key Concepts & Definitions

  • Sensor : A component that measures something in the environment, such as light, temperature, or pressure.
  • Actuator : A component that takes action in the environment, such as an LED, buzzer, or motor.

Essential Points

  • The IPO cycle continuously reads environmental inputs, processes them with a program, and sends outputs to devices for as long as the microcontroller has power.

πŸ“Œ Digital ports use only HIGH (5V) or LOW (0V), whereas analog ports handle a wide range of values.

Memory Hook

Input β†’ Processing β†’ Output.

4. Digital LED Output

Essential Points

πŸ“Œ An LED must be connected in series with a current-limiting resistor because its low internal resistance could otherwise allow excessive current to damage the LED or Arduino pin.

πŸ“ Formula β€” For a 5V Arduino pin, a 2V LED drop, and a target current of 20mA (0.02A), the resistor value is R=5Vβˆ’2V0.02A=150Ξ©R = \frac{5V - 2V}{0.02A} = 150\Omega.

  • The Blinky program repeatedly turns the LED HIGH, waits 1 second, turns it LOW, and waits 1 second.

Memory Hook

Low LED resistance β†’ excessive current β†’ component damage; the resistor prevents it.

5. Digital Pushbutton Input

Key Concepts & Definitions

  • Floating input : A digital input pin that is connected firmly to neither HIGH nor LOW and therefore produces unreliable readings.

β˜… Must-know

πŸ“Œ A 10kΞ© pull-down resistor holds an unpressed pushbutton input at LOW, while pressing the button connects the input to 5V and makes it HIGH.

  • The pushbutton program reads digital pin 2 into PB2_state, then turns pin 13 HIGH if PB2_state is HIGH and LOW otherwise.

Further detail

πŸ“Œ Arduino setup() runs once when the board powers on, while loop() runs continuously and contains the repeated input and output logic.

Memory Hook

Button pressed gives HIGH; button released is held LOW by the pull-down resistor.

6. Analog Inputs and Outputs

Key Concepts & Definitions

  • Voltage divider : Two resistors in series to split a total voltage so a proportional voltage can be measured at their midpoint.

β˜… Must-know

  • An Arduino Uno converts an analog input between 0V and 5V into a digital reading from 0 to 1023 on its six analog inputs A0–A5.

πŸ“Œ An analog input from 0–1023 must usually be mapped to the analog output range 0–255, for example by dividing the input value by four, before controlling brightness.

Further detail

πŸ“Œ An LDR changes resistance with light level, whereas a potentiometer changes its resistance ratio through a movable central wiper.

  • An RGB LED contains separate red, green, and blue LEDs whose brightnesses can combine to produce 256Γ—256Γ—256256 \times 256 \times 256 different shades.

Memory Hook

Digital uses two states; analog measures or produces a range.

7. FreeCAD Interface and Setup

Key Concepts & Definitions

  • Workbench : A collection of FreeCAD tools organised for one type of job, such as sketching or part design.
  • Body : The main FreeCAD container that holds the 3D features of one designed part.
  • Sketch : A flat 2D drawing made on a chosen plane and used as the starting point for a 3D shape.

Essential Points

  • The Combo View contains a Model tab showing Bodies, Sketches, and features, and a Tasks tab showing instructions and settings for the active tool.

Memory Hook

Workbench β†’ Body β†’ Sketch β†’ plane.

8. Construction and Drawing Tools

Key Concepts & Definitions

  • Construction line : A guide used for planning and measuring a sketch that is not included in the final solid model and appears blue in construction mode.

Essential Points

  • To find the centre of a 60 mm wide object, draw a 30 mm construction line from the origin and add a perpendicular construction line to mark the other centre direction.

  • The point, line, arc, and circle tools create basic 2D elements, with arcs and circles available through centre-based or three-point methods.

Memory Hook

Blue construction lines act like invisible scaffolding around the final model.

9. Shapes and Complex Outlines

Key Concepts & Definitions

  • Slot : An oblong, rounded opening that allows a bolt or pin to slide rather than remain in one round hole.

β˜… Must-know

πŸ“Œ A polyline creates connected straight-line segments in one continuous action, whereas separate line operations require selecting the line tool again.

Further detail

  • Examples of regular polygon shapes include:

    • hexagon (6 sides)
    • heptagon (7 sides)
    • octagon (8 sides)
  • An ellipse is a stretched circle, while a spline is a smooth freeform curve that can be adjusted by dragging its points.

10. Constraints and Degrees of Freedom

Key Concepts & Definitions

  • Degrees of freedom : The independent ways a shape can still move, stretch, or rotate before it is fixed.

β˜… Must-know

  • The four degrees of freedom are:

    • vertical position
    • horizontal position
    • length
    • angle
  • A single line can be fully constrained by fixing vertical position, fixing horizontal position, setting its length, and fixing its angle.

πŸ“Œ A fully constrained FreeCAD sketch has zero degrees of freedom and turns green, showing that it cannot move accidentally.

Further detail

  • Relationship constraints include:
    • perpendicular
    • parallel
    • equal
    • point-on-object
    • symmetric

Memory Hook

Constraints remove degrees of freedom β†’ the sketch turns green and becomes stable.

11. Fillets and Datum Planes

Key Concepts & Definitions

  • Fillet : A rounded edge added to a sharp corner to make a model smoother, safer, and more professional.
  • Datum plane : A reference surface created on a model so that a new sketch can be made from a different angle or position.

Essential Points

  • To apply a fillet, select one or more edges, choose Fillet in the Tasks panel, and enter a radius such as 1.5 mm or 5 mm.

  • πŸ”„ The datum-plane process is:

    1. Select an existing face or plane.
    2. Choose Create a datum plane.
    3. Pin and confirm the new plane.
    4. Create a sketch on the datum plane.

Memory Hook

A fillet changes an edge’s shape; a datum plane changes where you can sketch.

12. Mounting Bracket Workflow

β˜… Must-know

  • The mounting-bracket workflow creates a Body and XY-plane Sketch, draws and constrains an L-shaped polyline, applies a 5 mm fillet, adds an 8 mm by 20 mm slot, sketches a 6 mm diameter hole on a datum plane, and saves the project.

Further detail

  • The mounting bracket’s base is 80 mm long and 10 mm thick, while its raised arm is 50 mm tall and 10 mm thick.

πŸ“Œ A FreeCAD project should be saved regularly, with Save As used for the first save, a dedicated project folder, and a clear filename such as Mounting_Bracket_v1.

Memory Hook

Start β†’ outline β†’ constrain β†’ fillet β†’ slot β†’ datum-plane hole β†’ save.

Synthesis Tables

Arduino Port Types

Port typeStates or rangeTypical uses
DigitalHIGH (5V) or LOW (0V)Switches, pushbuttons, LEDs, buzzers
AnalogA range of valuesSensors, motor speed control, dimming lights

FreeCAD Constraint Status

Sketch stateDegrees of freedomAppearance
UnconstrainedOne or more DOF remainCan move or change
Fully constrainedZero DOFTurns green and remains fixed

Test your knowledge

Test your knowledge on Grade 8 Coding and Robotics with 33 multiple-choice questions with detailed corrections.

1. What does voltage represent in an electrical circuit?

2. Which quantity describes the flow of electrons through a circuit?

Take the quiz β†’

Review with flashcards

Memorize the key concepts of Grade 8 Coding and Robotics with 78 interactive flashcards.

What is voltage in electrical terms?

Voltage is the electrical potential difference between two points.

How is current defined in an electrical circuit?

Current is the flow of electrons through a circuit.

What does resistance measure in a material?

Resistance measures a material’s opposition to current flow.

See flashcards β†’

Similar courses

Create your own study sheets

Import your course and AI generates sheets, quizzes and flashcards in 30 seconds.

Sheet generator