jy0933's blog View Details
Posted by jy0933 | Sep 14, 2013 @ 08:44 PM | 9,823 Views
The reasoning on this attempt is quite simple. PX4 is capable of running at much higher stab loop rate. Current 100hz fast loop is mostly a compromise to the slow mega 2560. When it comes to stm32f4, the mcu and mpu6k should be capable of running at 500hz fast loop and 1k sensor sampling rate. At much higher fastloop rate, the copter should achieve finer stabilization/attitude.



Current code
in ardupilot / libraries / AP_InertialSensor / AP_InertialSensor_PX4.cpp
Code:
{
    switch (sample_rate) {
    case RATE_50HZ:
        _default_filter_hz = 15;
        _sample_time_usec = 20000;
        break;
    case RATE_100HZ:
        _default_filter_hz = 30;
        _sample_time_usec = 10000;
        break;
    case RATE_200HZ:
    default:
        _default_filter_hz = 30;
        _sample_time_usec = 5000;
        break;
    }
here specifies that it is possible to run at 200hz sensor sampling.

in ardupilot / ArduCopter / ArduCopter.pde
Code:
////////////////////////////////////////////////////////////////////////////////
// the rate we run the main loop at
////////////////////////////////////////////////////////////////////////////////
static const AP_InertialSensor::Sample_rate ins_sample_rate = AP_InertialSensor::RATE_100HZ;
....................
 // We want this to execute fast
    // ----------------------------
    if (ins.num_samples_available() >= 1) {

        // check loop time
the amount of sample(s) controls the fast loop rate.


to start with, it would be reasonable to try 200hz case
so to change

Code:
////////////////////////////////////////////////////////////////////////////////
// the rate we run the main loop at
////////////////////////////////////////////////////////////////////////////////
static const AP_InertialSensor::Sample_rate ins_sample_rate = AP_InertialSensor::RATE_100HZ;
static const AP_InertialSensor::Sample_rate ins_sample_rate = AP_InertialSensor::RATE_200HZ;

Posted by jy0933 | Apr 13, 2013 @ 10:09 PM | 49,260 Views
UPDATE

problem solved

we eventually found that the problem was caused by windows driver update. the solution to it is quite easy as following. and also the driver package is attached for your convenience.


solution:

(pre step... disconnect your internet to prevent windows from auto fetching driver)
step 1, Goto device manager

step 2, show all the hidden devices

step 3, delete all the serial/comport devices

step 4, delete all the usb serial devices (including driver)

step 5, connect the boards to usb

step 6. update driver

(step 6.5 for some computer you will need to reboot the system to take effect)

step 7. wala

video is being made .. will be uploaded soon

USB glitch solution for blgc (5 min 37 sec)










the following content was for logging purpose and just in case.. it is a workaround for this case.. the solution above should solve the problem







I recently have a new batch of BLGC to my door. and I found these along with some other people's having a similar/same USB glitch. After an entire day's work. I still have not identify what exactly caused the glitch. But I do find a workaround so people can still use the boards.


Glitch symptom:
when connected to usb, changed port to proper com1-5. the GUI stuck at reading value forever. meanwhile the arduino ide does not want to upload firmware to it.
(but according to reports from customer. buyer of same batch said different. some works just ok. some does not. I also suspect it might has todo with...Continue Reading
Posted by jy0933 | Apr 11, 2013 @ 04:37 PM | 12,533 Views
a update log of my project on 3 Axis STM32 Brushless Gimbal controller

key feature
3 axies
much powerful STM32 mcu
mosfet driver enables to apply higher current


UPDATE 1
proof of concept stage 1, driving mosfet with our own programe at different speed

3 axis blgc stm32 mos demo1 (0 min 20 sec)


3 axis blgc stm32 mos demo2 (0 min 35 sec)
...Continue Reading