HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jun 18, 2010, 05:29 PM
Registered User
Ciskje's Avatar
North Italy
Joined Feb 2009
308 Posts
Quote:
Originally Posted by Alexinparis View Post

I observed in BaronPilot code that I2C fast mode is not used. It is well supported for Wii accessories and it reduces a lot the time to read raw values.
I don't understand your supposition about fast mode, I have tested it in every situation and 4.54 is exacly the factor applyed to the voltage, it is not symmetric because drift (we can't use ZRO pin), but factor doesn't change in the upper or lower half.
Suppose that center is not 1.35 but 1.3, this doesn't change scale 2.7272 mV/deg/s.
Have you collected some data about this factor?

I'm using WM+ clone that incredible have a better yaw gyro a ISZ-650 invensense original.
Your idea to use LCD and Radio is very interesting! (I have a lot LCD display around).

Thank you for your info, when I rebuild it, I will try your suggestion about fast I2C. I'm very happy to collaborate for the same target!
Ciskje is offline Find More Posts by Ciskje
Last edited by Ciskje; Jun 18, 2010 at 05:50 PM.
Reply With Quote
Sign up now
to remove ads between posts
Old Jun 19, 2010, 12:56 AM
FPV Junkie
tazdevil's Avatar
somewhere in space
Joined Aug 2006
671 Posts
Quote:
Originally Posted by Alexinparis View Post
Does it never work, or just sometimes ?

I updated the schemes and the code.


I don't understand , my wmpwork fine with aeroquad???

problem is intermitant. this is original WMP
tazdevil is offline Find More Posts by tazdevil
Reply With Quote
Old Jun 19, 2010, 03:25 AM
xxxxxxxxxxxxx
JUERGEN_'s Avatar
Deutschland
Joined Nov 2009
660 Posts
Quote:
Originally Posted by Alexinparis View Post
For the radio, the settings should be [1000-2000] micro seconds for all channels.
On my Graupner/JR, it represents 125% ATV.

I tested successfully yesterday a new init phase. I was wrong in my explanation about the output analog PIN. It does not exist on Arduino
What I did:
- connect WMP VCC to digital PIN 12
- in the setup() phase
- set the PIN 12 output to 0
- wait for 0.5s
- set the PIN 12 output to 1 => 5V VCC (no way to switch a 3.3V)
- and then I2C init phase

This way, the WMP seems to init well at each attempt. I will try also to shield the WMP with a simple piece of aluminium paper.

If we power the WMP and at the same time the Arduino, I suspect some foolish and unpredictable I2C bits are transmitted to the WMP during the Arduino boot, causing a wrong init.
on the arduino-pro board, I miss the pullup resistors for i2c.
with 1K5 > 3K3



jürgen
JUERGEN_ is offline Find More Posts by JUERGEN_
Reply With Quote
Old Jun 19, 2010, 08:47 AM
Tri-Quad-Hexa-Octo-copters!!
United States, TX, San Antonio
Joined Feb 2007
14,267 Posts
Nice project Alex!
Added to the Quadrocopter and Tricopter Mega Link Index
Cheers,
Jim
jesolins is offline Find More Posts by jesolins
Reply With Quote
Old Jun 19, 2010, 05:14 PM
FPV Junkie
tazdevil's Avatar
somewhere in space
Joined Aug 2006
671 Posts
Quote:
Originally Posted by JUERGEN_ View Post
on the arduino-pro board, I miss the pullup resistors for i2c.
with 1K5 > 3K3



jürgen
hi , I try with pull up resistor , same problem...and workingfine withaeroquad with same hardware..!

is m168p can do 400khz I2C?
tazdevil is offline Find More Posts by tazdevil
Reply With Quote
Old Jun 19, 2010, 05:42 PM
Registered User
Alexinparis's Avatar
Paris, France
Joined Jun 2009
756 Posts
Quote:
Originally Posted by tazdevil View Post
hi , I try with pull up resistor , same problem...and workingfine withaeroquad with same hardware..!

is m168p can do 400khz I2C?
The main difference with AeroQuad Wii code (the last i saw) is
- the I2C not in fast mode (400khz I2C)
- a difference on the init code due to nunchuck
- the nunchuck connected to the WMP and a small jumper

