I auto tuned with ESC telemetry and filmed it

Pitch is quite good now, I would copy all the same values into Roll and probably no need to Autotune since your aircraft is quite symmetrical. If the weight is a bit uneven you could still Autotune on Roll axis.
You can do Yaw Autotune any time, but it’s not as critical as pitch and roll.

I think the Harmonic Notch filter needs a bit more adjustment:
INS_HNTCH_FREQ,45
INS_HNTCH_BW,22

Later when you get it all put back together, gimbal and all, just change these parameters to suit the difference in take off weight:

new ATC_ACCEL_P_MAX = ATC_ACCEL_P_MAX x (min_TOW / max_TOW)
new ATC_ACCEL_R_MAX = ATC_ACCEL_R_MAX x (min_TOW / max_TOW)
new ATC_ACCEL_Y_MAX = ATC_ACCEL_Y_MAX x (min_TOW / max_TOW)

I wouldn’t suspend the frame for determining level, I would sit it on flat stable ground and pack it under corners to achieve level.

Your vibrations are nice and low, so you should be able to set this too:
ATC_THR_MIX_MAN,0.5
and these:
PSC_ACCZ_I,0.4
PSC_ACCZ_P,0.2

Remember to set these too.
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2

Do another flight when you can to check the Harmonic Notch (and other settings). There could be a couple of alternative configs to try.

Try these Loiter params too, I think you’ll like them
LOIT_ACC_MAX,600
LOIT_BRK_ACCEL,300
LOIT_BRK_DELAY,0.3
LOIT_BRK_JERK,300

I think sometimes the altitude drop you see is a combination of the wind affecting the baro pressure, and also probably some prop-wash since those props are quite big for that sized frame.

Also the prop size is what is making that INS_HNTCH_FREQ so low, 45, instead of up around 80 for smaller props. That’s not necessarily a bad thing.

I’ve been trying to work out what to do with compass calibration, if anything…

Thank you again for helping. The pack should be full in the next hour then I can try again.

I copied all the values from Pitch to Roll again. I will fly a whole battery this way to see what it does.

Changed INS_HNTCH_FREQ from 80 to 45
Changed INS_HNTCH_BW from 40 to 22
Changed ATC_THR_MIX_MAN from 0.1 to 0.5
Changed PSC_ACCZ_I from 1.5 to 0.4
Changed PSC_ACCZ_P from 0.75 to 0.2
Changed BATT_FS_CRT_ACT from 0 to 1
Changed BATT_FS_LOW_ACT from 0 to 2
Changed LOIT_ACC_MAX from 500 to 600
Changed LOIT_BRK_ACCEL from 250 to 300
Changed LOIT_BRK_DELAY from 1 to 0.3
Changed LOIT_BRK_JERK from 500 to 300

I shifted the rear battery slightly, 1cm to the right, away from motor 2 towards motor 4.

I calibrated the compass before the second flight. What do you see with the compass? I have the GPS mounted as high as possible. Maybe it is moving slightly because the GPS holder base isn’t very tall and maybe the balsa wood has some give. I can see if I can get an aluminium tube of this size or I will just have to design a print a new base and top. I am also flying about 50m from a cellphone tower. Not sure if that could be an issue. I also have to slightly lift the drone now, because it doesn’t have legs, to connect the batteries.

The compass/GPS position should be OK provided it’s not vibrating too much, I’m just checking for interference.

This was from the flight after all the changes

Auto also seems to work well. Huge difference between today and last week when it was actually chasing me around the field.

I will see what I can do about motor 2. It gets very hot. Moving the battery didn’t help. I will see if that leg is horizontal. I might fly once without the rear battery to remove weight there and see what it does.

What do you think of the flight? Is the sound normal? It doesn’t fly very fast. I am ok with that but will it be able to handle strong wind or do I need more power?

This is after I removed motor 4 and installed it again. I think it is even worst now.
https://www.dropbox.com/s/h4sylh5bx53nuor/00000170.BIN?dl=0

The flight seemed fine. Still twitches a little bit on its own. Probably that motor 4. I will check if the frame is level tomorrow. Now that everything is working I will start converting to carbon. That should also help I think because it will be very stiff.

I think I am doing something wrong with the mission planning. It isn’t turning towards the middle. I created a circle and made every second waypoint do_set_roi and moved each point into the middle. Looking at this tutorial that is the mistake I made. I should just set the a single ROI and if I set it again it will disable it so I will try tomorrow with a single ROI.

