Automatic Card Dealer

by knb45 in Circuits > Arduino

2627 Views, 6 Favorites, 0 Comments

Automatic Card Dealer

Screenshot 2021-12-07 164156.png

The Automatic Card Dealer is a mechatronic device designed to complete the task of dealing cards. The device utilizes an Arduino microcontroller, a continuous micro servo motor, a positional micro servo motor, an ultrasonic sensor, and the associated circuitry and mechanical structure.

Operate the device by clicking the button, and the device will stop and output two cards when it "see's" an object in front of it.

Supplies

Arduino UNO

Wire Kit

Push Button

1000 ohm resistor

Micro Continuous Servo

Micro Positional Servo

4 Wire Harness

Mini Bread Board

HC-SR04 Ultrasonic Sensor

Card Cage (3D printed)

Card Wheel (3D printed)

Foam Board (20x30 sheet)

Baseplate

Screenshot 2021-12-07 164841.png

For the baseplate, cut a roughly 6” x 6” square of foam board.

Base

Screenshot 2021-12-07 164922.png

For the stem, cut a roughly 4” x 3” piece of foam board, and fold it around your positional servo as seen below. Proceed to glue the folded structure along the open edge, and glue the servo into place at the top.

Glue the stem to the center of the baseplate, being sure to route your servo wire between the baseplate and stem

Card Cage 1

Screenshot 2021-12-07 164942.png

Begin by gluing the card wheel to a servo horn on your continuous servo.

Card Cage 2

Screenshot 2021-12-07 164955.png

Glue the servo, a servo horn, and the ultrasonic sensor to the bottom of the card cage as seen below. Take caution to ensure you are gluing your servo and ultrasonic sensor on the side of the card cage that has the slit.

Mechanical Completion

Screenshot 2021-12-07 165022.png

Because your card cage already has the servo horn glued on, and the base has the servo, simply place the card cage on top of the spline of the servo on the base.

Circuit

Screenshot 2021-12-07 165650.png

Assemble your circuit on your Arduino according to the image of the following diagram. Feel free to simplify to a smaller breadboard. Just be aware, if you change pins, you will have to adjust your code accordingly.

Code

Screenshot 2021-12-07 170616.png

Upload the attached code to your Arduino. If you used different pins in your circuit, adjust the code accordingly.