[National Undergraduate Electronic Design Contest] H 2019 electric competition problems Replay record - electromagnetic gun + Curved comprehensive evaluation

       This is my last fight undergraduate, was expecting a perfect ending, but frequent accidents, play is not satisfactory, but the harvest is still there, so in this recovery disk, leaving some stuff for later reference person .

       Thank my teammates CJC, WJJ, to accompany me to stay up all night together!

        I Caishuxueqian, if any errors and omissions, please inform me in time to correct, very grateful!


1 race preparation country race (month before)

       We do group identified the control class subject, that will choose aircraft or another typical control track title , so the hardware is ready, I mainly focused on the design and commissioning and commissioning of the control board flight control , because I heard later aircraft topic limited use Texas Instruments chips, so the main focus of late on the subject in another channel control, my team prepared:

  • STM32F407 MPU (with MPU6050 / 9250 interfaces, line 7 OLED display modules, the SPI group, 4-channel ADC, DAC channels 4, 4 timer channels, four serial ports, six buttons, the LED 2, a buzzer, a set of the SPI, a set IIC)
  • Power supply board (12V DC input, 12V / 5V DC output, two DC motor, stepper motor driver 2, 4-way servo drive)
  • The image processing board (using STM32H7, micropython firmware flashed, the IDE can be used OpenMV programming model of camera The OV7725)
  • Wireless Scheduling (for fast, real-time adjustment parameter, with a 4.3-inch LCD screen, 8 buttons, potentiometer knob 2, a passive buzzer, an RGB light, an external FLASH chip)

4 unified interface board, may be interconnected with the line terminal of the anti-reverse

My teammates responsible for driving the maintenance of the code, to ensure that each module can be successful drive (OLED, buzzer, servo, stepper motors, DC motors, gyros, serial, ADC, DAC, IIC, SPI)

Reflection:

  • In the preparation process, there is due to the uneven distribution of tasks due to sabotage part of the team's phenomenon (widespread in each group, is not the case, not everyone is participating to the study, some people just want to experience a mix). This situation requires more communication, high school students as a laboratory leader, can not ignore, not in cahoots . Otherwise it will be caught in a vicious cycle!
  • Good test code package, you need where necessary add comments for quick transplant in the use
  • Aircraft topic as it relates to machine vision, TI's MSP430 / 432 series is difficult to meet the requirements, DSP technology for user requirements and high, so is bound to be relaxed on the chip limited, concerned that during the preparation does not hold (give up aircraft the key should be the laboratory does not have the debugging aircraft site conditions)

2 Nations Championship when carried out

To get the title, after the aircraft took note of SD card is determined to give the title (I did not draw the image processing board SD card), start preparing  H theme - Electromagnetic song shot gun .

I put the whole work is divided into the following sections

  • Guns and drive
  • Visual portion (Looking target)
  • Battery control
  • Paper Writing

The following describes a detailed analysis of each part of the implementation of:

(1) and its driving guns:

Guns through the Internet search data have a preliminary understanding, the understanding of a range of requirements, we believe that the single coil to meet the emission rate requirements of the subject (in fact is the case), then began winding coil to start using enameled wire of the coiled power pack, very fine magnet wire, resulting in a large coil resistance, when using the power box test, do not increase the short circuit current (approximately 7A @ 60V, equivalent resistance 8.6Ω, can be quite large a), repeated tests also cause the coil to heat unglued (is not that the heating wire?), and later to the motor repair shop to buy a thick wire, wound about 150 turns of the coil resistance is very small.

[Full Parameters: about 150 turns, wire diameter of 1.25 mm, a resistance of about 20mΩ}

Problem solving internal resistance, current can go up, but can be seen by calculating the theoretical short-circuit current has reached 3000A @ 60V, how much current power supply box parry? Even the presence of the thermal power has reached 180kW, which is not realistic, we need to mention that the instantaneous discharge, so a large capacitance is the better choice, because the required controllable, requires a switch to control the capacitor discharge circuit of the coil we find an air switch to temporarily implement (MOS tube is replaced at a later stage, after all, required transmit power control), tested, screws / nails as shells, gun wound coil can meet the requirement, when (because the emission kinetic energy of the projectile obtained is substantially constant, the kinetic energy E = 1 / 2mv ^ 2, only a small number of mass m, in order to obtain a large velocity v, of course, too small to affect the quality of the object in flight by the gas stream more obvious, mainly floating ballistic, placement is not fixed, it is necessary to make a trade-off between the mass m and the velocity v).

To ensure accuracy, the battery using a stepping motor (heading and pitch, two step altogether, 16 division), a stepping motor driven by the second year teammate code is responsible, in order to achieve closed loop angular fort two weeks, using a timer It acts as an analog encoder input step pulse drive counts , as long as the stepping motor does not lose phase, can be determined according to the number of pulses of the stepping motor current angle.

(2) the visual part (Looking target)

Using homemade camera board, a micropython firmware flashed, the IDE can be used OpenMV programming logic is relatively simple to find the target: first find the area of the red color, a method using Hough transform to find in the vicinity of the patch within a specified radius of the circle , this algorithm is compared to the full image Hough transform, extraordinarily high efficiency (78fps), ov7725 without doing any treatment, it is about 78fps frame rate that I have the misconception that refresh code wrong. Later, worried that the light color to identify the cause of the error, the gray image directly into the Hough transform looking round, but for ROI made a fixed limit (upper and lower end portions do not) , test frame rate of about 60fps. Finally, in the serial baud rate of 115200 issued circular coordinates of the center, while the end with a fixed frame header parity and no special flag center, and for the convenience of debugging, a target is identified, as a bright red LED prompt. After all the code implemented, observed around frame rate 40-50fps, to meet the requirements.

