Moderator
I am experiencing some trouble with my new ArduStation! I wired the + terminal of my 6s LiPo (22.2v nominal) in series with an additional 164k ohms resistor(s). That makes the divider 100/(240+100+164)*25.2=5, so the max volts at the divider output is 5v with a fully charged 6s LiPo (25.2v). All is good so far! I purchased an ArduStation, assembled it , loaded the code with the battery monitor disabled, tested it, all is still good! All data is coming in fine, all screens appear normal with good data! Airspeed reads 16 standing still but other than that nothing strange. Now things go downhill. I altered the code to scale the voltage to reflect the new voltage divider ratio.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NEW
//0-8
#define BATTERY_EVENT 1
and
//0-9
#define INPUT_VOLTAGE 5250.0                                --Measured at Vcc and GND with my DVM
and
#define BATTERY_VOLTAGE(x) (x*(INPUT_VOLTAGE/1024.0))/0.000198413  --1/5400 this is how we scale the voltage
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

OLD
//0-8
#define BATTERY_EVENT 0
and
//0-9
#define INPUT_VOLTAGE 5200.0
and
#define BATTERY_VOLTAGE(x) (x*(INPUT_VOLTAGE/1024.0))/0.000294117  --1/3400

*****************************************************************************************************************
*****************************************************************************************************************

Here is the problem, with the new code loaded I get a battery voltage displayed on the ArduStation that wraps around from the bottom right hand side of the screen to the top left had side of the screen overlapping the ROLL angle! The AIRSPEED also now shows 216 while not moving. Also I just noticed while I was trying to take pictures that the Ardustation screens while telemetry is coming in is "flickering" and not very clear. I didn't notice this before.

Ardupilot code is v2.6.2
Ardustation code is v1.3

I am using uBlox and the IMU with Ardupilot and the shield V2, I have the baud rate set at 38400 baud on Ardustation
I attached all my code for both Ardupilot and ArduStation, as well as pictures of the ArduStation with telemetry.

The top picture shows the ArduStation with active telemetry coming in, the bottom is static comm disconnected.




Help me out here guys I'm stumped!

Nathaniel

Ardustation.jpg

ArduStation_V13.zip

ArduPilot_2_6_2.zip

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer
    Here is how I dealt with this issue in Ardupilot 2_6_2 under GCS_AP_Standard
    Serial.print(",BTV:");
    Serial.print(battery_voltage/1000000); // mjc

    In ArduStation_v13, I reformatted screen like this,
    I moved fields a little to fit data display better

    Now all Labels are 3 characters, Added "S" for Number of Sats on top line right side
    but can't get SATs data sent from ArdPilot with ArduIMU v2 and Shield v1

    case 2:
    lcd.clear();
    lcd.print("ROL~");
    lcd.print(roll);
    lcd.setCursor(8, 0);
    lcd.print("PCH~");
    lcd.print(pitch);
    lcd.setCursor(16, 0);
    lcd.print("S~");
    lcd.print(numSV);
    lcd.setCursor(0, 1);
    lcd.print("ASP~");
    lcd.print(airSpeed);
    lcd.setCursor(10, 1);
    lcd.print("GSP~");
    lcd.print(groundSpeed);
    lcd.setCursor(0, 2);
    lcd.print("ALT~");
    lcd.print(altitude);
    lcd.setCursor(10, 2);
    lcd.print("DAL~");
    lcd.print(holdAltitude);
    lcd.setCursor(0, 3);
    lcd.print("CRS~");
    lcd.print(course);
    lcd.setCursor(10, 3);
    lcd.print("BAT~");
    lcd.print(battery);
    break;
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…