I also received my range finder. The TF-luna
https://amzn.to/3pVJFA4

I found links about how to set it up using I2C. I had to swap wires 2 and 3 for it to work. 2 goes to pin 3 and 3 goes to pin 2.

It is reading a value and I believe I configured everything so that it will actually activate.
This is all my parameters now

On this page Simple Object Avoidance — Copter documentation it says to set PRX_TYPE to 4 so that it will work as a proximity sensor. If I set it to 4 then there aren’t any rangefinder readings on the status tab. If I set it to 0 then I get values again. So not sure if I should set it or not.

I went flying today. Things went very well. Nobody almost died so that is always a good thing :slight_smile:
It does a twitch here and there but it is probably because of the body

Things I need to sort out:

Figure out what I am doing wrong on mission planner. I set a single DO_SET_ROI but it didn’t turn to the middle. I tried every second waypoint and now I tried a single waypoint.

I need a better battery monitor. I think I probably damaged my battery today.
Seems people like this company ( Mauch) https://baskaerospace.com.au/shop/sensors/mauch-002/

Rangefinder
I tested the rangefinder. If I set PRX_TYPE to 0 then the values show up in the status tab. If I change PRX_TYPE to 4 then nothing shows up.
I walked towards my drone and when the numbers showed up I went up to where the numbers showed 300 and it didn’t move backwards. When I wasn’t close the number would show 1200. I was too scared to try and fly it into a pole to test it.

Replace the aluminium body with a carbon body so that I can make sure everything is level. The aluminium body bends too easily. I can bend the legs up and down on the bench.

Replace the aluminium 20mm x 20mm legs with carbon 15mm x 15mm legs.

This is the log of today. I flew for +20 minutes. I was flying left and right, forward and back, not just hovering. So I am happy with the length of flight. I could not have done it with the help of everyone that has helped me so far. So thank you again to everybody. If I could afford it I would send everyone a Christmas present. Maybe if I get drone jobs in the near future that might be possible :slight_smile:

Yes to the Mauch sensor. Bask will be your best supplier too I think.
Usually the standard current/votage sensors can be manually calibrated a bit better than the default BATT_VOLT_MULT too.

Pitch, Roll and Yaw are all tracking nicely.
Other good news is the Harmonic Notch filter is set up correctly and working right on the motor RPM frequency.

Bad news is Motor2/ESC1 were having a hard time starting on this arming attempt - is that the one you’ve been saying is twitching?
Check over the connections and wires for any breakages, or breakages about to happen.

.What are your BLHELI settings in the ESCs?

Yes, I have been having issues with motor 2 on and off. When it spins it spins but sometimes it takes a moment to get going. I took the whole drone apart a few days ago and everything seemed fine.

I pulled on all the wires on the ESC just now and nothing came off. I might swap the motor and see if it is the motor. If I still have issues I will probably redo the bullet connectors. I will just need to get more connectors, I have nothing left in stock now.

How do you see that the filter is working well?
Are these values good? That long spike makes me worry.

You mentioned some other noise that you are worried about. How do you see that? Shouldn’t the aluminium body block most electrical noise?

When I lifted off I had the error I always have with lift off, ground mag anomaly. I am going to fly now again and take a video.

I sent the designs in now to get milled out of carbon fibre. The aluminium frame is 1.2mm. It bends too easily and the bends don’t go away. I am not sure if I want the frame out of 1mm or 0.8mm carbon. I don’t know what the minimum is I can get away with.

What I added to the design vs now:
A base that will be on anti vibration dampeners so the flight controller will have double dampening
A roof so that I can put a hook on top to make sure the drone is always level. It will also protect the wiring if the drone flips, but as it is flying now I don’t think that will happen again.

This is the BLHeli setup

All ESC’s info

Config screen all ESC’s

ESC 2 info

Do you have an idea why the rangefinder isn’t causing the drone to move backwards when I walk towards it?

So seems when you set a rangefinder to a proximity sensor it doesn’t display the rangefinder values anymore. You need to open up the proximity map.
This guy describes how to do it

I will test this probably tomorrow. Too many people now on the field.

I did a quick test in the backyard and it works. I will do a full test tomorrow. It seems the sensor area is very small. It will be fine for a tree or a wall but not a human or a lamp post. I probably need a few more sensors on the front or some how make the sensor move slightly left and right the whole time

