WM+ + Arduino Pro Mini

Post Reply
User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

WM+ + Arduino Pro Mini

Post by Solokirrik »

Hello!
I've got some problems with my Arduino + WMP

I'm Loading sketch MultiWiiV1_7

Code: Select all

/* Set the minimum throttle command sent to the ESC (Electronic Speed Controller)
   This is the minimum value that allow motors to run at a idle speed  */
//#define MINTHROTTLE 1300 // for Turnigy Plush ESCs 10A
#define MINTHROTTLE 1120 // for Super Simple ESCs 10A
//#define MINTHROTTLE 1190

/* The type of multicopter */
//#define GIMBAL
//#define BI
//#define TRI
//#define QUADP
#define QUADX
//#define Y4
//#define Y6
//#define HEX6
//#define HEX6X
//#define FLYING_WING //experimental

#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
//#define YAW_DIRECTION -1

#define I2C_SPEED 100000L     //100kHz normal mode, this value must be used for a genuine WMP
//#define I2C_SPEED 400000L   //400kHz fast mode, it works only with some WMP clones

#define PROMINI  //Arduino type
//#define MEGA

//enable internal I2C pull ups
#define INTERNAL_I2C_PULLUPS

//****** advanced users settings   *************

/* Failsave settings - added by MIS
   Failsafe check pulse on THROTTLE channel. If the pulse is OFF (on only THROTTLE or on all channels) the failsafe procedure is initiated.
   After FAILSAVE_DELAY time of pulse absence, the level mode is on (if ACC or nunchuk is avaliable), PITCH, ROLL and YAW is centered
   and THROTTLE is set to FAILSAVE_THR0TTLE value. You must set this value to descending about 1m/s or so for best results.
   This value is depended from your configuration, AUW and some other params.
   Next, afrer FAILSAVE_OFF_DELAY the copter is disarmed, and motors is stopped.
   If RC pulse coming back before reached FAILSAVE_OFF_DELAY time, after the small quard time the RC control is returned to normal.
   If you use serial sum PPM, the sum converter must completly turn off the PPM SUM pusles for this FailSafe functionality.*/
#define FAILSAFE                                  // Alex: comment this line if you want to deactivate the failsafe function
#define FAILSAVE_DELAY     10                     // Guard time for failsafe activation after signal lost. 1 step = 0.1sec - 1sec in example
#define FAILSAVE_OFF_DELAY 200                    // Time for Landing before motors stop in 0.1sec. 1 step = 0.1sec - 20sec in example
#define FAILSAVE_THR0TTLE  (MINTHROTTLE + 200)    // Throttle level used for landing - may be relative to MINTHROTTLE - as in this case


/* The following lines apply only for a pitch/roll tilt stabilization system
   It is not compatible with Y6 or HEX6 or HEX6X
   Uncomment the first line to activate it */
//#define SERVO_TILT
#define TILT_PITCH_MIN    1020    //servo travel min, don't set it below 1020
#define TILT_PITCH_MAX    2000    //servo travel max, max value=2000
#define TILT_PITCH_MIDDLE 1500    //servo neutral value
#define TILT_PITCH_PROP   10      //servo proportional (tied to angle) ; can be negative to invert movement
#define TILT_ROLL_MIN     1020
#define TILT_ROLL_MAX     2000
#define TILT_ROLL_MIDDLE  1500
#define TILT_ROLL_PROP    10

/* I2C gyroscope */
//#define ITG3200
//#define L3G4200D

/* I2C accelerometer */
//#define ADXL345
//#define BMA020
//#define BMA180
//#define NUNCHACK  // if you want to use the nunckuk as a standalone I2C ACC without WMP

/* I2C barometer */
//#define BMP085

/* I2C magnetometer */
//#define HMC5843
//#define HMC5883

/* ADC accelerometer */ // for 5DOF from sparkfun, uses analog PIN A1/A2/A3
//#define ADCACC

/* The following lines apply only for specific receiver with only one PPM sum signal, on digital PIN 2
   IF YOUR RECEIVER IS NOT CONCERNED, DON'T UNCOMMENT ANYTHING. Note this is mandatory for a Y6 setup
   Select the right line depending on your radio brand. Feel free to modify the order in your PPM order is different */
//#define SERIAL_SUM_PPM         PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,CAMPITCH,CAMROLL //For Graupner/Spektrum
//#define SERIAL_SUM_PPM         ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,CAMPITCH,CAMROLL //For Robe/Hitec/Futaba
//#define SERIAL_SUM_PPM         PITCH,ROLL,THROTTLE,YAW,AUX1,AUX2,CAMPITCH,CAMROLL //For some Hitec/Sanwa/Others

