Popular Content

Showing content with the highest reputation since 03/01/2020 in Blog Entries

  1. 1 point
    I got out Monday for a first flight for my digital flight control system. Overall it was a big success! The one thing I cut corners on to get out there was fully waterproofing the servo. I felt that the likelihood of a turtle capsize was low (my last one was months ago). Of course, what did I do after 90 minutes out there? Turtled the boat and killed the servo--HAHA! But still a great day with lots of learning and successes: 1) Being able to "arm" the system at the press of a button was a major convenience. When the system is "not armed" it is as if the wand is all the way up and in non-foiling mode. In the armed state, the boat will try to fly at the desired altitude set point. Sailing off the dock and around the marina where you really don't want to foil is super easy. No more swimming out to the spirit to adjust ride height! Furthermore, adjusting altitude and other parameters was easy with the key fob switch. The LCD could have been easier to read, but it worked. 2) The electronics enclosure really is waterproof! After a tough turtle recovery, the electronics survived DRY after 3-4 minutes submerged in about 12 inches of water! 3) The servo is NOT as waterproof. After the same submersion the servo continued to work for another 5-10 minutes before water ingress fried the circuit board in the servo. Thankfully these are $40 parts and available with 2-day shipping. There are lots of tutorials on how to waterproof servos. I plan on doing so prior to my next flight test. 4) Control loops need tuning. Things worked out on the water but the control loops felt like they were always behind where they should have been. I can see it in my data collected and it can be seen in the videos (below). After an hour of tuning with the wireless key fob, I was starting to get close to the performance I wanted. Thinking more about the wand if it were a PID controller (Proportional, Integral, Differential), it will have a P = infinity and I = D = 0 (yes, I know I'm ignoring the mode where the wand is just fluttering on top of the water, but let's keep this simple folks). That leads me to believe, I will need to really crank up my P constant (currently set at 9.0). I think the I and D constants will be helpful for improving performance beyond the wand, but I'd like to duplicate what I have first. 5) Epic data collection! After 90 minutes of floating and foiling I have 5MB of CSV data on heel angle, pitch angle, altitude, smoothing params, PID params, acceleration in X, Y and Z axes, battery cell voltages, etc. This data will help me tune control loops on shore. My first guess at constants was made by watching our UFO videos frame-by-frame and estimating elevation and rise/sink rates. My new data is at 20ms resolution and will give me a much better shot at getting things very close on shore before I head out next! 6) Battery life will NOT be an issue. After 1.5 hours of foiling I had better than 85% of the battery left. On prototype #2 I will definitely go with a smaller battery to cut costs and reduce size / weight). Either way, I have hard numbers on cell voltages vs. time and will accurately be able to calculate how much battery capacity will give me how much time on the water. 7) I need a hard-reset switch on the boat. The ultrasonic altimeter I am using is a cheap one from a car bumper. Occasionally it gets noisy and needs a reset. Having a way to do a full power cycle on the water short of taking the lid off the enclosure would make resetting the altimeter easier. In the long run, I will be looking for a higher reliability part for prototype 2.
  2. 1 point
    Hey team, just shot a quick video on my solution to adjusting altitude and some of the other prototype variables. First flight is TODAY!
  3. 1 point
    Electronics module and servo now fully mounted on spirit and actuating the flap with torque to spare! First flight in mid June is on track! Last steps are some linkage adjustments and test tank time (in my hot tub)!
  4. 1 point
    Another update from the land of digital flight control systems! Integration I now have all sensors talking to the Grand Central board and the algorithms (PID loop, ultrasonic sensor filter and smoothing, etc.) performing as designed. The wireless remote is also working and allowing the user to adjust PID Parameters, Altitude Setpoint, and Smoothing coefficients. The LCD is putting out status messages and feedback when the user is changing parameters. I am also collecting all the data from accelerometers, gyros, ultrasonic sensor, battery cell voltages, etc. and storing it to an SD card (sample data and charts below). The data gathering ability will be a major feature in itself. We will really get to be data-driven about what sorts of tunings make the boat go fast. For example, comparing nose up vs. nose down pitch angle, fastest ride height for different points of sail, etc. A simple battery management system is also now working indicating battery State of Charge as well as cutting off power to the servo when the battery gets too low to avoid damage to the cells. Last, the integrated PCB and battery have been installed into the waterproof housing and a gland has been installed to allow for a waterproof cable passthrough. I am planning on doing some more testing of the integrated system in the “test tank” (aka my hot tub with the jets going). I may throw my 5-year-old in there and tell him to do some cannonballs. The goal is to ensure that the ultrasonic sensor is reading turbulent water well and that the default IIR smoothing filter settings are correct. In particular, the smoothing needs to be set to smooth water ripple and wake without paying too bit a price in lag. The smoothing coefficient is tunable using the wireless remote so the goal here is just to get the default setting close. Final tuning can be done out on the water. A lot of progress for 6 weeks. Data Analysis The other fun side-project is analyzing data from all of the sensors and graphing things. I am able to gather data every 10ms which gives very good granularity. Currently I am collecting the following data fields: 1) Raw ultrasonic range sensor altitude (cm) 2) Filtered ultrasonic range sensor altitude (cm) 3) Smoothed ultrasonic range sensor altitude (cm) 4) Vertical acceleration (m / s*s) 5) Heel Angle (degrees) 6) Roll Angle (degrees) 7) Commanded servo position (0-100%)* 8) Battery cell 1 voltage (Volts) 9) Battery cell 2 voltage (Volts) *Rotary servo position (0-180 degrees) is converted in software to linear servo position using the proper trigonometric functions. In the code, the servo is commanded between zero- and one-hundred percent representing percent of total linear throw. I have attached some screenshots from excel where you can see the value of visualizing the data and how different filtering techniques and filter combinations affect altitude readings. Great to see that the outlier rejection (orange line) and IIR smoothing (gray line) are doing what they are supposed to do! I am also curious as to how fast the battery drains during foiling and monitoring cell voltages should give me a good picture of battery life. Mounting Plate I have also purchased Clickbond studs which will be bonded to the sprit. The mounting plate will then be screwed on to the Clickbond studs. The mounting plate still needs to be designed but it should be pretty straight forward. It will hold the enclosure, and mount the waterproof servo and ultrasonic range sensor. I am currently experimenting with perforated aluminum as it is strong and easy to work. Linkage My last step is designing the linkage to mate the servo to the existing flap control rod. Thankfully, there is already a bell crank on the sprit. I will not use the existing bell crank because it is not shaped correctly for my purposes, but I will use its pivot pin. I have to do the calculations to determine the correct length of each side of the bell crank to ensure the mechanical advantage and throw are correct. Additionally, I need to measure the total actuation length of the flap. Time to get out the calipers. Until next time, stay flying.....
  5. 1 point
    Time for another blog installment of the Digital Flight Control System for my UFO. I have been busy at work on the project and making good progress toward a first flight in early 2020! Also attached is an updated block diagram with details on various subjects below: Data Logging: In my last blog post I mentioned that we needed some sort of data logging to really get into the meat of how well our control and filter algorithms are working. Post processing data after getting off the water will also allow us to see if there is data being generated by sensors that could improve control. For example, I received a suggestion that I take vertical acceleration from the IMU into consideration and use it to derive vertical position. This vertical position would then be fed into a Kalman filter along with the ultrasonic range sensor's vertical position measurements to determine a better estimate for boat altitude. Logging and crunching data after getting off the water would allow us to take these types of ideas into consideration easily. Datalogging would also greatly improve troubleshooting of all types. To this end, I have added an 8GB micro SD card to the design as well as written some simple code to log data to a CSV file for post processing. My current code logs speed (GPS), acceleration (XYZ axes), attitude (XYZ planes), and servo control input. Any other thoughts on datalogger inputs? PID Loop Tuning: It has also occurred to me that tuning PID loops while on the water will not be possible with a laptop. As such, I have integrated a wireless, 4-button, key fob (in a waterproof bag), a wireless receiver and an LCD screen. This will allow for wireless adjustment of PID constants and LCD feedback to the user. This setup should allow for easy adjustment while out on the water between foiling runs. The enclosure chosen also has a clear plastic top to make reading the LCD screen possible. Mounting, Wiring and Power Distribution: The Arduino board I am using only has so many pin outputs for 3.3V and 5V. While my sensors easily fall within the max current output of the board, I am short on pin space. I also have a 3D model of the enclosure that requires at least one mounting plate made from plastic / metal / fiberglass / FR-4. It occurred to me that rather than mess with mounting plates and a wiring rat's nest, I should just burn a simple PCB to handle mounting and power distribution. This PCB may also contain some custom circuitry--we'll see. The PCB will minimize the wiring mess and be a mounting plate in one shot. Many PCB shops will burn custom sized, one-off boards for ~$150. It's probably a small price to pay for much better reliability and maintainability (not to mention the time saved on creating a mounting plate(s) and hand wiring all of the modules). Enclosure: Now that I have selected a battery (2S LiFePo, 8000mAh) and all other components, I created a 3D CAD model of how the boards will lay into an enclosure. It appears that a 4x6 inch case will fit everything we need to hold the system (see photo of selected case). This enclosure will mount onto a mounting plate (probably custom fiberglass or carbon fiber) that will bolt on to click bond studs bonded to the spirit. The servo and ultra sonic sensors (both waterproof) will live outside of the case and be mounted to features on the mounting plate. This section of the design is the most open at the moment and will certainly require more CAD work. That's all for now. Comments are welcome!
  6. 1 point
    Good news! I just received PCBs back from the fab house and all parts fit. This simply means I know how to be very detail-oriented with a pair of calipers and my CAD software. I mentioned in a previous post that mounting all of the modules to a single PCB was easier and more electrically sound than using a "base plate and flying wire" approach. The PCBs are back and everything fits mechanically. As you can see from the photo, I have added 0805 inline footprints on every trace. The idea here is that if the trace is correct, I install a zero-ohm resistor and carry on. If a trace ends up being incorrectly connected (because of a design or fab error) there is no need to break out the razor blade and cut PCB traces, just wire up some jumpers to the 0805 pads and connect correctly. Hopefully everything goes smoothly.... Electrical checkouts have gone well and no issues with power or ground planes were found. I have started soldering parts to the PCB and am about half way done with the full assembly. The next step is to run software with all modules integrated into the PCB and running on battery power (as opposed to power supply or USB power). The integrated PCB will look like a stack up of boards, so I plan on referring to it as "the stack." I'm looking forward to seeing all these modules work and play together! First flight could happen this spring!