CardboardBot v1.0 - utilize cardboard for the benefit of the brain

I can’t count the number of attempts to assemble a robot from me. But, then there were not enough materials, then the skills of their processing, then some kind of nodes, then knowledge of how to connect all these things together. If you are familiar with this situation, I’ll try to tell my experience in assembling a robot from improvised materials and some nodes purchased on eBay. The robot cost me $ 35 and two days of vacation, but the delight experienced from his first movements cost much more. If you are interested - I ask for a cut (a lot of pictures).
image


Shopping list


  1. Cardboard is the main material of our robot. I think that many houses have boxes of equipment lying around - we will need them
  2. Arduino - will be the brain of our robot. At my fingertips was only a Chinese clone of Arduino Uno. Price with delivery of about $ 20.

    image
  3. Ultrasonic Rangefinder HC-SR04. The price fluctuates around $ 4.
    image
  4. Three micro servos (labeled “9g” if someone is looking). The price is about $ 3.5 apiece.
    image
  5. (optional) Development board for soldering and soldering accessories. It is quite possible to do without this item by simply connecting everything with wires, but for everything to be at least with a hint of reliability, you have to solder.
    image
  6. Adhesive tape, glue, scissors, a paper knife, a simple pencil, a ruler.

Actually, when all of the above will be in your reach, you can start assembling.

Let's make the body of the robot


To begin with, we’ll make cardboard box blank without a cover. The main thing is that the Arduino is placed at the base of the box. My base was with a margin of about 5 mm on each side - these are the tolerances for maneuver, if necessary.
To simplify your life and make cardboard bend along even lines, cuts should be made in places of future bends. The main thing is not to cut a piece. Although, even if this happens, there is no need to worry particularly, adhesive tape will save us.
It is necessary to determine where the back side of our robot will be, and cut openings for Arduino ports on this side - one for power and one for USB. In order not to get pierced, I would advise making markings with a pencil by attaching the board itself. All holes should be made slightly smaller than the actual dimensions - during installation, the cardboard will fold a little more and this will allow you to tightly fix the part.
In addition, we make holes for hand servos and provide ourselves with access to the Arduino reset button.
It is not worth gluing the workpiece - it will be difficult to install something into it later. It is better to leave it in the end.
image
Now the task is even easier - to make a cover. The main thing here is to figure out the sizes. The lid will be slightly larger than the base, due to the added width of the walls. In the lid we make a hole for the servo, shifted to the front edge. We also make a small hole closer to the back of the cover - useful for laying wires (in the photo only the hole for the servo drive is made). To give strength, I pasted the corners of the lid with paper tape. Recommendation: all openings for servos are best reinforced. This can be done by gluing on the inside of the box an additional cardboard insert with a slot for the servo drive. There will be only three such inserts, it is very simple to make them, but this will give the construction additional strength and allow us to fix the servo drive to the screws without breaking through the cardboard.
image


Hands


Our hands will be just rectangular boxes. We will prepare and cut the cardboard. Glue it to the shape we need. To fasten the hand to the servo, one of the swings (included) is drowned in a cardboard rectangle, having previously cut the shape of the rocker with a knife in it. I just taped this design with paper tape. It keeps flimsy, but copes with its task. Hands themselves do not fall off. We repeat all the steps for assembling the hand again and glue our mount to the hands themselves. I also added fingers - this gives the robot some charm.
image

image

image

image

image

Head all over the head


The head will be just a box with holes for an ultrasonic sensor. Having filled a hand on the past elements, is going easily and simply. The main thing is not to glue the back wall (opposite the slots under the sensor) - it should open freely. The slot on top for the tongue, which will hold this very wall. View of the head from a different angle. In addition, a hole must be made in the back wall, we did the same in the base cover. Through this hole, we pass the wires from the sensor. Even to the top of the back cover you need to glue a strip of cardboard - it will serve as a kind of lock for it. After that, we install the sensor itself with the wires supported by it. I use a color loop for this. The head begins to take on a finished look. Again, a look from the other side.
image

image


image

image
To fix the head to the servo drive, we do exactly the same thing that we did for the hands - we cut out a recess under another rocker in another piece of cardboard (slightly smaller than the base area) and seal the rocking tape with tape. The resulting element is glued to our head from below.
I forgot to take a photograph, but I hope it’s clear what needs to be done. We close our head on the previously glued tongue, inserting it through the slot in the upper part of the box.
image

