Shop OBEX P1 Docs P2 Docs Learn Events
Design and build an interface to consolidate 8 PWM channels to one or two Serial chnl — Parallax Forums

Design and build an interface to consolidate 8 PWM channels to one or two Serial chnl

SeariderSearider Posts: 290
edited 2011-05-17 09:38 in Robotics
I think it might be interesting to walk through a design from idea to product for something fairly simple.
I hope I don't just start this then forget about it. I also wanted to use this forum format so that I could get feedback, suggestions, critique from anyone that was willing to spend the time to provide it.

This project is to build an interface that will take the 8 channels of PWM output from the Spektrum AR8000 and output serial data that can be read by a micro such as the Propeller. The primary value of this gadget is to reduce the number of pins needed by the Prop from 8 to 2 or possibly 1.

I plan to use this on one of my robot platforms so I can have a manual override using a remote control (Spektrum DX8 and AR8000)

General plan is
1. Design Requirements
2. Schematic
3. Breadboard
4. Software development
5. Finalize design (iterate back to step #1 as needed)
6. Design and fabricate boards
7. Build first article / Test
8. Iterate as needed
9. finalize documentation
10 Done.

So, here we go


Design requirements

1. Minimum of 8 PWM inputs
2. Board layout should allow the AR8000 to directly plug in without having to use a bunch of jumper cables
3. Output 1 should be constant serial stream of the values (0-2048) for each of the 8 channels then repeat
4. Output 2 should be an interactive and provide the current channel info on request
5. Board design should use Surface mount where possible (I want to learn to design and assemble surface mount boards)

I am still thinking of additional requirements and will update in the next few days. I would like to lock on the requirements in the next week.

Comments

  • SeariderSearider Posts: 290
    edited 2011-04-22 17:05
    Adding to the design requirements

    Design requirements

    1. Minimum of 8 PWM inputs
    2. Board layout should allow the AR8000 to directly plug in without having to use a bunch of jumper cables
    3. Output 1 should be constant serial stream of the values (0-2048) for each of the 8 channels then repeat
    4. Output 2 should be an interactive and provide the current channel info on request
    5. Board design should use Surface mount where possible (I want to learn to design and assemble surface mount boards)
    6. 3.3v output voltage regulator Input should probably be 5v
    7. 5v output voltage regulator input should be up to 12v.
    8. ability to easily bypass the 5v regulator and use off-board 5v source
    9. Both regulators need to be small low current and surface mount.


    I worry that the voltage regulators are going to take up as much board space as everything else. I will need to do some research about extremely small regulators for low current situations. In this case the 5v is needed to power the AR8000 and 3.3 for the Prop. I could just dictate that an offbord 5v source is required so only one regulator is needed. I might make that choice when laying out the board. I also feel like there could be some control features that could be added to the software but so far have not thought of any that would be useful or better done on this interface board than in the main robot processor.
  • SeariderSearider Posts: 290
    edited 2011-04-23 20:42
    I ordered a few Texas Instruments 3.3v LDO regulator in a surface mount package. TLV70033DDCT. $0.82 each from Mouser.

    I hooked up the AR8000 receiver and bound it to the DX8 this evening. It went without a hitch. I made 10 jumper wires that can plug onto the pins of the AR8000 and then tinned the other end so I could plug them into the PPDB. A quick look through the Object exchange and there was only 1 object for reading in a PWM signal. I am not sure if I will be able to use it as a starting point or not.
    Next step with the receiver is the characterize the outputs and answer some questions like
    1. Do all 8 PWM signals start at the same time
    2. Are they all in Sync with each other in some way?
    3. The data sheet says that the PWM has a resolution of 2048, what is the period of signal and what is the Pulse Width range?
  • JasonDorieJasonDorie Posts: 1,930
    edited 2011-04-24 02:10
    Generally the PWM signals from an rc receiver are staggered, but some (like futaba high end ones) overlap the signals. The signals have a min length of 1000uS, and a max of 2000uS (typically). 1500 uS is dead center, though again, this can vary a small amount by brand.

    I have a PASM RC receiver object that will read 8 channels with 1uS resolution. PM me if you'd like a copy.
  • SeariderSearider Posts: 290
    edited 2011-04-24 07:27
    Jason,

    Thanks for the info. My first look at two signals on the scope implied that they would be staggered, If that holds up after further testings then I could probably combine the signals with discrete components and save some trouble and cost. I will have to look into that. The documentation mentions a "high speed" mode that is only supposed to work with Digital servos. I am not familiar with the signaling differences between analog and digital servers. To speed things up I would think that they would use less than the standard 2ms signal length. I'll know shortly

    thx
  • JasonDorieJasonDorie Posts: 1,930
    edited 2011-04-24 11:00
    My guess is that high-speed mode just boosts the frame rate - standard servos get updates at 50hz. Some digital servos, like those used to control the tail rotors of stunt helicopters, can update much faster than that. A 2ms maximum pulse length could get you just under 500hz updates if you overlapped all the channel pulses. I don't think they'd need to change the pulse length. (I haven't actually looked, mind you...)

    Here's the RC input I spoke of - I found the original in the forums:
    http://forums.parallax.com/showthread.php?99010-RC-Receiver-pulse-reader
  • SeariderSearider Posts: 290
    edited 2011-04-27 13:50
    I've been a bit quiet due to other priorities. I was able to hook up my login analyzer to see all 8 output channels at once and I found that it was a mix of Staggered and overlapped. I also loaded the RC_Receiver.SPIN code that was posted by J.A.B. and referenced above by Jason. It worked perfectly. Bad news is no MIT license and J.A.B. only has 13 posts with none newer than 2/23/2008 so I guess it is unlikely that I could find J.A.B. to get permission :(

    Overall, not too big a deal, I was expecting to write my on driver when there was not anything in the OBEX.
  • JasonDorieJasonDorie Posts: 1,930
    edited 2011-04-27 18:10
    John Birkeland is still active over on DIY Drones. I'm sure he wouldn't mind you using his code, but you can contact him through his page here:

    http://diydrones.com/profile/JohnArneBirkeland
  • SeariderSearider Posts: 290
    edited 2011-04-27 18:13
    Super. Thanks Jason
  • SeariderSearider Posts: 290
    edited 2011-05-08 09:55
    OK, I am ready to start on the Schematic.

    I am making one design change. I am going to leave the 5vdc regulator off and require 5vdc from the host system. This will simplify the board and greatly reduce board space.

    Here are the Hardware Requirements

    1. Board layout should allow the AR8000 to directly plug in without having to use a bunch of jumper cables
    2. a DIP header that will have (two pins for each signal):
    A) 5v Input
    B) GND
    C) Output 1
    D) Output 2
    3. Surface Mount Components that I can assemble in my easybake oven (toaster oven)
    4. 3.3 LDO regulator for Prop (5v input)
    5. Xtal driven Prop
    6. LED Power indicator

    As always, I welcome comments,Critiques and Suggestions.
  • SeariderSearider Posts: 290
    edited 2011-05-08 11:52
    AR8000 interface schematic.pdfAttached is the first draft of the Schematic

    It is in PDF. I can't seem to upload the DipTrace Schematic format (.DCH)
  • SeariderSearider Posts: 290
    edited 2011-05-16 17:11
    I'm still here so don't give up on me. I receive my new Lathe a couple of weeks ago and it has taken most of my spare time (and some of my neighbors spare time) to move from the freight company dock to my carport, un-crate it then, using an engine lift, move into the shop via a 3'6" door way. Just yesterday I finally got the electrical connections make filled the gearbox with oil and started the 3 hour break-in sequence.

    So you don't think that I have completely ignored the AR8000 project. I have been starting to get ready for the PCB layout. This means selected the specific components. The ones that I am having trouble with are a 3 pin SIP socket that will mate with the Servo pins on the A8000. I got a couple of different versions today from Digikey but the molding on the AR8000 seems to be designed to allow only servo type connectors that have a notch in the corner. This is great for polarization but I cant find any of these "Servo" Connectors for PCB mount. As this is a low volume specialty item for me, I am going to take the AR8000 case apart and see what it would take to mill off or otherwise remove the bumps that match the notch and prevent a normal .1" 3pos SIP Socket from mating.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-05-17 09:38
    Michael,

    I've also had problems plugging 1.0" headers into RC equipment. I've noticed some receivers don't have the space between groups of three pins spaced at 0.1", just the space between each pin in a group of three uses 0.1" spacing. I ended up needing to have short lengths of wire with a separate connector to to each channel to connect my custom project to my receiver. I thought it would just be a matter of notching a SIP to make it fit (not the case).

    I've found some of the smaller receivers have all their pins spaced at 0.1".

    Good luck with your project.

    Duane
Sign In or Register to comment.