Wednesday, 28 December 2011

The Circuit Draw

Figure 1 the circuit draw
Figure 2 the circuit of the clock controller


Nutshell


Our Clock Controller can perform well, we will be able to display the clock on the 7 Segment LED display. Our clock functions were based on program on the AT89C2051 PIC and the circuit can perform based on ADC or DAC circuit condition. We also learned how circuit function for ADC/DAC circuit. We can learn how to program hardware we made and run it on our project. This can help us in doing our next semester project.

Warmly wishes from us, Merry Christmast!
 

Methodology of our research

Here is the flow of our research which represent with the aid of the flow chart.

Tuesday, 27 December 2011

Clock Controller

Figure 1.1 Hardware For The Clock Controller

Figure 1.2 Hardware For The Clock Controller


Analog-to-Digital Conversion (ADC) and Digital-to-Analog Conversion (DAC) are the processes that allow digital computers to interact with these everyday signals. Digital information is different from its continuous counterpart in two important respects: it is sampled, and it is quantized. Both of these restrict how much information a digital signal can contain.

Comparison Between Digital and Analog

DIGITAL
ANALOG
Digital system is used to process information.
·         Somehow need to convert an analog value into a digital value.
·         Perform digital operations on the data.
·         Somehow need to convert the digital results back into an analog quantity.
·         E.g.
o   CD’s
o   MP3’s
o   DVD’S
Most value in nature:
·         Temperature
·         Speed
·         Position
·         Etc.

  QUANTIZATION


Quantization, in mathematics and digital signal processing, is the process of mapping a large set of input values to a smaller set – such as rounding values to some unit of precision.

Because quantization is a many-to-few mapping, it is an inherently non-linear and irreversible process (i.e., because the same output value is shared by multiple input values, it is impossible in general to recover the exact input value when given only the output value).



There are two substantially different classes of applications where quantization is used:

  • The first type, which may simply be called rounding quantization, is the one employed for many applications, to enable the use of a simple approximate representation for some quantity that is to be measured and used in other calculations. This category includes the simple rounding approximations used in everyday arithmetic. This category also includes analog-digital conversion of a signal for a digital signal processing system (e.g., using a sound card of a personal computer to capture an audio signal) and the calculations performed within most digital filtering processes. Here the purpose is primarily to retain as much signal fidelity as possible while eliminating unnecessary precision and keeping the dynamic range of the signal within practical limits (to avoid signal clipping or arimethic overflow). In such uses, substantial loss of signal fidelity is often unacceptable, and the design often centers around managing the approximation error to ensure that very little distortion is introduced.
  • The second type, which can be called rate–distortion optimized quantization, is encountered in the source coding for "lossy" data compression algorithms, where the purpose is to manage distortion within the limits of the bit rate supported by a communication channel or storage medium. In this second setting, the amount of introduced distortion may be managed carefully by sophisticated techniques, and introducing some significant amount of distortion may be unavoidable. A quantizer designed for this purpose may be quite different and more elaborate in design than an ordinary rounding operation. It is in this domain that subtantial rate distortion analysis theory is likely to be applied. However, the same concepts actually apply in both use cases.


Tuesday, 6 December 2011

Part Two : The Clock Controller


Clock Controller V2.0
One day I found a small 7-segment LED with multiplex connection. It is nice to be used as the display for clock controller. So I spent my weekend built the board. Below are the pictures for outlook and internal. The board is quite small. The output has small relay for 0.5A AC load.

Figure 1. Example of mini clock controller

Figure 2 Another best example
This version has only three buttons. We can set current hour and min easily. The preset time on/off for relay control output are defined in the program.
// preset set time on/off are predefined in rom, user may change it here
#define onHour1 19
#define onMin1 00
#define offHour1 21
#define offMin1 30
Also if you need more period to turn on/off you can add, say onHour2, onMin2, offHour2, and offMin2. And provide the function that compares such period. It will be the same as function comparetime. Or you may insert at if statements. When reset, the board will turn output off, until user set current time, the clock will run again. This prevent improper output firing.
void comparetime()
{
if(flag1 & 0x40) // compare time only when user enter new time
{
if(flag1 & 0x01)
{
flag1 &= ~0x01;
if(hour == onHour1 && min == onMin1)
opto = 0x7f; /* clear P3.7 turning opto on */
if(hour == offHour1 && min == offMin1)
opto = 0xff; /* set bit P3.7 turning opto off */
}
}
}




