Quadcopter
From
Project: Quadcopter | |
---|---|
Name | Quadcopter |
Initiator | Michielbrink and Vondel |
Status | In progress |
Skills | lots of skills |
Summary | awesome quadcopter with a lot of sensors |
Contents
The quadcopter
To give you an idea of what we are planning with our Quadcopter, here is a list of features we want to include:
- gyroscope
- accelerometer
- compass
- ultrasonic range sensors on every corner
- control via wifi
- live webcam stream
- according to a comment with the motors we bought: at 1,3Kg, speed up to 75km/h
- servo to tilt webcam.
- battery measurement through adc -> uart on msp430g2553.
- stm32f3 discovery board as brain.
- raspberry pi for the webcam stream, control and more fun stuff
- gps (in the distant future)
- and lots more!
buy list
We ordered for two people but the prices are per person. so there are units at this list that are half.
conrad.nl
- 1 , STM32F3DISCOVERY (€19,79)
hobbykings
- 3 , Turnigy 2200mAh 3S 20C Lipo Pack ($23,67)
- 4.5 , Turnigy L2210C 1200 Brushless Motor ($45,54)
- 1 , Turnigy S3317M Servo 26g / 3.0kg / .14sec ($7.20)
- 0.5 , EMS Express to Netherlands(MAX 2.5kg) ($27,325)
- bovenstaande 4 dingen zijn in totaal €88.975
- 0,5 , taxes (€24.30)
random ebay shops
- 4 , 30A bürstenlosen Motor Drehzahlregler RC BEC ESC Motor Speed Controller (€21.96) (crap, not buy this!!!)
- 0.5 , 5 Pairs Nylon XT60 Connectors Bullets plugs Male / Female for RC lipo battery (max 30A) (€3.11)
- 0,5 , [http://www.ebay.de/itm/5-Paar-10-x-XT60-Lipo-XT-60-Hochstromstecker-Stecker-Buchse-vergoldet-RC-60A-/190738262266?pt=RC_Modellbau&hash=item2c68e2e8fa
5 Paar = 10 x XT60 Lipo XT-60 Hochstromstecker Stecker & Buchse vergoldet RC 60A] (max 60A) (€3,375)
- 1 , IMAX B6 6s Lipo Nicd/Nimh Multifunkt. Ladegerät Akku Balancer Charger m Adapter (€22.88)
- 0.5 , 5M 16Ft 16AWG Black 1square Heatproof/Low Resistence Soft Silicon Wire Cable (€3,875)
- 0,5 , 1pc 5M 500cm 16AWG Red 1square Heatproof/Low Resistence Soft Silicon Wire Cable (€3,875)
- 4 , New 10x4.5" 1045 Nylon CW CCW Propeller Multi-Copter QuadCopter Rotor Black (€12,395) (not buw this, it´s to big)
- 2 , spanningsregelaars
- 0,5 , 80PCS Dupont Wire Color Jumper Cable,2.54mm 1P-1P Male to Female For Arduino (€2,24)
- 0,5 , 80PCS Dupont Wire Color Jumper Cable,2.54mm 1P-1P Female to Female For Arduino (€1,87)
- 0,5 , 20pairs 3.5mm Gold Bullet Connector plug for RC battery (€2,345)
after shopping
- 4, Turnigy Multistar 20 Amp Multi-rotor Brushless ESC 2-4S (OPTO) (max 20A) ($39.16)
- hobbykings stuff (€42,74)
- 3x #017000058/36344 8045 SF Props 2pc Standard Rotation/2 pc RH Rotation (Black) (EU warehouse) = $10.35
- 1x #9323000002/36428 Hobbyking X525 V3 Glass Fiber Quadcopter Frame 600mm (EU warehouse) = $18.45
- 4x #LPGUARD18x22/38354 Lithium Polymer Charge Pack 18x22cm Sack (EU warehouse) = $10.92
- 1x #015000023/42109 Nylon XT90 Connectors Male/Female (5 pairs) (EU warehouse) = $9.4
stm32f3 bookmarks
License for the stm files https://github.com/micropython/micropython/issues/26 (we need MIT?)
raspberry pi <--> stm32f3 communication
- spi speeds available on the raspberry pi : 0.5 MHz ; 1 MHz ; 2 MHz ; 4 MHz ; 8 MHz ; 16 MHz ; 32 MHz
- the data is like [command-code, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]
- the command-code is one byte
0x01 = no operation 0x02 = set speed of motors [0x02, m1, m1, m2, m2, m3, m3, m4, m4] (the motor data is 2 times 8 bit (big-endian) 0x03 = control leds on stm [0x03, led_byte, 0, 0, 0, 0, 0, 0, 0] 0x04 = 0x05 = set web-cam angle 0x06 = 0x07 = 0x08 = 0x80= control leds on quadcopter [0x80, l1, l2, l3, l4, l5, l6, l7, l8] 0x81= control leds on quadcopter [0x81, l9, l10, l11, l12, l13, l14, l15, l16] 0x82= control leds on quadcopter [0x82, l17, l18, l19, l20, l21, l22, l23, l24]
computer/phone <--> raspberry pi communication
- over tcp/ip because it have an error checking
raspberry pi
- in python
- if there is a crash or error -> restart python script [1]
- password for user pi is: aaps
laptop client
- in java because it´s OS friendly
measure data, motor
rotor: 8" x 4.5" motor: max 15.8A
- 14% 0.4A 1500RPM 50g
- 19% 1.5A 3000RPM 100g
- 23% 3.2A 4000RPM 200g
- 28% 4.8A 5000RPM 250g
- 33% 7A 6000RPM 400g
- 41% 12.3A 7500RPM 550g
- 47% 15.4A (Warning!!! to close to the end)
- comment of davdi @ hobbyking
Here are measured values from my static test Accu: LiPo 3S Measuring device: Turnigy SuperBrain 40A Each Prop was run 15sec under full throttle Propellers: MA=Master Airscrew Propeller JXF=JXF Prop MA6x3: 12V, 6.5-7.1A, ~11500RPM, ~85W MA6.5x4: 11.8V, 9.1A, ~10700RPM, ~110W JXF7x6: 11.6-11.5V, 9.7-10.4A, ~10100RPM, ~120W JXF8x6: 11.5-11.3V, 11.7-12.3A, ~9200RPM, ~140W JXF8x8: 11.1-11.0V, 14.3-14.9A, ~8400RPM, ~160W no prop: 11.8V, <0.6A, ~13500RPM calculated Kv ~1140 (near to specification) Motor was warm (not hot) after the test with each propeler If is not planned to run under full throttle most of the time then 8x8 prop can be used. I expect that motor load will be slightly lower during the flight. Currently I don't have plane where motor can be used finished. Result: Motor has parameters as stated.
adc electronics
circuits (quadshields)
raspberry pi
- [comming soon]
- the raspberry itself: © http://www.rapixt.com/?a=5
stm
- [comming soon]
power
- [comming soon]
ledstrip
- [comming soon]
the firmware for the msp430g2553 (adc to uart)
#include <msp430.h> #include <stdbool.h> #include <stdio.h> #define GND BIT4 #define DAT BIT5 #define RXD BIT1 #define TXD BIT2 char buffer[4]; int adc_new; int adc_old; char * adc_string; void uart_putc(unsigned char c); void uart_puts(const char *str); int adc_read(); void Delay_ms(unsigned int ms); int main(void) { //msp430 init WDTCTL = WDTPW + WDTHOLD; // Stop WDT BCSCTL1 = CALBC1_1MHZ; // Set DCO to 1MHz DCOCTL = CALDCO_1MHZ; //pin init P1SEL = RXD + TXD; P1SEL2 = RXD + TXD; P1DIR |= GND; P1OUT&=~GND; //uart init UCA0CTL1 |= UCSSEL_2; // SMCLK UCA0BR0 = 104; // 1MHz 9600 UCA0BR1 = 0; // 1MHz 9600 UCA0MCTL = UCBRS0; // Modulation UCBRSx = 1 UCA0CTL1 &= ~UCSWRST; // Initialize USCI state machine IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt //adc init ADC10CTL1 = INCH_5 + ADC10DIV_3 ; // Channel 5, ADC10CLK/4 ADC10CTL0 = SREF_0 + ADC10SHT_3 + ADC10ON + ADC10IE; //Vcc & Vss as reference ADC10AE0 |= BIT5; //P1.4 ADC option __enable_interrupt(); Delay_ms(1); // Wait for ADC Ref to settle while(1) { Delay_ms(500); adc_new = adc_read()*10/1023; if(adc_new != adc_old) { sprintf(adc_string, "%d",adc_new); uart_puts(adc_string); adc_old = adc_new; } } } //uart void uart_putc(unsigned char c) { while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready? UCA0TXBUF = c; // TX } void uart_puts(const char *str) { while(*str) uart_putc(*str++); } //adc int adc_read() { ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start __bis_SR_register(CPUOFF + GIE); // LPM0 with interrupts enabled return(ADC10MEM); } __attribute__((interrupt(ADC10_VECTOR))) void ADC10_ISR(void) { __bic_SR_register_on_exit(CPUOFF); // Return to active mode } //delay void Delay_ms(unsigned int ms) { while(ms--) { __delay_cycles(1000); } }