Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino Mega 2560-Based Multi-Toggle Switch Controller

Image of Arduino Mega 2560-Based Multi-Toggle Switch Controller

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that includes an Arduino Mega 2560 microcontroller and several toggle switches. The circuit is designed to interface multiple toggle switches with the Arduino, allowing for various input configurations. The document includes a component list, wiring details, and the embedded code used in the microcontroller.

Component List

Arduino Mega 2560

  • Description: A microcontroller board based on the ATmega2560.
  • Pins: IOREF, RESET, 3V3, 5V, GND, VIN, A0-A15, D0-D53, AREF, SDA, SCL.

Toggle Switch

  • Description: A basic toggle switch with three pins.
  • Pins: Vcc, Sig, Gnd.

Toggle Switch SPST

  • Description: A single-pole single-throw (SPST) toggle switch.
  • Pins: L1, COM.

Comment

  • Description: Placeholder for comments in the circuit.
  • Pins: None.

Wiring Details

Arduino Mega 2560

  • GND is connected to:

    • Sig of Toggle Switch
    • Sig of Toggle Switch
    • Sig of Toggle Switch
    • Sig of Toggle Switch
    • Sig of Toggle Switch
    • Sig of Toggle Switch SPST
    • Sig of Toggle Switch SPST
    • Sig of Toggle Switch SPST
  • D52 is connected to Vcc of Toggle Switch.

  • D50 is connected to Gnd of Toggle Switch.

  • D48 is connected to COM of Toggle Switch SPST.

  • D46 is connected to COM of Toggle Switch SPST.

  • D44 is connected to Vcc of Toggle Switch.

  • D42 is connected to Gnd of Toggle Switch.

  • D53 is connected to Gnd of Toggle Switch.

  • D51 is connected to Vcc of Toggle Switch.

  • D49 is connected to Gnd of Toggle Switch.

  • D47 is connected to Vcc of Toggle Switch.

  • D45 is connected to Gnd of Toggle Switch.

  • D43 is connected to Vcc of Toggle Switch.

  • D41 is connected to COM of Toggle Switch SPST.

Toggle Switch

  • Vcc is connected to:

    • D52 of Arduino Mega 2560
    • D44 of Arduino Mega 2560
    • D51 of Arduino Mega 2560
    • D47 of Arduino Mega 2560
    • D43 of Arduino Mega 2560
  • Sig is connected to:

    • GND of Arduino Mega 2560
    • GND of Arduino Mega 2560
    • GND of Arduino Mega 2560
    • GND of Arduino Mega 2560
    • GND of Arduino Mega 2560
  • Gnd is connected to:

    • D50 of Arduino Mega 2560
    • D42 of Arduino Mega 2560
    • D53 of Arduino Mega 2560
    • D49 of Arduino Mega 2560
    • D45 of Arduino Mega 2560

Toggle Switch SPST

  • L1 is connected to:

    • Sig of Toggle Switch
    • Sig of Toggle Switch
    • Sig of Toggle Switch
  • COM is connected to:

    • D48 of Arduino Mega 2560
    • D46 of Arduino Mega 2560
    • D41 of Arduino Mega 2560

Documented Code

sketch.ino

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

documentation.txt