Unveiling: Christmas Cabin

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com).

Ever since I was a kid, I have forever been very fond of the Christmas mollify. I decided it would be entertaining to design and build a cabin with a Christmas composition thereto.

All of the materials that make functioning the cabin was designed using Inventor Professional and later 3D printed. These parts DO NOT have to be 3D written. This project would have turned impermissible very similar and very much cheaper if understudy materials much as wood, plastics, or cardboard was used.

The final look of the cabin is open to the imagination of the designer. The design process could even be a family event for the Holidays.

A list of all the electrical components utilised to build project are:

- Arduino Uno

- Jumper cables

- Piezo Buzzer

- D.C. motor (if larger motor will not spin as fast if powered only by the Arduino)

- 3 LEDs (your choice of colors)

- Touch Embroider Sensor module

- 3 220k Georg Simon Ohm resistors

- 1 NPN electronic transistor (small signal)

Step 1: Fritz Plot of the Circuit Wiring

Here is the Fritz diagram to link up all the electrical components together.

The transistor is beingness used as a switch to power the Direct current motor. The understructur personal identification number of the transistor is well-connected to the PWM pin 6 of the Arduino. Since the motor I used was a lesser 3-5 volt motor, this method acting helped better control the spinning power of the motor (although IT distillery spun pretty rapid). The beat signal in my sketch was set to 57 which is about 25% Duty Wheel. The PWM signalize ranges from 0 - 255 (little # = smaller duty cycle) and you can variety this rate depending happening the performance of the motor you choose. The motive was glued to the bottom of the base board and the protruding pin was promote pasted to the bottom of the Christmastide tree diagram in order to revolve around it.

The racing circuit is initialized using the Spot Pad sensor. When the sensor is touched by any object, a change in voltage occurs and is recognized by the Arduino. The Arduino then enables the output components to turn on. Note, the ISR feature of the Arduino is required in grade for this circuit to perform correctly.

The sketch was written to turn all the components on and soured synchronously with the doorbell. When the buzzer is initialized, it begins to play the Christmas tune "Ding Dong Mirthfully on Flooding." Three LEDs were placed inside the cabin. Unity is placed underneath the fireplace to imitate the look of an actual fire. The opposite two were set in the cap to give it more a festive look. The buzzer is pasted inside the base bulwark of the project and allied with a tiny hole for the sound to escape.

Stair 2: Arduino Sketch

#define interruptNumber 0              //this initializes pin 2 as the outward interrupt            
#delimit touchpad 2            
#define fireplace 3 #define led 4 #define buzzer 5 int dcmotor = 6; #define blinker 7
              //Buzzer begins int length = 73; char notes[] = "ggagsed deggsgg ggagsed deggsgg DCbCDbCbabCabagabgagsgasgsesgeseddeggsgg "; // a space represents a rest int beats[] = { 2,2,1,1,1,1,4,2,2,2,2,2,2,4,2,2,2,2,1,1,1,1,4,2,2,2,2,2,2,4,2,2,3,1,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,3,1,2,2,2,2,2,2,4,2,2 }; int tempo = 200; void playTone(int tone, int length) {   for (semipermanent i = 0; i < duration * 1000L; i += tone * 2) {     digitalWrite(buzzer, HIGH);     delayMicroseconds(quality);     digitalWrite(buzzer, LOW);     delayMicroseconds(tone);   } } void playNote(char note, int duration) {   char name calling[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };   int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
              // gaming the tone related to the note name   for (int i = 0; i < 8; i++) {     if (names[i] == take down) {       playTone(tones[i], duration);     }   } }                                     //Buzzer ends
              changeable byte TouchPadEventFlag;    //all variables that are changed inside ISR penury to be dimensioned as "volatile"                                     //this uncertain will personify ill-used to Tell the independent loop that an interrup event occurred
avoid setup() {   pinMode(fireplace, End product);   pinMode(light-emitting diode, OUTPUT);   pinMode(blinker, OUTPUT);   pinMode(dcmotor, OUTPUT);   pinMode(buzzer, End product);   pinMode(touchpad, INPUT);   attachInterrupt(interruptNumber, InterruptServiceRoutine, CHANGE); //CHANGE defines the ISR is called when the voltage                                                                      //on the PIN changes in either direction. We are using CHANGE and not LOW                                                                      // to 'debounce' the pad. Using LOW would consequence in a round-the-clock reading of the allude outcome                                                                      // until your finger is removed from the pad
              }
void loop()  {    if(TouchPadEventFlag==1)  {   TouchPadEventFlag=0;                                              //resets the flag for the next interrupt  } } void InterruptServiceRoutine()                                      //ISRs pauperization to be void and have no parameters {     if(digitalRead(touchpad)==HIGH)     {       digitalWrite(led,LOW);                                        //turns off components after loops ends       digitalWrite(fireplace, Baritone);       digitalWrite(blinker, LOW);       digitalWrite(dcmotor, LOW);     }     if(digitalRead(touchpad)==Double-bass)                                  //touch the aggrandize causes the output to go LOW     {              digitalWrite(led,HIGH);                                       //Components turn connected while Buzzer performs       digitalWrite(fireplace,HIGH);       digitalWrite(trafficator, HIGH);       analogWrite(dcmotor, 57);                                                                     //Buzzer begins       for (int i = 0; i < length; i++) {     if (notes[i] == ' ') {       delay(beats[i] * tempo); // rest     } else {       playNote(notes[i], beat generation[i] * tempo);     }     // pause 'tween notes     wait(tempo / 2);     }     }       TouchPadEventFlag=1;                                        //set the flag to recount the main loop topology that a touch event occurred    }

Step 3: Video of the Finished Product

This project has a joyous theme to information technology and it can buoy perhaps be part of a family craft. The external look of this stick out will vary supported the imaginativeness of the designer.

The LEDs potty as wel be exchanged. Perhaps you can attend a small set of string LEDs on the outer lip of the roof instead of placing individual ones low-level the ceiling.

I hope you this instructable provides with a sufficient innovation on how to work up your own Christmas Cabin/House. Allow your ideas to come out and make them a reality this Christmas season.

Be the First to Dea

Recommendations

  • Anything Goes Contest 2022

    Anything Goes Contest 2022