A Mafia Game

by Interstellar Idiot in Circuits > Arduino

481 Views, 2 Favorites, 0 Comments

A Mafia Game

AU (v6~recovered).png
AU H bot.png
AU (v6~recovered)top.png
AU holder.png
AU H.png

Hi, my name is Ahemad and I study at Green Valley High School and am currently studying in 9 grade.

Mafia is a party game in which different people are given different roles and have to play accordingly. You can learn more about the rules and gameplay HERE. In this project, I will make a device that makes it easy to give random roles to people using LEDs.

Supplies

Fusion 360

Magnets

3d Printing

RGB LEDs

Shift Registers

I2C LCD

Keypad

Coding

So this device is going to work by lighting RGB LEDs to different colors and indicating the player's roles. The receiver is going to fit into the transmitter wirelessly using magnets. one receiver will have 4 magnets attached to the bottom for R G B and Cathode. The transmitter will then give a signal to the receiver for the color of the LED which will be stored in capacitors. and when the switch is pressed the capacitor powers the LED indicating the role. The keypad will take the input for the total number of people and roles.The code:


Downloads

Schematic

Screenshot 2023-03-27 at 23-17-12 Circuit design Smooth Rottis-Trug Tinkercad.png

Connect all the things in the following manner.

We will connect the LEDs later using Magnets.

The LED Holder

AU H.png
AU H bot.png
Screenshot 2023-03-28 at 14-46-47 EasyEDA(Standard) - A Simple and Powerful Electronic Circuit Design Tool.png
WhatsApp Image 2023-03-28 at 3.34.25 PM.jpeg

This is the design for the LED holder. At the bottom of it is the place for magnets for R G B and cathode each. Then wires will be soldered to the magnet using the method shown in THIS video. The connections inside the holder are shown in the image. The R G B and cathode will be connected to the magnets. the magnets on the other side will be connected to the shift registers. NYN part will charge the capacitors and when the switch will be pushed it will glow the LED. This part was created using Fusion 360. These will be a total of 16 in number. The file is attached below.

Downloads

The NYN Part

AU (v6~recovered)top.png
WhatsApp Image 2023-03-28 at 4.50.03 PM(1).jpeg

I still do not know what to call this part so for now I am calling this NotYetNamed. This part gives a signal to the led holders (Charging the capacitors) using shift registers. It has the space for LCD and we can glue the Keypad below the LCD. There is also space for the attachment of magnets on the Right side of the model. There are a total of 16 spaces for holders and each has 4 holes for magnets. The wires will be soldered from the shift registers' output to the magnets. The polarity of one of the 4 magnets will be opposite the others so that the holders will only have 1 way to connect. Also, the magnets will be connected to shift registers in an order - Left to Right. The connection to each cell in the NYN will be the same as in the Holder. The Connection to the NYN part is also shown. The connection is the same for all three and should be in the same order. The are 2 Registers for each color referred to as S1 and S2 in the image. and P indicates the output Pin number ranging from 0-7.The file is attached below.

Downloads

Done!

Screenshot 2023-03-28 at 17-24-51 Circuit design Epic Jofo Tinkercad.png

And with That, it is done. I could not make this physically as I do not have access 3D printing. But HERE is the simulation on Tinkercad. Thank You.