Jump to content

Controlling minature servos (Hitec HS485HB) directly from transistor outputs

Ian B

Recommended Posts

I am trying to hookup some servos for valve control. The servos I have, require three pulse train parameters to output the control action: 600usec, 1500usec and 2400usec to give me -90degree 0 degrees and +90 degrees action respectively.
Looking at the specs for a standard transistor output card (UID-0016T) these seem to able to switch at up to 80us which seems plenty fast enough. I thought I may be able to drive these directly by using a looped timer set at the respective times of 0.6ms, 1.5msec and 2.4ms, but it seems I cant get that resolution(<1ms) out of the timer? Do you know if there is another way to hook these servos up directly to an output card, or obtain timing output of 0.1msec resolution? I don’t think the Unistream system has a pulse train output card, and I am not sure if I could configure a high speed out card either?
My fallback alternative is to use a serial controller for the servos and send out serial commands instead (but I don’t think this solution is as robust). Being new to PLC programming I just wanted to see if anyone had encountered controlling these servos before.

Link to comment
Share on other sites

Ok, so I managed to get this working with a High Speed Output card using PWM, with a frequency of 50 Hz and pulse widths as quoted above.
This is not exactly high speed, so I wonder is there a PWM function for the Unistream/Unilogic system using a standard transistor output card? If so could someone show me how to access it or an example?



Link to comment
Share on other sites

  • 3 weeks later...

Hi Ian B.

I found next link with pulse timing


Which refers to 180° Servo Stretcher


And there is no data about pulses period or frequency.

I will suggest to you to use UniStream UID-0808THS module in PWM mode.

PWM mode require to set Frequency, Duty Cycle and Run/Stop.

Approximation of period will be the next:

Pulse Width 1500 uSec is for middle position.

1500 uSec*2=3000 uSec. This is a Cycle Period.

Frequency = 1 Sec/3000 uSec=333.3(3) Hz.

*You can lower frequency to one which have rounded number.

For calculated frequency (333.333 Hz)

-for -90° PWM Duty Cycle=600/3000=0.2. 0.2*1000=200. You have to use number 200.

-for 0° PWM Duty Cycle=1500/3000=0.5. 0.5*1000=500. You have to use number 500.

-for +90° PWM Duty Cycle=2400/3000=0.8. 0.2*1000=800. You have to use number 800.


Duty Cycle encoded in range 0 to 1000. 0 = 0%. 1000 = 100%.


I hope this helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...