The shape of the FFT graphs looks similar to how they were before any filtering but the amplitude is the big change.
On the FFT graphs if you hover the mouse pointer over the graph lines it tells you the frequency and associated RPM.
Check in the log under ESC for you individual motor RPMs.

You can see from the FFT graphs and ESC data we picked the correct value to suit the motor RPM. You can also see the following peaks are multiples of that first peak. If they were unevenly spaced you would have to decide which was the primary (and secondary) due to motor noise and set HNOTCH values accordingly, and which peak (if any) requires a static notch.

Aluminium can act like a ground plane and may also filter some electrical noise, as will carbon fibre since it is conductive, but neither are ferrous and wont shield against magnetic fields.
I think you are getting some magnetic interference from battery and power wiring to the compass. If you keep using this frame while the new one is built, you might want to do the compass/motor calibration.
https://ardupilot.org/copter/docs/common-compass-setup-advanced.html#common-compass-setup-advanced-compassmot-compensation-for-interference-from-the-power-wires-escs-and-motors
Read over the instructions carefully - it can be dangerous if precautions are not followed.

Be aware that it is possible to over-damped the flight controller and it wont pick up tiny movements that it should, and it wont react as quick or as well. If you vibrations are low and tuning was successful how it is now then you have it just right.
Your existing damping system is working well, but a nice stiff CF frame might change that too. Your aluminium frame might (or might not) have some resonance that a CF frame wont, it could be better or worse - you’ll have to assess that once the new build is complete. It will be good to have the option of more or less damping.

I couldnt see anything wrong with your ESC config. So you may still have an issue with that motor, or that ESC.
One thing I would change → I would drop the temperature protection to 100°C or 110°C.
/rant
I haven’t been able to work out why BLHELI makes the default value 140°C since the tiny little processor (MCU) is rated for “Temperature range from -40 to 85 ° C or from -40 to 105 ° C” and stops working at 120 or less. Sure the temperature reported should be the FETs and not the MCU, but in reality the whole ESC is only small and it will all heat up. And depending on the ESC design and manufacturer, the temperature is often taken from the MCU internal temperature sensor.
/end rant

Make sure that rangefinder is powered from an external 5vdc source (BEC) and not from the Flight Controller serial port.

I will change the esc temperature now before my flight. Currently I am running the rangefinder via I2C so I will redo the wiring to get the power from my VTX 5V line after this flight.

I did a flight now. Will show the logs. Everything went very well I think. I am not sure if I should set my D on PID to get it to stop stuttering when I go left and right.

I also had an error come up again and had to reboot. Not sure where to log bugs

I am getting more confident now that it isn’t always trying to kill me. I will go get an SD card to record the flight through the vtx. Next is to attach legs again and the gopro.

1 Like

you are doing well and you have an excellent teacher in Shawn no’s arducopter very very well

I am very thankful for his help. So much

1 Like

This thread for that error, Ardupilot determined an IMU was not operating correctly and reset it.
Could be an anomaly or bug, or sign of a hardware issue.

Roll is tracking extremely closely to Desired Roll (and same for pitch) so I wouldn’t change any PIDs yet.
Your RC1 channel (roll, left/right) has a bit of jitter but it doesn’t look very bad. Are you sticks spring-centered?
You could try increasing RC1_DZ,20 to 30
or lower these a bit
ATC_ACCEL_P_MAX and ATC_ACCEL_R_MAX to about 70000, they dont need to be very precise.

1 Like

I am using a Futaba T14SG.
Here is a video of it.

I will make those changes and see how it goes.

The mission worked well. The drone was pointing to the middle and collision detection is working well also. I will change my I2C bus this week to get power from the VTX 5V. I want to add more sensors as the money comes in.

I called my drone Demon and Meteor, but I need to rename it now because @xfacta “The Exorcist” has cured my drone. Maybe the new name can be Chopper since it will chop you into pieces if it gets too close :slight_smile:

The flight today running a mission

Avoidance working well

Changed RC1_DZ from 20 to 30
Changed ATC_ACCEL_P_MAX from 79171.95 to 70000
Changed ATC_ACCEL_R_MAX from 79171.95 to 70000

This was a quick test before the flight, it still bounces. Not sure if this is normal for this kind of wind.

This was the flight recorded using my goggles. The quality isn’t great, but maybe it will show something useful. I configured brightness and contrast, but seems when recording it ignores that. I am using the legal 2mW power on the VTX and I didn’t actually fly with the goggles.

1 Like