Search found 529 matches

by ziss_dm
Wed Dec 28, 2011 9:06 am
Forum: Software development
Topic: Style question about #define
Replies: 28
Views: 6356

Re: Style question about #define

Hi,

Suggestion:

Code: Select all

#define FRAME QUADX
#define  RECEIVER PPM
#define GYRO ITG3200
#define ACC BMA180
#define LCD SPARKFUN
...


regards,
ziss_dm
by ziss_dm
Tue Dec 27, 2011 10:04 pm
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi Hamburger, Can you measure current/voltage/rpm at WOT? is this analogWrite(PWM_PIN[i], ((motor[i]>>2) - 250) + 2); the going code for the alternative firmware (to get maximum power output)? The length of positive pulse, generated by analogWrite(val) is val*8. So, for standard rc range we using: a...
by ziss_dm
Tue Dec 27, 2011 11:37 am
Forum: Software development
Topic: A little correction for dynThrPID implementation.
Replies: 10
Views: 3876

Re: A little correction for dynThrPID implementation.

Hi marbalon, ad.1. 250 arduino_pwm_250 or fast_pwm_250 ? maybe this is answer for next question - this is my all settings for Pitch/roll 4/0.030/5, gyro is l3g4200. Have you tried to increase D? gyro is l3g4200. #if defined(L3G4200D) void Gyro_init() { delay(100); i2c_writeReg(0XD2+0 ,0x20 ,0x8F ); ...
by ziss_dm
Sun Dec 25, 2011 6:47 am
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Yes,

You right, it keeps one byte "open" to distinct between full and empty. I missed that. ;)

regards,
ziss_dm
by ziss_dm
Sat Dec 24, 2011 11:15 pm
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi Danal, The buffer holds 63 bytes, not 64 64. Simple case head=0 tail=63 - holds 64 bytes, next byte will be rejected to prevent head=tail (which is empty condition). The fundamental way to sync with Spektrum frames is timing. Yes, but time can be discrete and measured in cycles/ticks/etc. The sim...
by ziss_dm
Sat Dec 24, 2011 12:18 pm
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi Danal, To overrun 64 bytes buffer you need to delay poll by 55ms. If it would happen in main cycle, you most likely crash anyway. The LCD configuration loop can be easily adjusted, to avoid: delay(1000). Or even better, to run in context of main cycle (to read real voltage and sensor data, instea...
by ziss_dm
Sat Dec 24, 2011 11:12 am
Forum: Software development
Topic: Let's talk about serial interrupt handling!
Replies: 6
Views: 2359

Re: Let's talk about serial interrupt handling!

Hi Danal,
It is actually does not matter. In case of buffer overrun you would have problems in both cases. ;)
The first case is standard behavior of all libraries on most platforms.

BTW: I think, it is better to read UDRn as first operation in the ISR, to free hw FIFO ASAP.

regards,
ziss_dm
by ziss_dm
Sat Dec 24, 2011 1:57 am
Forum: Ideas
Topic: AUX1 and 2 for 5 Channel PPM Sum
Replies: 9
Views: 4664

Re: AUX1 and 2 for 5 Channel PPM Sum

Hi marbalon,
This is actually cool. You binary encoding channel value! ;)

Decoding can be simplified:
rcOptions =(rcData[AUX1]-1000)>>6;

regards,
ziss_dm
by ziss_dm
Sat Dec 24, 2011 1:23 am
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi Danal, just flatly doesn't work reliably Can you be more specific? this is debug output to the o-scope: Cyan: Serial Data Yellow: pin toggle every cycle, phase toggle - header received. http://www.multiwii.com/forum/download/file.php?id=660 SPK-Stream-debug.JPG Looks quite healthy to me.. regards...
by ziss_dm
Fri Dec 23, 2011 2:34 am
Forum: Software development
Topic: New serial code induces instability? SOLVED
Replies: 86
Views: 21178

Re: New serial code induces instability?

Hi Hamburger,

Can you check-out revision-by revision, to narrow down the particular commit?

regards,
ziss_dm
by ziss_dm
Fri Dec 23, 2011 2:29 am
Forum: Software development
Topic: A little correction for dynThrPID implementation.
Replies: 10
Views: 3876

Re: A little correction for dynThrPID implementation.

Hi marbalon,

I have couple of questions:
1) What range are you using (125/250)?
2) What type of ocillations you have (fast/slow/erratic)?

regards,
ziss_dm
by ziss_dm
Thu Dec 22, 2011 9:59 pm
Forum: Software development
Topic: Beware: out of memory on promini
Replies: 13
Views: 4544

Re: Beware: out of memory on promini

Hi, 1) m 2) All prog_ types is just typedefs: m 3) You already violating "Arduino rule", declaring this: PROGMEM const void *lcd_param_ptr_table [] = { 4) If you want example how to put strunct in progmem, take a look in SoftwareSerial.cpp (officialy supplied with Arduino): typedef struct ...
by ziss_dm
Thu Dec 22, 2011 10:09 am
Forum: Software development
Topic: Beware: out of memory on promini
Replies: 13
Views: 4544

Re: Beware: out of memory on promini

Hi Danal, I would not say I really like it. ;( You did big job separating strings/rearranging structs/etc.. But was it really necessary? 1) For inline strings there are really convenient macro PSTR(...) 2) It does not work for struct initializers, and there are 2 ways to overcome it: - declare strin...
by ziss_dm
Wed Dec 21, 2011 6:32 am
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi,

You can connect to mcu pins:
Image

regards,
ziss_dm
by ziss_dm
Wed Dec 21, 2011 12:50 am
Forum: Software development
Topic: Teensy Support ?
Replies: 24
Views: 12059

Re: Teensy Support ?

Hi, This is powerful remote.. I have played with Teensy++ 2.0, yesterday and managed to compile 1.8 with following configuration: 6 PWM (motors) 5 receiver channels (PCI interrupt) GUI -> USB serial HW TWI With little effort, I think it would possible to get: 8 PWM (with soft TWI) 8 receiver channel...
by ziss_dm
Tue Dec 20, 2011 6:48 am
Forum: Getting Started - MultiWii config and setup
Topic: Yaw issue v1.9
Replies: 4
Views: 1970

Re: Yaw issue v1.9

Hi,

Try to decrease YAW D.
But to get "sharp" yaw response with quads, you need to tilt motors.

regards,
ziss_dm
by ziss_dm
Tue Dec 20, 2011 6:41 am
Forum: MultiWii tweaking - flying experience
Topic: help with pid tuning..
Replies: 7
Views: 3190

Re: help with pid tuning..

Define "unstable". ;)
by ziss_dm
Tue Dec 20, 2011 6:38 am
Forum: MultiWii tweaking - flying experience
Topic: PID tuning Stable and Baro
Replies: 8
Views: 6965

Re: PID tuning Stable and Baro

Hi,

Just a question what is the best order for ALT-HOLD PID tuning ? first VEL and after ALT ?


Usually vice-versa. You need to tune inner loop (Vel) first. Same as you need to tune main PID before level. ;)

regards,
ziss_dm
by ziss_dm
Tue Dec 20, 2011 4:36 am
Forum: Ideas
Topic: Alt. Hold Ideas and discussion
Replies: 193
Views: 124247

Re: Alt. Hold Ideas and discussion

Hm... 2Hz is enough? How you testing? I'm usually do the following tests, to assest dynamic: 1) Enter to alt. hold with vertical speed (better to do it with baro clamped to constant value) - go up - flick switch - should stop - go down - flick switch - should stop 2) Set a set point 2-3 meters highe...
by ziss_dm
Tue Dec 20, 2011 3:55 am
Forum: Ideas
Topic: Temperature drift correction for main sensors (ACC and GYRO)
Replies: 3
Views: 1750

Re: Temperature drift correction for main sensors (ACC and G

Not sure. Can you check it in GUI in warming-up cycle? ;)

The ESC's RC generators also can drift sugnificantly.

regards,
ziss_dm
by ziss_dm
Tue Dec 20, 2011 3:43 am
Forum: Software development
Topic: New serial code induces instability? SOLVED
Replies: 86
Views: 21178

Re: New serial code induces instability?

Hi Alex, I maybe wrong, but I think that it is better always get data from UDRx? Something like this: ISR(USART_RX_vect) { uint8_t d = UDR0; uint8_t i = (serialHeadRX[0] + 1) % SERIAL_RX_BUFFER_SIZE; if (i != serialTailRX[0]) {serialBufferRX[serialHeadRX[0]][0] = d; serialHeadRX[0] = i;} } regards, ...
by ziss_dm
Tue Dec 20, 2011 2:24 am
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi,

Cool! Now we are talking. ;)
So, what do you think about averaging?

regards,
ziss_dm
by ziss_dm
Tue Dec 20, 2011 1:42 am
Forum: Software development
Topic: Teensy Support ?
Replies: 24
Views: 12059

Re: Teensy Support ?

Hi itain,

Did you make any progress on this port? ;)
Could you please share your ideas on pin assigment?

regards,
ziss_dm
by ziss_dm
Tue Dec 20, 2011 12:05 am
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi, Regarding the other issues: Explaining these issues takes a lot of time. Developing code is frequently about style, and I don't code in your style (and would never expect you to code in my style). We agree about eliminating the special interrupt routine now that there is an existing interrupt ba...
by ziss_dm
Mon Dec 19, 2011 9:45 pm
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi, 1) The phrase if (val1 == 0x01) {state = SPEK_STATE_PAYLOAD00; ... } will not work for all satellite types and bind modes. There is no sync byte. I have seen header bytes of 00 01, 03 12, 00 12, 00 00 with different firmware levels in the sats, and/or different bind modes. And that is all before...
by ziss_dm
Mon Dec 19, 2011 7:04 am
Forum: Ideas
Topic: Alt. Hold Ideas and discussion
Replies: 193
Views: 124247