Part One : The Clock Controller

The Clock Controller V1.1was designed to be an exemplary of using 'C' language to control timer0interrupt, 7-segment LED and keypad scanning. It provides 1-bit sink currentdriving output, for driving a relay, opto-triac, say. Many projects requiring7-segment display and keypad interfacing may get the idea from the Clockcircuit and software.



Hardware

Figure 1 shows a circuitdiagram of the Clock Controller V1.1. P10-P1.7 drives 7-segment commonanode LED with sink current. P3.0-P3.3 also drives a base pin of 4-PNPtransistor, 2n2907 with sink current. As shown in the figure, the 2nd 2-digitLED that connected to P3.2 and P3.3 is rotated 180 degrees to the 1st 2-digitallowing the pt. segment to be used for 1 second blinking. P3.0-P3.3 alsoconnects four momentary switches while the other legs are tied to inputport P3.4. During display and key switch scanning, a logic '0' is shiftedfrom P3.0 to P3.3,  if there was a key pressed, P3.4 then became low.P3.7 is a 1-bit sink current driving, an example in the circuit uses a2n2907 to drive a small electromechanical relay 5V, say.

Figure 1. Circuit related

Software

The program clock.cwas written in ‘C’ language and was complied by Micro-C Compiler from DunfiledDevelopment Systems. The memory model is TINY. The hex file of clock.csuitable for downloading by Easy-Downloaderis clock.hex.
The Clock1.cwas modified for C51 compiler. The function that updates real-time clockwas moved into timer0 interrupt service routine. The HEX file is Clock1.hexsmaller than compiled by Micro-C.
I got many requests askingmodification of the source code. Now you can modify the source code byyourself with the free compiler sdcc for 8051. Here is the source codeof new firmware, clock2.c and the hex file,clock2.hex.Please test it and let me know the result. I haven't tested my hardwareyet, because I cannot find it now. This project is quite long time ago.You may add your code or modify whatever you like to have using sdcc! Youmay download the sdcc here, sdcc.zip.

Practice


  • The function time( ) in clock.cwas not put in the timer0 service routine, there's a bit delay at scanLED() function making the clock delay, try write a function that make adjustmentof the clock.


  • With C51 compiler, there's aspace for more functions to put in, write a function that saves a secondtime on and off.

  • Heavy Load Driving

    I suggest to use a zero switchsolid-state relay for driving heavy loads (>10A). Most solid state relay'sinput can be driven with 3-30Vdc without any problems.


    Contribution to Clock Controller Project

    • Sridhar Vittalrao designed the PCB layout (Protel), Clock.zip
    • Petar Timotijevic Pancevo, Serbia made the single sided PCB in Cadsoft Eagle for Clock Controller Ver. 1.1. The clock controller has two PCB. The first board is main circuit and the second board is display module. Connection between them is made with ribbon cable. This makes easier to implement display in the right angle. More detailed in the compressed file, i.e. Eagle3D view of boards, specification, compiler instructions, and PCB print data information. Petar has modified some part based on the original circuit: Transformer and the output are implemented, i.e. selectable 220V or 110V.  The output is optocoupler with manual on/off, and switch for pin11 output, relay on 12V with signal led diode, 78S05 is used instead of 78L05 (100mA), 7812 if needed, standard 7-seg display connection. PCB and circuit have been tested. Click here to download it, PCB V1.1.RAR
    • Petar Timotijevic describes how to modify the time schedule in the HEX code using the freeware HEX EDITOR directly. This eliminates the need of recompilation. Click here for the explanation,Modify Time Schedule with HEX Editor




    Sunday, 4 December 2011

    The entire Entity of the Mechaputer

    The Mechaputer Holdings entirely have a lot of loyal workers that willing to share and gain experience as well as idea as to enhance the company level.

    Presenting you the Board of Director of the Mechaputer Holdings which carry a very big responsible as to ensure the company succeed and gradually growth by the mean time.


    The President : Mr. Mohd Nadzir Mohd Kamal
    Vice- President : Ms. Shakirah Yatim
    Marketing Department:

    Research and Development Department : 

    Head of Engineer Department : 
    Warmly welcome to our company, thank you.



    Friday, 30 September 2011

    Welcome notes

    Hye there creative people,
    here is our story begin of sharing our technology with your creative surrounding.thank you