210 (lisam ls-210) mini Quadcopter with GPS and omnibus f4 pro with INAV build

Started by sim_tcr, August 03, 2018, 10:09:58 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

kn8alpha

Position the GPS module so that the arrow points forward, towards the nose of the aircraft. In INAV, change the mag orientation (CW or CCW angles) and hit save and go check the Setup tab. The craft movement/heading in this tab should match actual movement without any bounce back. Also the heading should be close to 0 degrees when you point the craft towards magnetic North.

For the modes, poshold enables whatever it needs, i.e. angle mode. You don't need to overlap with angle mode. You need to overlap poshold (2d) with althold if you need a 3d position hold.

In flysky tx, set the aux channel to combination of two switches, like SWC + SWD. You can now get 6 flight modes. I use one physical switch for flight modes (angle, acro) and one for navigation (althold, position hold, none) and an extra switch for emergency RTH return to home.

Sent from my ONEPLUS A3003 using Tapatalk

sim_tcr

Still trying to figure out position features of INAV.
I think my issue is, compass(magnetometer) not working correctly. In order to get my compass detected by F.C. i Had to reduce i2c speed to 200KHZ, due to this or not I am seeing lot of i2c errors.

I was powering gps using 5v to 3.3v step down module. I removed it and tried. Gps worked fine, compass same issue.

Next I will place two 4.7kohm resistors and check. Resistors one end to any 3.3v on FC +ve and other end of resistors to the mid of SCL-SCL and SDA-SDA wires.

kn8alpha

Ah.. looks like you have a bad GPS module. Do you have pics of the PCB? Try using shorter wires for the scl sda lines. If all else fails pick up a BN880 GPS module from sp4mm3r or banggood

Sent from my ONEPLUS A3003 using Tapatalk

sim_tcr

Quote from: kn8alpha on August 26, 2018, 06:38:59 AM
Ah.. looks like you have a bad GPS module. Do you have pics of the PCB? Try using shorter wires for the scl sda lines. If all else fails pick up a BN880 GPS module from sp4mm3r or banggood

Sent from my ONEPLUS A3003 using Tapatalk
Her is my gps module pcb picture,
https://static.rcgroups.net/forums/attachments/7/3/4/6/2/5/a11164005-98-IMG_9270.JPG

Gps itself works fine, and get lock fast with some 16 to 17 sats. (Verified using black box logs).
If none works, what about buying a hmc5883l mag sensor alone and use it in the same place where gps mag is. I will cut the wires of scl sand sda from gps and connect them to external hmc5883l.

kn8alpha

Yes this module is definitely a Chinese clone of some better quality Neo M8Ns that I've seen. Maybe pour some spirit and clean it up a bit?

GPS works well as it's ublox protocol over uart and there's plenty of error correction with CRC.

Did you try reducing the wire length on the mag I2C lines?  You can safely connect short wires between the sda scl connections on module to the FC to bypass the longer wires, this should reduce the bus capacitance due to which you're using the lower i2c speed. This is ideally a better solution than reducing the pull up resistance. I2C speed depends on 1/RC. Something to keep in mind if you're going to use an external module as well and that should have onboard pullups as well.

sim_tcr

Added two 4.7kohm resistors to sda and scl and that cleared all i2c errors.
Also now I can set compass i2c speed to 400KHZ. I think that is the default speed.

But still position hold is not working correctly. Its slowly drifting when pos hold enabled.
I will try compass calibration again.

sim_tcr

Finally I was able to get position hold working. Not stand still though. But it did well I guess. It was in Horizon mode. Yet to try if this work same way in angle mode. Here is video. Sorry for bad lighting.



Here is a far view video and attempting RTH (at the end of video). RTH was not success.



For benefit of others,
compass calibration/setup is very crucial to make pos hold work correctly.
Your quad compass should report the same data as any other compass. I used my iphone compass to compare. I also had to change Mag Alignment to cw 270 degree flip.
If all done correctly, in INAV setup tab, the value for "Heading" should be close to any other compass' value. Also when quad is rotated clock wise, the "Heading" value should increase. If it is decreasing, we have to change Mag Alignment setting.

