|
~: Laser cutting machine circuit :~

Connection:-
A 4x3 matrix keyboard is connected with P1 as shown. Rows are connected with P1.0 - P1.3 and columns are connected with P1.4 - P1.6. Data lines of LCD (D0-D7) are connected with P0 through 74LS373 latch. Latch is enable through ALE from 89C51. Three controlling signals RS, RW & E are connected with P2.5, P2.6 & P2.7 respectively. For LEDs (LED1 - LED4) are connected with P2.4 - P2.1 as shown. P3 is used to drive two stepper motors through ULNA chip. A 12 MHz crystal along with 2 33pf capacitors provides clock signal to 89C51. Capacitor C1 is for power on reset feature.
Operation:-
-
Initially the message "enter x(horizontal) in 2 digits (inch)" is displayed
-
After pressing 2 digits as one enters it again message "enter Y (vertical) in 2 digits (inch)" is displayed
-
When both X and Y are entered then message "press start" is displayed and system waits for start switch to be pressed
-
As one presses start switch the operation will start. Motor 1 will start rotating CW direction. Indicated by LED1. Then motor 2 will rotate CW, indicated by LED2. Then one by one both motors rotate CCW (indicated by LED3 & LED4) and one round is complete.
-
Again same above cycle repeats for next sheet cutting.
Now this entire operation is handled by the software program written in C language that is loaded in micro-controller 89C51. So now let us understand it.
Software program: -
writecmd function sends command byte to LCD. It takes one argument byte and sends it to P0
writedata function sends data byte to be displayed on LCD. It also takes one argument byte and sends it to P0
writestr function writes whole string (message) on LCD. It takes pointer as an argument that points address of first character of string. Then through pointer it sends all the character one by one to P0
busy function provides delay after sending command or data byte to LCD
dely function generates delay between two consecutive pulses applied to stepper motor
keydly is key debounce delay of 0.1 sec.
display function takes hex value and first convert it into decimal, then convert it to ASCII. Then display these ASCII characters on LCD
main function handles entire operation.
-
It initializes all input output ports
-
Initializes LCD and displays messages
-
Detects and finds key press and performs corresponding tasks
-
It displays the number pressed on LCD as well as rotates both motors in sequential manner
Click here for C program code |