New to Arduino and zero coding experience so any help much appreciated
I'm trying to make an active front wing for my powerboat, normally at 0 angle of attack then if the bow of the boat begins to raise up too much, beyond maybe 10 degrees the wing will point down to bring it back level.
I've got an Arduino Uno, MPu6050 gyro and a 25kg servo.
So far just copy and pasting code from online then attemping to adapt it. Seems to work but not getting a linear response at all, can't make sense of it.
Would ideally like to have the servo move the wing to around 60 degrees when the mpu6050 is at 10 degrees (x axis roll). Then slowly go back to 0 as the mpu6050 goes back level.
The boat generally doesn't change angle too much when decelerating. When accelerating the bow does tend to lift, but the front wing being angled down should help then too. It's really to prevent blowovers at full speed, around 75mph which hurts.
If it works I was thinking of splitting the front wing into halves and then operating each side seperately so it could aid cornering too
Power for the servo is just coming from the 5v, seems to be moving ok at the moment although not under load.
Tried putting a battery as the power source and the whole system worked much better, pretty much perfect. So just need to find a way to adjust the code so it only works from the gyro x axis and not the others.
Not a model boat, a thundercat inflatable 4m. Will only be used for high speed runs which I only do when it's very calm
@roflhat1,
I have deleted your new topic and opened this one as your new question is clearly a continuation of this topic. Please ask your new question here.
Got the wing just about up and running. Just wondering what sort of batteries folk would recommend? Tried a rectangular 9v but it's not even up to moving it at 0mph. Needs to work at 70+mph. Hardware I'm not sure is up to the task either but will find out...
With #15 in mind, if it becomes a problem, use an assisted control surface.
Other than that there are a few systems floating around on youtube for r/c aircraft stability controllers which may help you out.
Just use say elevator stability section of the code.
9V smoke alarm batteries are not suitable in any way, shape or form for any gear with servos.
Use a 4 x AA pack or similar.
I worked out that there should be 4.5kg on each half of the wing at 75mph. The bar going through them is close to the centre of area so hopefully the servo isn't having to move too much weight/force
Hi,
You need to remember that the servo will use power moving to a position, but will also use power to keep that position if any torque is present.
What torque do you expect at 70mph?