Variable Pulse Rate on a servo channel using a T9XR

tgy9x is a fork of er9x, and is the default firmware that is released by hobbyking on the Turnigy 9XR transmitter.
Post Reply
willworkforplastic
Posts: 2
Joined: Thu Sep 05, 2013 7:30 am
Country: -

Variable Pulse Rate on a servo channel using a T9XR

Post by willworkforplastic »

So I am doing a freebee for a friend, for a special affects application for education using a TX9R as the remote.

At this stage I am just playing around with companion9x using the simulate function to see what is possible, and the TX9R has stock firmware on it. So far I have got switches/sticks changing channel values with no worries. One last thing remains and it is the tricky one.

What I am after is a servo channel to switch on (100% value) (fixed time of either 0.1 or 0.2s) and then switches off (-100% value) for a variable time (0.2 to 1.0s) which is dependent on a stick or knob position. So far I have discovered the TIM function in the custom switches section, but it appears these will only take constants as values.

Does anybody know if what I am trying to achieve is possible with the stock firmware or another version of the firmware? Or is it a matter of brushing up on my C skills and hacking the firmware myself? Or coupling a servo to a pot and controlling a timer circuit.

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Variable Pulse Rate on a servo channel using a T9XR

Post by jhsa »

The timer in custom custom switches was upgraded to support less than 1 second in newer versions of er9x.. I think you would have to upgrade the firmware..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Variable Pulse Rate on a servo channel using a T9XR

Post by MikeB »

It should be possible. I don't have time just now, but you probably need a channel that goes up SLOW, and some custom switches that compare that channel output and control the real channel outputting a pulse. I hope to get to look at this later.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Variable Pulse Rate on a servo channel using a T9XR

Post by gohsthb »

Mike b had set up a mix once, which was then used to turn on a timer. This have the person a timer that counted down with a rate proportional to the throttle stick position. I'm only on my phone, so I can't do the search. It should be in here somewhere.
-Gohst
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Variable Pulse Rate on a servo channel using a T9XR

Post by Kilrah »

I would try something like the servo test template (see the channel that goes back and forth slowly), and use a custom switch to compare the channel's value to the pot. This could then activate another mixer.

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Variable Pulse Rate on a servo channel using a T9XR

Post by MikeB »

A starter, I've used eepe for er9x but I think all is the same on openTx:

CH9: +100% MAX switch(SW1) Slow(u4:d0)
CH10: +30% P1 Offset 100%
+35% HALF

Custom switch:
SW1: v1<v2 CH9 CH10

Channel 9 starts at 0% and slowly moves towards +100%, when it reaches the value of channel 10 it goes back to 0%.
Pot P1 controls the setting of channel 10.

Now you just need another custom switch that is ON when channel 9 is below some value and OFF otherwise. Then use this switch to control a channel sending a pulse.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
willworkforplastic
Posts: 2
Joined: Thu Sep 05, 2013 7:30 am
Country: -

Re: Variable Pulse Rate on a servo channel using a T9XR

Post by willworkforplastic »

Thanks all for replying, and MikeB your an F'ing legend!

The fact that you could ramp a channel continuously was the real key which unlocked the whole issue in my head. After that it was really easy, and I even found ways to cut down on hardware which was a real bonus. Now all I have to do is flash the TX9R when it shows up.

Anyhow again thanks all.

Post Reply

Return to “tgy9xr”