Final Project

QA BOX: test your culture!

Development

Bill Of Materials

The Box

The concept of QA Box is Box to include a notebook, a hole to insert some cards (one for each answer) and a button to start the question. Figure 1 shows this concept. But I wanted to do more, so I decided that the Box could be transported and assembled on site. The notebook could be put inside the closed Box and each part could have to fit in with each other. So I thought these Box pieces:

1. The cover of the closed Box becomes the base to support the notebook (it has a grid for the air);

2. The base of the box becomes the cover for the notebook display;

3. The main part of the box covers the notebook keyboard and has three compartments where to put the electronic components, the cards and the button.

You can see these steps in Figure 2.

Figure 1: First-angle orthographic projection of the Box. Figure 2: Mounting the Box step by step.

I designed the Box pieces using Autocad (You can download the .dwg file at the bottom of the page) and I laser cut it at Opendot using the GCC SpiritGLS passing through Rhino. To cut the thickness of 3 mm, I used 2,5 for speed and 100 for power. Fortunately I did not have any problems with the laser cutter. In fact, before cutting, I studied the pieces in 3D view and this allowed me to eliminate the errors. To have perfect joints I have increased the thickness of 0.1 mm (the total carve is 0,2 mm). In this way I could assemble the pieces without using glue. Figure 3, 4 and 5 show the laser cutter step. If you want to know more details about laser cutter and How to design through Autocad, you can see my Assignment 3 (Computer-Controlled Cutting).

Figure 3: Laser cutting the Box. Figure 4: Laser cutting the Box. Figure 5: Laser cutting the Box.

The Case

It was more complicated to prepare the Case to carry the Box. I decided to use the CNC machine, but I wanted that the Case could become the Box table. In fact, if the Box is simply putting on a normal table, the base grid becomes useless. Initially I was thinking to make a normal totem, but then I thought about a Case-Table object. You can see my sketches on Figure 6.

Figure 6: Sketch to study the Case.

The first version (Fig. 7) was not a success. The four pieces had to be mounted around the box, but then they could not be assembled to form the table. I tried to make a prototype with the 3D printer and I realized that assembly was complicated and the pieces did not stay together easily. After an afternoon of drawings I decided to sleep on.

Figure 7: First version of the Case.

The next day the solution was clear. I designed the final version (Fig. 8) of the Case very quickly: two vertical supports jointed into horizontal cave bases around the Box. I thought to design two types of vertical supports: for three and for four joints.

Figure 8: Final version of the Case.

At Opendot I prepared the file for CNC machine using VCarve and then I moved to the Shopbot. I used the 4 mm tool and I cut the OSB material (Fig. 9 and 10). For details on using VCarve and ShopBot, you can see my Assignment 7 (Computer-Controlled Machining).

Figure 9: Cutting the Case with CNC. Figure 10: Cutting the Case with CNC.

Shopbot took about 40 minutes to finish. Then I cleaned the machine, cut all Tabs and refine all surfaces using sandpaper. Final result was good (Fig. 11) and the Case worked fine (Fig. 12 and 13)!

Figure 11: Assembling the case. Figure 12: Putting the Box into the Case. Figure 13: Trasporting the Case.

The Electronic circuit

Initially I thought to have four buttons centered on the Card hole to have sixteen combinations. But there was a symmetry problem: the same Card activated two combinations if inserted in both way. To avoid this problem, I thought to put an activation button. But to have only a Card responding to a single combination, I also decentred the four buttons: if the Card space is divides into five parts, you have the activation button at one extreme, one empty space to the other, and the three buttons in the centre. Figure 14 shows this.

Figure 14: Studying how the Cards press the buttons.

I designed the circuit using Eagle: first the main circuit (Fig. 15), then the circuit for the button that can strat the question (Fig. 16). So I used all the ATtiny44 PINs. I perfected the circuits on CorelDraw (Fig. 17) and prepared the file for the milling machine using the FabModules. I set these parameters on FabModules:

PCB traces (1/64)

PCB outline (1/32)

