0

Not having worked with servos on arduino I'm not sure how to go about this or if an arduino is the best solution. I have looked at servo actuation tutorials and can get a servo to move but rather than waste hours on the wrong approach,possibly someone has a suggestion on how best to achieve this? :

I have a tilt rotor quad, and have a mix on the pitch of the craft and the servo, which works quite well and allows some very fast forward flight. The issue is that although I can limit the servo range with trims, I cannot make the servo move full throw in half a stick of movement. Sometimes I wish to just control tilt, and sometimes just pitch. With expos you can almost achieve this but you only get about 50% of the servo movement before pitch sets in and this makes using acro with tilt impossible.

My idea is to use an arduino pro mini, (or something smaller?) to take the incoming PWM signal, and double it, outputting to the servo so that I have the full range of linear motion on half of my pitch stick input, but the servo PWM is not over driven (or doubled) when it goes to full stick.

I would also like the arduino to respond to another PWM high value which would maintain the last set pwm so that I can initiate a 'cruise control' off another switch on my TX.

Summary:

  • Arduino translates range of input PWM to output pwm
  • Arduino also maintains last set output PWM, when second incoming PWM is high.
  • Nice to have: programmable input to output ranges
  • Nice to have: Arduino control two input and output pwms with third and fourth input pwm (or a combination of both)

Finally...

Anyone know if the arduino would be fast enough to intercept and relay an s-bus signal? modifying as appropriate... and breaking out the servo channels (s-bus to pwm)... This is obviously more involved, but infinately more camable if I can intercept comms before they get to the flight controller.

Edit: The closest example of code I can find is as follows, and this will do one side of sbus for me (i.e. i will get sbus in and pwm out, which would work for me. however I cant see in the code any variables I can use to manually manipulate values of channels before they are sent out as PWM?

// Arduino pro mini 16 mhz decode sbus or CPPM 
// detects automatically CCCPM  or a SBUS signal.

CODE HERE as I dont have enough space to post: http://openrcforums.com/forum/viewtopic.php?t=6361

Thanks

  • All this sounds possible, why don't you give it a try? Try on your own and, if get stuck on some issue, you can come here with specific questions. As it stands, this question sounds like you want us to do all the work. A good news: the Futaba SBUS protocol has been reverse-engineered, and it seems easy to implement on an Arduino. – Edgar Bonet Nov 19 '17 at 20:23
  • Sorry I was not specific enough. It was more of evaluating the approach I was taking... sure I can try this, but if its not going to work, due to limitations of the arduino or something, then why waste time doing it? Thank you for suggesting it is possible as that is useful :) (as is the link). Not wishing to reinvent the wheel, would there be an easy way of modifying the linked code so enable some maths to be performed upon the PWM values before they are spat out? I genuinely cannot see where the values are before they are relayed to PWM. Thanks again – Rendeverance Nov 19 '17 at 20:31
  • I can't see either. That would require taking the time to carefully study the code. – Edgar Bonet Nov 19 '17 at 21:08
  • Ok, only one presumes, that people may be able to help me as i try to help others in areas i am strong, mainly EE but that's often related. I can make arduinos do things, but i have no idea how to achieve or what parts to look at to change the code and allow adding of my own code. I was merely asking if it would be trivial or someone might point me in right direction to modify the code... Assistance, not asking anyone to do it for me. – Rendeverance Nov 20 '17 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.