We are building a caterpillar Bluetooth robot with a camera. Part 1

    By popular demand, I decided to describe the process of creating just such a robot with a camera on a caterpillar chassis and control via bluetooth using a joystick.

    I always dreamed of creating a robot that can be controlled using a computer and watch its movements in the first person.
    I conventionally divided the whole process into three parts:
    1. Assembling a robot
    2. Programming a microcontroller on-board
    3. Programming control from a PC

    I believe that this topic will be most interesting for those who would like to build such a robot, but lack knowledge in certain moments. (For those who are well versed in robotics, electronics and programming, I will not open anything new). Therefore, I will tell you as detailed and simple as possible.
    Generally speaking, the robot can be bought and ready, but
    -in the first place is not so interesting - the process of creating a robot with his own hands is a great pleasure
    -Secondly when buying a ready robot to remake it to fit their interests is often difficult, if not impossible,
    s finally, with a competent approach, it can be cheaper to make a robot yourself.
    We will use the cheapest, but ready-made components, because assembly from scratch is not interesting for everyone, more complicated and runs the risk of bothering with a months-long process :).
    If you want to not just get a robot to play, but to do it yourself, then let's go!
    The robot does not make decisions on its own, that is, it is a PC-controlled chassis that executes commands and transmits a video signal. However, it is not difficult to modify it to an independent robot - you just need to add sensors and add the logic of the on-board computer. The platform is designed for this.
    We need:
    For a tracked chassis
    1. Twin engine gearbox - Tamiya Twin Motor Gearbox (TAM70097)

    2. Caterpillars and rollers with axles - Tamiya Track and Wheel Set (TAM70100)

    3. Platforms and fasteners - Tamiya Universal Plate Set (2) ( TAM70157)


    of this, only point 2 is the deficit in Russia.
    You can buy the rest in Terraelectronics (70097 - 520r, 70157 - 385r)
    Or in the officialTamiya store . If you buy in it, then take the tracked chassis (630r) and the box (390r). You will have in reserve a box with one engine.
    The fact is that we need a box with two motors so that the robot can go not only straight, but also rotate, separately controlling the tracks.
    Since it was not possible to buy everything in one place in Moscow, and I did not want to run and search, I ordered all this on ebay from the only seller who delivers to Russia at the normal price. The set cost about $ 37.5 with delivery.
    You can also find these parts at pololu.com. There are more expensive and not always available.
    Instead of a platform with holes, it is quite possible to use a piece of plywood, and for fasteners a metal constructor, which is sold in the children's world for about 200-400 rubles (there are several sets). In general, the most important thing is the tracks and gear motors. On-board electronics 1. Arduino Duemillanove / Freeduino 2009 - the brain of our robot - on ebay from $ 17.60. I took on freeduino.ru, for a long time and for 950r. Atmega168 based (cheaper than Atmega328P) is enough for the robot, if you are not going to write very sophisticated robot logic or use Arduino like me for other experiments that may not have enough 16kB flash memory. 2. Power module Motor Shield V2 or V3 for controlling motors
    image




    image




    image
    On ebay from $ 10.5, the old version and without combs to install the next floor shields.
    on Freeduino.ru from 600 rubles in the form of a constructor to 900 rubles in assembled form. I advise v3 - it is more flexible.
    3. Sensor shield V4 - a convenient module for connecting sensors and servos. If you are not afraid of a bundle of wires, then he nafig is not needed. I bought it for experiments, so I stuck it for convenience.
    image
    about $ 8 on ebay
    4. SmartBluetooth module. It will be required to communicate with a PC or laptop.
    image
    on ebay from $ 9.9. I took a long time and it cost me as much as $ 23
    5. Bluetooth dongle - if you control from a PC and there is no Bluetooth interface in it, you need to buy it.
    imageprice - $ 2.7
    Total $ 40.7 if you do without a Sensor shield, but with a bluetooth dongle for PC.

    We will also need power for Arduino and motors. You can use ordinary AA batteries in such a compartment by buying it on the market or in ChipIDip, if very urgent. “ RPMS & AA ” or 9V “Krona” type battery. I prefer compact and more convenient LiPoly batteries : or 2 LiIon 18650 cells connected in series. This kit is enough to make a robot with basic functionality, so I would suggest to pause at this place, choose where and what you will order, place orders or go shopping, and while the order will be delivered, do the video subsystem.
    RPMS & AA



    image



    When ordering mainly from China, all components you will receive in about 2-3 weeks and it will cost $ 80-100, depending on the seller you choose or your desire to bargain and save, it may be cheaper. If you buy several products from one seller, ask to combine shipping, this can save you money. The so-called "free shipping" (free shipping) is simply included in the price and is good if you buy one item.

    Assemble the chassis
    The Tamiya 70100 kit comes with detailed instructions. Carefully cut the rubber tracks and rollers with wire cutters or an office knife, separating from the sprues, assemble and fasten them with the M3x10 screws to the plywood platform, or if you bought Tamiya universal plate set, then with complete wedges, they are reusable, so it's okay if there is something wrong at first stick it in the wrong place.
    Then we assemble a box of motors with gearboxes TAM70097. She has 2 options for gear ratios. 58: 1 drives very, very smartly, but the motors do not pull at low speeds and moan plaintively, and after we load the platform, they can barely roll at all. I recommend collecting in option 201: 1, so our “tank” will not run out of sight and will move more smoothly. True, the noise from the furiously rotating gears will be more. We drive the gears of the chassis onto the hexagonal axis of the box.
    To test the operation, it is enough to supply power from 2 batteries to the motors simply by consulting the wiring of the motor contacts. Now you need to solder a pair of wires to the motors. 10-15 centimeters will be enough.
    Then, using parts from the designer, I secured a second platform for mounting electronics. In principle, it is possible to do one floor, it’s just that there is not enough space and it’s not very convenient to work, but it’s quite possible.
    We fasten the Arduino / Freeduino with the M3x10 screws (it does not quite coincide in the holes and becomes a little diagonal) onto the second floor. The second floor we insert MotorShield. Through the holes in the site, we pass the wires from the motors and we fasten the wires to the port M3 and M4 - the extreme screws, the middle one remains unused (it is for stepper motors). The polarity of connecting the motors does not matter yet, then you can change it or set it programmatically, so do not be afraid to mix it up.
    Bluetooth module for now, just figure out where to stick it or attach it to the upper floor with stationery rubber. I didn’t even unpack it - the foamed packaging will serve him with mechanical protection, but at the same time it will not allow to close the contacts by accident.

    You’ll get something like this sandwich: “ RC Tank chassis ” Open a full-sized picture to better see what and how is connected, if there are difficulties with assembly and connection. Arduino fasten the USB port to the edge of the platform, so that later it would be more convenient to connect the cable and program without removing it from the robot. Works only for a couple of hours, if done slowly. Video subsystem
    RC tank chassis





    To ride with a first-person image, we need a miniature video camera, a radio transmitter (transmitter) and a receiver (receiver).
    There are a lot of options. Including to reach the market and buy a Chinese radio camera in a spyware or video surveillance equipment store. Most likely will cost 2-4 sput with the receiver.
    But it’s much cheaper to order from China.
    I recommend taking it at 1.2 GHz, rather than 2.4 GHz, to avoid interference with the bluetooth module and WiFi operating at 2.4 GHz.
    For example, this kit : it
    image
    will cost a little more than $ 30. There are cheaper, depending on the camera included.
    On ebay you can buy exactly the same with a camera in a metal case as in the picture from the box.
    The image quality of all these CMOS cameras is very so-so (380TVL and those are quite soapy and with a low dynamic range and high noise in low light). Therefore, I ordered a hobbyking.com camera on a Sony CCD with a resolution of 420TVL and better sensitivity, which allows me to see what happens even under a table without additional lighting.
    image
    As well as mounting for it to pan and tilt:
    image
    As the inscription on the picture reads - servos not included, so we order cheap 9grammovye serfs . We will need 2 pieces, the 3rd will remain in reserve, if we break it.
    My camera does not want to work from 9V, so I have to power it from a separate 11.1V battery .
    The receiver and transmitter used from the inexpensive kit shown above. (The transmitter tried a more powerful one - at 800mW, but it decently warms up, bulky with a radiator, and such power that causes pickups on camera servos).
    You can connect the receiver to a TV, but control it from a computer, and watching TV is not very convenient (unless you buy a portable one). Therefore, we need a video capture device.
    Fortunately, it is inexpensive , very compact, powered by a USB port, all cables and software are included:
    image
    It’s useful to have a switch so that you don’t have to turn it off, pulling out the power connector and a set of male and female connectors
    That's all we need.
    There are plenty of options for where to buy and how to save plenty, but the article will be endless if you try to list everything.
    Collecting all this is quite exciting and not at all as difficult as it might seem at first glance.
    But the final assembly and tuning we will do in the next part, but for now you need to buy everything you need and assemble the chassis. :)
    Have a nice shopping!

    UPD I have been contacted more than once about the cost.
    To avoid misunderstandings, I will bring together:
    1. Chassis - I bought on ebay for $ 37.5 with delivery. In Moscow, all the components are in Terraelectronica:
    70097 (motor-gearbox) - 514r
    70157 (2 platforms + fasteners) - 381r
    70100(tracks and wheels) - 571 rubles.
    Total chassis in Moscow 1466 rubles (~ $ 46- $ 50)

    2. Electronics - $ 40.7 if you do without Sensor shield, but with bluetooth dongle for PC. All from China.
    3. Video subsystem - from $ 27 on DealExtreme.

    Total complete set from $ 105 (all from China) to $ 118 (chassis in Moscow).
    The batteries are separate, there are too many power options to describe here.
    UPD 2 Charging lithium-ion and lithium-polymer batteries requires appropriate charging - a conventional power supply will not work.
    There is a whole section of chargers on hobbyking:www.hobbyking.com/hobbyking/store/__216__408__Battery_Chargers_Acc_-Battery_Chargers.html
    I myself use this: HobbyKing ECO6 50W 5A Balancer / Charger w / accessories. He needs a power supply 12V ca 5 A at HK this has , and you can buy from us on the radio.

    All links are given in the article.

    Part 2
    Part 3

    Also popular now: