search
Search the Community
Showing results for tags 'digital control'.
Found 2 results
-
Integration, Data Crunching, and Mechanical Integration
DerekF posted a blog entry in Digital Flight Control System for Foiling Dinghies
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..... -
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!