|Feb 16, 2012, 02:39 AM|
Joined Dec 2010
AfroFlight32 - now we're talking progress
This is going to be pretty much against everything I've been posting here for the last year but hey, if it works, ship it!
Remember blog last year about lack of innovation in multirotor scene? Well, nearly a year later, and nothing changed.
Tardupilot Mega 2 has been released and is solid unobtainium. But let's take a look what it offers? Same old obsolete 8bit processor. A minor sensor refresh, switching to all-digital sensors (more on this later). A new form factor, but still full of headers and heavy/ugly. Then there's the lies about "3 processors". They're not even using MPU6000 DMP/sensor fusion stuff, it's still same ol' tarduino/AVR for main processor, and I dunno what butt they're pulling the 3rd processor from. Maybe the Atmega32U they're using for USB interface.
DJI released their "hobby" version of WK-M and promptly overpriced it. It would be cool if those guys could eventually figure out how to do PPM input and how to set ESC arming pulses to 1000us and not whatever they're doing.
Openpilot is still failing to meet demand, having production troubles (again), is in the middle of switching gyros on CopterControl, and Revolution platform is still being worked on. So you can't get a CopterControl even if you really wanted to, though demand has been slightly reduced by people buying DJI Naza and selling off their CopterControls
I had pretty good success with my 8bit flyingthing using analog Invensense gyros and ADXL accel. I did a test version using MPU6000 and mag, but never bothered doing much else with it. After all, it's 2012, and 8bit really is DEAD.
Unlike all those guys using "it's made in Europe, so its expensive" excuse to peddle their obsolete / overpriced 8bit warez, our Chinese friends at least try to innovate. Delivering a final death blow to KKBoards, they released a couple 32-bit flyingthings, one being the 'Rabbit' FC and another, 'FreeFlight', both reasonably priced modern platforms.
Rabbit uses NuvoTon 50MHz Cortex M0 processor, has series resistors on every PWM input and output for some reason, and uses code stolen from MultiWii. ~$90 version has full set of sensors, acc/gyro/mag/pressure.
FreeFlight uses STM32F103C8T6, 64K flash device with only acc/gyro and pads for pressure sensor, and is priced just about right at ~$50 from goodluckbuy, or $35 from some random chinese retailer. I liked everything about FreeFlight except the form factor, so I decided to make my own version. With my involvement with ESC32 I ended up with a decent supply of STM32F103 chips, so I wanted to use them for something. Also by reusing FreeFlight platform I had the choice of running their firmware as-is or work on some improved version. I kept the same sensors as FreeFlight uses - ADXL345 accel, MPU3050 gyro, and added BMP085 pressure and the usual HMC5883 mag. I had some space left over and thought why not add USB, too. STM32 has native USB device, but FreeFlight wasted those pins for LEDs. So in order to to be compatible with their firmware, I had to add a cheap USB>serial bridge. SiLabs CP2102 is small/cheap enough. Why do avrtards still insist on using FTDI? With some creative routing, I fit all of this into 36x36mm on 2 layer PCB that still looks good and isn't full of staggered holes like some other guys.
In a couple evenings I wrote drivers for all the system stuff, PWM/PPM, UART, I2C, made timing driver using SysTick and Cortex cycle counter. Another evening is all it took to port current -dev MultiWii to the new driver framework. Here it is running and showing all the fun stuff in GUI.
I received a ton of complaints about my 8bit board that it only supported CPPM for RC input. Why would people WANT to connect 6+ servo wires to a receiver instead of just one? The mind boggles. Anyhow, reality is, CPPM is only used by hackers, everyone else just wants to use $5 OrangeRX receivers.
FreeFlight has 8 PWM inputs, and so does my clone. Since all those channels are on hardware timers, I could reuse any of them either as inputs or outputs, so theoretically with CPPM, this can fly an octo with camstab. And they're all 1us precision, no jitter! Take that, AVRTards.
This is what I ended up with:
36x36mm CopterControl-sized 9DOF flyingthing
STM32F103C8T6 32-bit ARM Cortex M3, 72MHz, 64K flash (128K actual), 20K SRAM
BMP085 Pressure sensor
CP2102 USB>Serial bridge
6 + 8 PWM I/O, can be reassigned for other functions.
2 status LEDs
5V Buzzer connector
Battery voltage monitoring
It even flies - but its raining here for the last few days and I really don't want to land in giant puddles of water again. Here's some pro tail-in hovering:
Yes, all sensors are digital. Yes, analog stuff is still better. But it seems the cheap sensor stuff is moving to digital (blame iFail/Android), plus I wanted to be compatible with FreeFlight hardware.
Source code is available at http://code.google.com/p/afrodevices/ in the 'baseflight' directory. It builds and runs as-is on the board above (using all sensors) or on the Chinese FreeFlight board (only using acc/gyro and pressure if available). Still lots of things to clean up, but it's a start.
CP2102 USB driver
Click "Tools", download:
Issues have been reported with old CP2102 drivers not working / causing "device cannot be started" nonsense in Windows 7 x64, if you plug the USB connector and get something similar with a previously loaded driver, go to device manager, and 'uninstall driver', making sure to check [x] delete driver files then reconnect USB and install latest driver from the URL above.]
Permanent "USB Device Not Recognized" FIX
If it works for you, don't bother doing it. Anything shipped after March 03 2012 already has this modification and no further changes are necessary.
Required GUI software
Android and Windows-based GUI by nicodh
Firmware update instructions
Download baseflight latest stable version, stm32 flash loader from http://code.google.com/p/afrodevices/downloads/list. Latest (beta) firmware always available at:
(right click on 'view raw file', save as... )
Latest firmware shows build version by typing "version" in cli.
Firmware update procedure uses STM32's built in ROM bootloader. This means that's not something a user can break/erase by uploading wrong data etc. If standard update fails, recovery always works as it goes directly to this bootloader.
Standard update instructions
1) Use terminal emulator (suggested Hercules Setup) connect to USB COM Port at 115200 8bit no parity 1 stopbit
2) Send 'R' (no need to enter key, but must be capital R). Easiest is to type R into one of the 3 transmit boxes and click [Send] button.
3) All 3 leds will be ON.
4) Start STM32 Flash Loader, choose USB COM port, don't change any other setting. Some systems might need 'timeout' increased to 10.
5) click next until it goes to erase/download/upload page. Here, make sure 'Download' is checked, check [jump to user program] and if needed [global erase]. The latter will clear all settings (newer firmware might also clear settings depending on config struct version. It's better to backup PIDs etc if needed).
6) browse to the baseflight firmware you want.
7) click next
8) when all done, the leds will blink standard startup pattern, if not, unplug usb and replug.
Rescue / recovery update instructions
If transmitting 'R' in above method doesn't work, if flash fails, if firmware is too old, etc, the following method is to be used.
1) short out bootloader pads on the bottom with tweezers or similar.
2) plug in USB cable. Only POWER light will be on - 2 status lights are OFF. If they blink, repeat step1 after removing USB - means the pads weren't shorted correctly.
3) Bootloader pads can now be unshorted.
4) Go to step 4) from the instructions above.
Can't get ST Flash Loader demonstrator to work? Chances are you need UART DLL update:
Place the DLL in specified location and re-run flashing procedure from step 1.
Manual (work in progress): http://www.abusemark.com/downloads/naze32_rev1.pdf
User PID/etc settings spreadsheet (managed by lebrett)
FreeFlight firmware loading quick how-to
Should you want to use original FreeFlight firmware instead of MWC port, there's an extra step involved.
1) Flash http://www.rcgroups.com/forums/showa...6&d=1327893905 (freeflight_fix_flash.zip) using any method (R, bootloader pads).
2) Power cycle, leds will blink repeatedly. Hardware is now prepared for FreeFlight firmware
3) Short bootloader pads, flash latest FreeFlight firmware (see FreeFlight thread)
4) Power cycle, now connect to ZNS software as usual and follow FreeFlight instructions for calibrating IMU/RC/Motors/etc.
To go back to MWC/baseflight firmware, short bootloader pads and reload latest baseflight.
Another version of above instructions: http://www.rcgroups.com/forums/showp...postcount=2150
Naze32 setup guide for non-programmers
This is a thread maintained by a forum member who found the manual (rightfully) lacking in newbish detail and decided to take matters in his own hands. If you have no idea what you're doing, and you're stuck looking for the '#' key, this thread is for you!
A friendly reminder: You cannot use this hardware with any DJI frames.
This includes: FlameWheel 330, 450, 550, or any future or past frames released by DJI.
tl;dr version (thanks wingspinner)
A. Basically this is a sport / funfly board NOT FOR PROFESSIONAL HOVERING / AP WORK.
B. Not for beginners and non-technical types who can't figure out on their own or with the existing docs how to flash the board without hand holding. If you read the above instructions and have questions, this isn't for you.
C. Something to experiment with and do more advanced stuff ON YOUR OWN or via the multiWii / other forums. i.e. you want to play with STM32 / sensors / RC stuff and know what you're doing.
D. Support questions should be limited to possible hardware problems or documentation clarification and not be about how to do more than the board was designed to do or how to reflash firmware.
Last edited by timecop; Jun 08, 2012 at 09:37 AM. Reason: added nicodh's apps
|Feb 16, 2012, 07:05 AM|
|Feb 16, 2012, 07:12 AM|
Joined Feb 2011
|Feb 16, 2012, 08:32 AM|
Joined Feb 2011
|Feb 16, 2012, 09:44 AM|
Soooo would it be stupid if I bought a JussiH miniwii now?
Because this thing seems to beat it in so many ways, even price.
Is it actually in stock at that site?
|Feb 16, 2012, 10:02 AM|
I have 3 sattelite RX's and i thought it would be a great alternative to ppm sum, any way that could be implemented, although i cant figure out how you would enable it, but then im not clever like you LoL. just a thought
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|Discussion||Sen. Coburn $9 Trillion plan- Now we're talking||SPEED-E-FLYER||Life, The Universe, and Politics||7||Jul 20, 2011 05:43 PM|