B A N G L A D E S H U N I V E R S I T Y O F E N G I N E E R I N G A N D T E C H N O L O G Y D E P A R T M E N T O F E L E C T R I C A L A N D E L E C T R O N I C E N G I N E E R I N G EEE 41 6 (January 2022) B2 Microprocessor and Embedded Systems Laboratory Final Project Report Multiplayer Gaming Console Using Dot Matrix Evaluation Form: STEP DESCRIPTI O N MAX SCORE 1 Report (Format, Reference) 10 2 Design Method and Complete Design (Hardware Implementation ) 15 3 Video Demonstration 10 4 Novelty of Design 15 5 Project Management and Cost Analysis 1 0 6 Considerations to Public Health and Safety, Environment and Cultural and Societal Needs 10 7 Assessment of Societal, Health, Safety, Legal and Cultural issues relevant to the solution 10 8 Evaluation of the sustainability and impact of designed solutions in societal and environmental contexts 1 0 9 Individual Contribution (Viva) 20 10 Teamwork and Diversity 10 TOTAL 1 2 0 Signature of Evaluator: ___________________________________________________ Academic Honesty Statement: IMPORTANT! Please carefully read and sign the Academic Honesty Statement, below. Type the student ID and Write your name in your own handwriting You will not receive credit for this project experiment unless this statement is signed in the presence of your lab instructor. “In signing this statement, We hereby certify that the work on this project is our own and that we have not copied the work of any other student s (past or present) , and cited all relevant sources while completing this project We understand that if we fail to honor this agreement, We will each receive a score of ZERO for this project and be subject to failure of this course. ” Full Name : Student ID: Full Name : Student ID: Full Name : Student ID: Full Name : Student ID: Full Name : Student ID: Table of C ontents Evaluation Form: ................................ ................................ ................................ ................................ 1 Academic Honesty Statement: ................................ ................................ ................................ ........... 1 1 Abstract ................................ ................................ ................................ ................................ ........ 1 2 Introduction ................................ ................................ ................................ ................................ 2 3 Design ................................ ................................ ................................ ................................ ........... 2 3.1 Design Method ................................ ................................ ................................ ................................ ................................ .......... 2 3.2 Circuit Diagram ................................ ................................ ................................ ................................ ................................ ........ 4 3.3 Full S ource Code of Firmware ................................ ................................ ................................ ................................ .................. 5 4 Implementation ................................ ................................ ................................ ......................... 14 4.1 Description ................................ ................................ ................................ ................................ ................................ .............. 14 4.2 Results ................................ ................................ ................................ ................................ ................................ .................... 16 4.3 Github Link ................................ ................................ ................................ ................................ ................................ ............. 17 4.4 YouTube Link ................................ ................................ ................................ ................................ ................................ ......... 17 5 Design Analysis and Evaluation ................................ ................................ .............................. 17 5.1 Novelty ................................ ................................ ................................ ................................ ................................ ................... 17 5.2 Project Management and Cost Analysis ................................ ................................ ................................ ................................ .. 18 5.2.1 Bill of Materials ................................ ................................ ................................ ................................ ........................... 18 5.2.2 Calculation of Per Unit Cost of Prototype ................................ ................................ ................................ .................... 18 5.2.3 Calculation of Per Unit Cost of Mass - Produ ced Unit ................................ ................................ ................................ ... 18 5.2.4 Timeline of Project Implementation ................................ ................................ ................................ ............................. 19 5.3 Practical Considerations of the Design to Address Public Health and Safety, Environment, Cultural, and Societal Needs .... 19 5.3.1 Considerations to public health and safety ................................ ................................ ................................ ................... 19 5.3.2 Considerations to environment ................................ ................................ ................................ ................................ ..... 19 5.3.3 Considerations to cultural and societal needs ................................ ................................ ................................ ............... 19 5.4 Assessment of the Impact of the Project on Societal, Health, Safety, Legal and Cultural Issues ................................ ............ 19 5.4.1 Assessment of Societal Issues ................................ ................................ ................................ ................................ ...... 19 5.4.2 Assessment of Health and Safety Issues ................................ ................................ ................................ ....................... 19 5.4.3 Assessment of Legal Issues ................................ ................................ ................................ ................................ .......... 1 9 5.4.4 Assessment of Cultural Issues ................................ ................................ ................................ ................................ ...... 19 5.5 Evaluation of the Sustainability the and Impact of the D esigned Solution in the Societal and Environmental Contexts ......... 20 5.5.1 Evaluation of Sustainability ................................ ................................ ................................ ................................ ......... 20 5.5.2 Evaluation of Impact of Design in Societal Context ................................ ................................ ................................ ..... 20 5.5.3 Evaluation of Impact of Design in Environmental Context ................................ ................................ .......................... 20 6 Reflection on Individual and Team work ................................ ................................ ............... 20 6.1 Individual Contribution of Each Member ................................ ................................ ................................ ............................... 21 6.2 Mode of TeamWork ................................ ................................ ................................ ................................ ................................ 21 6.3 Diversity Statement of Team ................................ ................................ ................................ ................................ .................. 21 6.4 Log Book of Project Impelementation ................................ ................................ ................................ ................................ .... 21 7 References ................................ ................................ ................................ ................................ .. 22 Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 01 1. Abstract 1. To learn the industry standards of microprocessors architecture and design 2. Learning to overcome the project implementation difficulties on the go and prepare ourselves for future industry experiences in microprocessor and embedded systems technolo gies Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 02 2 Introduction In modern days, the youth is engrossed in video games, and even more for the twenty - first century generation - Z kids with their excessive and sometimes even mental need - A video game. This general penchant for futile expression of fun and so called “digita l” happiness has somewhat triggered modern industry to invest even more into gaming industry. We have, in our project, tried to implement the forefathers of gaming industry of today’s Nintendo, Gameboy and make it an even beautiful but “easy - to - build” IoT project (Internet of Things) : : Multiplayer Car Racing Gaming Console. 3 Design Fig: Basic Server and two player setup 3.1 Design Method ❖ In our design, we planned initially to compete using two person, this essentially demands a server - client connection – for which we used Arduino Uno for both users. ❖ We first used our first hand experience that we learned from our previous semester course EEE 303 about shift registers and their workflow. The shift register loads the data serially by taking from an input pin and with every clock cycle. ❖ The 8x8 LED matrix we used are model 788BS and 1088AS. The display 8x8 is driven by logic high on row pins and logic low on column pins. Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 03 ❖ The Arduino Uno we used, model Atmega328P and both users are connected with a server where Raspberry Pi 4 model B plays the role of a server. ❖ The players individually should drive the car left or right to avoid obstacles. The minimum collision of a user makes him/her first a nd the other player last in a two horse game. ❖ The Arduino should be connected to each individual user and they should send the data from one user to the server and the server to other user. Thus the server decides from minimum collision who gets to become winner. Fig: Game layout and Control demo Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 04 3.2 Circuit Diagram Fig. Single Player console circuit diagra Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 05 3.3 Full Source Code of Firmware Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 06 Console Code (Arduino Uno) 1 const byte ROW_SLC_VAL = 4; 2 const byte ROW_SLC_CLK = 2; 3 const byte COL_SLC_VAL = 8; 4 const byte COL_SLC_CLK = 7; 5 const byte BUTTON_MSB = 13; // left 6 const byte BUTTON_LSB = 12; // right 7 8 const byte SCRN_W = 8; 9 const byte SCRN_H = 16; 10 const byte GAMELVL_LEN = 130; 11 12 byte screen[SCRN_H][SCRN_W] ={{1,1,1,1,1,1,1,1}, 13 {1,1,1,1,1,1,1,1}, 14 {1,1,1,1,1,1,1,1}, 15 {1,1,1,1,1,1,1,1}, 16 {1,1,1,1,1,1,1,1}, 17 {1,1,1,1, 1,1,1,1}, 18 {1,1,1,1,1,1,1,1}, 19 {1,1,1,1,1,1,1,1}}; 20 21 byte game_level[GAMELVL_LEN][SCRN_W] = {}; 22 23 int current_row; 24 int current_row_ctrl; 25 int player_pos[2]; 26 int player_pos_global[2] ; 27 int screen_window_pos[2]; 28 byte user_input[4]; 29 int collision_count = 0; 30 int flag = 0; 31 int input_flag = 0; 32 byte finishline = 30; 33 String verdict; 34 bool score_sent = 1; 35 bool score_shown = 0; 36 37 void make_game_level(byte game_level[GAMELVL_LEN][SCRN_W], byte nobs, byte finishline){ 38 for (int y=0; y<GAMELVL_LEN; y++){ 39 for (int x=0; x<SCRN_W; x++){ 40 if (x==0 || x==SCRN_W - 1){ 41 game_level[y][x] = 0; 42 }else{ 43 game_level[y][x] = 1; 44 } 45 } 46 } Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 07 47 48 randomSeed(115); 49 for (int d=0; d<nobs; d++){ 50 game_level[random(0,GAMELVL_LEN)][random(1,SCRN_W - 1)] = 0; 51 } 52 53 // make finish line 54 for (int y=0; y<finishline; y++){ 55 for (int x=0; x<SCRN_W; x++){ 56 if (y>=finishline - 2){ 57 game_lev el[y][x] = 0; 58 }else{ 59 game_level[y][x] = 1; 60 } 61 } 62 } 63 } 64 65 //void print_game_level(){ 66 // for (int y=0; y<128; y++){ 67 // for (int x=0; x<8; x++){ 68 // Serial.print(game_level[y][x],BIN); 69 // } 70 // Serial.println(); 71 // } 72 //} 73 74 void load_row_bits(int current_row, int SCRN_H, int wait){ 75 if (current_row!=SCRN_H - 1){ 76 digitalWrite(ROW_SLC_VAL,0); 77 }else{ 78 digitalWrite(ROW_SLC_VAL,1); 79 } 80 digitalWrite(ROW_SLC_CLK,1); 81 delayMicroseconds(wait); 82 digitalWrite(ROW_SLC_CLK,0); 83 delayMicroseconds(wait); 84 } 85 86 void load_data_bits(byte screen[SCRN_H][SCRN_W], int current_row, int arrlen, int wait){ 87 for (int idx=0; idx<arrlen; idx++){ 88 digitalWrite(COL_SLC_VAL,screen[current_row][idx]); 89 digitalWrite(COL_SLC_CLK,1); 90 delayMicroseconds(wait); 91 digitalWrite(COL_SLC_CLK,0); 92 delayMicroseconds(wait); 93 } 94 digitalWrite(COL_SLC_CLK,1); 95 delayMicroseconds(wait); Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 08 96 digitalWrite (COL_SLC_CLK,0); 97 delayMicroseconds(wait); 98 } 99 100 void init_global_vars(){ 101 current_row = 0; 102 current_row_ctrl = pow(2,SCRN_H - 1); 103 player_pos[0] = SCRN_H - 4; 104 player_pos[1] = SCRN_W/2; 105 player_pos_global[0] = SCRN_H - 4; 106 player_pos_global[1] = SCRN_W/2; 107 user_input[0] = 0; 108 user_input[1] = 0; 109 user_input[2] = 0; 110 user_input[3] = 0; 111 screen_window_pos[0] = GAMELVL_LEN - SCRN_H - 1; 112 screen_window_pos[1] = 0; 113 } 114 115 void init_pins(){ 116 pinMode(ROW_SLC_VAL,OUTPUT); 117 pinMode(ROW_SLC_CLK,OUTPUT); 118 pinMode(COL_SLC_VAL,OUTPUT); 119 pinMode(COL_SLC_CLK,OUTPUT); 120 pinMode(BUTTON_MSB,INPUT); 121 pinMode(BUTTON_LSB,INPUT); 122 } 123 124 void read_user_input(byte user_input[4]){ 125 byte button_R = digitalRead(BUTTON_LSB); 126 byte button_L = digitalRead(BUTTON_MSB); 127 // byte button_ML = 3 - (button_M*2 + button_L); 128 // if (button_ML==0){ 129 // user_input[0] = 1; 130 // user_input[1] = 0; 131 // user_input[2] = 0; 132 // user_input[3] = 0; 133 // }else if (button_ML==1){ 134 // user_input[0] = 0; 135 // user_input[1] = 1; 136 // user_input[2] = 0; 137 // user_input[3] = 0; 138 // }else if (button_ML==2){ 139 // user_input[0] = 0; 140 // user_input[1] = 0; 141 // user_input[2] = 1; 142 // user_input[3] = 0; 143 // }else if (button_ML==3){ 144 // user_input[0] = 0; 145 // user_input[1] = 0; Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 09 146 // user_input[2] = 0; 147 // user_input[3] = 1; 148 // } 149 if (button_L==1){ 150 user_input[0] = 0; 151 user_input[1] = 0; 152 user_input[2] = 0; 153 user_input[3] = 1; 154 }else if (button_R==1){ 155 user_input[0] = 0; 156 user_input[1] = 0; 157 user_input[2] = 1; 158 user_input[3] = 0; 159 }else{ 160 user_input[0] = 0; 161 user_input[1] = 0; 162 user_input[2] = 0; 163 user_input[3] = 0; 164 } 165 } 166 167 void load_screen_window(byte screen[SCRN_H][SCRN_W],byte game_level[GAMELV L_LEN][SCRN_W],int screen_window_pos[2]){ 168 for (int y=0; y<SCRN_H; y++){ 169 for (int x=0; x<SCRN_W; x++){ 170 screen[y][x] = game_level[screen_window_pos[0]+y+1][x]; 171 } 172 } 173 } 174 175 void update_screen(byte screen[SCRN_H][SCRN_W],byte game_level[GAMELVL_LEN][SCRN_W],int player_pos[2],int screen_window_pos[2]){ 176 load_screen_window(screen,game_level,screen_window_pos); 177 178 screen[player_pos[0]][player_pos[1]] = 1; 179 screen[player_pos[0]+1][player_pos[1]] = 1; 180 //player_pos[0] = player_pos[0] - user_input[0] + user_input[1]; 181 //screen_window_pos[0] = screen_window_pos[0] - user_input[0] + user_input[1]; 182 screen_window_pos[0] - = 1; 183 player_pos[1] = player_pos[1] + user_input[2] - user_input[3]; 184 // if (playe r_pos[0]<0){ 185 // player_pos[0] = 0; 186 // } 187 // if (player_pos[0]>6){ 188 // player_pos[0] = 6; 189 // } 190 if (screen_window_pos[0]<0){ 191 screen_window_pos[0] = 0; Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 10 192 } 193 if (screen_window_pos[0]>GAMELVL_LEN - SCRN_H - 1){ 194 screen_window_pos[0] = GAMELVL_LEN - S CRN_H - 1; 195 } 196 if (player_pos[1]<1){ 197 player_pos[1] = 1; 198 } 199 if (player_pos[1]>SCRN_W - 2){ 200 player_pos[1] = SCRN_W - 2; 201 } 202 screen[player_pos[0]][player_pos[1]] = 0; // not changing 203 screen[player_pos[0]+1][player_pos[1]] = 0; 204 } 205 206 void collision_detection(byte screen[SCRN_H][SCRN_W],byte game_level[GAMELVL_LEN][SCRN_W],int player_pos[2],int screen_window_pos[2]){ 207 if (game_level[screen_window_pos[0]+player_pos[0]][player_pos[1]] == 0 ){ 208 collision_count++; 209 } 210 } 211 212 void show_winner(byte game_level[GAMELVL_LEN][SCRN_W],int player_pos[2],int screen_window_pos[2]){ 213 for (int y=0; y<SCRN_H; y++){ 214 for (int x=0; x<SCRN_W; x++){ 215 if (x==SCRN_W/2){ 216 game_level[y][x] = 0; 217 }else{ 218 game_level[y][x] = 1; 219 } 220 } 221 } 222 } 223 224 void show_looser(byte game_level[GAMELVL_LEN][SCRN_W],int player_pos[2],int screen_window_pos[2]){ 225 for (int y=0; y<SCRN_H; y++){ 226 for (int x=0; x<SCRN_W; x++){ 227 if (y==SCRN_H/2){ 228 game_level[y][x] = 0; 229 }else{ 230 game_level[y][x] = 1; 231 } 232 } 233 } 234 } 235 Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 11 236 void show_tie(byte game_level[GAMELVL_LEN][SCRN_W],int player_pos[2],int screen_window_pos[2]){ 237 for (i nt y=0; y<SCRN_H; y++){ 238 for (int x=0; x<SCRN_W; x++){ 239 if (y==SCRN_H/2 || x==SCRN_W/2){ 240 game_level[y][x] = 0; 241 }else{ 242 game_level[y][x] = 1; 243 } 244 } 245 } 246 } 247 248 void setup() { 249 init_pins(); 250 init_global_vars(); 251 make_game_level(game_level,10,finishline); 252 Serial.begin(9600);while (! Serial); 253 } 254 255 void loop() { 256 load_row_bits(current_row,SCRN_H,2); 257 load_data_bits(screen,current_row,SCRN_W,2); 258 259 if (input_flag == 10){ 260 read_user_input(u ser_input); input_flag = 0; 261 }else{ 262 input_flag++; 263 } 264 265 266 if (flag==1){ 267 flag = 0; 268 update_screen(screen,game_level,player_pos,screen_window_pos); 269 collision_detection(screen,game_level,player_pos,screen_window_pos); 270 } 271 272 273 current_row++ ; 274 current_row_ctrl/=2; 275 delay(5); 276 if (current_row==SCRN_H){ 277 current_row = 0; current_row_ctrl = pow(2,SCRN_H - 1); flag = 1; 278 }else{ 279 flag = 0; 280 } 281 282 if (screen_window_pos[0]==0 && score_sent==1){ Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 12 283 // game finished 284 Serial.println(collision_count - 2); // send to Rpi 285 score_sent = 0; 286 } 287 //Serial.println(69); 288 if (Serial.available()){ 289 verdict = Serial.readStringUntil(' \ n'); 290 verdict.trim(); 291 //Serial.println(verdict); 292 if (verdict.equals("1") && s core_shown==0){ 293 show_winner(game_level,player_pos,screen_window_pos); score_shown = 1; 294 }else if (verdict.equals("0") && score_shown==0){ 295 show_looser(game_level,player_pos,screen_window_pos); score_shown = 1; 296 }else if (score_shown==0){ 297 show_tie(game_level,player_pos,screen_window_pos); score_shown = 1; 298 } 299 } 300 } 301 302 Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 13 Server Code (Raspberry pi Python) 1 2 import serial 3 4 ser0 = serial.Serial('/dev/ttyACM0',9600, timeout=1) 5 ser1 = serial.Serial('/dev/ttyACM1',9600, timeout=1) 6 ser0.flush() 7 ser1.flush() 8 9 line0 = "" 10 line1 = "" 11 done = 0 12 13 while done<2: 14 if ser0.in_waiting > 0: 15 line0 = ser0.readline().decode('utf - 8').rstrip() 16 print("ACM0 output:") 17 print(line0) 18 done = done + 1 19 if ser1.in_waiting > 0: 20 line1 = ser1.readline().decode('utf - 8').rstrip() 21 print("ACM1 output:") 22 print(line1) 23 done = done + 1 24 25 26 while True: 27 if int(line0)<int(line1): 28 ser0.write("1 \ n".encode()) 29 ser1.write("0 \ n".encode()) 30 print("ACM0 is winner") 31 elif int(line0)>int(line1): 32 ser0.write("0 \ n".encode()) 33 ser1.write("1 \ n".encode()) 34 print("ACM1 is winner") 35 else: 36 ser0.write("9 \ n".encode()) 37 ser1.write("9 \ n".encode()) print("tie") Table: Source Code for the main program Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 14 4 Implementation 4.1 Description The components we used in this project are described here. # Component – 1:: The pinout in this IC is not pinned out as was depicted in our Proteus Model which proved to be difficult to find proper pins and thus, the column pins are low and row pins are high. However, due to the internal configuration of the pins, simultaneously brightening two slanted pins are not possible. Hence there should be sweeping to show data. # Comp onent – 2 :: The shift register shifts data serially with each clock pin and latch pin pulses. The data pin (Pin No. 14) gets either 0 or 1 to show high or low pulse. There are corresponding 8 output pins and an additional output pin to pass through the data to the next register. This is what we have implemented for our 16 by 8 dot matrix display. # Component – 3 :: Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 15 Arduino Uno is a multi purpose microprocessor that uses microprocessor Atmega328P to control various inputs or outputs. The corresponding code must be written to provide proper amount of data to feed through the shift register and the relevant dot matrix display. This is one of the work orders and the other work order is to transmit the data to server Raspberry Pi to check which player has w on the race. The Arduino uses USB type B to connect to the microprocessor and the other end goes to the Raspberry Pi. # Component – 4 :: The Raspberry Pi 4 model B uses Raspberry original power supply that uses 96 - 230Vac operating input range and Input Current of 0.5A maximum and Input Power consumption (no load): 0.075W maximum For our project we have programmed the raspberry pi as a net work switch that can also power all the connected consoles i.e. Arduinos with 5V through USB connection. The connected consoles communicate bi - directionally with the raspberry pi using serial communication. In brief, the raspberry waits for a minimum numbe r of consoles to connect with itself. After that it commands the consoles to load up the same game environment and starts the game. Afterwards it keeps track of the players score and when each player have crossed the finish line it gives each player a posi tion based on score. Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 16 4.2 Results The figure above is the moment when the two players are individually playing the race car game. The player with the least number of collisions will be rewarded as a winner. The figure here is the position when the two players both match the collision score, hence they will be tied to be both winners/losers. Thus there will show the sign of both winning and losing, by cascading that’s a Plus (+) sign on the display. Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 17 As we can see, the winner here is the player on the left, and the player who came second in race is the one on the right. 4.3 Github Link https://github.com/fahimabid07/DotMatrixMultiplayerRacingGame 4.4 YouTube Link https://youtu.be/f6B5 - NWgM_U 5 Design Analysis and Evaluation 5.1 Novelty Our project incorporates Raspberry Pi using SSH network frame for using as a server for bi - directional communication between individual user console. The data sent by an user (a player) provides apt communication with the server(here, raspberry pi) and the server decide how to judge the player based on the collision outcome. This provides a useful data communication system between users. However, this increases the overall value for users for Raspberry Pi is now a novelty itself, being extremely expensive in the market. Multiplayer Game Console Using Dot Matrix EEE 416 ( January 2022 ) B2 Group 2 - Final Project Page 18 5.2 Project Management and Cost Analys is 5.2.1 Bill of Materials 5.2.2 Calculation of Per Unit Cost of Prototype The table above is our total cost of all the equipment that we have bought. However, after many trials and errors, we have figured out a system for which our system can run stably. In this configuration, we have 2 dot matrix per user, 3 8 - bit parallel shift register, 2 pushbuttons and both the users use a Raspberry Pi as server which traditionally has a capacity to hold 4 USB devices, we can distribute this cost in 4 ways. Therefore, the total cost of a unit should be, Arduino Uno → 1250 /= Dot Matrix display → 200/= Shift Register → 120/= Push Button → 6/= Raspberry Pi → 4000 /= ------------------------------------------- Total → 5576 /= 5.2.3 Calculation of Per Unit Cost of Mass - Produced Unit We have minimized our per unit cost by contacting with suppliers and designing custom PCB with ICs instead of full Arduino or Raspberry PI boards Hence, we have calculated per unit price by using actual components, that is 1/7 th of the prototype cost. Product Model Quantity Unit Price Total SN74HC145N,74HC145,74LS145,DIP 16 pin Encoder IC 3811 4 3 0 .00 120 74595, SN74HC595N,74HC595,74LS5959,DIP pin IC 3805 7 40.00 280 Arduino Nano ATmega328p 1 750. 00 750 Arduino Uno ATmega328p 2 1250.00 2500 Dot Matrix 788BS, 1088AS 6 100 600 Raspberry PI PI 4 Model B 1 4000.00 4000 Push Buttons Generic 10 3 30 Total 8280/ - Product Model Quantity Unit Price Total 74595, SN74HC595N,74HC595,74LS5959,DIP pin IC 3805 3 40 120 Console PCB Customized 1 250 250 Dot Matrix 788BS, 1088AS 2 100 200 Server PCB Customized 1 250 250 Total 820/ -