Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO R4 WiFi Cable Tester with OLED Display

View and Edit Project In Cirkit DesignerImage of Arduino UNO R4 WiFi Cable Tester with OLED Display

Circuit Documentation

Summary

This circuit is designed to test the continuity of connections using an Arduino UNO R4 WiFi microcontroller, a 0.96" OLED display, a 16-channel analog multiplexer, and several resistors and banana sockets. The Arduino controls the multiplexer to select different channels and reads the continuity status, displaying the results on the OLED screen.

Component List

  1. Arduino UNO R4 WiFi

    • Description: Microcontroller board based on the ATmega328P.
    • Pins: OFF, GND, VRTC, IIC0_SCL, IIC0_SDA, 3V3, GPIO 41, GPIO 0, GPIO 42, GPIO 43, GPIO 44, BOOT, IOREF, RESET, 5V, VIN, A0, A1, A2, A3, A4, A5, RSPCKA, CIPO, COPI, D0/RX, D1/TX, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, AREF, SDA, SCL
  2. 0.96" OLED

    • Description: Small OLED display module.
    • Pins: GND, VDD, SCK, SDA
  3. GND

    • Description: Ground connection.
    • Pins: GND
  4. 16-channel analog multiplexer

    • Description: Multiplexer for selecting one of 16 analog inputs.
    • Pins: GND, VCC, EN, S0, S1, S2, S3, SIG, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15
  5. Resistor (10k Ohms)

    • Description: Resistor with a resistance of 10k Ohms.
    • Pins: pin1, pin2
  6. Blue Panel Mount 4mm Banana Socket

    • Description: Blue banana socket for panel mounting.
    • Pins: Blue_Pin
  7. Red Panel Mount 4mm Banana Socket

    • Description: Red banana socket for panel mounting.
    • Pins: Red_Pin

Wiring Details

Arduino UNO R4 WiFi

0.96" OLED

16-channel analog multiplexer

Resistors (10k Ohms)

Blue Panel Mount 4mm Banana Socket

Red Panel Mount 4mm Banana Socket

Code Documentation

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET    -1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

const int buttonPin = 7;
const int muxSIG = A0;
const int muxEN = 2;
const int muxS0 = 3;
const int muxS1 = 4;
const int muxS2 = 5;
const int muxS3 = 6;

bool testing = true; // Startet direkt mit der Messung

void setup() {
  Serial.begin(9600); // Initialisiere die serielle Kommunikation
  pinMode(buttonPin, INPUT_PULLUP);
  pinMode(muxEN, OUTPUT);
  pinMode(muxS0, OUTPUT);
  pinMode(muxS1, OUTPUT);
  pinMode(muxS2, OUTPUT);
  pinMode(muxS3, OUTPUT);
  digitalWrite(muxEN, LOW);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.display();
  delay(2000);
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
  display.setCursor(0, 0);
  display.print("Kabeltester");
  display.display();
}

void loop() {
  if (digitalRead(buttonPin) == LOW) {
    delay(50);
    if (digitalRead(buttonPin) == LOW) {
      testing = true; // Setzt die Messung zurück
      while (digitalRead(buttonPin) == LOW);
    }
  }
  if (testing) {
    display.clearDisplay();
    display.setCursor(0, 0);
    display.print("Teste...");
    display.setCursor(0, 10);
    bool allOK = true;

    // Teste Kontinuität zur Masse für jeden Kanal
    for (int i = 0; i < 5; i++) {
      setMuxChannel(i);
      delay