Big problem with 3 MWCs and v1.6

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Big problem with 3 MWCs and v1.6

Post by S3NS3 »

Hello!

I have actually a problem with all of my three MWCs. Today i have updated my middle MWC that never have a problem befor from 1.4 to 1.6 and - there it is! So from what i can say it only come up with higher than 1.4, maybe 1.6 only. v1.5 i never tested.

The problem is: While flying my MWCs will sometimes beep (Buzzer beeps on my PCB) and while it beeps at least the PID is not reacting anymore. The Copter fall free for a very short time and then i can fly as nothing was happend before.

First time i see what was on my smallest MWC that flipped. But i have no buzzer on it so i don´t realize that it was the same that i have now on all three. Second was my big powerful MWC that crashed very badly because that problem. And today my ever fine flying one freshly updated to v1.6 makes the same :!:

Here is a short clip with that beep, clearly to see:
http://vimeo.com/19321858

And here is a Video with that really baaad crash at the end :(
http://vimeo.com/19424920

The first question i have about that is what event can let beep the buzzer short on full lipo inflight? And have someone ideas where i can search the problem?? All three copters have the same PCB with Pro Mini 5V Arduino with Warthox Layout and original Nintendo WMP but completly other ESC and Motors.

I hope i can fix that... :cry:

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Big problem with 3 MWCs and v1.6

Post by Alexinparis »

Hi,

I recheck the code.

The only parts where the buzzer can beep are:
- in the battery monitor function.

Code: Select all

  vbat10bits = analogRead(V_BATPIN);
  if (vbat10bits>VBATLEVEL1_3S) {                                          //VBAT ok, buzzer off
    BUZZERPIN_OFF
...


- in the blinkLED function, but it won't be a continuous sound in this function.

I see no code reason that can explain a sudden buzzer sound.
=> it's maybe something I still not have seen
=> it's maybe a low voltage lipo, but you checked and there is no reason for this
=> it's maybe a poor arduino Vpower
- how is your arduino powered ?
from an independant UBEC ?
from a BEC of an ESC ? if yes, are they all link together ?
which PIN on the arduino are you using for the power in ? VCC or RAW ?

There is a very safe way to power the arduino I never mentioned: you can plug directly VBAT on RAW PIN as the arduino has it's own regulator and RAW PIN is ok with a 3S voltage.

Rurek
Posts: 30
Joined: Sun Jan 30, 2011 1:28 pm

Re: Big problem with 3 MWCs and v1.6

Post by Rurek »

Maybe it is a problem with inactive pullups resistros in Arduino....I observed that buzzzer beeps abnormally when something wrong ocassionally did on Ardu board like I2C freeze, initalization, calibration...there is small, short (above 0,3sec) beeps... I think in this case S3NS3 have a problem with pullups..
BTW - Alex - on my board shield this way of powering Ardu is default standard :-) there is no problem with powering Ardu from LiPo to RAW pin - always good.

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

At first thx for the fast help :)

I powered the Arduino over one ESC BEC from one ESC only on Pin RAW.
Between, pullups, i must enable the "buildin i2c pullup" option in the source from the v1.6. Without that nothing happend and the programm don´t start up (visually, no beep, nothing, and no connection to the tool are possible).
In the old v1.4 there was no such option. I think that was enabled always? The beep is short, as you can see (ok, hear ;) ) in the video it only beeps one short time. And in that time the speed of the motors are not regulated.

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

The receiver can cause these problems or not? Because this receiver is the part that i plug on all of my MWCs because i have only one left. But how the receiver can cause the buzzer to beep? ;)

It is possible that massive I2C problems cause that problems? I hope i don´t ask stupid questions but i only try to get a direction where i can search the reason ;)
Hmm, maybe my I2C layout and cables are very bad? Here are pictures of my PCB.

Can i measure something? I have an oscilloscope but i think i´m not able to say its ok what i see if i look at the I2C bus ;)
Attachments
Layout.jpg
oben.jpg

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Big problem with 3 MWCs and v1.6

Post by Alexinparis »

It's interesting, someone encountered exactly the same problem on v1.5
http://www.rcgroups.com/forums/showpost ... count=9389

The investigation continues

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

I have nothing found yet. But this mainly i don´t know how to enclose the problem. If i can do something let me know! If i found something out i will post it.

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

FINALLY i found the problem! Big thanks to Jürgen aka X-Spieler from the german X-UFO Forum for his hints and help.

The reason was that it is very bad to connect a 5V BEC from an ESC to the 5V regulator on the Arduino Pro Mini. Cause of that the regulator don´t regulate the voltage and then i have very dirty 5V. To be accurate only 4,92V.

