[Tutorial for beginners and intermediate] Make Your Own uArm ClockBot

uArm ClockBot


This tutorial will be all about creating a simple clock using a uArm Metal, some paper, and cleverness. This is the perfect project for a beginner who has never worked with this robot, and wants to use it for the first time for automation. Its also a great project for intermediate users who want usable code to mess around with.

This clock shows the minutes of a current hour. The program relies on a clean consistent environment with no wind or people to move the papers. The robot has no error checking other than a storage location that acts as a reset point for the papers location. It’s a great project for beginners who have just bought a uArm.


Step 1: Getting the Materials

  1. uArm Metal
  2. Several sheets of construction paper
  3. Tape
  4. Scissors
  5. A small 16"x20" area to work in (Alternatively, a white board or a poster board to mount the robot onto)
  6. Recommended but optional: Sculpting clay

Step 2: Making the Paper Segments and the Bank

There are two components to the crafting part of this project. First, you must cut out the “Paper Bank”. This is a little paper container that the robot will use to store all of the clock segments when they are not being used. The bank is very important, because it is used as a “reset point”- when papers are dropped into it, they fall into place, which ensures that the robot is always picking up the papers from the same spot. Without it, the robot would make mistakes that would add up over time and throw everything out of sync.

To make the paper bank, download and print this PDF of the paper bank, and follow the folding steps on the diagram above. Use tape on the last step to stick the tabs together.

The second step is to cut out 14 or more paper segments. To make these, download and print this pdf of the paper segments, and cut them all out. There are 16 on the pdf, which is best in case you lose some. Only 14 are needed to make two digital segments.


Step 3: Securing the Robot

The next step is to get the robot taped down. This is very important because if the robot moves even the slightest bit, it will eventually be out of sync with the location of the paper segments and the bank.

I didn’t use tape to fix my robot, but instead used sculpting clay and made a solid mount. If you do this, make sure to not permanently stick clay to your robot leg, but rather put aluminum foil around the robot’s legs, and then make a nice foothold for the robot to rest in (as shown in the picture below).

If you choose to use tape, I suggest using duct tape and making absolutely sure that the robot won’t move around as it runs the clock program. Any movement would compromise the location that the robot thinks the paper pieces are at.


Step 4: Placing the Paper Bank

Time to download the code! Download the code from this link. Place the ‘uArmClock.ino’ file into your arduino sketch folder, and place everything inside the ‘libraries’ folder into your arduino libraries folder inside of your sketch folder. Its important that you use the sketch folder that is generated by the Arduino IDE, otherwise it won’t know where to look for your sketch. If you don’t know where your sketch folder is, try ‘saving as’ and seeing where the IDE wants you to save to. That will be your sketch folder. Next, Plug your robots micro usb to the computer, and plug the robot to the power supply.

With everything in place, Open the ‘uArmClock.ino’ folder in your arduino sketch folder, click tools and select ‘arduino Uno’ as the type of arduino, select your arduino under the ‘port’ section, and upload the code to the robot.

The robot will move to its normal position, as shown below.

Next, open up the serial monitor (Control+shift+M). Type “goto bank” without quotations. The robot will now move towards the location where the paper bank should be placed.

Now place the paper bank beneath the robots sucker. The sucker should be centered on the middle of the bank, and the bank should be rotated to match the picture below. The final step is to tape the bank to the surface. Make sure the robot is taped down before this step!

Next, open up the serial monitor (Control+shift+M). Type “goto bank” without quotations. The robot will now move towards the location where the paper bank should be placed.

Now place the paper bank beneath the robots sucker. The bank should be centered on the middle of the sucker, and the bank should be rotated to match the picture below. The angle of the paper bank (as shown below) should be parallel to the two legs of the robot on that side. The final step is to tape the bank to the surface. Make sure the robot is taped down before this step!


Step 5: Running the Program

It’s time for the fun part! Make sure your code is uploaded and your robot plugged into a power source and the computer. Now, open the Serial Monitor and type in the ‘minutes’ of the current time. For example, if it were 12:52, type 52. The robot will now begin to build the ‘52’. It will start with the first digit, and then go on to the second digit. If a minute has passed before it starts the second digit, it will adjust and start building the next number- so, if it takes a minute to build the ‘5’ it will build a ‘3’ next instead of a ‘2’ once it gets to the second digit. Here’s a video of what your final project should look like.

Have fun with your new robotic clock!

3 Likes

How to create the ClockBot on the new uArm Swift Pro?

I would like to try this application on the uArm Swift Pro with a Suction Cup attached to the end-effector.
The original Step 4 (see above) for the uArm Metal directly addresses the Arduino environment and uses a specific library (included in the link at Step 4) called UF_uArm_Metal_new.cpp and .h.
So if I cannot use the uArmStudio environment I will have to try to address the Arduino directly and compile and load the software in that way.

My question:

Does there exist an equivalent of UF_uArm_Metal_new.cpp for the uArm Swift Pro?
Or is there another mechanism proposed to build the project above?

Thanks in advance for your help.
Regards,
Franz

Hi FranzMa,

I’m glad to hear you’re interested in building your own ClockBot!

Unfortunately, I don’t yet own a uArm Swift, so I haven’t made the ClockBot code compatible with the new swift API. I recommend you take a look at the ClockBot code though- I think I only call move functions once or twice in the code. Only those lines would need to be changed :slight_smile:

If you end up refactoring the code, give me a heads up + the file and I’ll happily edit this post with the new info!

Cheers!

I am working on it too, with uArm Pro and control from an outside Arduino via the G-code. Soon I will send working code.

It is more complicated than I thought. I have changed the communication interface and the code I have is now able to control the arm, but the coordinates in the code are very strange and not compatible. Distances are usually too close to the base and the whole system is very irregular. Even the table level height, which should be constant, is different at every place. So I will have to change all of it.

1 Like

@AlmostThere maybe you have a calibration issue with your arm, there is an instruction availble to recalibrate. maybe you could benefit from doing that.

So here (github.com/AlmostDan/RobotClock) is a version of the RoboClock for uArm Pro + Arduino. Instructions are there as well. The code is 95% rewritten and is very customizable. Also well commented, so read it first, then ask questions :slight_smile: It contains some rather small changes, the main one is that it uses smaller paper blocks 60x20, as the original size is out of reach of uArm Pro. Another one is that the starting time can’t be inputed through serial anymore (not possible in this setup), so it is defined in the code.

Have fun :slight_smile: And thanks @apockill for the idea and his code!

@FeKo it does not come from my arm, but from the original code, where the coordinates are all over the place. If they have some common plane, it is somehow inclined.

Nicely done! I read through the code. I need to get myself a uArm Pro so I can test this out. Cheers!

Wow! This project is really fun! And it’s also simple enough for beginners like us!

Would you mind me to translate the project into Chinese, and post it in our forum? This may help makers in China who can not read English.