(3) Control Fort

Fort heading control is very simple, not too much to do is described in detail herein Fort pitch control (pitch control of shell perpendicular exit angle).

First, the high school physics understood, in the ideal case (no air resistance constant kinetic energy projectile exit, the exit point and the aiming point at the same horizontal level), when exiting the longest range 45 °. My specific formula is derived in the game too (but now can not find it) , muzzle at 45 °, the elevation or whether the next lift, aiming position will be close to the exit point. But note that very few people exit point and the ground is level, that is, after the shells fired at the exit point is reached the same level, will continue to fly for some time.

Calculated, considering the exit point higher than the actual aiming point where, when an error angle δθ in the mechanical structure itself, an overhead way (more than 45 ° exit) than the low drive mode (less than 45 ° exit) errors caused δx smaller , However, due to the limitations of our fort mechanical device, using a forced low drive mode, but in the subsequent measurement, this error does not matter.

In Battery control, the range of primary and initial discharge voltage coil (capacitor voltage) , a shell-shaped material , the number of turns , the position of the shells in the bore of and the angle related to the first four variables can be controlled to be constant, only the need to control the angle of the variable can change the range. A function of angle and range is very important, because the formula is derived complex, we direct the measured data to fit out this function. Fitting manner using polyline segmentation fitting (polynomial fit at the end proved to be the least reliable fitting manner).

(4) Paper Writing

Thesis writing section entirely to the group responsible for the freshman school brother.

Reflection:

In this part I made many mistakes, is also reflected in the process, I did not do a qualified leader. Before I used to go it alone, all hardware and software themselves, this game is not getting it, although I mainly do control algorithms and vision algorithms work, but still want to have a hand each part, and made two other players are Not satisfied, always felt I was in denial of their work.

Besides, I did not form their own authoritative leadership is a big problem, the team's sophomore strong players of our own strength, a lot of their own ideas when writing code stepper drive, often with "I feel no need to" reject my advice, when taking into account the emotional problems the team did not do too much interference, the result was catch up with you at the time of the late write control algorithm, the brothers variable Natori ambiguous, calling himself no problems, when I was in convergence confused and disoriented. So, my suggestion is, in teamwork, communicate, and remove all refused to cooperate signs; for bad programming practice, we must put an end as soon as possible. The transfer of part of the code, must be standardized naming write a comment!

During the race, I started to play a part in adjusting a laser followed, after the discovery of the basic functions we do not realize (at this time has passed most of the day), I began to tune basic functions, later time constraints, this play part He did not need them. It can be said wasted a lot of time. Later, using the parameter adjustment is transformed into a remote control, coupled with the interface and the predicted trajectory of the bullet points, feeling spent too much time in the interface, although this last part was definitely the judges, but if you use this time to polish our foundation section, the effect will be better. So, the game or should do step by step, not too ambitious.

In the base portion, it is required for a given distance and angle of the keyboard, when convenience, heading step 3 °, the range 5cm step, (the last has not changed). Competition judges specified site 20 ° position, the initial value of the heading angle of 0 °, we can only be set to 18 ° or 21 °, always lead to missed.

In addition, I did not expect to determine the placement of so-called high-speed camera, it turned out to be the judges eyes! (Smile), and then to determine the impact point by a sandbox. I realize now equivalent to shortening the height of the sand table in the picture above, I marked the ΔH, and because a low shot mode, the closer we use, the more significant errors! When we own calibration, are directly in the tile floor calibration (also in the thick yoga mat calibration, so the situation is very close to the stadium), 2cm of sand table, can produce a maximum error range of 6cm, I finally understand why the placement of the game is always shorter than the time measured own a little. (Very angry)

 

3 Comprehensive Assessment race preparation (the week before)

Main saw Zhenti previous years, in a bit of Multisim, but also to take part of the circuit board in a bit tunnel, the cutoff frequency of the active filter is found complicated calculations, the theoretical calculations, the simulation results, Bode diagram analysis and physical measured out parameters are actually not the same. Final decision: If you encounter filtering, directly employing passive filtering scheme to use small amplitude amplifying operational amplifier. This part of the preparation more fully.

Prepared Snickers, skip lunch to save time for lunch.

4 comprehensive evaluation conducted

Get a title soon, already has programs:

  • Square wave: an operational amplifier positive feedback square wave, since the slew rate problems leading to unsightly waveform, to the NAND gate shaping, a shaping does not look good, then the whole time (using op amps * 1, * 2 NAND gate)
  • Sine: third order passive low-pass, followed by inverse scaling (using op amps * 1)
  • Rectangular wave: square wave to charge the capacitor through the potentiometer, and a square wave is fed to the NAND gate, the adjustment potentiometer adjusting the capacitance voltage rise time, so that the NAND gate output square wave of variable pulse. (Using a NAND gate * 1)
  • Cosine: Variant A: the use of integral sine (op amp * 1); Case B: After phase shifted signal is amplified through a low pass (op amp * 1) [This idea was not attempted is not guaranteed]

When the game I do not know why, I suddenly filter failure, his teammates do not always reverse scaling gain on the card in question until the end of the game, everyone was desperate ......

This problem is really did not expect, I feel this is the "force majeure" it.


Written in the last

After the game, my teammates are more frustrated (me too), this world's most sad thing is not "impossible", but "could have."

Indeed, the success of the game is a testament to the ability of the participants, but by no means lost the game to deny the ability of the participants, scholarship need reasonable manner, ten years grinding sword is doing the right attitude academic. Remember: work does not Tang donate, greatness into!

 

Published 44 original articles · won praise 203 · views 40000 +

Guess you like

Origin blog.csdn.net/ReadAir/article/details/99762864