DIY Your Own Red Packet Robot for the Lunar New Year

As the Lunar New Year approaches, the big boss is about to send out red packets in the group, thousands at a time. If you can’t grab one, won’t you be anxious?

Using a script to grab red packets on your phone? That’s too boring; there are plenty of those online without any creativity. What do true Makers use to grab red packets? Of course, it’s a homemade robotic arm! Not only can it grab red packets, but you can also enjoy its silly and cute posture, adding a bit of fun and a sense of achievement when it grabs the red packet for you!

DIY Your Own Red Packet Robot for the Lunar New Year

DIY Your Own Red Packet Robot for the Lunar New YearHigh-definition ham sausage red packet grabbing robot: Focus——Red Packet!——Grab!

Yes, the end of the robotic arm is a ham sausage. Do you also want to own a red packet grabbing robot? Let’s make it together with friends from Guokelab!

Materials needed:

Arduino Mega2560

Breadboard ×1

Dupont wires, several

Push button switch ×1

10K resistor X1

10K sliding potentiometer X3

Servos ×3

2mm acrylic sheet about 40cm×40cm

Rubber bands ×2

Ham sausage ×1

Equipment needed:

Laser cutter

A computer with a python+opencv+numpy environment

External camera

Camera stand

What is the principle of the red packet grabbing robot?

When we started making the red packet grabbing robot, we tried to find a simpler solution: to attach four TSC200 color sensors to the four corners of the phone screen where the red packet would appear. When all four color sensors simultaneously detect the orange-yellow of the WeChat red packet, it can be judged that a new red packet has been sent out, and at this point, Arduino will start the grabbing operation.

However, when we got the TSC200 color sensor module, we were quite frustrated. Although the TSC200 chip is very small, the circuit board takes up more than half the screen when made into a module, completely covering our faces…

So we turned to seek another path—computer image recognition.

We use a camera to capture the phone screen, and through the open-source computer vision library openCV, analyze the picture signal to determine whether a new red packet appears. When a red packet appears, it sends a command to Arduino, which controls the robotic arm with the ham sausage to click three times on the screen, completing the red packet grabbing operation.

How do I make it?

The mechanical part of the red packet grabbing robotic arm is mainly made of acrylic structure, servos for executing actions, and a ham sausage responsible for touch screen tasks, which is debugged through Arduino.

To simplify the program as much as possible, we set up three sliding potentiometers and a button to manually set the path of the robotic arm. During the first use, we control each action of the robotic arm with the potentiometers and record the corresponding angle coordinates of each action to fill in the program, and then re-upload the program.

Connect sliding potentiometers to Arduino controller

We use three 10k sliding potentiometers as variable resistors to manually control the robotic arm. Connect the 1st pin of the three potentiometers to GND, the 3rd pin to VCC, and the 2nd pin of the three potentiometers to Arduino’s A0, A1, A2. When the potentiometer is turned, the 2nd pin outputs different voltage levels. Arduino reads the levels of each potentiometer’s 2nd pin to control the servos to rotate to the corresponding angle.

DIY Your Own Red Packet Robot for the Lunar New YearSliding Potentiometer

Connect push button switch to Arduino controller

To conveniently view the angle of the servo during manual operation, we set up a button to output angle information. When we turn the servo to the desired angle and press the button, Arduino will return the angle the servo has turned through the serial port. We will record these angle values and upload them to Arduino, so during the next operation, we only need to send a serial command to Arduino, and the robotic arm will start executing at the set angle.

DIY Your Own Red Packet Robot for the Lunar New YearTouch Switch

DIY Your Own Red Packet Robot for the Lunar New YearTouch Switch Wiring Diagram

Connect servos to Arduino controller

The choice of servos is not as rigid as ordinary motors; they can rotate to any angle between 0 and 180 degrees based on your instructions and stop precisely. Therefore, using servos to drive the robotic arm is a simple and economical solution. We use Arduino’s ports 11, 12, and 13 to output PWM signals to control the servos.

Connect the red wire of the three servos to VCC, the brown wire to GND, and the yellow wire of the three servos to Arduino’s ports 11, 12, and 13 respectively.

Build the robotic arm structure

We will sketch the rough shape of the robotic arm on paper, then draw the part diagrams in AutoCAD, outputting a PDF document that can be read by laser cutting software, and then use the laser cutter to cut parts from a 2mm thick acrylic sheet, assembling the parts together and fixing them with glue or screws.

Concept sketch of the robotic arm:

DIY Your Own Red Packet Robot for the Lunar New Year

Parts diagram of the robotic arm:

DIY Your Own Red Packet Robot for the Lunar New Year

Assembled parts of the robotic arm:DIY Your Own Red Packet Robot for the Lunar New YearDIY Your Own Red Packet Robot for the Lunar New YearDIY Your Own Red Packet Robot for the Lunar New YearDIY Your Own Red Packet Robot for the Lunar New Year

Completed assembly of the mechanical diagram:DIY Your Own Red Packet Robot for the Lunar New Year

Attach the ham sausage, and it can start touching the screen:DIY Your Own Red Packet Robot for the Lunar New Year

Image (Red Packet) Recognition

We call the openCV vision library in python for image processing. After the computer receives the video signal, it first performs color filtering, removing colors other than orange-yellow, then obtains the contour, area, and centroid position of the yellow color block. The program determines whether a new red packet has appeared based on the area and centroid. When a red packet appears, the python script sends a command to Arduino through the serial port.

DIY Your Own Red Packet Robot for the Lunar New YearComputer Image Interface

Alright, just wait for the red packets to come!

Red Packet Robot Big Party

It’s better to share joy than to enjoy it alone. Such an interesting thing should be shared with everyone. We will open-source all our content and invite interested friends to make various red packet grabbing robots together, to see whose design is cuter and faster!

Do you also want to participate and make your own red packet grabbing robot? Do you want to show it off on New Year’s Eve?Now you can connect with the experimenter’s AI!

Follow our “Guokelab” WeChat account,reply “Red Packet Robot”, and follow the prompts, join the Guokelab red packet robot WeChat group, and you can obtain technical materials for the red packet robot. Moreover, we can guide you with any questions you have, and in the future, you may also participate in various interesting projects at Guokelab, so act quickly!

Now Makeblock and Chaihuo Maker Space have joined our activities. We will hold a live video broadcast on February 2 at 8 PM on Bilibili to showcase the red packet grabbing robots from various teams, and we hope to see your work included too! (Editor: Jerrusalem)

DIY Your Own Red Packet Robot for the Lunar New Year

Leave a Comment

×