RC servo to PIC controlled via RC transmitter


Closed Thread
Results 1 to 15 of 15
  1. #1
    Join Date
    Nov 2014
    Posts
    8

    Default RC servo to PIC controlled via RC transmitter

    Hello, so what I would like to be able to do is attach a RC servo to a PIC which communicates with the receiver (which communicates with the RC transmitter) so that when I press a certain button or switch on the transmitter it sends a signal to the PIC which tells the servo to activate. Would anyone know how to program something like this?

    Thanks!

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    So you want to send a button press to the pic via a radio signal, and have the PIC control a servo . . . Why not control the servo from the receiver? There MUST BE more to this story . . . BUT Yea that should be do-able use a comparator input to convert signal to a switch input, pic can output servo signals . . . this is right up Acetronics alley, but I would need a bit more information than you have been forthcoming with. Bottom line, whay are you trying to do? Decode a button push, some text?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,613


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    Nothing to add ...

    What exactly is to do with that servo ??? "activated" or NOT.

    BTW note the servo ALWAYS is activated ... you just "tell " it the position you want it to reach @ 50 times per second ...

    As Archangel wrote, your R/C set very probably can do that without any added Gadget ...

    Just ... RTFM ( just Read that ... R/C Manual !!! )

    Now, the good question is ...
    Does this pushbutton already exist aboard your transmitter ??? ....

    this could be an interesting story, then.


    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Nov 2014
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    How is the servo angle controlled using the RC transmitter since there is no coding involved?

    And the servo didn’t come with a manual nor have I been able to find one online. Sorry this is my first experience with any kind of servo.

    Thanks

  5. #5
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    I think this is very doable... You might start by looking at the "PULSIN" or "COUNT" functions - they are for measuring or counting incoming pulses. Output, for only one servo, I think nothing fancy is required.

    There is a thread here discussing it - even in PicBasic: http://www.rc-cam.com/forum/index.ph...-signal-w-pic/

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,613


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    . . . and DO avail youself of the forum search feature, I got from using just the word servo :http://www.picbasic.co.uk/forum/sear...archid=1323450
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  8. #8
    Join Date
    Nov 2014
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    Quote Originally Posted by Archangel View Post
    . . . and DO avail youself of the forum search feature, I got from using just the word servo :http://www.picbasic.co.uk/forum/sear...archid=1323450
    No Matches?

    And thanks Amoque for the link, that could be very useful!
    Last edited by Dickeysbbq; - 27th November 2014 at 01:17.

  9. #9
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    There were about 30 matches when I posted, SO. . . IN THE SEARCH BOX type servo and click the little spyglass icon. It Works.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  10. #10
    Join Date
    Nov 2014
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    Thanks and I did look through some of those threads however I'm still curious as to how the transmitter can control the rotation angle of the servo? Basically what I'm trying to do is use the servo to control a claw (opening and closing arms) however the servo only needs to rotate around 20 degrees.

  11. #11
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    I am not an R/C guy, BUT I did play with servos with success. You have 3 wires on the servo. one + one - and one for signal. Signal is the key word. on tha SIGNAL wire send a pulse train of varying pulse width. The servo will change it's position. Go back to the link Acetronics2 posted, it explains it.

    As for limiting the servo to 20 degrees, personally I would gear it down and use the extra resolution to make a smoother movement. You could create a lookdown table for servo positions if you need exact places for it to stop. Then you could just send your PIC a number or other symbol as instructions as where to go.

    Read Sec 5.66 of the manual PULSOUT
    Last edited by Archangel; - 27th November 2014 at 19:17.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  12. #12
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    The definitive servo control link: http://www.merlotti.com/EngHome/Comp...controller.pdf. This PDF explains mechanics, electronics, and control... with line by line description of how and what is happening and why. It goes over interrupts, serial input to controller from PC, and about every other thing you'd likely want to know. If you EVER intend to control a servo, I'd suggest downloading this 18 page, easy to follow, tutorial/ primer.

    The author states the code is in Mikro-Pascal - and that may be, I don't know Pascal, but it is so close in appearance to PicBasic that I had to look twice...
    Last edited by Amoque; - 28th November 2014 at 15:42.

  13. #13
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    I'm confused.

    You want to send a signal from an RC transmitter, to be received by an RC receiver, and then want to have a PIC connected to the receiver which then controls the servo ? why not just plug the servo directly into the receiver like a normal RC set up ?

    If you want to drive a servo from a PIC, you need to generate a a pulse proportional signal between 1ms and 2ms refreshed every 50ms. If you could elaborate on what project you are working on and why you need a PIC between the receiver and servo it might help us to offer more suggestions

  14. #14
    Join Date
    Apr 2011
    Location
    Welches, Oregon
    Posts
    198


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    Scampy, There are actually several reasons to do this.

    While some newer transmitters have the ability to modify the servo response curve, older or simpler units require exactly this type of set-up. Suppose for example, rather than a linear response from the servo you require a logarithmic one? Or, rather than a smooth rotation, 10 discrete positions... with a microprocessor between the receiver and the servo virtually any response may be programmed to affect the servo - or servos. Really, nothing requires that the output be limited (or similar) to output to more than one servo. also, timing may be a reason - flip the stick to half... and the servo follows in a timed arc - "realistic" flying, where pilots try to mimic the look of real aircraft while flying is an aspect of this hobby many enjoy. I suspect that with proper timing and knowledge complex "3D" moves as well as many visual effects (lights, landing gear, bomb drops, camera activation) might be customized to the switches, sliders, and knobs on today's transmitters.

    I have a pretty nice Futaba that limits the response of one servo based on the position of another - say, for example, to keep flaps from deploying at full speed or reducing control surface response at high throttle settings. Many of today's hi-tech models - from "Wings" to "V-tails" require complex control interaction to fly. And, of course there are any number of ground and water based models - and robots - that would only be possible with this type of control.

  15. #15
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: RC servo to PIC controlled via RC transmitter

    That's interesting... thing is I have a 13 year old FM transmitter (old school given todays standards) and most of what you mentioned can be programmed into the transmitter, so the technology isn't that new.

    I can see the logic though, you could have the PIC monitor the pulse width and if it's more than centre stick turn on lights etc.

Similar Threads

  1. FM Radio transmitter PIC Interface.
    By koossa in forum Off Topic
    Replies: 2
    Last Post: - 30th November 2008, 09:05
  2. Single PIC As Both, Wireless Transmitter and Receiver
    By charlieb83 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd November 2007, 04:35
  3. CD/DVD burner controlled by PIC - Possible?
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th August 2007, 08:09
  4. PIC Controlled Current Source
    By Andy Wood in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 30th June 2007, 18:15
  5. PIC controlled serial LCD
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd March 2004, 18:04

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts