Author Topic: Server input  (Read 2330 times)

0 Members and 1 Guest are viewing this topic.

Offline JohnMTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Server input
« on: August 10, 2009, 01:42:58 PM »
Here is my application and question.

My son and I are RC (radio control) plane flyers. so I have in the pane a receiver that creates server sernals which goto the servos and control the plane.

I am wondering can the servo outputs on the controller be proggrammed for input so I can run the outputs of the RC receiver into the controller and in a pass throught mode just the controller would repeat the servo commands it got on the input to the output. In a controlled mode the controller could also modify the signals based on, maybe, a tilt, accelerometer.

So the basic questions is can the servro outputs be programmed to be inputs and can it pass through the signals?

Thanks

Offline wil.hamilton

  • Robot Overlord
  • ****
  • Posts: 207
  • Helpful? 6
  • rtfm
Re: Server input
« Reply #1 on: August 10, 2009, 02:08:53 PM »
yes, this seems like it would be possible. 

i'm not totally sure how a controller would read a PWM input (thats the kind of signal that is getting sent from the receiver to the servos).

you might be able to read this based using analog inputs on a microcontroller, i'm not positive though
use the google.  it's your friend.

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Server input
« Reply #2 on: August 10, 2009, 02:21:28 PM »
You can do that, it is just a matter of the controller to measure the pulse length and for it to output the processed pulse to the servo. In Arduino you can use pulseIn to measure the pulse and the Servo command to output the pulse.

Also there is code floating around the forum for measuring pulse length, but I forgot where it is.

Offline sonictj

  • Supreme Robot
  • *****
  • Posts: 416
  • Helpful? 11
    • Tim's Workshop
Re: Server input
« Reply #3 on: August 10, 2009, 05:59:24 PM »
I think the hardware input capture pins on the avr are designed for such things.  If you want to do multiple signals at a time this is probably the way to go.  I think the axon may support up to 4. 

quote from page 143 of atmega640/1280/2560 datasheet (atmega640 is the axon's chip )

Quote
The Timer/Counter incorporates an input capture unit that can capture external events and give
them a time-stamp indicating time of occurrence. The external signal indicating an event, or multiple
events, can be applied via the ICPn pin or alternatively, for the Timer/Counter1 only, via the
Analog Comparator unit. The time-stamps can then be used to calculate frequency, duty-cycle,
and other features of the signal applied. Alternatively the time-stamps can be used for creating a
log of the events.

Offline JohnMTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: Server input
« Reply #4 on: August 10, 2009, 06:11:50 PM »
Can't it be simpler then all this. If I just want to pass it through all I have to do is monitor the imput to the control from the receiver and when the line goes high raise the line on the output to the servo, and lower the output when the input goes low. The only concerns i how fast can 6 inputs be read and set.

This seems to be a simple passthrought of the receiver signals through the controller. Then if I canalso time the pulse I know where the servo is?

John

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Server input
« Reply #5 on: August 10, 2009, 07:31:24 PM »

Offline Truckstop

  • Full Member
  • ***
  • Posts: 93
  • Helpful? 2
  • I Void Warrenty's
Re: Server input
« Reply #6 on: August 11, 2009, 04:09:19 AM »
I have never used the avr and admit it might be a better way to go, But the basic stamp made by parallax has a built in command for PULSIN, and can be used for what your wanting. I have seen it done in a rc car, where they programmed it to create throttle control(rev limiting?) ithink to cap the top speed during competition so they could compete in two different class's with the same car.  i'm not sure how simple you want it but no matter what processor you choose you will haft to do a little programming /code writing, if you have never used a microcomputer before i think the parallax chip would be easiest but again thats an assumption in comparing the avr. also the car i was talking about used to be on the tower hobbie's website. they hada track out here on glisan street. pretty cool stuff...

Truckstop
The Mongoose: Natures Assassin
The Hyena: Nature's A$$hole
And.....
The Lemming: Natures Retard

Offline JohnMTopic starter

  • Jr. Member
  • **
  • Posts: 11
  • Helpful? 0
Re: Server input
« Reply #7 on: September 08, 2009, 04:09:12 PM »
thanks, i will look into this. I am a programmer but I prefer to keep the stuff that requires a lot of processing for a small gain is better in hardware.

Pulse widths in and out are better in the hardware. The planning of what these pulses do is for the microcontroller.

Thanks.

 


Get Your Ad Here