/* interleaving delay in micro seconds between 2 readings WMP/NK in a WMP+NK config
   if the ACC calibration time is very long (20 or 30s), try to increase this delay up to 4000
   it is relevent only for a conf with NK */
#define INTERLEAVING_DELAY 3000

/* for V BAT monitoring
   after the resistor divisor we should get [0V;5V]->[0;1023] on analog V_BATPIN
   with R1=33k and R2=51k
   vbat = [0;1023]*16/VBATSCALE */
#define VBAT              // comment this line to suppress the vbat code
#define VBATSCALE     131 // change this value if readed Battery voltage is different than real voltage
#define VBATLEVEL1_3S 107 // 10,7V
#define VBATLEVEL2_3S 103 // 10,3V
#define VBATLEVEL3_3S 99  // 9.9V

/* when there is an error on I2C bus, we neutralize the values during a short time. expressed in microseconds
   it is relevent only for a conf with at least a WMP */
#define NEUTRALIZE_DELAY 100000

/* this is the value for the ESCs when thay are not armed
   in some cases, this value must be lowered down to 900 for some specific ESCs */
#define MINCOMMAND 1000

/* this is the maximum value for the ESCs at full power
   this value can be increased up to 2000 */
#define MAXTHROTTLE 1850

/* This is the speed of the serial interface. 115200 kbit/s is the best option for a USB connection.*/
#define SERIAL_COM_SPEED 115200

/* In order to save space, it's possibile to desactivate the LCD configuration functions
   comment this line only if you don't plan to used a LCD */
#define LCD_CONF

/* to use Cat's whisker TEXTSTAR LCD, uncomment following line.
   Pleae note this display needs a full 4 wire connection to (+5V, Gnd, RXD, TXD )
   Configure display as follows: 115K baud, and TTL levels for RXD and TXD, terminal mode
   NO rx / tx line reconfiguration, use natural pins */
//#define LCD_TEXTSTAR

/* motors will not spin when the throttle command is in low position
   this is an alternative method to stop immediately the motors */
//#define MOTOR_STOP

/* some radios have not a neutral point centered on 1500. can be changed here */
#define MIDRC 1500

/* experimental
   camera trigger function : activated via AUX1 UP, servo output=A2 */
//#define CAMTRIG
#define CAM_SERVO_HIGH 2000  // the position of HIGH state servo
#define CAM_SERVO_LOW 1020   // the position of LOW state servo
#define CAM_TIME_HIGH 1000   // the duration of HIGH state servo expressed in ms
#define CAM_TIME_LOW 1000    // the duration of LOW state servo expressed in ms

/* you can change the tricopter servo travel here */
#define TRI_YAW_CONSTRAINT_MIN 1020
#define TRI_YAW_CONSTRAINT_MAX 2000
#define TRI_YAW_MIDDLE 1500

//****** end of advanced users settings *************


But in MultiWiiConf1_7 only
http://imageshack.us/photo/my-images/714/26151.jpg/
http://imageshack.us/photo/my-images/82 ... 4copy.jpg/

Building on
http://imageshack.us/photo/my-images/71 ... ndboa.jpg/

P.S. sorry for my english
Last edited by Solokirrik on Sun Oct 23, 2011 2:24 pm, edited 1 time in total.

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

Solokirrik wrote:I've got some problems with my Arduino + WMP


WHAT PROBLEMS please???

It is not clear from your posting.

... and the links "image" don't work with me.

BR - KH

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

Sorry, 1st msg edited.

WMP with isz 650 and idg 650.
In MultiWiiConf1_7 nothing changing.

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

snap33.jpg
I think, your error is here.

Wrong connection ;)

BR KH

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

I've used connection from http://www.rcgroups.com/forums/showthread.php?t=1332876
http://www.board-portal.de/ArduWiino/image043.jpg

Thats funny... Without WMP:
1)Green led - blinking rapidly.
2)MultiWiiConf1_7 - http://imageshack.us/photo/my-images/828/dfs52f1.jpg/

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

snap34.jpg
(27.54 KiB) Not downloaded yet
That is a pic of my wm+

I marked your connections, as I see it from your pics.

BR - KH

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

kalle123 wrote:
snap34.jpg
That is a pic of my wm+

I marked your connections, as I see it from your pics.

BR - KH

