PDA

View Full Version : Need some help with a TX Deadine coming up this weekend.


ThePig0079
04-17-2008, 04:31 PM
Ok this is going to sound wierd, but I don't know if it is possible.
I would like to know if it is possible to program a T6EXAP Futaba to do some things.

Breifly, My brother is a Senior in a Electrical Eng. Program. He is building a fairly large submarine and make it R/C. He is using the above radio to control it. The way he has it set up the receiver is going to control some servos to rotate and a arm is going to hit some limit switches that he mounted beside the servo. The switches will send a signal to the CPU and it will actual control the axis of the sub. Up, Down Forward Back and Left, right.

What we are trying to find out if there is a way to limit the distance that each servo travels each way. He doesn't need it to be gradual movement. It just needs to rotate one way hit the switch and center and then the other way center.

I think it will be adjusted by setting the end points. Is it possible to do that. Am I thinking about this right.

If we need to I have the 9C super Heli TX radio that I use for my heli. Any help would be great.

Thanks

If you all are interested I posted some info about this project in the off topics under interesting project.

yaniel
04-17-2008, 04:41 PM
yes, use the end end point adjustments(epa). i think they go by a different name on futaba radios, might be atv, but i'm not 100% sure.

HFG
04-17-2008, 04:46 PM
Why not have the Rx feed the CPU/microcontroller directly ??? Using basic interrupts you can convert the PWM signal from the Rx into a proportional signal for the controller or you can threshold it.

ThePig0079
04-17-2008, 05:04 PM
Thanks for the response. Can you suggest a C language code that would helpe me to understand what you refering too. My understand of PWM is that it's a constant signal and not a varying signal other then how long it is off or on and not a voltage difference that could be used for threshhole voltage.

Jason

HFG
04-17-2008, 05:32 PM
Sorry i have forgotten everthing i learned about C many years ago. I have a class i TA/teach that has a project that uses this technique. We use accelerometers to measure angles and the output signal is a PWM signal. We use a 68HC11 to convert the PWM into a binary number before we use it to calculate the angle and display it.

PWM is a very common signal, it constants of a waveform that only has 0 and 1 BUT is not digital. The information of the signal in a PWM is stored in the duty cycle. The duration of the cycle is fixed but for how much of that cycle is 1 and how much of it is 0 is the information.

Duty cycle = Time on / Time on + Time off

so something like
10% |-|_________|-|_________|-|__________|-|__________
50 % |--------|_____|--------|_____|--------|______|---------|_____
90% |---------------|_|---------------|_|-----------------|_|---------------|__

Usually you know how long the total time is so you only need to record how long the signal is 1. We do this by using hardware interupts that when the signal goes high or low a subroutine in the software starts counting.

Our accelometers use a 100Hz cycle and 50% is equal to 0G , 0% is -2G and 100% is 2G. 100 Cycles works out to 1000 e-clocks on our controller, so if the signal is high for 750 e-clocks we know the duty cycle is 75% and thus 1G.

ThePig0079
04-17-2008, 05:53 PM
So your saying to read the input so that when it goes low for say 75% of the time before it goes back high would mean 2G or 50% would be 1.5G.

Thanks, That was a great reminder. And much needed infor. This project is due Tue this coming week.

Jason

HFG
04-17-2008, 05:57 PM
No with the accelerometers we use has negative acceleration, anything less then 50% is negative.

0% ------- 25% ---------- 50% ----------75% ----------- 100%
-2 ............-1.................. 0.................. 1..................... 2

The % is the Time on not off.