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

Arduino Nano-Based Propeller LED Pendulum Clock with Hall Sensor and Battery Power

View and Edit Project In Cirkit DesignerImage of Arduino Nano-Based Propeller LED Pendulum Clock with Hall Sensor and Battery Power

Circuit Documentation

Summary

This circuit is designed to interface an Arduino Nano with multiple LEDs, a Hall sensor (magnetic), resistors, a polymer lithium-ion battery, a toggle switch, and utilizes embedded code for control. The primary function of the circuit is to create a propeller LED pendulum clock, which displays time using LEDs while responding to magnetic sensor inputs and serial commands for time adjustments.

Component List

Microcontroller

Sensors

Power Supply

Switches

LEDs

Resistors

Wiring Details

Arduino Nano

Hall sensor (magnetic)

Polymer Lithium Ion Battery - 850mAh

Toggle Switch

LEDs

Resistors

Documented Code

// hobbyprojects
// 27-05-2020  Propeller_LED_Pendulum_Clock.ino

char ch;
int sensorPin = 2;
unsigned int i,n,c,nc,k,d,y,bn,mp,m = 0;
float dl;
unsigned long timecurr,timeold,previousTime = 0;
int hours = 5;
int minutes = 45;
int seconds = 00;
uint16_t timer_count_A=0; 
byte number,t,a,temp,data = 0;
int val;

const PROGMEM  unsigned char data1[]={/* Data omitted for brevity */};

void setup() 
{
  // Setup code omitted for brevity
}

void loop() 
{
  // Main loop code omitted for brevity
}

// Additional functions omitted for brevity

void update_time()  
{
 // Time update function omitted for brevity
}

void us_time()
{    
  // Microsecond timing function omitted for brevity
} 

ISR(USART_RX_vect)
{ 
  // USART receive interrupt service routine omitted for brevity
}

Note: The code provided is a snippet and does not include the entire code for brevity. The full code would include the omitted data and function implementations. The code is responsible for controlling the LEDs to display the time and respond to serial commands for time adjustments. It uses interrupts for timing and USART for serial communication.