Re: Alt. Hold Ideas and discussion

Hi Alex, Not really that.. I think, increased bw is good for Alt.Hold. (in theory) But integrator currently skipping cycles, assuming bw: 20Hz. So, for increased BW, you need to adjust that. (busically integrate every cycle, for around 200Hz) BTW: What a waight of your model? What power system you h...
by ziss_dm
Mon Dec 19, 2011 5:12 am
Forum: Ideas
Topic: Alt. Hold Ideas and discussion
Replies: 193
Views: 124247

Re: Alt. Hold Ideas and discussion

Hi Alex,

With normal ACC bandwith (10-25 Hz)?

regards,
ziss_dm
by ziss_dm
Mon Dec 19, 2011 5:10 am
Forum: Ideas
Topic: Temperature drift correction for main sensors (ACC and GYRO)
Replies: 3
Views: 1750

Re: Temperature drift correction for main sensors (ACC and G

Hi,

Easiest way would be to upgrade to BMA180.. ;)
It is supposed to be compensated as well as ITG3200..

regards,
ziss_dm
by ziss_dm
Mon Dec 19, 2011 4:39 am
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi Danal, As I undestand, something like this should work (Assuming serial is buffered and buffer >= 16 bytes and you call it from main loop every 1-8ms): #if defined(SPECTRUM) #define SPEK_STATE_START 0x00 #define SPEK_STATE_PAYLOAD00 0x10 #define SPEK_STATE_PAYLOAD01 0x30 void readSpectrum(){ stat...
by ziss_dm
Sun Dec 18, 2011 3:50 am
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi, I know, that serial library is buffered and this buffering is quite efficient. This handler finishes in 3mks. I just want to clarify, that there no obvious reason to implement frame deserialization inside interrupt handler. The current implementation has number of disadvantages: 1) It allocates ...
by ziss_dm
Sun Dec 18, 2011 12:22 am
Forum: Software development
Topic: New serial code induces instability? SOLVED
Replies: 86
Views: 21178

Re: New serial code induces instability?

Hi Hamburger,

Can you try to put Sensors.pde from 1.8 to 1.9, just in case?

regards,
ziss_dm
by ziss_dm
Sat Dec 17, 2011 9:38 pm
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi, You receiving frames every 11ms, our loop is 2-3ms. Yo have plenty of time to implement pause sync. Additionally, interrupt handling is more efficient and elegant. Efficient? The interrupt handler takes ~20mks to exit. For each byte.. Elegant? Copy-paste HardwareSerial is elegant? regards, ziss_dm
by ziss_dm
Sat Dec 17, 2011 4:39 am
Forum: Software development
Topic: Arduino 1.0
Replies: 47
Views: 20763

Re: Arduino 1.0

Hi Danal,

Why we need interrupt based handler for Spectrum? As I understand it sends 16 bytes frames every 11ms?
It would be simpler to handle this from main loop (Same as SBUS).

regards,
ziss_dm
by ziss_dm
Thu Dec 15, 2011 7:52 am
Forum: Pictures & Videos
Topic: Quadcopter crash
Replies: 3
Views: 1641

Re: Quadcopter crash

Hi UndCon,

Have you found reason for glitches?
I had the "glitches" with Plushes, they was loosing sync from time to time.

regards,
ziss_dm
by ziss_dm
Thu Dec 15, 2011 7:38 am
Forum: Software development
Topic: New serial code induces instability? SOLVED
Replies: 86
Views: 21178

Re: New serial code induces instability?

Hi Hamburger,

Can you comment SerialWrite(0, i ) in LCDprint()? Or you already tried that? ;)

regards,
ziss_dm
by ziss_dm
Thu Dec 15, 2011 7:01 am
Forum: Software development
Topic: Improving Altitude Hold Performance
Replies: 98
Views: 62097

Re: Improving Altitude Hold Performance

Hi, BTW, I am not a big fan of the 2-PID feed-fwd method being used. Just my opinion, but it needs to be one PID called Alt-Hold. The two PID method is fine for experimentation and debugging, but the final production version should settle on a one PID setup. It is not possible to archive displacemen...
by ziss_dm
Thu Dec 15, 2011 1:03 am
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi Synthex,

Currently there are no compilled .hex files. And not sure would it be possible ;(
Now we have 8 input methods and around 7 targets which is 57 hex files.

But we have nice instruction how to compile (tnx to Heiko!): ;)
http://code.google.com/p/wii-esc/wiki/F ... Assembling

