Shop OBEX P1 Docs P2 Docs Learn Events
16 Output Servo Board — Parallax Forums

16 Output Servo Board

DigitalDjDigitalDj Posts: 207
edited 2005-03-12 01:01 in Robotics
Hello,

1. Does anybody know the frequency of the pulses that come out of the 16 output·servo board?
2. Can the frequency of the pulses be changed?
3. Has anyone used this board·with a pc and·Visual Basic?
4. Is it hard to program Visual Basic to use this board?

Thanks,
DigitalDj
·

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-11 15:30
    Umm, without a part number or vendor (or link) we can't really know which "16 output servo board" you are referring to. Note that a Servo control signal normally sits low, and controls the position of the servo by pulsing high for some period of time before returning low. Typically, a 1.5 mSec pulse 'centers' a servo, a 1 mSec pulse is full left, and a 2 mSec pulse is full right. AND, these pulses need to be repeated every 20 to 50 mSec.

    so when you ask if the "frequency of the pulses" can be changed -- well first, you HAVE to change the width of the high portion, and second, what other frequency would you want to change?

    OK, I assume you mean this: http://www.parallax.com/detail.asp?product_id=28023

    Which is the "Parallax Servo Controller" or PSC. Since its input is serial based, you SHOULD be able to use it with VB, if you know any serial port programming. You will need a MAX232 to convert the PC's +- 10 volt RS-232 levels to the unit's 0 to 5 Volt levels -- adapters are available.
  • rounderrounder Posts: 18
    edited 2005-03-11 16:57
    Here is a link to a post I made a bit ago. I am using a bs2 and serial servo controller connected to pc. I wrote a quick and dirty app to control servos with my joystick. The code is there for both the bs2 and vb. This example uses·pin 16(programming pin) so no rs232 interface is necessary.·Hope it helps!

    rounder

    http://forums.parallax.com/showthread.php?p=527763

    ·PS Ignore the first post in that thread and concentrate on the second post with corrected and cleaned up code.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Is it supposed to smoke like that?

    Post Edited (rounder) : 3/11/2005 5:00:16 PM GMT
  • DigitalDjDigitalDj Posts: 207
    edited 2005-03-11 17:53
    Yes the Parallax servo board is what i was refering to, sorry!

    What i want to find out if i can use this board to control some l.e.d. light since the board uses Pulse Width Modulation. I just need to know if it can be used that way. I know most pwm circuits use over 1khz frequency for the pwm. I want to use rgb l.e.d's and do color mixing.

    Thanks,

    Kevin
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-11 18:35
    No, you cannot do that with the board; the PWM output is setup for servos. Each channel will output a pulse between 0.5 and 2.5 milliseconds every 20 milliseconds (fixed).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • DigitalDjDigitalDj Posts: 207
    edited 2005-03-11 22:14
    Jon,

    What is the difference between the SX28ac/dp pwm and the servo board pwm? I had a gentleman from Parallax that told me that i could use the servo board just for the pwm and control l.e.d's! I don't have to change the pulse width but i thought it would be nice that way i could compensate for color inconsistencies. I was using the PakV(SX28AC/DP) from AL Williams but was having problems with the address pins for multiple chip operation and one of the pins was blowing the chip. The PakV(SX28AC/DP) chip does proportional mode approximately 2uS time slice) or equal area PWM (duty cycle of a 512uS period).

    Thanks,
    Kevin
    <!--mstheme-->
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-11 22:41
    From what Jon is saying the servo board will not do what you want, the SX28 has full control over is I/O pins and therefore is capable of doing both equal area and proportional modes of PWM plus any other more complex modes of PWM you can dream of (writing your own code), Jon posted SX/B code to do 8 channels of PWM for the SX using SX/B in this thread: http://forums.parallax.com/showthread.php?p=520420·which should help you get started if you decide to go that route.

    I had tried to respond earlier but I was unable to find the thread using keyword search until I remebered Jon wrote it, then it was an easy find using Posted By searching.

    For full range control of LEDs you want 0-100 percent duty cycle PWM, the servo board having·the dedicated function of operating servos has limited functionality, I would venture to guess trying to use the servo board will give you a range of extremely dim to dim since its pulse duty range is between 2.5-12.5%

    One last thing, if you decide to design your own pwm chip using the SX28 you can get all 16 channels of PWM on the same chip with 4 pins left over for other interfacing needs.

    Post Edited (Paul Baker) : 3/11/2005 10:49:47 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-11 23:22
    DigitalDj

    You may have been told that you could use the PWMPAL for servo and/or other control because you can change the entire cycle -- on the PSC the only that that can be changed is the high-going portion of the cycle (low is fixed at 20 ms), and the high-side pulse has a limited range.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • DigitalDjDigitalDj Posts: 207
    edited 2005-03-12 00:09
    Nothing was discussed with the gentlemen from parallax on changing the pulse, they just said it would work for controlling the brightness of l.e.d's.·

    1. What will the difference do to the l.e.d's using the servo board pwm as compared to using the SX chip pwm? 2. Let's just say i want to do nothing more but control the brightness for now, will the servo board do the trick?
    3. Will the new servo board that will have usb connection be setup the same way?

    Thanks,
    Kevin
    ·
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-03-12 00:24
    Since the maximum pulse the servo board will put out is 2.5 mSec, and it repeats that every 20 mSec, then (since 2.5 is basically 10% of 20) you'll only get 10% "light" out of the PSC -- or less if you choose lesser pulse widths. The Servo board will NOT do the trick.

    A Servo board is for driving servo's, which have the signal requirements mentioned above. This stuff is not magic, you know, things have interfaces, and boards are engineered to support those interfaces. If you want to get creative, then things may or may not work. In this case, the PSC board will only drive LED's to 10% brightness. The new USB board will do that over a USB port -- still not what you want.

    You do need the PWMPAL, which CAN drive LED's to 100% brightness.
  • DigitalDjDigitalDj Posts: 207
    edited 2005-03-12 00:44
    Actually i need 24 outputs, that's the reason i started using the PakV(SX28AC/DP) from A L Williams but had trouble with the address lines which could become another subject of help. I want to control the circuit from a PC's serial port or usb. The PakV(SX28AC/DP) chip does what i want but to burn up 2 of them was $50.00. I tried to find out what was going on and narrowed it down to 1 address pin but couldn't get them to help in figuring out what was going on, thier not there to design the circuit or that's what i was told.

    ·
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-03-12 01:01
    As several of have said, the PSC will not work for what your trying to do. The PWMPAL will, but $30 for 4 channels = $180 for 24 channels. I remember your original post, and if I remember correct you were trying to drive it straight from serial or something like that. Your most cost effective solution is to continue with the PakV, but I understand you being reticent of continuing along that line since you keep burning them out. Another option is the purchase the SX development board (Complete for $129 (suggested) and·Lite for $99) which comes with 2 SX28s providing at least 32 channels if you want by minor modification of the code I pointed to earlier, and if you burn them out, they are under $5 to replace.
Sign In or Register to comment.