It seems to be ok, not good but it runs, if someone don´t use some LEDs and a buzzer on the board. But i have that on my PCB. So the current draw was a lot higher. Cause of that the I2C and the ADC reference was unstable. I have checked this with my oscilloscope and was shocked how heavy the buzzer disturb the voltage level.

Ok, now that sudden: I fly around, the ESC makes dirty 5V. After some time the buzzer beeps because the ADC reference was dirty too and the lipo not complete full anymore. In this moment a I2C error occour and the software resets the WMP. Cause of that a second disturbance caused by the altered current occour. That was enough to alter the ADC reference so that the buzzer beep short. After that the reinitialisized WMP runs again and i can fly again. That sudden not everytime but approximately all 1-2 flys.

I have corrected my board for testing purposes to lipo plus on Arduino RAW and ... all is ok! Clear undisturbed voltages and I2C signals!! :)

But now i will switch to Jürgens Aeroduino-Fun PCB that is really nice and build some new MWCs ;)


So for all: It is not good to connect 5V to an 5V regulator!

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Big problem with 3 MWCs and v1.6

Post by Alexinparis »

It's a great news you found out what was the problem :)
I don't like when problems are not predictable, and now we know why

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

Hehe i don´t like it too :) But now all is ok and it was of course not a bug, only hardware configuration :)
Now i´m looking forward for my new MWCs and the brand new v1.7 :D

User avatar
BlueAngel
Posts: 30
Joined: Sun Feb 27, 2011 11:35 am

Re: Big problem with 3 MWCs and v1.6

Post by BlueAngel »

I am interested to understand the problem completely.
You used the VCC pin on the arduino for powering your sensors?

Maybe a second question about the arduino:
VCC and D12 have the same voltage, but D12 can be reset by the arduino?
So they are both regulated from "raw".

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

I had the 5V BEC from the rear ESC used to power the Arduino Pro Mini over Pin RAW - and of course power the receiver.
The WMP was connected without an diode directly to Pin D12. All normal as the scetch shows how to connect all together.

The problem is that the Arduino has an onboard 5V regulator. And a regulator needed more than 5V to regulate nice constant 5V at his output. Approximately 7V for proper function.

So the Ardu-Onboard-Regulator not only works not - it seems he distort the 5V for the ATMega328 in dependence of current draw and of course not filter the voltage level out of the peaks and variations from the ESC. It seems that was not so bad if someone connect only the minimal configuration but i have 2 LEDs and one very loud buzzer connected directly to the Arduino.
So i have see by myself, with an oscilloscope, that the buzzer makes very big peaks and bad waveforms on the 5V supply on the ATMega. This of course disturb the very sensitive ADC and the amplitude of the I2C signals!

The disconnect of Pin D12 to the WMP too! (WMP reset simulation :) )

Now i have only cut of the connection from Pin RAW to 5V BEC and have solder a wire directly to Lipo plus. In the datasheet i have read that the Arduino can handly up to 12V - so on 3S it is ok and it was not warm - and i have a nice 5V supply on the ATMega itself.

I hope you understand what i mean, its a little bit difficult to explain in english :)

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

PS: Yes, VCC is the 5V voltage after the onboard regulator on the Arduino, the self as D12 that is only a output here on the MWC Code. So the ATMega can switch the power supply on and of in order to reset the WMP.

User avatar
BlueAngel
Posts: 30
Joined: Sun Feb 27, 2011 11:35 am

Re: Big problem with 3 MWCs and v1.6

Post by BlueAngel »

Okay, thanks for the detailed explanation.

Mh.
I don't know if this was the reason for my last crash with my Multi Wii Copter.
I thought i was a RC loss problem, but i had RC control much further away.
+ i had set failsafe on the receiver to set the quad in ACC mode, so it should level and go down slowly.
But it was more like something in your videos.

I use the Jussi shield and use a separate 5V Recom switching regulator to power the board.
But this voltage does feed into the raw pin and power the whole board (WiiM+, BMA020, receiver, board) + the buzzer and the two leds like in your setup.
But the Recom does supply a constant 5V voltage and current up to 1A constantly.

I will have to measure too, if a buzzer sound will disturb the voltage on my board.
I hope not, because i have written the build thread in the fpv-community:
http://www.fpv-community.de/comm/forum/ ... p?tid=2792

So, i have to find the problem soon. Until Heiko (photo maker) has not built these steps.
Powering the arduino via VCC pin with the Recom would solve this problem + cutting the connection to the raw pin.