Next - RTH and failsafe setup.

kn8alpha

I just had a chance to look at your posts and videos. Looks like you've made some good progress, keep going.

Couple of pointers for a successful position hold and RTH (with iNav, but some stuff below applies to any navigation enabled FC):

- For iNav to switch to actively switch to position hold, while 'arming' it must have 3D GPS lock (with minimum 6 GPS satellites, this number is configurable in the GUI)

- A good GPS lock is needed before using position hold and other navigation modes. I usually wait for HDOP < 2, sat counts can be misleading. Usually you get <2 HDOP with 8-9 sats.

- If GPS lock is not available it behaves like it's in Angle mode.

- You need an indication to know if you have GPS lock.
Simplest way is to power the quad, plug into PC iNav GUI and look at the GPS tab. You can see GPS sats, lat/lon, HDOP, etc.
I know it might not be able to carry your PC around, next alternative is a buzzer or LED strip. Buzzer emits a series of fast beeps when GPS is locked.
The best way of course is to view GPS data on your FPV feed, if you have one. It supports displaying sat count, lat/lon, HDOP and updates in real time.

- iNav uses compass to check if quad is moving in the right heading, and this affects position hold as well. If your compass orientation is set properly and after calibration, the setup tab in iNav should display the right heading and the quad displayed should rotate/yaw correctly with actual rotation of your quad (clicking reset heading Z-axis helps in orienting the displayed quad). If the display moves in the opposite direction or bounces back, either the compass orientation is wrong or is flipped. For BN880, with the cables coming out it's back the orientation is CW 270 flip.

- Prior to iNav v2.0, position hold is just 2D, i.e. holds horizontal position and throttle controls the power to the motors. Combine position hold with altitude hold using overlapping switch assignment to get 3D position hold. Simply put, throttle position in altitude hold sets the vertical speed, in default configurations, middle throttle/ RC value 1500 "holds" the altitude and 1500 + 50 causes it to rise slowly and 1500 - 50 causes it to descend. The value "50" is altitude hold deadband and is configurable.


kn8alpha

One more thing.. for mag alignment check, point the quad to magnetic north (different from actual north) and make sure the reading is near 0. If its close to 180 degree, the alignment is incorrect. Surprisingly the setup tab shows the quad moving in the right direction even with the wrong 180 degree offset alignment but the issue shows up in flight as the quad starts drifting.

sim_tcr

I think my compass is now setup correctly. I verified the heading with my iphone compass and both always shows same reading.

Quote from: kn8alpha on September 02, 2018, 07:55:37 PM
next alternative is a buzzer or LED strip. Buzzer emits a series of fast beeps when GPS is locked.
I believe you also have a omnibus f4 pro v2. It has LED strip port (J1)  as per https://www.electroya.com/wp-content/uploads/2017/10/Betafligth-Omnibus-F4-Pro-v2-botton-pinmap.jpg . Have you ever used that port for connecting led strip?
I read some where that, in clone boards, J1 cannot be used for LED but have to use PWM5.

From inav page,

"Omnibus F4 Pro clones (Banggood, AliExpress, eBay, etc.) use OMNIBUSF4PRO_LEDSTRIPM5 target (LED strip on M5 pin instead of incorrectly wired dedicated connection)"

kn8alpha

AS stated in iNav wiki, use the M5 signal pin, works without issues. I just power my LED strip from the FC 5V as well.

sim_tcr

Modded my FS-I6 to 10 channels. With FS-IA6B on i-bus I could make full 10 channels work. I used https://github.com/benb0jangles/FlySky-i6-Mod- and 10ch Mod i6 Updater in that. Also had to install CP210x_Universal_Windows_Driver to get my Data cable recognized.

I am using SWA for arming, SWB for angle and horizon modes, SWC for alt hold, pos hold.
I still have VRA, VRB and SWD unassigned.
I don't have a buzzer installed. When I do, I will use VRA for that.