regards,
ziss_dm
by ziss_dm
Wed Dec 14, 2011 5:42 am
Forum: Software development
Topic: Improving Altitude Hold Performance
Replies: 98
Views: 62097

Re: Improving Altitude Hold Performance

Hi mr.rc-cam, The GUI's ALT D term is ignored. The ALT's PI data is derived from the baro sensor. The GUI's VEL I term is ignored. The VEL's PD data is derived from the ACC's Z axis so it must be a "TRUSTED" ACC sensor for reliable results. This is not 100% true. TRUSTED_ACCZ=True: (Acc1g-...
by ziss_dm
Wed Dec 14, 2011 1:32 am
Forum: Software development
Topic: New serial code induces instability? SOLVED
Replies: 86
Views: 21178

Re: New serial code induces instability?

Hi Alex, Can I make couple of notes? 1) Currently we have packet buffer s[200] and all variables which we serialize. I think, to economise SRAM it is better to assemble all varibles into struct and use it for sending. Additionally all transformations should be moved to the GUI side. 2) It is quite s...
by ziss_dm
Wed Dec 14, 2011 12:31 am
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi,

Just B and C phases swapped and different comparator connections.

regards,
ziss_dm
by ziss_dm
Tue Dec 13, 2011 12:02 am
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi EOSBandi, Are you testing them with exactly the same setup? Same voltage/motor/prop? EDIT: I have found schematic of Plush 6A: m Could you please confirm that this matches your board, especially comparator connections. If yes, we would need to create special configuration for them as it slightly ...
by ziss_dm
Mon Dec 12, 2011 2:52 am
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi Dieter,
I have commited bord definition for TurboJet60A. You can carefully test it. ;)
Please note that I have re-arranged phases to have them like here: http://home.versanet.de/~b-konze/blc_18 ... ematic.pdf

regards,
ziss_dm
by ziss_dm
Mon Dec 12, 2011 2:09 am
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi Rob,

I have find 1 bug.... if I slowly decrease the input down to 900us (with servotester) The motor is making (little) sound (startup active?).
If I decrease fast everything is shut down correctly.

Should be fixed. ;) An I also cleaned-up Qynx20A.inc.

regards,
ziss_dm
by ziss_dm
Mon Dec 12, 2011 12:58 am
Forum: Ideas
Topic: Sigma-Delta modulation for PWM outputs.
Replies: 3
Views: 2186

Re: Sigma-Delta modulation for PWM outputs.

Yes, something like that. ;)
or like that:
viewtopic.php?f=13&t=516
by ziss_dm
Fri Dec 09, 2011 9:24 pm
Forum: Software development
Topic: New serial code induces instability? SOLVED
Replies: 86
Views: 21178

Re: New serial code induces instability?

Hi Hamburger,

I think, this is because currently sending can block in case ring buffer is full. Try to increase ring buffer size.


regards,
ziss_dm
by ziss_dm
Thu Dec 08, 2011 11:47 pm
Forum: ESCs, propellers , servos and radios
Topic: Alternative ESC firmware (reflashing)
Replies: 640
Views: 361955

Re: Alternative ESC firmware (reflashing)

Hi, My questions are: do you have a firmware for all N-Fet setup? do you have experience with IR2101 setups with hi-side PWM 1) Theoretically should work (this is just "bl-17a" schematic). I can create hw file later. But you would have to test it yourself. 2) There are support for high sid...
by ziss_dm
Thu Dec 08, 2011 11:16 pm
Forum: Ideas
Topic: Restart Gyro Calibration if Copter has been moved during cal
Replies: 6
Views: 2752

Re: Restart Gyro Calibration if Copter has been moved during

Hi, Why you need acc for this? Just calculate min/max deviation and if it more than limit do calibration again. Something like this: // **************** // GYRO common part // **************** void GYRO_Common() { static int16_t previousGyroADC[3] = {0,0,0}; static int32_t g[3]; static int16_t g_min...
by ziss_dm
Thu Dec 08, 2011 11:12 am
Forum: Software development
Topic: v1.9 hang with Magneto of FreeIMUv1 enabled - i2c related?
Replies: 55
Views: 17273

Re: v1.9 hang with Magneto of FreeIMUv1 enabled - i2c relate

Hi
Not really... But reserving 200-300 bytes is usually good idea.

regards,
ziss_dm
by ziss_dm
Thu Dec 08, 2011 10:50 am
Forum: Software development
Topic: v1.9 hang with Magneto of FreeIMUv1 enabled - i2c related?
Replies: 55
Views: 17273

Re: v1.9 hang with Magneto of FreeIMUv1 enabled - i2c relate

Dynamic memory, memory manager, stack, local varibles, etc...