Radio/Receiver is messing up my sensor data!

Post Reply
torxnl
Posts: 9
Joined: Wed Jun 04, 2014 11:10 pm

Radio/Receiver is messing up my sensor data!

Post by torxnl »

So I just started with multiwii and so far everything goes well. I try to connect the smaller parts first and move up from there. So first I connected my acc/gyro and that seems to work. Then I connected my receiver which does nothing of course until I turn on my transmitter. Well when I turn on my transmitter all of a sudden my acc and gyro start acting really weird and it looks to me that they are copying input values from the transmitter. Also when I turn on the transmitter the input values don't change in the gui.

How does this happen? I have changed the basics in the config but nothing more. I already read that it could be the i2c adress (which I did change to the right adress) but this is impossible because the receiver is connected through digital pins.

I am using a arduino leonardo and I have connected the sensor to SDA/SCL and my receiver to D2, D4, D5 and D6.

Below you can see a screenshot of what happened.

Image
Attachments
Schermafbeelding 2014-06-05 om 00.21.55.jpg

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: Radio/Receiver is messing up my sensor data!

Post by waltr »

You are getting a huge number of I2C errors. Do these happen only after connecting receiver and turning the the TX?
In that case re-check the connections for the receiver.

receiver to D2, D4, D5 and D6.

This is not correct as far as I can tell. I think for a Atmega32U4they should be:
Thro -> D7
AILE (roll) -> MOSI, D16
Elev (pitch) -> MISO, D14
rudd (Yaw) -> SCK, D15
AUX1 -> D8
AUX2 -> D17

Comes from:
viewtopic.php?f=6&t=1337&start=10

Some other info I found:
- If you are going to use a regular RX, DO NOT uncomment #define A32U4ALLPINS. That will mess up the RX pin order on the board.

- You will need to uncomment #define RCAUX2PIND17 if you plan on using Aux2, which will probably be needed in most cases if you want to activate / deactivate BARO, for example.

torxnl
Posts: 9
Joined: Wed Jun 04, 2014 11:10 pm

Re: Radio/Receiver is messing up my sensor data!

Post by torxnl »

You are right indeed, by connecting the receiver to the right inputs I no longer got any i2c errors. So that's solved. But now when I connect my ESC's, the same thing happens again. I connected them to D2, D5, D6 and D3. I guess that must be wrong too then?

Do you know perhaps where I can find more info on using multiwii on a leonardo? So far I have gotten most of my information from here http://www.multiwii.com/connecting-elements but I don't think all of it can be applied to my board.

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: Radio/Receiver is messing up my sensor data!

Post by waltr »

Ok, the correct pins works better. Again wrong pins for the ESCs. The diagrams in the link is for the Atmega 328 and a 'mega' not the 32U4 processor which has a very different pinout.
I used connection info from Witespy's Flip Pro FC board. It uses the Atmega32U4 so the pin outs are the same as the leonardo since it is a leonardo plus sensors and connectors.
Follow the ESC connections and motor rotations here:
http://witespyquad.gostorego.com/flight ... oller.html

Also google search for "multiwi arduino leonardo" for some additional info.

torxnl
Posts: 9
Joined: Wed Jun 04, 2014 11:10 pm

Re: Radio/Receiver is messing up my sensor data!

Post by torxnl »

Thanks for the help! This should do it now. I have already googled around a bit but I don't exactly know what to look for.

waltr
Posts: 733
Joined: Wed Jan 22, 2014 3:21 pm
Location: Near Philadelphia, Pennsyvania, USA

Re: Radio/Receiver is messing up my sensor data!

Post by waltr »

Look for any FC boards that use an Atmega32U4 processor and MultiWii code.
Then look at what pins they use.

Post Reply