Monday, 2 May 2016

Project scope

Project scope

1 we are building the propeller clock based on pov
2 after this we will show the analog time in our clock
3 we will show the minute and hour hand


Team
Puneet
Satyender
Rajesh




Members
Puneet Mohanpuria  -hardware and programming
Satyender -hardware and programming
Rajesh kumar- mathametical calculation


Block diagram

Pin diagram

list of components
voltage regulatr
capacitors and resistors
batteries
led's
microcontrollr
oscillatr
rtc
bldc motor
motor base
solder iron
Cpu fan
adapter
pro board
i c base
solder wire
motor
8051 programmer
rf module
humidity temperature sensor
double sided tape
keypad
wifi module
registers

Reference
http://www.instructables.com/id/Propeller-Clock/
http://www.bobblick.com/techref/projects/propclock/propclock.html
http://www.luberth.com/analog.htm
http://www.pyroelectro.com/projects/pyro_propeller_clock_pov/

Tools
a v r programmer 
h bridge
breadboard
mutimetr
gluegn
adapter

Initial approach
1 we have dc motor above which their is our circuit board
2 on the board we have atmega 16
3 power is given to atmega 16 using 7802 which convert 9 v to 5 volts 
4 their are led's fitted with appropriate resistances

Calculating Each Timing Step


Journey
achievments

we started with avr programming and understood the basics of  avr programming
we tried to understand how to programme a microcontrolller using hex file
we were successfuly able glow the led 
we learned soldering 



problems
we had no idea which ic to use
then how to programe it 
we had no idea what is avr programming how to burn a chip  
we were not able to make a stable pattern using pov
it was very difficult to control the rpm of the the motor 
we tried to use h bridge but the power supply was not constant
   
Approach





code for propeller clock
/*
 * GccApplication1.c
 *
 * Created: 3/20/2016 1:36:20 PM
 * Author : Puneet01
 */ 
#define F_CPU 20000000L
#include <avr/io.h>
#include <util/delay.h>
void Int0(void) interrupt 0 using 2

{

EX0=0;   // Avoid another INT1* until we are completely finished...
TH0=0xA4;
TR0=1;    // Start timer 0
}
void timer0(void) interrupt 1  using 3
{static unsigned char i,k;
k++;
if(k==12){
k=0;
if(i<5)  //hours ten digit
{P0=~(flook[f][i]);
i++;
}else if(i==5)//space{
P0=0xFF;
i++;
}
else if(i<11)//space
{P0=~(flook[(e%10)][i-6]);
i++;}
else if(i<14)//colon{
if(tog==1){
P0=~(colon[i-11]);
}else
{P0=0xFF;}
i++;
}else if(i<19)//min tens
{P0=~(flook[d][i-14]);
i++;}
else if(i==19)//space
{P0=0xFF;
i++;}
else if(i<25)//min on
{P0=~(flook[c][i-20]);i++;
}
else if(i<28)//colon
{
if(tog==1)
{
P0=~(colon[i-25]);
}
else{P0=0xFF;
}
i++;
}
\else if(i<33)//sec tens
{
P0=~(flook[b][i-28]);
i++;
}
else if(i==33)//space
{
P0=0xFF;
i++;
}
else if(i<39)//sec ones
{
P0=~(flook[a][i-34]);
i++;
}
else
{TR0=0;
P0=0xFF;
EX0=1;
i=0;
}
}
}

int main(void)
{
DDRA =0xff;
PORTA = 0x00;
int numcol=30;  // total gap used by numbers
int colg=48; // total gap columns
//float m=195.5;
float y=238617-numcol*195.5-colg*195.5;
float gap=195.5*4; // space for each gap b/w to numbers
while (1) 
    {
// code for printng 12
PORTA= 0x7f; //for 1 of 12
_delay_us(195.5);
PORTA= 0x00; //for gap b/w 1 and 2 of 12
_delay_us(195.5);
PORTA= 0x79; //for 2 part 1 of 12
_delay_us(195.5);
PORTA= 0x49; //for 2 part 2 of 12
_delay_us(391);
PORTA= 0x4f; //for 2 part 3 of 12
_delay_us(195.5);
// code for gap b/w 12 and first dot
PORTA= 0x00;//delay for 5 column 
_delay_us(gap);
// code for first dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w first dot and second dot
PORTA= 0x00;// delay for 5 column
_delay_us(gap);

// code for second dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w second dot and 3
PORTA= 0x00; // delay for 5 column
_delay_us(gap);
// code for printing 3 
PORTA= 0x7f; // for part 1 of 3
_delay_us(195.5);
PORTA= 0x07; // for part 2 of 3  
_delay_us(195.5);
PORTA= 0x7f; // for part 1 of 3
_delay_us(195.5);
PORTA= 0x07; // for part 1 of 3
_delay_us(195.5);
PORTA= 0x7f; // for part 1 of 3
_delay_us(195.5);

// code for gap b/w 3 and 3rd dot
PORTA= 0x00; // delay for 5 column
_delay_us(gap);
// code for 3rd dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w 3rd dot and 4th dot
PORTA= 0x00; // delay for 5 column
_delay_us(gap);
// code for 4th dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w 4th dot and 6
PORTA= 0x00; // delay for 5 column
_delay_us(gap);
// code for printing 6
PORTA= 0x4f; // for part 1 of 6
_delay_us(195.5);
PORTA= 0x49;  // for part 2 of 6
_delay_us(391);
PORTA= 0x7f;    // for part 3 of 6
_delay_us(195.5);

// code for 6 and 5th dot
PORTA= 0x00;
_delay_us(gap);
// code 5th dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w 5th dot and 6th dot
PORTA= 0x00;
_delay_us(gap);
// code for 6th dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w 6th dot and 9
PORTA= 0x00;
_delay_us(gap);
// code for printing 9
PORTA= 0x7f; // for part 1 of 9
_delay_us(195.5);
PORTA= 0x60; // for part 2 of 9
_delay_us(391);
PORTA= 0x7f; // for part 3 of 9
_delay_us(195.5);
PORTA= 0x63; // for part 4 of 9
_delay_us(391);
PORTA= 0x7f; // for part 5 of 9
_delay_us(195.5);


// code for 9 and 7th dot
PORTA= 0x00;
_delay_us(gap);
// code 7th dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w 7th dot and 8th dot
PORTA= 0x00;
_delay_us(gap);

// code for 8th dot
PORTA= 0x07;
_delay_us(195.5);
// code for gap b/w 8th dot and 12
PORTA= 0x00;
_delay_us(y);

    }
}