User avatar
BlueAngel
Posts: 30
Joined: Sun Feb 27, 2011 11:35 am

Re: Big problem with 3 MWCs and v1.6

Post by BlueAngel »

okay, i measured the voltages and displayed them on my Mini Oscilloscope.
:o

The BUZZER is the problem

I power the arduino via the recom 5v 1A.
stable output 5,00V to the input on "raw" pin on arduino
VCC output of the arduino is 4,93V on the "vcc" pin.

when the buzzer beeps, because of voltage alarm, voltage breaks down to 4,90V.
I see that noise at the osci display too.
up to 30mV sinus wave like the beeping of the buzzer.
not that good. :shock:

voltage at the recom output is still 5,00V with no noise.
So the voltage reg. of the ardunio is the problem.

I will change that and use the "vcc" pin instead of the "raw" pin, because we have already clean 5V.

but as S3NS3 has posted, the problem is still there with 5,3V input on the "raw" pin, like most ESCs produce.

So, i think there should be a big fat WARNING, when using the BUZZER.

So the buzzer can be only used if,

1. constant and clean 5,0V voltage is supplied to the "vcc" pin
or
2. a proper voltage is supplied to the "raw" pin of the board, something like 7-12V


Alex, what do you mean?

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Big problem with 3 MWCs and v1.6

Post by Alexinparis »

I was always suspicious about the input range voltage for the pro mini.
according to http://www.arduino.cc/en/Main/ArduinoBoardProMini
it's 5-12V

But if you take the last uno: http://arduino.cc/en/Main/ArduinoBoardUno
recommended: 7-12V
limit: 6-20V

It always work for me with 5V on the promini, but I never used the onboard buzzer (yes, shame on me, it's a multiwii feature I developed, but I never used it ;) ). I have an external lipo saver for this need.

I think your conclusion is perfectly true and should be communicated to board builders.

User avatar
BlueAngel
Posts: 30
Joined: Sun Feb 27, 2011 11:35 am

Re: Big problem with 3 MWCs and v1.6

Post by BlueAngel »

Yes, i was wondering to about that voltage input range.

I have a external lipo saver too onboard, but since i have the buzzer connected (which is great for ACC trimming, or general feedback of the copter), i used it for voltage alarm too. (bad mistake, because thats why my Copter is dead. R.I.P. )

S3NS3
Posts: 12
Joined: Sun Jan 30, 2011 10:29 am

Re: Big problem with 3 MWCs and v1.6

Post by S3NS3 »

Ah good to hear that you can confirm this behavior. Ok, not really good but...
And not only the buzzer disturb the voltage, the reset of the WMP too! But the buzzer do that very strong (at least my loud thing...)
I´m curious to read what your tests with VCC take! It should be better!

The official voltage range is normally ok, it runs, but not with periphials :(

User avatar
BlueAngel
Posts: 30
Joined: Sun Feb 27, 2011 11:35 am

Re: Big problem with 3 MWCs and v1.6

Post by BlueAngel »

I have already solved the problem:
http://www.rcgroups.com/forums/showpost ... tcount=601

also posted in the rcgroups Wii Mega thread and in Jussis shield thread.
I think he is considering now, to add a dedicated voltage regulator as i did with his board.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Big problem with 3 MWCs and v1.6

Post by copterrichie »

I am not using a buzzer but I just experienced what I am going to label as a run away copter. I did not have the copter in open air but in the back of my Jeep. I was trying to figure out what was cause it to be over sensitive in the morning hours but worked fine in the afternoon. Yes, I had the props on which I knew was not a good idea when troubleshooting however, I have return home in the past when this had happened and everything was fine. When I powered on the system, the gyros was very over active and lots of jitter with the servos. With a Quad, this would not appear. With the ESCs armed, something happened to cause WOT. Now that my nerves have claimed down, I recall seeing the LEDs flashing just before the motors went WOT. I also now recall that this problem did not appear until I installed the LEDs and resistors, initially, I built the boards without them. I had problems in the beginning with not having a clean power source and figured it was the servos because when I connected an oscilloscope to both D12 and 3.3v on Jussi's board, I could see voltage spikes that coincided with the servo jitter. I cut the power trace thinking this was the problem that fed to the Motor pins and added a second UBEC. This worked up until I added the LEDs and resistors.


I am very bless to say, my intuition advised me to hold copter down with one hand while performing this test. Thank you Jesus that I followed this advise. I turned off the transmitter with my other hand, but the failsafe did not work. My last resource was to pull the power plug. In the process, I received a minor cut that could have been much worse.

Post Reply