I watched the two posted video's that John did and I see the great possibilities of the Arduino, which I may explore after i actually build my first sub. I am sorry that gentlemen passed, he seems very nice and knowledgeable. The more i look around the forums the more I see why people get so caught up in the build process and customization of the Subs.
Arduino
Collapse
X
-
In a final attempt to pinpoint the source of the servo jittering, I performed an experiment.
Assumptions are the mother of all fu**ups.
I conducted a test without the receiver, using code to move the servo back and forth between X and Y degrees.
Interestingly, during this test, the servo operated smoothly without any jitter.
This observation suggested that the interference or noise causing the jitter likely originated from the process of reading signals from the receiver.
To address this issue, I introduced a filter into the code, which effectively averaged the received PWM signal before instructing the servo to move. Through careful adjustment of the filter's sample size and the deadband settings, I successfully eliminated the servo jittering.
The small blue PCB on the left is the accelerometer and Gyroscope that will be used for the auto-leveling.
Grtz,
Bart
Practical wisdom is only to be learned in the school of experience.
"Samuel Smiles"Comment
-
Last edited by redboat219; 10-16-2023, 06:23 PM.Make it simple, make strong, make it work!Comment
-
Practical wisdom is only to be learned in the school of experience.
"Samuel Smiles"Comment
-
Comment
-
The stern planes are like the elevators on a plane. Since they are located far aft from the boat's centre of buoyancy ( also the boat's center of gravity) any deflection up or down will produce a pitching moment through lever action.
Bow/ fairwater/ sail planes are located closer to the COB so they exert less turning force but cause hull to rise and fall vertically.Make it simple, make strong, make it work!Comment
-
The stern planes are like the elevators on a plane. Since they are located far aft from the boat's centre of buoyancy ( also the boat's center of gravity) any deflection up or down will produce a pitching moment through lever action.
Bow/ fairwater/ sail planes are located closer to the COB so they exert less turning force but cause hull to rise and fall vertically.
The stern planes and propellers are aft of the center of gravity and center of buoyancy so the stern planes can cancel the pitch vector of the propeller thrust.
The centers of buoyancy and gravity are between the bow plane and propeller causing the boat to ascend or descend.
Comment
-
Have there been any tests conducted to ascertain if there's a noticeable difference between these setups? I presume someone has compared both configurations.
Additionally, I assume it might also depend on the type of submarine and the hydrofoil's size relative to the hydrodynamic area.Practical wisdom is only to be learned in the school of experience.
"Samuel Smiles"Comment
-
Technically, redboat219 is correct. I proved it with a free body diagram and summation of forces. Maybe someone else can present it better than me. In practice it may not make a noticeable difference because of the magnitude of the forces and other factors. Fluid dynamics can get very complex. Consider bow planes for depth control and stern planes for pitch control a “best practice”.
Comment
-
I've successfully implemented automatic pitch control.This was achieved by utilizing a PID loop, it will require the adjustment of kP, kI, and kD values during the commissioning of the submarine.
I tried to explain the P,I and D of the controler in below example:
Proportional (P): Picture yourself inside the submarine, with a control system at your disposal for altering its angle. The proportional component of the PID controller functions like your swift response. When the front of the submarine veers too low, the controller takes action to bring it back to a level position. Similarly, if it tilts excessively upward, it intervenes to restore a horizontal alignment. This component promptly addresses deviations from the desired level.
Integral (I): The integral component is akin to a long-term perspective. Over time, you may observe that the submarine tends to gradually incline slightly, despite your efforts to maintain a level position. The integral part addresses this issue by making minor, continuous adjustments to return the submarine to a horizontal orientation, eliminating any persistent tilting.
Derivative (D): The derivative component is akin to anticipating changes. When the submarine tilts too rapidly, the controller detects this and takes corrective measures to counteract the swift movement. It serves to avoid sudden, abrupt motions, thereby enhancing the submarine's stability.
Consequently, with the PID controller in place, the submarine continuously monitors its angle and performs the necessary modifications to sustain a horizontal orientation. It accomplishes this by rapidly responding to immediate alterations (P), progressively rectifying long-term drift (I), and pre-emptively countering rapid tilting (D), all in the pursuit of maintaining the desired level position beneath the water's surface. This intelligent control system ensures the submarine remains steady and balanced.
Link a short footage of the pitch control in ation https://drive.google.com/file/d/1DYK...ew?usp=sharing
I adjusted my Basis Of Design, it descibes what I want to do:Receiver:
This component receives signals from the RC transmitter, providing input to the control system.
Arduino Nano:
Each channel from the receiver is connected to an Arduino Nano, which processes the input signals and generates output commands for the various control surfaces and components.
Channel 1 - Rudder Control:
This channel controls the rudder. To have a "setpoint rudder" indicating the desired rudder angle and an "output servo" that adjusts the rudder's position accordingly.
Channel 4 - Thrust Control:
This channel controls the thrust of the submarine. To have a "setpoint thrust" representing the desired thrust level, and an "output ESC" that regulates the power to the propulsion system to achieve the set thrust level.
Channel 3 - Depth Control:
This channel adjusts the depth of the submarine. Using a pressure sensor and a PID controller to control the AftPlanes servo, which manages the depth of the submarine.
Channel 5 - Logic control:
Enables & disables Diving and Surfacing logic.
Pitch Control:
The pitch control system uses an accelerometer and Gyroscope sensor and a PID controller to adjust the position of the FwdPlanes servo. This helps control the pitch (tilting) of the submarine.
Ballast Pump Control:
The ballast control system manages the ballast system, which controls the submarine's buoyancy. The functions include "filling," "off," and "empty," allowing to control the water ballast tank.
Diving Logic:
Ballast Pump Filling: When the "Diving" command is received on Channel 5 ((indicating the desire to dive), enable the ballast pump to fill the tank with water.
Timer: Set a timer for XX seconds to control how long the pump should operate.
Pitch and Depth Control: After XX seconds, activate the pitch and depth control systems. This will involve using the PID controllers for the Aft Planes servo and depth control using the pressure sensor.
Surfacing Logic:
Ballast Pump Discharge: When the "Surfacing" command is received on Channel 5 (indicating the desire to surface), enable the ballast pump to discharge water from the tank.
Overrule PID Controllers: During this time, set both the forward and aft dive planes to XX°, effectively overruling the normal PID control.
Timer: Set a timer for XX seconds to control how long the pump should operate and the planes should be at XX°.
Stop Pump and Reset Planes: After XX seconds, stop the ballast pump and reset the forward and aft dive planes to their neutral positions.
Disable Plane Control: Disable the forward and aft dive plane control systems, so they no longer respond to pitch and depth commands.
Have a nice day,
Bart
Practical wisdom is only to be learned in the school of experience.
"Samuel Smiles"👍 1Comment
-
I've successfully implemented automatic pitch control.This was achieved by utilizing a PID loop, it will require the adjustment of kP, kI, and kD values during the commissioning of the submarine.
I tried to explain the P,I and D of the controler in below example:
Proportional (P): Picture yourself inside the submarine, with a control system at your disposal for altering its angle. The proportional component of the PID controller functions like your swift response. When the front of the submarine veers too low, the controller takes action to bring it back to a level position. Similarly, if it tilts excessively upward, it intervenes to restore a horizontal alignment. This component promptly addresses deviations from the desired level.
Integral (I): The integral component is akin to a long-term perspective. Over time, you may observe that the submarine tends to gradually incline slightly, despite your efforts to maintain a level position. The integral part addresses this issue by making minor, continuous adjustments to return the submarine to a horizontal orientation, eliminating any persistent tilting.
Derivative (D): The derivative component is akin to anticipating changes. When the submarine tilts too rapidly, the controller detects this and takes corrective measures to counteract the swift movement. It serves to avoid sudden, abrupt motions, thereby enhancing the submarine's stability.
Consequently, with the PID controller in place, the submarine continuously monitors its angle and performs the necessary modifications to sustain a horizontal orientation. It accomplishes this by rapidly responding to immediate alterations (P), progressively rectifying long-term drift (I), and pre-emptively countering rapid tilting (D), all in the pursuit of maintaining the desired level position beneath the water's surface. This intelligent control system ensures the submarine remains steady and balanced.
Link a short footage of the pitch control in ation https://drive.google.com/file/d/1DYK...ew?usp=sharing
I adjusted my Basis Of Design, it descibes what I want to do:Receiver:
This component receives signals from the RC transmitter, providing input to the control system.
Arduino Nano:
Each channel from the receiver is connected to an Arduino Nano, which processes the input signals and generates output commands for the various control surfaces and components.
Channel 1 - Rudder Control:
This channel controls the rudder. To have a "setpoint rudder" indicating the desired rudder angle and an "output servo" that adjusts the rudder's position accordingly.
Channel 4 - Thrust Control:
This channel controls the thrust of the submarine. To have a "setpoint thrust" representing the desired thrust level, and an "output ESC" that regulates the power to the propulsion system to achieve the set thrust level.
Channel 3 - Depth Control:
This channel adjusts the depth of the submarine. Using a pressure sensor and a PID controller to control the AftPlanes servo, which manages the depth of the submarine.
Channel 5 - Logic control:
Enables & disables Diving and Surfacing logic.
Pitch Control:
The pitch control system uses an accelerometer and Gyroscope sensor and a PID controller to adjust the position of the FwdPlanes servo. This helps control the pitch (tilting) of the submarine.
Ballast Pump Control:
The ballast control system manages the ballast system, which controls the submarine's buoyancy. The functions include "filling," "off," and "empty," allowing to control the water ballast tank.
Diving Logic:
Ballast Pump Filling: When the "Diving" command is received on Channel 5 ((indicating the desire to dive), enable the ballast pump to fill the tank with water.
Timer: Set a timer for XX seconds to control how long the pump should operate.
Pitch and Depth Control: After XX seconds, activate the pitch and depth control systems. This will involve using the PID controllers for the Aft Planes servo and depth control using the pressure sensor.
Surfacing Logic:
Ballast Pump Discharge: When the "Surfacing" command is received on Channel 5 (indicating the desire to surface), enable the ballast pump to discharge water from the tank.
Overrule PID Controllers: During this time, set both the forward and aft dive planes to XX°, effectively overruling the normal PID control.
Timer: Set a timer for XX seconds to control how long the pump should operate and the planes should be at XX°.
Stop Pump and Reset Planes: After XX seconds, stop the ballast pump and reset the forward and aft dive planes to their neutral positions.
Disable Plane Control: Disable the forward and aft dive plane control systems, so they no longer respond to pitch and depth commands.
Have a nice day,
Bart
DavidWho is John Galt?Comment
-
Last edited by bwi 971; 10-17-2023, 12:15 PM.Practical wisdom is only to be learned in the school of experience.
"Samuel Smiles"Comment
-
Practical wisdom is only to be learned in the school of experience.
"Samuel Smiles"👍 1Comment
Comment