RC servo controller with rs232 interface

Discussion in 'The Projects Forum' started by vane, Nov 19, 2008.

  1. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    I want to try and make a module that interfaces with an rs232 port on my laptop, that allows me to move rc servos, the kind you get in an rc plane or other model, i want to try and make it with a pic. For my birthday i got the velleman pic programmer and i can program:
    PIC12F629, PIC12F675

    PIC16C83, PIC16CR83, PIC16F83, PIC16C84, PIC16CR84,PIC16F84, PIC16F84A

    PIC16F870, PIC16F871, PIC16F872, PIC16F873, PIC16F873A, PIC16F874

    PIC16F874A, PIC16F876, PIC16F876A, PIC16F877(A)(ICSP only), PIC16F627

    PIC16F627A, PIC16F628, PIC16F628A, PIC16F648A, PICF630, PIC16F676

    PIC16F818, PIC16F819

    I wanted to have a c# program that you eg type the position you want each servo to go to and then they move to it, please can you give me some feedback

    Vane
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Google is a good source - store.qkits.com/moreinfo.cfm/KT-5199A.pdf.

    You may need to learn a bit of programming.
     
  3. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    i have some experience coding in C#
     
  4. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    I have found out further about the serial port, i have made an example serial connection c# program, then bridged the Tx and Rx pin in the serial connector and had the data i types echoed bck to the program, i think i understand it in a bit more detail, so you need to send this information in your own code so to speak, which is then decoded by the PIC and fed into the servo controller, and thus moving the servo.
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    I believe the manufacturer of the RC controller would publish the commands that would allow servo control over an RS-232 link. You can probably run down a manual or two on line.
     
  6. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
  7. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    on the circuit diagram the ceramic resonator appears to have three connectors, the one i got from maplin only has two :S
     
  8. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  9. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    i have now got all the right parts, but i have discovered that maplin are rubbish, they didn't ask if i wanted a three terminal resonator or a two pin, and most of the people in there didn't know the first thing about electronics, i asked him the difference between a 16F84 and a 16F84A, he said your asking the wrong person, will the 16F84A run off 4.8v?
     
  10. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  11. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    Is there any way i can use the two pin version? And is Vss positive and Vcc negative?
     
  12. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    Is there any way i can use the two pin version? And is Vss positive and Vcc negative?

    oops double post :s
     
  13. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Vss is substrate voltage, and is usually 0. Vcc is always positive with respect to Vss.

    With no idea about the resonator, all I can suggest is that you get the data sheet and see.
     
  14. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
  15. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    I have found out that a three pin is effectively a two pin with two capacitors
     
  16. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    got some 4mhz three pins on their way from luton for £10!!!£1 VAT and £4 for packaging! they should have arrived in the next second for the price we spent!

    On the page it says to control it, you send a certain line of information, does anyone know how i send that information in a C# program?
     
  17. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    i have found out, you need to do serialport1.write etc, just need to get the proper components and i can test it out
     
  18. vane

    Thread Starter Active Member

    Feb 28, 2007
    181
    0
    i kinda got it working but it just moves the servo to a random position when i send a position signal
     
Loading...