loading

Project overview

In this project you will learn how to make your self made money-shooter or how we like to call it "The Cash Riffle"!

What do you need?

  • Arduino kit
  • Motor Shield
  • HC-SR05 / HY-SRF05 Precision Ultrasonic Sensor
  • Power Supply 6V DC
  • DC motor 6V
  • Double-sided tape
  • UHU POR glue
  • MDF 3 mm
  • Rubber
  • 1.000.000 dollar (If you don't have so much money, you can print fake ones like we did)

Step 1: Lasercut the Cash Riffle Box

Take a 60cm by 30cm MDF 3mm sheet and place it in the Lasercutter. You can find a link down below to download the box template we used.

The box is easy to set up. It's designed in a way that the Arduino and breadbord are keeped seperated from the money and the motor.

Use some UHU-POR to glue the left part of the box togheter. This is the part where the money should shoot from the box.

Step 2: Lasercut the Wheel

Now download the template below and lasercut the wheels. Attach the wheels with some UHU-POR togheter and press the wheels togheter until the glue has dried. Cut some piece of the rubber and attach this to the double-sided tape. Use some UHU-POR on the wheel and attach it to the rubber.

Tip: If you want more grip, you can use a rubber band like we did.

Step 3: Assemble the Electric Circuit

Attach the motorshield on your Arduino and assemble the circuit using the supplied cables:

Circuit:

HC-SR05 / HY-SRF05 Precision Ultrasonic Sensor

  • VVC connection of the sensor attached to +5

  • GND connection of the sensor attached to ground

  • TRIG connection of the sensor attached to digital pin 8

  • ECHO connection of the sensor attached to digital pin 13

DC Motor

  • Red cable of the motor attached to PWR +
  • Black cable of the motor attached to PWR -

Step 4: Arduino Code

Copy the code below into the Arduino Software and attach the USB to your Arduino UNO

Code:

const int TRIG_PIN = 8;
const int ECHO_PIN = 13;

void setup() {

// initialize serial communication:

Serial.begin(9600);
pinMode(TRIG_PIN,OUTPUT);
pinMode(ECHO_PIN,INPUT);

//Setup Channel A
pinMode(12, OUTPUT);

//Initiates Motor Channel A pin
pinMode(9, OUTPUT);

}

void loop() {
long duration, distanceCm, distanceIn;

// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
duration = pulseIn(ECHO_PIN,HIGH);

// convert the time into a distance
distanceCm = duration / 29.1 / 2 ;
distanceIn = duration / 74 / 2;

if (distanceCm <= 0){
Serial.println("Out of range");
} else if(distanceCm <= 100 && distanceCm >= 0){
Serial.println("motor AAN");
digitalWrite(12, HIGH);

//Establishes forward direction of Channel A
digitalWrite(9, HIGH);

//Disengage the Brake for Channel A
analogWrite(3, 255);

//Spins the motor on Channel A at full speed

delay(4000); }
else if(distanceCm >= 100){
Serial.println("motor UIT");
analogWrite(3, 0);

//Spins the motor on Channel A at full speed
Serial.print(distanceIn);
Serial.print("in, ");
Serial.print(distanceCm);
Serial.print("cm");
Serial.println(); }
delay(1000); }

End Code

Step 5: Put Everything in Place

Put the Arduino and all the cables in the box. Assemble the sensor in a way that fits your target direction. And finish the last things to complete the design of your box.

Step 6: Let the Fun Begin!

Place the Cash Riffle at a fun place... Hide yourself... and watch people surprise themselves when they walk in range of the Riffle.

Don't forget to tell your friends about this awesome project!!!

Have fun!

just wow
<p>That's a fun idea :)</p>

About This Instructable

3,247views

13favorites

More by SirIbra:The Cash Riffle 
Add instructable to: