Adapting a real KT76A transponder for AM

Working on a instrument project or just finished a project? Show it to others!

Moderators: russ, Ralph

Message
Author
ChuckK
Posts: 95
Joined: Sun Nov 06, 2016 2:33 pm

Re: Adapting a real KT76A transponder for AM

#11 Post by ChuckK »

No, Im not using the Carenado Malibu. I had a aerodynamic model made with no panel, no automation, and no viewport to the outside. No need for all of that over head. I routinely get 100 fps+ on my main computer.

Here is a pic of the front of he KT76A with the panel removed. There are 2 back lights along with some reflectors. Note the unit is upside down on the bench. So the dial back light is at the top.
image.png
I have never seriously looked into weather radar. I fly with Foreflight which gives you Nexrad which works well enough.

Chuck

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Adapting a real KT76A transponder for AM

#12 Post by jasong »

Hi Chuck I was wondering if you could please post your code or PM it too me. One of the radio projects I'm working on has me stuck and I'm wondering if the dials work like yours.
Thanks.

ChuckK
Posts: 95
Joined: Sun Nov 06, 2016 2:33 pm

Re: Adapting a real KT76A transponder for AM

#13 Post by ChuckK »

In lieu of just trying my code, May I suggest you use a DVM to map out the pins on the switch as the switch is rotated. Once that is done the code can be written. Just look for continuity to ground for each pin at each switch position.

As an example on the S-tec 55 the VS selector is a 12 position switch wired such that there are only 3 output terminals. They sequence A-B-C-A-B-C-A-B... when the dial is rotated. With this knowledge, code can be easily written to determine the direction of each click. The KT76 transponder uses a 3 bit selector to resolve the 8 dial positions (2^3 = 8), simple coding but totally different from the S-tec.

Post your findings and I'd be happy to help you along.

Chuck

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Adapting a real KT76A transponder for AM

#14 Post by jasong »

Hi Chuck thanks for reply, and offering help.

I believe the rotary dial to be similar as how you describe the S-tec55. It rotates 12 clicks and there are 3 outputs that’s go to the Arduino and one to the ground. The only thing I'm unsure of is in the photo below, I haven't been able to find a pin for it nor figure outs its purpose.
circuit.jpg
They sequence A-B-C-A-B-C-A-B... when the dial is rotated. With this knowledge, code can be easily written to determine the direction of each click.

So in AM writing code I get the switch/dial to call back it’s position which is 0 , 1 , 2 , 0, 1, 2.. as it's rotated.
With this knowledge, code can be easily written to determine the direction of each click.
Oh hmm.... I really don't want to disclose the time I've spent trying to figure this out. :( :oops:

I can code AM with in the function statement of the switch moving, I can detect the starting position (which could be 0,1 or 2) and increment a counter positive (for CW). But I don't know how to decrease the counter negative (for CCW). I don't understand how in the function to do this.

I don't understand how to write an expression that checks if a number was 0 and in now 2 then its a negative movement for example.

Thanks and Happy new year! 1hr to go

ChuckK
Posts: 95
Joined: Sun Nov 06, 2016 2:33 pm

Re: Adapting a real KT76A transponder for AM

#15 Post by ChuckK »

Its quite easy to determine the direction.

At the end of the callback function write the switch position value to a local variable. Then when the callback runs the next time as the switch is moved to the next position, compare the new switch position to the previous position, if its greater then it went one direction if its less it went the other direction. I'll post the portion of my stec code that does this exact thing this afternoon when I get home from work.

Chuck

ChuckK
Posts: 95
Joined: Sun Nov 06, 2016 2:33 pm

Re: Adapting a real KT76A transponder for AM

#16 Post by ChuckK »

Here's the section of code from the Stec55 for the VS dial.

Code: Select all



function new_vs_dial(new_pos) -- the VS dial on the stec55 is actually a 12 position switch wired to send groups
                              -- of 3 signals as its rotated, i.e. A,B,C,A,B,C,A....
	print(new_pos)
	if     new_pos == 1 and old_pos == 0 then xpl_command("sim/autopilot/vertical_speed_up")
	elseif new_pos == 1 and old_pos == 2 then xpl_command("sim/autopilot/vertical_speed_down")
	elseif new_pos == 2 and old_pos == 1 then xpl_command("sim/autopilot/vertical_speed_up")
	elseif new_pos == 2 and old_pos == 0 then xpl_command("sim/autopilot/vertical_speed_down")
	elseif new_pos == 0 and old_pos == 1 then xpl_command("sim/autopilot/vertical_speed_down")
	elseif new_pos == 0 and old_pos == 2 then xpl_command("sim/autopilot/vertical_speed_up")
	end
	old_pos = new_pos	
end

vs_dial_id = hw_switch_add("ARDUINO_MEGA2560_F_D46", "ARDUINO_MEGA2560_F_D47", "ARDUINO_MEGA2560_F_D48",new_vs_dial)
local old_pos = hw_switch_get_position(vs_dial_id)
You should pretty much be able to just substitute the xpl commands you need.

Chuck

jasong
Posts: 101
Joined: Sun Oct 20, 2019 8:18 am

Re: Adapting a real KT76A transponder for AM

#17 Post by jasong »

Hi Chuck thanks for your help sorry for the delayed reply been busy at work this time of year.
It's helped a lot now I think I can move on to looking at the digit displays for the MAX7219.

Ron K
Posts: 2
Joined: Fri Jan 28, 2022 8:46 pm

Re: Adapting a real KT76A transponder for AM

#18 Post by Ron K »

Hi Chuck,
I saw your Kt76a on Russ Barlows video :) .
I wanted to thank you for getting me into cockpit building since this is my first instrument ever.

Since you told they are getting cheap i started looking at ebay for one. Just two days later one was listed as broken for free.
I decided to get it, buy Air Manager and started the work. One month later the project is finished.
Luckily i had some help with the code from my brother, otherwise it would have taken much longer.

The difference to your kt76 is that i printed an enclosure to get it smaller (it will be painted black later). I also switched to the Raspberry Pi Pico after it all worked with the Arduino Mega.
The Ident and normal lights are still the stock lamps, no leds. Thats why i do have a 12V connection at the back.


IMG20220128203718.jpg
IMG20220128203724.jpg
IMG20220128190530.jpg
PS: your Cockpit is awesome :),
Ron

ChuckK
Posts: 95
Joined: Sun Nov 06, 2016 2:33 pm

Re: Adapting a real KT76A transponder for AM

#19 Post by ChuckK »

Looks awesome Ron, nice work. Next you can look for a KMA24 audio panel. Inexpensive and Very easy to interface

Chuck

And thank you to the compliment on my panel. I honestly get as much enjoyment building and upgrading as flying. It’s a great hobby. :)

Ron K
Posts: 2
Joined: Fri Jan 28, 2022 8:46 pm

Re: Adapting a real KT76A transponder for AM

#20 Post by Ron K »

That's the plan :D
Audio Panel and AP Panel will be next.
Even though i don't have the space for a homecockpit, i still can try to build the instruments.

Ron

Post Reply