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

The general idea for the project is a tribute to a videogame named Dark Souls. The project consists of an 'Estus Flask' that will be connected to a stepper motor via a rod which will also house an LED, the LED will light up the flask and the flask will rotate.

Step 1: Control System Block Diagram

Here is the Control System Block Diagram of my project. As we can see, the arduino controls the entire functioning of the project. A remote will send a signal to the arduino through an IR sensor, prompting the arduino to power the stepper motor, as well as the RGB LED. The RGB LED will be placed inside the estus flask for a glowing effect.

Step 2: Parts and Circuit

The parts used in my project include these listed below, with descriptions and how they are included in the project.

  1. 1x Arduino Uno - Controls the entire circuit.
  2. 1x DC-47P DC Series Heavy Duty Electronics Enclosure - The base of the project, this will be used to house the circuit. A hole must be made in the top for the rod and LED to pass through for the estus flask to spin and glow. A hole must be made in the side for the IR remote to communicate with the IR receiver.
  3. 1x Mini Breadboard with Power Rails - This will be used to connect the circuit.
  4. 1x Stepper Motor - This will spin the estus flask. The stepper motor can either be screwed onto the bottom of the enclosure or set in place with an adhesive (hot glue gun).
  5. 1x ULN2003 Motor driver module - This module allows the stepper motor to be connected through the arduino. This is placed directly on the arduino digital pins.
  6. 1x IR Receiver - This will receive the IR transmissions from the IR remote.
  7. 1x IR Remote - This will send IR transmissions to trigger the circuit.
  8. 9V Battery holder (with appropriate jack size for arduino) - Used to house the battery.
  9. 9V Battery - Power source for the project.
  10. 1x RGB LED - This will be placed inside the Estus Flask for a glowing effect.
  11. 1x 1KΩ Resistor - Used for the IR receiver circuit on the breadboard.
  12. 3x 220Ω Resistor - Used one for each pin color for the RGB LED on the breadboard.
  13. 6x Female Jumper wires - Four of these will be used for the RGB LED to connect from the LED in the estus flask to jumper wires and subsequently the breadboard. The remaining two will be used for the power and ground for the motor driver module.
  14. 14x Breadboard Jumper wires - Two will be connected to the 5V power and Ground on the arduino to the positive and negative power rails on the breadboard. Two will be used for the motor driver module, power and ground, connecting to the breadboard. Two will be used for the IR receiver, power and ground, connecting to the breadboard. Three will be used to connect the female jumper wires connected to the RGB LED to the breadboard. Three will be used to connect from the breadboard to digital pins on the arduino. One will be used to connect the ground pin of the RGB LED to the negative power rail of the breadboard. One will be used to connect the IR receiver to a digital arduino pin.
  15. 1x ~9mm Hollow Rod - This rod was made and 3d printed, it connects the stepper motor and the Estus Flask. It will be hollow, and must have a hole through which the female jumper wires are passed through to allow the RGB LED into the estus flask. This is connected to the stepper motor with a hot glue gun, if made with the right dimensions it can fit onto the estus flask without requiring adhesives.
  16. 1x 3D Printed Estus Flask - Can be 3D modeled independently, I have used a public model for this project (http://www.thingiverse.com/thing:1543005). I have down-scaled the model used by 50%. When printed, you must drill a small hole on the bottom to properly fit the connector rod, remove any support material inside with a screwdriver or other tool.
  17. 1x 3D Printed Bonfire - Can be 3D modeled independently, I have used a public model for this project (http://www.thingiverse.com/thing:1464127). When printed, paint with oil paint and add any additional embellishments. Set on the top of the enclosure with an adhesive (hot glue gun used).

Connect the circuit as described above inside the enclosure.

Step 3: Arduino Sketch

This is the Arduino Sketch for my project:

#include <IRremote.h>

#include <StepperAK.h>

#define gearratio 64 // 1:64 gear ratio const int stepsPerRevolution = 2048; // 2048 steps turn the shaft of the motor one round

Stepper myStepper(stepsPerRevolution,10,11,12,13); // Instatiate 4-wire stepper pins 4 through 7

int redPin = 6; int greenPin = 5; int bluePin = 4;

int RNG;

int RECV_PIN = 0; IRrecv irrecv(RECV_PIN); // Instantiate a IR receiver object decode_results results; // Instantiate a decode_results object

void setColor(int red, int green, int blue) { #ifdef COMMON_ANODE red = 255 - red; green = 255 - green; blue = 255 - blue; #endif analogWrite(redPin, red); analogWrite(greenPin, green); analogWrite(bluePin, blue); }

void setup() { pinMode(redPin, OUTPUT); digitalWrite(redPin,LOW); pinMode(greenPin, OUTPUT); digitalWrite(greenPin,LOW); pinMode(bluePin, OUTPUT); digitalWrite(bluePin,LOW); randomSeed(analogRead(A0)); myStepper.setSpeed(0.15*gearratio); // set the speed at 0.15 rpm Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver }

void loop() { if (irrecv.decode(&results)) {//has a transmission been received? Serial.println(results.value);//If yes: interpret the received commands... while (results.value == 16754775){ RNG = random(0,2); Serial.println(RNG); if (RNG == 0) { setColor(255, 255, 0); // estus } else if (RNG == 1) { setColor(0, 255, 255); // ashen } myStepper.step(-stepsPerRevolution); // Step one revolution in one direction; delay(500); myStepper.step(stepsPerRevolution); // Step one revolution in the other direction delay(500); } if (results.value == 16769055){ } irrecv.resume(); // Receive the next value } }

Prior to and in the setup, I include all libraries needed, set up the stepper motor and LED pins and set up the IR sensor. In the loop, the arduino checks if the transmission from the IR remote has been received, then interprets it. The value of the plus button on the remote used triggers a while loop in which a color is randomly chosen for the LED between blue and green, and the stepper motor turns a revolution in one direction then the other.

Step 4: Demonstration of the Project

About This Instructable




More by IstvanCx:Dark Souls Respite 
Add instructable to: