📜 ⬆️ ⬇️

Create autonomous robot Frank. Part one

image

For the second month I have been gathering in the evenings of an autonomous robot whose name is Frank. Why? Do not ask! I know that every robot must have a beautiful name deciphered, but I haven’t yet come up with anything. If you have ideas - write in the comments. It all started a long time ago. My passion for neuroscience, cognitive science, artificial neural networks and artificial intelligence led me to researching algorithms in a computer is quite an exciting process, but sometimes I want to touch my creation with my hands and see how it behaves in real life.

All this did not fit well with the already existing knowledge, since I work in the film industry by profession. I had to learn everything from scratch, read a huge amount of literature, websites and conduct a large number of experiments in order to achieve the desired results.
')
Since half of the time I live in Los Angeles, and half in Moscow, it is possible that some links will not be very relevant. On the other hand, I had to find stores to buy electronics both here and there, since my regular patrols do not affect the desire to learn robotics. Therefore, if possible, I will publish links to both our and Western resources. Perhaps this will help both Russian readers and those who read Habr abroad.



image

It all started with the choice of platform, on the basis of which it would be possible to build a robot. At that time, I didn’t care if he had legs, wheels, or other means of transportation. I decided to start with one of the Lynxmotion platforms, but they didn’t have enough servo motors to send me the order. At that moment I met Russian comrades from the company Brain Corporation, which is located in San Diego, and having gone to their office, I realized that I had to start with a simple one - Lego Mindstorms. This is a fairly simple platform, understandable to adolescents, but allowing programming, if desired, in Python and C ++.

I had a week in Los Angeles before I left for Moscow. Just in case, I ordered a pair of Lego Technic kits and the Lego Mindstorms NXT2.0 kit itself. After reading some interesting articles about Arduino and other similar systems, I ordered several sets that included components for beginners, servo motors, and servo motor mounts for Lego.

All the details came, and packed them in a suitcase, I flew to Moscow to collect my first robot.

image

At first, everything seemed to be very simple, but in practice, I couldn’t manage to assemble a four-wheeled monster with the ability to drive all the wheels, all-wheel drive and a suspension that allows you to drive off-road in three weeks. Motors that come in Lego Technic kits are quite compact. With them, you can really build an all-terrain vehicle, but connecting it to Mindstorms is not so easy - you need additional cables and adapters. The motors from Mindstorms are so huge that it was simply impossible to assemble a compact "Frank". I had to make it all the more difficult and interesting.

I decided to use the HiTech motors instead of those that came with Lego, and instead of the NXT Brick use another controller - the Arduino Uno. Having connected the servo motors to the PWM outputs of the Arduino, and checking that everything works, I began to re-assemble my “Frank”. The motors together with the mount were still quite large, but the modified form factor allowed them to be placed in the body of the SUV. I had to sacrifice the suspension, but in the future, when it comes to driving outside, I’ll think of something.

image

image

And so, the platform is assembled. It's time to do the fun part - stuffing Frank with electronics and making him move. To test that all components work as they should, I took Arduino, the usual prototyping board. Each servo motor has three cables — red, black, and yellow. Black cable is ground. When connecting the Arduino, it is necessary that the land at the Arduino and the servo motors be closed between themselves. Therefore, all the black cables from the servo motors, grd output from the Arduino and the minus of the battery that feeds the servo motors we connect together. Further, plus servo-motors (red cable) and plus batteries we connect together, but do not connect to the Arduino. In order for the Arduino to function without problems, it is necessary to isolate the power of the servo motors and the power of the Arduino. For this, I use different power sources for motors and Arduino. If there is only one power supply, then a capacitor must be soldered between the plus and the ground of each servo motor - this will save you from unnecessary “noise” in the board.

After making sure that the Servo-> Sweep preset in the Arduino is working, I began to solder a small circuit based on the Arduino Proto Shield. Of course, due to the fact that this was my first experience with a soldering iron in my hands - I ditched the board safely, without noticing that some contacts are connected with the “ground”, and therefore among themselves. Now I am waiting for the new experiment boards to come.

At the moment, this is where progress with my experiments has stopped today. What do I plan to do next when additional components arrive?

So! This week I have to deliver 3 solar batteries of 3W each, two Arduino Proto Shield (in case I destroy another board), Li-Po battery 2LIR18650-PCB-LD, Lipo Rider from Seeedstudio.

I also had various ultrasonic sensors, 2 CMOS cameras and BeagleBone Black. What can come of all this?

Solar panels, Li-Po battery and Lipo Rider will provide autonomous operation. When the voltage drops, the robot can be put into “sleep” mode while the batteries are charging.

Two cameras, ultrasonic sensors and possibly a laser rangefinder (when I come up with a reasonably cheap solution) will be processed by BeagleBone Black to build a “picture of the world”. Considering that the process of visual perception in people is multi-level (different levels of our neural networks process different image properties), I got the idea to use several BeagleBone Black or Parallela boards connected hierarchically. Each board will perform its own algorithm, maximizing the utilization of processor power and the amount of free memory, transferring data further along the chain for further processing. Thus, other sensors can be processed. As a result, you get a large network of components, which, like a living organism, controls an autonomous robot.

Ahead of a fascinating journey to build a robot. As soon as the remaining components arrive and everything will work, I will write another article.

Now, as for the various resources, where I buy parts, electronics and the like.

USA:
1) The main resource in America, as no wonder is Amazon.com . There you can buy anything.
2) Newark.com - here you can buy any components for microcircuits.
3) Lynxmotion - here you can buy parts and ready-made robots.
4) Mindsensors - various sensors for Lego and other platforms. There are a lot of things for Arduino.
5) Trossen Robotics - perhaps the coolest platform for developing robots. Here you can buy servo-motors, spare parts, chips and so on.

Russia. Everything is a little worse here - I really hope for your help and recommendations, since, apart from one store, I could not find something worthy, with a large selection and delivery.

1) Electronshik - The only thing that I haven’t yet. There is not all, but all that I needed at the moment.

Source: https://habr.com/ru/post/191430/


All Articles