Quote from: kn8alpha on September 04, 2018, 07:41:34 AM
AS stated in iNav wiki, use the M5 signal pin, works without issues. I just power my LED strip from the FC 5V as well.
Can I use any 5v and gnd to power the led strip and use only PWM5 for data, like in below diagram I drawn?

kn8alpha

Yes, all 5V are tied together, you can use the 5V on ESC rail (those near m5 pin)

taksh

@sim_tcr
If cjmcu board have inbuilt capacitor then it is okay else use a small capacitor to smooth voltage.

sim_tcr

Quote from: taksh on August 15, 2018, 08:36:58 PM
Use a proper soldering iron else high temperature of iron can damage solder pads then last option is jumper. Jumper is not a permanent Solution.
Use adjustable solder soldering iron. Use high temperature sponge(made for soldering cleaning) and Make sure sponge is wet.

Bought this same one in picture. its working good so far. Changed the main power lead to good quality wire as the plug was loose.

ambattuhari

Quote from: sim_tcr on September 05, 2018, 09:27:46 PM
Quote from: taksh on August 15, 2018, 08:36:58 PM
Use a proper soldering iron else high temperature of iron can damage solder pads then last option is jumper. Jumper is not a permanent Solution.
Use adjustable solder soldering iron. Use high temperature sponge(made for soldering cleaning) and Make sure sponge is wet.

Bought this same one in picture. its working good so far. Changed the main power lead to good quality wire as the plug was loose.

It is not the tools we use that make us good, but rather how we employ them.

sim_tcr

Received the CJMCU 8 Bit WS2812 LED Strip and Flysky FS-CVT01 Voltage Module (I think it will work only on FS-IA6B)
voltage module worked out of the box, just needed to wire correctly and configure Tx. It weighs 9gm.

Wired the LED strip. I used 5v BEC from the PDB to provide power. On Omnibus F4 Pro V2 (clone), I used PWM5 for Data.
Configured them for GPS status, Arm state, Battery they worked neat.
The first and last 2 led's I configured for turn indicators. But its not blinking when I move roll stick left or right. I had set color of those LEDs to orange, I don't know if that's the issue.


sim_tcr

I think there is an issue with turn indicator LED programming in INAV 2.0.0

I set led 0,1 as right (E). LED 6,7 as left (W).
After saving, Right turn indicator working as it should but left turn not working.
Also, though right indicators are set to blink only for right turn, they are blinking when stick moves down.
I confirmed that 6,7 leds are good. I can make them work on any other function. I also tried to set 0,1 LEDs to left (W) and not working.
Some issue with left (W).
I Also found that, whether you set direction or not, they will blink only and always when roll stick moves right or down. And will not blink when roll stick move left or up.
Reported as an issue o INAV.


sim_tcr

Here is how position hold work on my 210mm quadcopter running inav 2.0.0. It is bit wobbly at some part due to wind.
pos hold and getting quad to exact stand still never worked, it slightly move around in small space of 1 meter. But the whole flight time (10 minutes) I could be in pos hold and not touch my Tx at all.



sim_tcr

Cheap SQ11 camera mounted on the quad. Horrible jello effect due to incorrect mounting of camera and inexperienced flyer (me)
Video was taken while quad in pos hold mode.



Next - Planning to get some silicon mounts to see if they can take out vibrations and improve video.
My build is published at https://rotorbuilds.com/build/14227

sim_tcr

I was able to make RTH (return to home) function working.
IMO, It worked so great.
I tweaked settings slightly to test RTH from a small space.
Video speaks all.


sim_tcr

I was able to make RTH (return to home) function working.
IMO, It worked so great.
I tweaked settings slightly to test RTH from a small space.
Video speaks all.



Next - RTH fail safe, way point missions.

sim_tcr

I have used some rubber material between motors and frame to remove vibrations.
Also mounted the camera differently to get jello effect cleared. See the video, I think it helped great.



rastsaurabh