Arduino-Powered Coin Box Is the New Way of Saving Money
Before you begin building this amazing device, you are going to need a few materials.
- Arduino Nano
- MG90S servo motors
- Cardboard circles (1.4-inch/35 mm by 1.4-inch/35 mm)
- Small cardboard box or cardboard
- Hot glue gun
- Battery holder
- Electrical wires, resistors, and soldering gear.
- Arduino Nano code
The first step is to wire up the servo motor to the Arduino Nano. Watch the video for more details on this.
Next, grab your cardboard circles, you will only need one. Poke some holes through it using a sewing needle as shown in the video.
Now, grab a 10K and a 4.7K resistor and affix to the cardboard circle as instructed in the video.
Next, grab some wires, and solder to the resistors as shown.
Now, solder the other ends of the wires to the Arduino Nano.
Now, plug in the USB cable to the Nano and upload the all-important code. We have included the link above to the .ino file, but here it is in all its glory:
Servo myservo; // creating myservo object
int buttonPin = 11;//set button pin
int buttonState = 0; // set buttonState
myservo.attach(12);// attach the 13 pin to servo
pinMode(buttonPin, INPUT); // set button to input
buttonState = digitalRead(buttonPin); // read and save to the variable "buttonState" the actual state of button
if (buttonState == HIGH)
Upload it directly to the Nano, as usual.
Next, grab a small cardboard box (or build one to size).
Mark out and cut out a circle to one face of the box.
Next, using a hot glue gun, affix the servo motor to the box lid, as shown.
Using the hot glue gun again, also glue the Arduino Nano to the cardboard too.
Next, take a small strip of cardboard, and glue it to the cardboard circle as shown.
Then glue the other end of the cardboard strip to the servo motor arm.
The cardboard circle should now close off the hole you made in the cardboard box lid. This will act to open and close the coin box.
Now, grab your battery holder, poke another hole through one side of the cardboard box, and feed the battery holder wires through it. Using your hot glue gun, glue the battery pack to the cardboard box.
Wire the battery pack to the Arduino Nano, as shown in the video.
Now affix the lid to the box, stick in some batteries, and play with your new Arduino-powered coin box. Hours of fun are now to be had!