📜 ⬆️ ⬇️

Robot "Inchworm" based on Arduino Nano

The year of admission to the university has arrived, and I thought about a project that could be presented at the university conferences, so as not to sweat about the notorious USE and Olympiads. After talking with his teacher of information, having hoisted on YouTube, I decided to assemble a crawler-like robot.

As additional buns, I decided to add the ability to control from the computer to the hardware, to realize the possibility of several types of movement, while keeping within the minimum budget.

Here's what happened in the end:
')
image



Now everything is in order.

Constructive

Thinking about the design of the future snake, I looked at a lot of videos of ready-made robots, and some image of my caterpillar was born in my head: a modular system of several identical symmetrical pieces would fit just right.
In total, three modules are involved in the snake: two work on the movement back and forth, and one is responsible for the rotation of the structure.
Now about the implementation of modules. There was an idea to make a kosher case on a 3D printer. Even threw a layout in SolidWorks. But an acquaintance did not work, but in another way it is expensive and time consuming. I decided to do with scrap materials. In the construction market I bought a reel tape reel (construction) and an active flux to conveniently solder the structure.
As a result, each module looks like this:

image

At the base sits the servo Hitec HS-311.

Electronics

image
Requirements to the functionality of electronics: control of servos in accordance with accepted commands.
It has long been a desire to pick Arduino, and this project was just the perfect reason to buy a board. From the Arduino family, I chose Nano because of its convenient size and availability in the market. I chose Bluetooth Bee as a command receiver, which I had to order and wait for about a month. While she was gone, she controlled the track through a COM port with a transition to the MAX232. As the bee was delivered (BluetoothBee), in the prog on the PC I corrected the COM port (the bluetooth adapter just emulates it), and on the Arduino I moved to the NewSoftSerial.h library and corrected the prog to a minimum, adding initialization of the bee. By the way, on the Nano there is an exit to 5V and to 3.3V - this is just gold, because the bee eats exactly 3.3V.
Arduino soldered to the prototype, added convenient pins for connecting the serv and added a toggle switch (At conferences it is very convenient to choose the mode by switching the three-position toggle switch: 1 mode - doing nothing, 2 mode - demonstrating the implemented types of motion, 3 mode - control from a computer).
The power supply used 4 AAA batteries, mounted behind the caterpillar in a convenient holder, which fell just in size.

Arduino program

Praise the libraries, practically nothing has to be considered manually. Servo.h has already been written to control the servos, so it remains to specify the servo and write the angle to which we want to install into it: MiddleServo.write (90); Working with a Bluetooth serial connection is essentially the same control over a wired connection. Ready library - NewSoftSerial.h.
Source code

PC program

I used a ready-made library for working with a COM port. The Bluetooth adapter emulates the COM port, everything clings itself, no problems arise. Then the keystroke is polled using GetAsyncKeyState, and initial letters assigned to keystrokes are transmitted to the Arduino for further conversion and execution.

Demonstration :


I apologize for the poor quality video.
And also types of movement close-up: 1 , 2 , 3 .

Resources spent :

It took me a total of about a day to create everything. Much more on the selection of materials, waiting for delivery and doing nothing.
Money spent about 3,000 rubles.
The materials used in the snake are pretty easy to get. Perhaps, only with Bluetooth Bee there can be difficulties. I had to order at Seeeduino Store. But, if you wish, you can teach the snake to listen to the radio with xBee, which is much easier to get, but then the computer needs an appropriate adapter.

Buns :

1st degree in the competition "Step into the Future" (MSTU. Bauman)
2nd Diploma on Intel-Avant-garde Dynasty (selection on Intel ISEF)

Perhaps I missed something important, so I’m happy to answer all questions.

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


All Articles