PWM to RS232

Hi all,

Just wondering if there is such a thing out there to convert PWM signals into RS232 commands?

Ryan

You need to be a member of diydrones2 to add comments!

Join diydrones2

Email me when people reply –

Replies

  • I think this might be what you're looking for.

    Let me know if you need anything else.
  • Hi Ryan,

    I've mentioned this before here at DIY drones (and I don't think I'm the only one to have done this ....)

    I have taken a stock ardupilot, soldered 2 wires on the back of the board to connect ch3 + ch4 to the mux input, and then have massaged, abused, and tweaked a version of the ardupilot firmware to do the following:

    1. Read 4 channels of PWM signal into the processor and store the most current values internally. The code uses an interrupt based approach so timing values are pretty tight and accurate, and PWM signals are read as fast as the receiver sends them. Thinking about how the system is laid out, I have additional DIO pins available so I think I could probably handle at least 6 channels in, maybe more if we really abuse the hardware design?

    2. At 50hz, the system broadcasts the PWM input (receiver) values out the RS232 port using a binary (or ascii) protocol. Currently I am modding my firmware to support a reading and reporting a couple of the available analog channels on the ardupilot. (i.e. pressure sensor, voltage sensor, etc.)

    3. The firmware also reads servo position commands (incoming on the serial port, from a host computer.) I don't let the ardupilot compute servo positions itself. All the autopilot / filter / pid / navigation / etc. smarts is upstream on the faster processor.

    4. The built in manual / autopilot safety switch function of the ardupilot is maintained. When in manual mode, the pilot has absolute direct control of all the servos at all times. In auto mode, the firmware positions the servos based on whatever the host computer is commanding.

    So this allows me to build an advanced autopilot around a higher power processor (like an ARM9 gumstix, or an MPC-5200 with hardware floating point). All the servo / pwm functionality is pushed out to a separate piece of hardware. I like this because my host computer can be just about anything that has a serial port (or a usb<->serial converter) ... my desktop PC, a laptop, a gumstix, maybe even god help us a Mac. :-)

    If your needs are more simple, there are plenty of devices that you can use to drive servos based on serial commands (search pololu.com for instance.) However, to my knowledge, I haven't found anything that can easily read an RC receiver and broadcast those values out an RS232 port, accept servo commands via the same RS232 port, and have the auto / manual safety switch all built into the same hardware. The $25 ardupilot does all this if you only need 4 channels in and out. The ardupilot mega should be able to handle 8 channels in and out (but can only auto/manual switch the first 4 of those channels.) If you need to switch or read or control more channels you might consider pasting on a second ardupilot.

    Regards,

    Curt.
This reply was deleted.

Activity

DIY Drones via Twitter
New! Online Training on Drones for Disaster Response https://t.co/brqRuujjY2
yesterday
DIY Robocars via Twitter
https://t.co/8EMCvYW6oz
yesterday
DIY Robocars via Twitter
RT @OttawaAVGroup: We are going to try something new this week. We will be having a drop-in style meeting Wednesday @ 7-9pm EST. Pop in and…
yesterday
DIY Robocars via Twitter
RT @tawnkramer: Thanks Everyone for another fun virtual race! Amazing Ai racers competing head-to-head, Virtual Makers Fair event. Catch us…
Sunday
DIY Robocars via Twitter
RT @make: Find out the latest from @diyrobocars at 10am PT from @chr1sa of @3DRobotics on Virtually Make Faire! #makerfaire #maketogether #…
Saturday
DIY Robocars via Twitter
RT @Heavy02011: Join us Saturday online: Virtual Race League: @DIYRobocars Race #2 - Parking Lot Nerds https://t.co/aJUu4sdutx #Meetup via…
Saturday
DIY Robocars via Twitter
RT @donkey_car: Yay, we are part of the virtual @makerfaire with @diyrobocars. Come see our race or better yet train a model and race with…
Thursday
DIY Robocars via Twitter
RT @chr1sa: The @DIYRobocars Virtual AI Race is going to be part of the virtual @makerfaire on Sat! https://t.co/wnMDAboLID
May 20
DIY Robocars via Twitter
RT @tawnkramer: Please join us next week for our second DIYRobocars online race. We will be using a new Mountain Track course! https://t.co…
May 19
DIY Robocars via Twitter
RT @SmallpixelCar: I realized that the size of the cones in @diyrobocars is known. If we can detect the bounding box, which can be done wit…
May 19
DIY Drones via Twitter
RT @chr1sa: Our next @DIYRobocars autonomous car virtual race is this Saturday. Sign up here to compete or just spectate on @Twitch https:/…
May 19
DIY Drones via Twitter
Definitive Guide to Setup Drone Delivery System https://t.co/7ibwcgF24h
May 19
DIY Robocars via Twitter
RT @DAVGtech: The next @diyrobocars virtual robocar race is this Saturday. One of many interesting issues we are taking a stab at is "how c…
May 18
DIY Robocars via Twitter
RT @chr1sa: cc @DIYRobocars @donkey_car https://t.co/ewbyqZ3xC0
May 18
DIY Robocars via Twitter
RT @chr1sa: This is the technique that many of the @DIYRobocars racers use to estimate their localization position on the track https://t.c…
May 18
DIY Drones via Twitter
Fighter Hand throw fixed wing https://t.co/cwBPSsbePp
May 15
More…