I think m168p can do also fast I2C mode.
Alexinparis is offline Find More Posts by Alexinparis
Reply With Quote
Old Jun 21, 2010, 04:17 PM
Registered User
signguy's Avatar
Swansea, Massachusetts
Joined Dec 2004
2,088 Posts
Hi Alexinparis

Here is my controller ready to go into its frame. I used a RBBB arduino clone and a Wii MP. Lots of wires! But it should be way less than my gyro only copter. I will get a mini pro after I get this working. I did uncomment the speed control line, and it compiled and uploaded perfectly.

I have almost no experience with the arduino, or any other "chips". Is there a way I can modify the P I D parrameters without an LCD?

I don't mind having to re-upload sketches. Once it is set, I'll leave it that way.

Thanks for the project!!

BobD aka signguy
signguy is offline Find More Posts by signguy
Reply With Quote
Old Jun 21, 2010, 05:19 PM
Registered User
Alexinparis's Avatar
Paris, France
Joined Jun 2009
756 Posts
Hi signguy,

You made a nice spider
This arduino clone looks very small, quite similar to a nano, a little bigger than a mini pro.
I hope you won't encounter the problem of intermittent bad init.

If you want to set your PID, it's still possible without a LCD or a GUI.
Not very convenient, but if you have a PC with you, it's nearly as fast as a GUI:

edit the code, and insert this after checkFirstTime():
Code:
...
  checkFirstTime();
  configureReceiver();
...
=>
Code:
...
  checkFirstTime();
    P = 3.5; // <= your param here
    I = 0.03; // <= your param here
    D = -13; // <= your param here
  configureReceiver();
...
recompile and re-upload the sketch each time you want to change the values.

This is in fact what I did to adjust several non configurable parameters during the dev.
Alexinparis is offline Find More Posts by Alexinparis
Reply With Quote
Old Jun 21, 2010, 05:41 PM
Registered User
signguy's Avatar
Swansea, Massachusetts
Joined Dec 2004
2,088 Posts
Got everything mounted and plugged in, but No Go

I'll try to re-upload the sketch. I'm using my old tricopter, and eurgle 2.4 radio, and Super Simple 10 amp speed controls. If I hit the reset on the arduino, I get a 1 second motor run from all motors. No other controls are working, not even yaw. I did see a change in your wiring. You went from the last connector away from the ground on the M+ to 5v on one picture, and to pin 12 on another. I'm at pin 12. I measured 5 v at the M+. I'll also try reversing channels.

Do I have to hold the rudder over during radio startup, or just when I'm ready to fly?

Hope I can get this working. I have another board with header pins and a breadboard, maybe I'll make that one up too.

Thanks
Bob D
signguy is offline Find More Posts by signguy
Reply With Quote
Old Jun 21, 2010, 06:15 PM
Registered User
Alexinparis's Avatar
Paris, France
Joined Jun 2009
756 Posts
Quote:
Originally Posted by signguy View Post
I did see a change in your wiring. You went from the last connector away from the ground on the M+ to 5v on one picture, and to pin 12 on another. I'm at pin 12. I measured 5 v at the M+. I'll also try reversing channels.
Yes, it's a new way to avoid bad init, and to power the WMP just after the boot time. The old wiring (VCC WMP+ connected to +5V) is still compatible.


I don't advise you to reset the arduino or to plug the FTDI : the motors will run at max for 1s. I can't prevent this.

To start the tricopter, you have to arm it:

Starting the tricopter
The engine launch is done by tilting the yaw stick right while having the throttle stick in minimum position.
For security reasons, the throttle stick must be set to minimum.
Now motors turn at an idle rate and the tricopter is ready for flight.


You may also have to increase your ATV (125% for graupner/JR) or the yaw value needed to arm the tricopter won't be high enough
Alexinparis is offline Find More Posts by Alexinparis
Reply With Quote
Old Jun 21, 2010, 08:59 PM
Registered User
signguy's Avatar
Swansea, Massachusetts
Joined Dec 2004
2,088 Posts
Quote:
Originally Posted by Alexinparis View Post
Yes, it's a new way to avoid bad init, and to power the WMP just after the boot time. The old wiring (VCC WMP+ connected to +5V) is still compatible.