Figure 15: Designing the circuit in Eagle. Figure 16: Designing the support board for the button. Figure 17: Main board files for milling machine.

I used Roland MDX-40 (Fig. 18) to mill the circuits at Opendot. If you want to know more details for using Roland MDX-40 you can see my Assignment 4 (Electronic Production). If you want to know more about Eagle you can see my Assignment 6 (Electronic Design).

Figure 18: Milling the board.

Finally I soldered the components (Fig. 19) and set the fuses (the same of the Hello Board) using my FabISP. Therefore I started to program it. For details about fuses and how to connect the board to the notebook using the FAbISP and the FTDI Cable, you can see my Assignment 8 (Embedded programming) and my Assignment 10 (Output Devices).

Figure 19: Testing soldering of the main board.

The Software

To program the circuit I used Arduino IDE. If you want to know how to install and set Arduino IDE using the ATtiny series, you can see my Assignment 13 (Input Devices).

As I did in the Interface and Application Programming week with Processing, in the Arduino code I decided to use status variable. The status can be: zero if the player press the start button connected to pin A4; one when the ATtiny waits for a new question coming from the serial port; two if it is checking the answer. Specifically, to check the answer the code reads the three buttons of the board (A2, A3 and A7) and computes the combination of pressed and unpressed buttons. So if the combination corresponds to the question, it beeps a positive sound and sends back the value to the Processing interface. Otherwise, it generates a negative sound and waits for the next card. The sound of the buzzer is generated with a sequence of short digital pulses: a "positive" sound feedback comes from a sequence having growing frequencies (DAAA-DI), a "negative" is produced with decreasing frequencies (DI-DAAA). I did not used the piezo speaker library of Arduino because it was too big and the code was to big for the 4 KB of memory of the ATtiny.

Below the code.

    #include 

    #define speakerPin PIN_B2
    #define startPin A4
    #define serSpeed 9600

    SoftwareSerial mySerial(PIN_A0, PIN_A1);


    int btn = 0;
    char tanswer = 0;
    int stato = 0;

    void setup() {
    mySerial.begin(serSpeed);
    // mySerial.println("b");
    pinMode(speakerPin, OUTPUT);
    }

    void beep(int delayms){
    for (int i = 0; i < 250; i++) {
    digitalWrite(speakerPin, HIGH);
    delayMicroseconds(delayms);
    digitalWrite(speakerPin, LOW);
    delayMicroseconds(delayms);
    }
    }

    void beepYes() {
    beep(800);
    beep(400);
    }

    void beepNo() {
    beep(400);
    beep(800);
    }

    void loop() {
    if (analogRead(startPin) > 512) {
    mySerial.write(255);
    stato = 1;
    delay(1000);
    }
    if (stato == 1) {
    tanswer = 0;
    int rd = 0;
    while (mySerial.available() > 0) {
    rd = mySerial.read();
    tanswer = rd;
    stato = 2;
    }
    }
    if (stato == 2) {
    int nowbtn = 0;
    if (analogRead(A2) > 512) { nowbtn |= 0x01; }
    if (analogRead(A3) > 512) { nowbtn |= 0x02; }
    if (analogRead(A7) > 512) { nowbtn |= 0x04; }
    if (nowbtn != btn) {
    btn = nowbtn;
    if (btn == tanswer) {
    beepYes();
    mySerial.write(btn);
    stato = 0;
    tanswer = 0;
    btn = 0;
    } else if (btn > 0 and btn != tanswer) {
    beepNo();
    }
    }
    delay(500);
    }
    delay(100);
    }
    

The Processing part (Fig. 20) is better explain in Assignment 16 (Interface and Application Programming). As I wrote above, the combination of pressed and unpressed buttons generates a value that the ATtiny sends through the serial port. The interface reads these value and waits a message from the serial port and when a new byte is received it generates a new question and sends its number to the board.

Figure 20

The Cards and the other details

