And I want to fly, or how to test the quadcopter nodes without radio control equipment
Having read articles on Habré about quadcopters, and after watching the video on YouTube, I also wanted to make a quadcopter. I ordered in a wonderful Chinese parts store , based on a list from this article . Unfortunately, there was no radio equipment in that store, and so far I haven’t had any experience with purchases of such sums, so the order consisted only of propellers, batteries, engines, controllers for them (ESC) and the main controller. Everything arrived quickly enough - less than two weeks (from Hong Kong to Kiev). Immediately after that, I ordered in the other store radio equipment and various trifles. I made a frame from scrap materials (a square aluminum pipe from a local hardware store), placed engines with controllers on it. And I wanted to try them - suddenly there are defective ones. The instruction to the ESC said that it was necessary to connect one of the channels from the radio control to them. But the radio control will arrive no earlier than in a week and a half ... I climbed to understand how these ESC are controlled. It turned out that they are controlled by PWM, and the duty cycle of the pulses is not important here, but the absolute duration of the pulses is important. Minimum counts are 1 ms, maximum is 2 ms ( RaJa , thanks for the help). To emulate a radio control, I used the wonderful development of DiHalt `a - pinboard II board (for which a special thank you to it). I wrote a C program, the code is outrageously simple: the microcontroller (ATMega16) waits for a byte from the serial port, and if it is' q ',' w ',' e ', it increases (in different steps) the pulse width at the PWM output, if' a ',' s', 'd' - decreases. Also, the program flashes one of the LEDs - to make sure that the MC does not freeze, and the second LED lights / extinguishes if the port receives '1' / '0' (to check the connection with the computer). Do not scold too much, this is the first C program (previously written for assembler in tiny13). Program code PWM operates at a frequency of 488 Hz, all ESC adequately perceive such a signal. Compile in AVRstudio (I’m using 4 for the time being), MK clock speed - 8MHz, firmware using bootloader (which was recorded in MK with pinboard). To control the board, you can use the usual screen (for * nix): lim$ screen /dev/tty.usbserial-000013FAA 9600 or hyperterminal for Win *.
And finally, how everything in the collection looks like: ')
And one more video (second attempt):