Thank you, but nothing changed :(

Withput WMP, in MultiWiiConf1_7 we can see, that quadrocopter is connected http://imageshack.us/photo/my-images/703/dfs52f1.jpg/
But with WMP - http://imageshack.us/photo/my-images/821/26151.jpg/

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

I think, that pic from

http://www.microcopters.de/artikel/das- ... pter-howto

is more clear.

Do you have spare components for testing?

BR - KH
Attachments
wmp-to-arduino.jpg

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

Image
Only this http://imageshack.us/photo/my-images/714/26151.jpg/

Tomorrow I'll try another arduino and wmp.... Ty :)

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

You are still wrong!

In your 1st and 2nd pic of the wm+ the connections are wrong!

:roll:

I marked the connection in yellow
Attachments
Unbenannt.jpg

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

http://imageshack.us/photo/my-images/88/img1648n.jpg/
Results:
51515635156354185163.JPG


On Arduino power is ON...
On wmp power is ON....

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

Please take a magnifying glass at hand and check for bridges in your soldering/wiring on arduino/wm+

Hope you get it working. ;)

Besides, it is much easier, to do the first test on a breadboard.

That was my first try
Attachments
DSCF1675.JPG

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

Thank you (=
But I think there is problem in WMP... Because, when it is connected - in MultiWiiConf1_7 no quadrocopter configuration...

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

Could someone give me another MultiWiiConf1_7 in compiled form ?
Pls(

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

Go to

http://code.google.com/p/multiwii/downloads/list

and get from there 1.8 patch 2

flash the arduino with 1.8 patch 2 and use GUI 1.8 patch 2.

Why use 1.7 ???

BR KH

tommyp
Posts: 16
Joined: Wed Oct 12, 2011 11:45 am

Re: WM+ + Arduino Pro Mini

Post by tommyp »

I still think his connections are wrong.

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

Uploaded 1.8 patch 2
After starting GUI 1.8, with WMP RX led on http://www.sparkfun.com/products/8165 not blinking... Only TX blinking (

On another Pro mini and wmp it is the same....

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: WM+ + Arduino Pro Mini

Post by PatrikE »

Make sure everything is connected the right way.
Bad soldering on pic but it's a god illustration from
http://www.multiwii.com/connecting-elements
Image

In my WM+ setup with i use pullups and 100khz.

Code: Select all

#define I2C_SPEED 100000L     //100kHz normal mode, this value must be used for a genuine WMP

//enable internal I2C pull ups
#define INTERNAL_I2C_PULLUPS


/Patrik

kalle123
Posts: 106
Joined: Sun Oct 09, 2011 10:07 am

Re: WM+ + Arduino Pro Mini

Post by kalle123 »

Solokirrik wrote:Uploaded 1.8 patch 2
After starting GUI 1.8, with WMP RX led on http://www.sparkfun.com/products/8165 not blinking... Only TX blinking (
On another Pro mini and wmp it is the same....


There seem to be basic problems.
For a moment do forget multiwii and start with more simple application.

For instance a thing like that here
http://www.arduino.cc/en/Tutorial/Blink
Just need an LED and a resistor.
Teaches you, how to program and run a simple application into an arduino.
When that works, you know how to do that and that your arduino is working.
From that on, you could step on to multiwii.

Just my suggestion ;) - BR KH

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

kalle123 wrote:There seem to be basic problems.
For a moment do forget multiwii and start with more simple application.

For instance a thing like that here
http://www.arduino.cc/en/Tutorial/Blink
Just need an LED and a resistor.
Teaches you, how to program and run a simple application into an arduino.
When that works, you know how to do that and that your arduino is working.
From that on, you could step on to multiwii.

Just my suggestion ;) - BR KH


Ty, but I've made it before))
It was my first experiment with arduino :D

User avatar
Solokirrik
Posts: 13
Joined: Sun Oct 23, 2011 1:47 pm

Re: WM+ + Arduino Pro Mini

Post by Solokirrik »

It is strange....
When SCL or SDA connected - arduino won't working...

Thats like it was in the case. http://imageshack.us/photo/my-images/46 ... 15202.jpg/
So:
1 pin - VCC
6, 7 pins - GND

PatrikE
Posts: 1976
Joined: Tue Apr 12, 2011 6:35 pm
Location: Sweden
Contact:

Re: WM+ + Arduino Pro Mini

Post by PatrikE »

You have the WMP upside down in the picture.
But this is how it should be conected seen from bottom side.
*|VCC|SCL|*|*|SDA|GND|GND
Attachments
WMP.png

Post Reply