I don't advise you to reset the arduino or to plug the FTDI : the motors will run at max for 1s. I can't prevent this.

To start the tricopter, you have to arm it:

Starting the tricopter
The engine launch is done by tilting the yaw stick right while having the throttle stick in minimum position.
For security reasons, the throttle stick must be set to minimum.
Now motors turn at an idle rate and the tricopter is ready for flight.


You may also have to increase your ATV (125% for graupner/JR) or the yaw value needed to arm the tricopter won't be high enough
Tried the yaw value increase, still a no go. I also tried throttle trim, throttle reverse, starting with throttle high, low, trim high and low. I did follow the startup procedure, but still nothing. I'll have to check all my wiring.

Thanks
BobD
signguy is offline Find More Posts by signguy
Reply With Quote
Old Jun 21, 2010, 09:09 PM
Registered User
RCvertt's Avatar
Joined Aug 2007
3,903 Posts
Quote:
Originally Posted by signguy View Post
Tried the yaw value increase, still a no go. I also tried throttle trim, throttle reverse, starting with throttle high, low, trim high and low. I did follow the startup procedure, but still nothing. I'll have to check all my wiring.

Thanks
BobD
Try uploading the Arduino blink sketch to make sure it's functioning.

If you made your wires pluggable, unplug everything from the arduino when doing the blink sketch.
RCvertt is offline Find More Posts by RCvertt
RCG Plus Member
Old Jun 22, 2010, 01:10 AM
FPV Junkie
tazdevil's Avatar
somewhere in space
Joined Aug 2006
671 Posts
Victory.....!


it's working for me

I just put I2C to 400kz routine to comment and it's working for me every time boot is ok

it's seem that original wmp don't accept 400 khz or there is maybe a pb of osc cal on m168p ? I don't now

well, it's working,stabilisation is fine,but I just need to inverse the yaw gyro sens in the soft

I'm looking about it,any idea to had a flag to have the possibility of servo reverce,I wouldn't like to inverse my servo harm on the triwii

anyway,first flight maybe today ..!
tazdevil is offline Find More Posts by tazdevil
Last edited by tazdevil; Jun 22, 2010 at 04:14 AM.
Reply With Quote
Old Jun 22, 2010, 01:36 AM
Registered User
Alexinparis's Avatar
Paris, France
Joined Jun 2009
756 Posts
Hi,

Very good news !
So apparently the original WMP does not work very well at 400kHz fast mode.
=> just comment the line if you are in this situation:
Code:
//  TWBR = ((16000000L / 400000L) - 16) / 2;
I will find a way to reverse to yaw servo without changing the arming procedure.
for the moment, here is a quick hack is to inverse the sign:
Code:
    servoYaw     = 1500 + axisPID[YAW];
=>
Code:
    servoYaw     = 1500 - axisPID[YAW];
@signguy
even if the WMP is not working, you should be able to run the motors with the arming procedure. what radio RX/TX are you using ?
Alexinparis is offline Find More Posts by Alexinparis
Reply With Quote
Old Jun 22, 2010, 04:16 AM
FPV Junkie
tazdevil's Avatar
somewhere in space
Joined Aug 2006
671 Posts
Quote:
Originally Posted by Alexinparis View Post
Hi,

Very good news !
So apparently the original WMP does not work very well at 400kHz fast mode.
=> just comment the line if you are in this situation:
Code:
//  TWBR = ((16000000L / 400000L) - 16) / 2;
I will find a way to reverse to yaw servo without changing the arming procedure.
for the moment, here is a quick hack is to inverse the sign:
Code:
    servoYaw     = 1500 + axisPID[YAW];
=>
Code:
    servoYaw     = 1500 - axisPID[YAW];
@signguy
even if the WMP is not working, you should be able to run the motors with the arming procedure. what radio RX/TX are you using ?

cool , I'm going to try it first flight in few minute
tazdevil is offline Find More Posts by tazdevil
Reply With Quote
Reply


Thread Tools