I designed the Cards using Autocad (Fig. 21) and laser cut them using the GCC SpiritGLS again. Together with the Cards I also prepared a circular piece with the topic of the game. I decided to prepare questions and answers about the Mantova palaces, so inside the molded button I put a disk with carved "Mantova" and its skyline. I also laser cut a rectangle of plexiglass to glue it to the Box piece covering the notebook display. I all laser cut pieces into a one .dxf file and you can download it at the bottom of the page. Each cut is a single layer with specified the material. If you want see how I molded and casted the button, you can see my Assignment 12 (Molding and Casting).

Figure 21: Designing the Cards and the disk.

I designed two guide to better insert the Card into the hole. I printed it with 3D printer. I used the Ultimaker 2Go with 0.4 nozzle. To save time I used a layer Height of 0.15 mm and a low Infill of 20% (Fig. 22). I printed the same file two time (Fig. 23). You can see my Assignment 2 (Computer-Aided Design) and my Assignment 5 (3D Scanning and Printing) to know more about 3d design and 3D print.

Figure 22: Preparing the file for 3D printer. Figure 23: 3D Printing the guide for inserting the card.

The vinyl cutter part is that I prefer. So I designed on CorelDraw the logo "QA BOX" (Fig. 24) for the front of the Box, some texts and the icons of the single palaces (Fig. 25) for the Cards.

Figure 24: Designing the logo. Figure 25: Designing the drawings for the Cards.

I used a little Roland vinyl cutter called STIKA. I saved the .bmp and .eps format to have more precision.I imported the file on Cut Studio, extracted the contour automatically, inserted the vinyl sheet (Fig. 26) and sent the cut. I weeded the excess vinyl (Fig. 27 and 28) using a cutter. I used a piece of transfer paper to move the drawing to the cover (Fig. 29), the Cards (Fig. 30) and the other pieces of the Box. For more details about vinyl cutter, you can see my Assignment 3 (Computer-Controlled Cutting).

Figure 26: Vinyl cutting the logo and the other details (texts and drawings). Figure 27: Preparing the Vinyl for the cover. Figure 28: Preparing the Vinyl. Figure 29: The notebook cover of the Box. Figure 30: The Cards.

The Assembling

The assembly was easy. First of all I assembled the electronic part on the Box. I fixed the circuits and the cables (Fig. 31) using a bit of hot glue.

Figure 31: Assembling the electronic.

Then I put a piece of sponge around the main button (Fig. 33)to have something like a spring but more soft. I fixed the button at the playwood using another piece of sponge (Fig. 34).

Figure 33: Preparing the main button. Figure 34: Fixing the main button.

I glued the plexiglass on the cover of the Box and the two guide on the cover with the hole to insert the Card (Fig. 32). Finally I closed the cover for the Card (Fig. 33).

Figure 35: Assembling the guide for the Cards. Figure 36: Assembling the playwood pieces.

So the QA Box was ready and I started to play (Fig. 37)!

Figure 37: Playing with QA Box.

Download area

Download my Box .dwg file

Download my Box .dxf file

Download my Box .stl file

Download my Case .dwg file

Download my Case .dxf file

Download my Case file forthe Shopbot

Download my Case .stl file

Download my Main Circuit Schematic Eagle file

Download my Main Circuit Board Eagle file

Download my Main Circuit .png file for traces

Download my Main Circuit .png file for edge

Download my Main Circuit file for milling the traces with Roland MDX-40

Download my Main Circuit for milling the edge with Roland MDX-40

Download my Support Circuit Schematic Eagle file

Download my Support Circuit Board Eagle file

Download my Support Circuit .png file for traces

Download my Support Circuit .png file for edge

Download my Support Circuit file for milling the traces with Roland MDX-40

Download my Support Circuit for milling the edge with Roland MDX-40

Download my Code

Download my Processing

Download my 3D file for the guide

Download my .stl file for print the guide

Download my 3D file for the button

Download my file for roughing the button mold using Roland MDX-40

Download my file for finishing the button mold using Roland MDX-40

Download my Corel file for texts and drawings

Download my file for vinyl cut the Logo

Download my file for vinyl cut the texts and the icons