Hey 
First up im very grateful for all the support documentation , without which i wouldnt have gotten this far , with my build.
Im having a few issues (probably just my stupidity ) with the APM setup process .
I got my APM board and Oilpan(2.2) about a month ago .I finished assembly and ran the blinking LED program , and also the servo dance program (which seems fine to me.)
The APM Beta Code is currently loaded on my board , last evening i took it outside to test the  GPS LED behavior .

This is the behavior i got :


  1. Fast flashing - cablibrating gyros.
  2. BC go solid for 2-3 seconds - pause.
  3. A and BC flash alternating - rotation flashing.
  4. ABC flash slowly - waiting for GPS lock.
  5. B Solid ,C Flashing (for about 2 minutes)
  6. Then B and C solid.
Ive Included a picture showing my APM running on the Receiver battery .I hadnt done the radio setup before this .
I then connected the APM via usb and ran a gps test , the test confirmed that the home coordinates were accurate.
im wondering why didnt the A LED glow solid.

This morning i proceeded to the radio setup :

This is how the RX is connected to the APM

THRO == IN2
AILE  == IN0
ELEV == IN1
RUDD == IN3
AUX1 == IN7  (even tried AUX2)


This is my show output:

Radio:
CH1: 900 | 1520
CH2: 1200 | 2100
CH3: 900 | 1916
CH4: 1096 | 1902
CH5: 1000 | 2000
CH6: 1000 | 2000
CH7: 1000 | 2000
CH8: 1000 | 2000



when i tried setting up the mode, the 'pos' value did not change when i flipped the 3 way switch. (APM detected the inputs on my Aile channel in order to scroll through the available modes , but i couldnt change the switch position.

Help.




Tags: APM, gps, radio, setup

Views: 246

Attachments:

Reply to This

Replies to This Discussion

I had found a similar solution on the forums and this is how ive altered the 'control_modes' file to work with AUX switch and the GEAR switch :


void read_control_switch()
{
byte switchPosition = readSwitch();
if (oldSwitchPosition != switchPosition){

set_mode(flight_modes[switchPosition]);

oldSwitchPosition = switchPosition;

// reset navigation integrators
// -------------------------
reset_I();
}
}

byte readSwitch(void){
int pulsewidth = APM_RC.InputCh(flight_mode_channel);
int pulsewidth_a = APM_RC.InputCh(AUX2_CH);
if (pulsewidth_a < 1230 && pulsewidth < 1230) return 1;// AUTO
if (pulsewidth_a < 1230 && pulsewidth >= 1690) return 2;// RTL
if (pulsewidth_a > 1690 && pulsewidth <= 1230) return 3; //Software Manual FBW A
if (pulsewidth_a >= 1690 && pulsewidth >= 1690) return 4; // Hardware Manual
//if (pulsewidth >= 1750)
return 0;
}

void reset_control_switch()
{
oldSwitchPosition = 0;
read_control_switch();
Serial.print("MSG: reset_control_switch");
Serial.println(oldSwitchPosition , DEC);
}

void update_servo_switches()
{
// up is reverse
// up is elevon
mix_mode = (PINL & 128) ? 1 : 0;
if (mix_mode == 0) {
reverse_roll = (PINE & 128) ? 1 : -1;
reverse_pitch = (PINE & 64) ? 1 : -1;
reverse_rudder = (PINL & 64) ? 1 : -1;
} else {
reverse_elevons = (PINE & 128) ? 1 : -1;
reverse_ch1_elevon = (PINE & 64) ? 1 : -1;
reverse_ch2_elevon = (PINL & 64) ? 1 : -1;
}
}


adding
#define AUX2_CH 6
to the APM_Config.h file
At first I couldn't get the toggle to work too. I followed the manual, but my ailerons were my toggle and my toggle were my ailerons. I seems like there is a swap in the order.

My solution:

Swap the female servo wire connections:

For those connecting to the receiver,
0 -> 7
1 -> 6
2 -> 5
3 -> 4
4 -> 3
5 -> 2
6 -> 1
7 -> 0

I do the same to the connectors to the servo and ESC.
0 -> 7
1 -> 6
2 -> 5
3 -> 4
4 -> 3
5 -> 2
6 -> 1
7 -> 0

Everything works fine now. My toggle works, and during auto mode, all control surfaces work properly.

Not sure if it affects other things though.
You are right - wow - thank you. I was getting nowhere and reversed everything from the diagram and it works! Thank you. If you look at the bottom of the board, the board is actually labeled correctly. The mistake I made is that I followed the published RC setup diagram in a literal sense. The diagram should be updated to eliminate this confusion for others.
Mark, could you clarify (perhaps by uploading a picture with your suggested changes)? I'm happy to update the manual, but I don't see the error.
I'm afraid I don't understand this. What numbers are you referring to? Surely not the ones printed on the APM board....
I have the same situation - all the LEDs function, the UBLOX ordered through DIY store, GPS tests fine with good LAT/LONG but when the APM board concludes self tests, calibration etc. and GPS appears to lock, I'm left with the B and C LEDs on. At this point I never get all three as indicated in the manual so the question is - do I really have a GPS lock and ready to fly? Curious, was there a clear solution to your problem GPS LED problem or have I missed something?
nope i havent found a solution to the GPS LED problem , Still DONT get all three to light up.
I never get blue GPS lock LED to turn on, even though uBlox is locked! APM & OIP are beta boards No Lock indication on HappyK's new GCS either.
Mark, there is no blue GPS LED on either the uBlox or APM/IMU. Only the MediaTek has an onboard blue LED. Which LED are you referring to?

We're working with HappyK's on his GPS to pass on the lock data; his current code is looking for a data string APM doesn't provide, but will soon.
Chris,

Pls see attached for the APM RC connection picture. It shows the top view.

I reversed the numbers (0-7) to followed the numbers on the bottom of APM. Also, the position of GPS, telemetry, and I2C Port has be swapped to reflect the respective position.

Regarding LED lights, initially, I only had Yellow LED and the Blue LED on MediaTek on. I had to reset the board every time I start up to get both the Yellow and Red LED up. The Green LED never comes on. But even without the Green LED, the setup seems to work fine when I tested it on the field.

Should we get the Green LED light? What might be the problem?
Ah, I see. It's the confusion over top view vs bottom view. Fortunately, Mark has just sent me some awesome drawings that make these much clearer, so I'll update the manual with them.
Thanks Chris.

So we are still wondering what does the green light mean and what have we done wrong to not get the green light. Would appreciate if you could enlighten us. Tks

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service