element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum DSM2 transmitter attached to Arduino via RS-232
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 15 replies
  • Subscribers 404 subscribers
  • Views 1847 views
  • Users 0 members are here
Related

DSM2 transmitter attached to Arduino via RS-232

roineust
roineust over 12 years ago

Hello!

 

I would like to connect an Arduino Uno via RS-232,  with this transmitter:


http://www.micronradiocontrol.co.uk/docs/dt/dt-tx1-k1-1.pdf


And to have as servo controller, on the receiving side, this receiver:


http://www.hobbyking.com/hobbyking/store/__28554__OrangeRx_R615_Spektrum_JR_DSM2_Compatible_6Ch_2_4Ghz_Receiver.html

 


Can anyone instruct me with such a project?


Thanks a lot!

Roi Neustadt.


  • Sign in to reply
  • Cancel
Parents
  • billabott
    0 billabott over 12 years ago

    This is a big challenge.  Please review the MAX232 IC data sheet and see if you can manage it.

    Do a search using Google and YouTube for MAX232 and Arduino.  I think you may find what you need.

     

    Happy Trails.

     

    Ha.  The OP caught me shooting from the hip and missing the target completely.  Good call, OP.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • roineust
    0 roineust over 12 years ago in reply to billabott

    Hey Bill!

     

    I want my computer to connect to the Arduino via a USB cable, only for the sake of uploading the code and the Tx1-K1 DSM2 transmitter to connect to the Arduino, using the Arduino  TX and PWM pins using the RS232 protocol.

     

    I think there is no need in this project to connect the Arduino directly to the computer using the RS232 protocol or RS232 hardware.

     

    Have i misunderstood anything?

     

    Thanks a lot,

    Roi.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billabott
    0 billabott over 12 years ago in reply to roineust

    Let's see there are two distict features that make up RS-232 specification.  One is the well known 8-N-1 at a given baud rate which is 115200 according to the data sheet pdf you provided the link to.  And then there is the electrical signal level for which binary 0 is -8 V and binary 1 is +8 V.

     

    Your TX does not seem to work with true RS-232 signals.  Having located and read a document from the OEM's website, I have come to the conclusion that you REALLY need to read it too.  Especially, Section 4 which shows how to feed pin 7 (or 8).  http://www.deltang.co.uk/tx1-112.htm  This MAY NOT be the correct document for your TX.  If that is the case then please do tell me which is the right one.  Pay attention to the power supply requirements and there will be no tears because the TX got tore up.  Since the Uno is 5 V on a high (binary 1) you REALLY must understand and follow what the OEM shows about the interface between the Uno's output pin and pin 7 (or 8) of the TX.  Again, I point you to Section 4.

     

    I don't know but the answer you are looking for may be how to create and send the PPM signals into pin 7 (or 8) of the TX.  For that, I refer you to the Arduino Forum.  http://forum.arduino.cc/index.php?PHPSESSID=g7vue61elc4pk3312kt7uvrtl6&topic=146982.0  ,  http://forum.arduino.cc/index.php?PHPSESSID=g7vue61elc4pk3312kt7uvrtl6&topic=146982.0 and other discussions posted there that may be easily be found by inputting "ppm tx rc" into the search box on the Arduino Forum's pages.  Where you might learn that PPM is only between the TX and RX.  Ha, gotcha!

     

    Does your difficulty lie with creating, maintaining, and TXing a required 16 byte array?

    Byte 1 Checksum (sum of bytes 2-16 cast to 1 byte)

    Byte 2 Not used (can be any value)

    Bytes 3-16 2 bytes per channel with following structure 0b000 CCC PPPPPPPPPP    for a total of 16 bits which is 2 bytes

    - 000 = not used (normally zeros)

    - CCC = channel number (0b000=Thr, 0b001=Ail, 0b010=Ele, 0b011=Rud, 0b100=Gear, 0b101=Aux1, 0b110=Aux2)

    - PPPPPPPPPP = 0b0000000000 <= 10bit channel position <=0b1111111111

     

     

    Happy Trails

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gdstew
    0 gdstew over 12 years ago in reply to billabott

    billabott wrote: And then there is the electrical signal level for which binary 0 is -8 V and binary 1 is +8 V.

     

    The actual RS232 specification for logic levels is binary 0 is minimum of -3V (maximum is -15V) and binary 1 is minimum of +3V (maximum is +15V).

    Many RS232 recievers will accept  0 V as a binary 0 although this is clearly out of spec.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billabott
    0 billabott over 12 years ago in reply to gdstew

    Thanks, Gary.  I was just quoting something (dated) I read the other day.  Wikipedia is my friend, too.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to billabott

    William is quite right.

    You can indeed send data out of an Arduino to this device, which may in turn communicate with the Rx.

     

    So to answer your question.

    Get some wires and connect to pin 7.

     

    If you want a sketch then I'm afraid there is much more information required.

    ie, how are you going to provide the input information, how many channels, which input on the Arduino is what, etc.

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • roineust
    0 roineust over 12 years ago in reply to mcb1

    Hello Mark!

     

    I would definitely need a sketch, since i have little experience in hardware and software.

     

    I am even having trouble understanding all the 16 bytes, 10 bit, checksum, CCC, 00011111 stuff - If i had a sketch and a wiring diagram, that i can copy and paste the code and upload it (both i already have, but it doesn't work up to this moment) and then successfully the receiver and transmitter would bind and if even one servo moves in a predefined way - then i can start playing with these 0001111 arrays and try to understand how these bytes and bits influence the servos reactions. i understand the basic concept of binary counting, but not much more.

     

    My final goal in this project is to have 4-6 servos connected to that receiver - using all the channels it is? i will need quite an elaborate animated synchronized movement sequence of these servos. Is there no way to record with joystick ot mouse a sequence of movements and automatically 'translate' these movements to the 0's and 1's language?

     

    Otherwise, would there be a need to manually insert a long list of these bytes in the code?

     

    If there is still more information that i can provide to enable you to help me, please let me know.

     

    Thanks,

    Roi.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to roineust

    Roi

     

    Sorry I have enough to do for myself without writing code for other people.

    The forums are to help, however someone may take pity on you.

     

    You have some code, so maybe posting that will show where you're going wrong/right.

     

    I presume there is basically a 'start' button, and then the various servos move in a preconfigured manner.

    You will need to be storing this for each of the 'servos' and sending it out.

     

    The reference to 10 bit is a number from 0-1023 (which in binary is 10 bits).

    So effectively if you send it 512 (in binary) it should translate to mid position on the servo.

     

    How you capture or work it out, is your next move.

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • mcb1
    0 mcb1 over 12 years ago in reply to roineust

    Roi

     

    Sorry I have enough to do for myself without writing code for other people.

    The forums are to help, however someone may take pity on you.

     

    You have some code, so maybe posting that will show where you're going wrong/right.

     

    I presume there is basically a 'start' button, and then the various servos move in a preconfigured manner.

    You will need to be storing this for each of the 'servos' and sending it out.

     

    The reference to 10 bit is a number from 0-1023 (which in binary is 10 bits).

    So effectively if you send it 512 (in binary) it should translate to mid position on the servo.

     

    How you capture or work it out, is your next move.

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • roineust
    0 roineust over 12 years ago in reply to mcb1

    Hey Mark,

    Thanks for replying.

     

    Cheers,

    Roi..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube