dice roller

Post on 26-Mar-2015

80 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Dice Roller

Team Members : Muhammad Iqbal Jaafar (FB 09035)

Sarina Shafie (FB 09066)Nur Qamarina Zaudi (FB 09043)

BFM 2013PROGRAMMING FOR ENGINEERFINAL PROJECT

BROUGHT TO YOU BY :

Press START Button

Hit Dice

Delay 3 Second

Lift UP

RESET

Lift Down

Process Flowchart

Introduction

Dice Roller

Used widely

in Games

and Casino.

Main Component of project is Stepper Motor and Visual Basic Interface

This device will roll the dice placed in the holes

and the dice will be display in a

mini elevator.

Objective

To design an electronic working dice roller with the use of stepper motor and using program to control

the device.

Problem Statement

How to apply the stepper motor and

parallel port given in

designing a new life

convenient product?

Mechanical Part

Wood Mounting Board Catgut UHU Glue

Hose Pulley Motor

Small Square Aluminum Pot

Metal Wire Hook

PULLEY

MOUNTING BOARD

WOOD

MOTOR

HOSE

FINAL PRODUCT

CIRCUIT DESIGN CONCEPT

Electronic Part

ULN 2803 was used to

From the program, the output will be send through the parallel

port from pin 2 until 9.

The output is then sent to IC ULN

2803 of pin 1 to 8.

From the ULN 2803 IC the output will be

invert and send to coil of stepper motor.

VCC which is red jumpered were

connected to pin 9 of IC.

Motor 1 ( Pin 11-15 ) and Motor 2 ( Pin 16-18) were connected to Pin 11-18 of

ULN 2803 IC

Pin 9 of the ULN 2803 IC were

grounded.

Real Electronics Circuit

ULN 2803

PARALLEL PORT

Testing Circuit

Programming Part

Public Class dice_roller

Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _ (ByVal PortAddress As Integer, _ ByVal Value As Integer) Dim delay As Integer Dim counter As Integer Dim pukul As Integer

End Class

Declaration

Visual Basic Interface

Start Button Private Sub Button1_Click(ByVal sender As

System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Out(888, 255) pukul = 1

For tolak As Integer = 1 To 100 System.Threading.Thread.Sleep(pukul) Out(888, 128) System.Threading.Thread.Sleep(pukul) Out(888, 144) System.Threading.Thread.Sleep(pukul) Out(888, 16) System.Threading.Thread.Sleep(pukul) Out(888, 48) System.Threading.Thread.Sleep(pukul) Out(888, 32) System.Threading.Thread.Sleep(pukul) Out(888, 96) System.Threading.Thread.Sleep(pukul) Out(888, 64) System.Threading.Thread.Sleep(pukul)

Out(888, 192) System.Threading.Thread.Sleep(pukul) Next System.Threading.Thread.Sleep(3000) 'motor besar pny XD delay = 1 counter = 300

For pusing As Integer = 1 To counter System.Threading.Thread.Sleep(delay) Out(888, 8) System.Threading.Thread.Sleep(delay) Out(888, 9) System.Threading.Thread.Sleep(delay) Out(888, 1) System.Threading.Thread.Sleep(delay) Out(888, 3) System.Threading.Thread.Sleep(delay) Out(888, 2)

System.Threading.Thread.Sleep(delay)

Out(888, 6) System.Threading.Thread.Sleep(delay) Out(888, 4) System.Threading.Thread.Sleep(delay) Out(888, 12) System.Threading.Thread.Sleep(delay) Next

End Sub

Reset Button Private Sub Button2_Click(ByVal

sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

'kasi turun lift delay = 1 counter = 300 For pusing As Integer = 1 To

counterSystem.Threading.Thread.Sleep(dela

y) Out(888, 12)

System.Threading.Thread.Sleep(delay)

Out(888, 4)

System.Threading.Thread.Sleep(delay)

Out(888, 6)

System.Threading.Thread.Sleep(delay)

Out(888, 2)

System.Threading.Thread.Sleep(delay)

Out(888, 3)

System.Threading.Thread.Sleepdelay)

Out(888, 1)

System.Threading.Thread.Sleep(delay)

Out(888, 9)

System.Threading.Thread.Sleep(

delay) Out(888, 8)

System.Threading.Thread.Sleep(delay)

Next

End Sub

Bill Of MaterialNo. Parts Description Quantity Price Per Unit (RM) Price (RM)

Mechanical Parts

1 Wood 4 m 2 1.50 per m 3.00

2 UHU Glue 7 ml 1 8.90 8.90

3 Catgut N/A N/A N/A N/A

4 Hose 2 ft 2 1.50 3.00

5 Pulley 2 1.50 3.00

6 Stepper Motor N/A N/A N/A N/A

7 Small Aluminum Pot N/A N/A N/A N/A

8 Metal Wire 1.00 1.00

9 Hook N/A N/A N/A N/A

10 Wrapping Paper 1 5.90 5.90

11 Ribbon 2 m 1 2.50 2.50

12 Mounting Board 26.5 in 2 5.90 11.80

13 Masking Tape 60 mm 1 2.80 2.80

Electronics Part

13 IC ULN 2803 N/A N/A N/A N/A

14 Stepper Motor N/A N/A N/A N/A

15 Parallel Port N/A N/A N/A N/A

16 Jumper N/A N/A N/A N/A

17 Electronic Board N/A N/A N/A N/A

TOTAL ESTIMATED COST

RM 41.9

0

Conclusion

This objective of this project is

achieved.

It may have the potentials to be marketed in the game industries mainly casinos.

The knowledge of stepper motor and parallel port were successfully

applied.

top related