Putting it all together


We install a servo drive in the cover of our base and fasten it with two screws that come with it. So that the robot can look ahead and turn its head - before installing the head, it is better to find the middle between the two extreme positions of the servo. This can be done with any remaining rocker. The servo axis should be set to mid-position. We set the head on the resulting base. To warm up your own curiosity, you can install the lid with your head on the base. After that, it will still be necessary to remove it, but interest is interest. At the base we glue the front wall with the side. Now we insert the servos into the walls of our base so that the axis is offset closer to the center of the box.
image

image

image

image
If you look from the back of our robot, the picture will be approximately as follows. By the way, here you can clearly see the cardboard inserts for the servos, which I mentioned earlier. To see how it all looks together, and at the same time evaluate the future front of work, put on the lid, attach our hands and look at the robot again from both sides. Familiar photo? Yes, actually from him I started the post. And yes, the robot is really not ready yet, but now it’s already clear how it will look. View from the other side.
image

image

image

A chapter on brains, or prepare and insert a controller.


It’s clear that in order for all this to work, you need to somehow connect all this with Arduino. Since I do not have a Sensor Shield, I had to get out with improvised means. So the following scheme was born. If it’s very rude, then we can call it a kind of perverted Arduino Shield - since it is inserted directly into the controller. But somehow my language doesn’t dare to call it shield, let it be just a diagram. The main idea is to make it convenient to connect servos and sensors by feeding them from the + 5V output of our Arduino. This will allow the robot to work even from the USB port of our computer. On the flip side, it looks even worse. Install on the controller.
image


image

image
As you can see, ports from 8th to 13th are still available, so you can use them in the future. Of course, I would make an extension for all ports, but because of the non-standard step between the two Arduino blocks, it is not possible to do this on a breadboard.
Installation almost comes to an end. It remains to connect our servos and sensor to the board. Although this is not of particular importance and you can connect in another way, but personally I got the following port and module correspondences:
image

  • 2 - servo drive of the right hand;
  • 3 - servo drive of the left hand;
  • 4 - servo head;
  • 6 - echo distance sensor, 7 - trig it.

We push the Arduino with all the wires into the box of our base and seal the back cover of this box. After the glue dries, we push the Arduino so that the ports fall into the holes made for them.
It remains only to rejoice - the assembly is fully completed.
image

image

Software part


To check the operability of all mechanisms, we will write the firmware to the robot.
#include  
#include 
#define RIGHT_HAND_PIN    2
#define LEFT_HAND_PIN    3
#define HEAD_PIN       4
#define TRIGGER_PIN    7
#define ECHO_PIN       6
Servo rightHand; 
Servo leftHand;
Servo head;
Ultrasonic ultrasonic(TRIGGER_PIN, ECHO_PIN);
void setup() {
  Serial.begin(9600);
  rightHand.attach(RIGHT_HAND_PIN);
  leftHand.attach(LEFT_HAND_PIN);
  head.attach(HEAD_PIN);
} 
void loop() { 
  head.write(90);
  delay(1000);
  float cmMsec;
  long microsec = ultrasonic.timing();
  cmMsec = ultrasonic.convert(microsec, Ultrasonic::CM);
  Serial.print("CM: ");
  Serial.println(cmMsec);
  head.write(135);
  delay(1000);
  head.write(45);
  delay(1000);
  head.write(90);
  leftHand.write(0);
  rightHand.write(0);
  delay(500);
  leftHand.write(180);
  rightHand.write(180);
  delay(500);
}

After flashing it into the controller, the robot will come to life. Yes, the usual USB port is enough for him to power - the servos in it consume not so much, and the distance sensor, if you believe the specifications, also consumes a little more LED. We look at what happened on the video. I apologize in advance, but for the video I modified the firmware a bit to make it a little more spectacular. All I did was add a few hand movements. However, the firmware described above is quite suitable for checking the robot for performance, it is less and less cluttered with any nonsense.


At this time, the following can be seen on the console.
image

Conclusions and plans


Well, that's all that I wanted to tell. In the future, I plan to slightly improve this robot, perhaps insert a pair of sensors (light and temperature, for example) and actually put it on the shelf - this is still my first robot. Thanks for attention.

Also popular now: