Jump to content

HogBox


Duckling

Recommended Posts

Wow, wow, wow.

 

Those panels look fantastic - and I'm considering doing something similar with the TM throttle (remanufacturing the faceplates) - looks like you did the LASTE panel - mind sharing more details about that was?

 

Color me jealous. Wow.

Link to comment
Share on other sites

  • Replies 117
  • Created
  • Last Reply

Top Posters In This Topic

Hi Guys. Been fiddling with the leftside panel including the VHFs/UHF and got em somewhat operational.

 

 

All freq inputs incl channel select are gray encoders to a mastercard. Remaining is also to code the displays off when the radio is off. Other opt is to include the ability to save each preset channel in a SIOC Var to have it pop up when flipping the channel switch in PRE mode (not an option in the SIM but can be added through SIOC)...

 

VHFs works as predicted as long as I "spin" each knob one way only, then the freq move one step at a time, Turning em the other way, the freq spins to the correct value but take a complete 360 degree first. In short I fail to findout how to code it correct ;-)

Happy if someone can point out how to get the "singelstep" to work in bort inc and decr values from a grayencoder.

 

That is looking excellent! I think most of us would find it hard to make those panels and not find a way to somehow integrate it with our flying pit while we do the rest. You must have the patience of a saint having it all there but not using it for flying :)

 

Anyway, about your question. I am using gray encoders as well, mine support 2 bit incremental or 4 bit absolute encoding. I am using 2 bit incremental as it's only using 2 pins instead of four and I only need to know which direction it is turning.

 

I don't have the behavior that when I turn the other way the dial spins all the way around to the next number.

 

Are you doing it like this? for the sencond freq select I would use the arguments

device = 55

button = 3012 (for turning clockwise or 3011 for anticlockwise, use the right one for direction)

value = 0.0 - 0.9 To get this value I read my digit displaying, e.g. 0-9 and

 

value = (digit +1) % 10 /10 (if incrementing)

value = (digit +9) % 10 /10 (if decrementing)

 

if you are not a C guy the % is modulus, that handles the wrapping around from 9 to zero and zero to 9. the modules give me the remainder after division, thats why for decrementing I add 9 then get the remainder after dividing by 10. It just saves me a few 'if's when checking the conditions around 9 and 0.

 

I am looking at your pics of the panels but I thought you said the panel was taller in real life, yours looks the same except the digits are obviously larger dues to the segment displays.


Edited by metalnwood
Link to comment
Share on other sites

Thanks Feed

 

ofouse but might missunderstand what you looking for.

Is it the Throttle "cut" or the home made Laste panel ?

 

(watch up for Laste plates that I have, these are a notch to "high" vs the real thing, can "remake" it if not found elsewhere)


Edited by Duckling

- - - -

Link to comment
Share on other sites

Thanks Avi.

 

I am looking at your pics of the panels but I thought you said the panel was taller in real life, yours looks the same except the digits are obviously larger dues to the segment displays.

 

Thanks. I very far from a C# guy... but longing to be there..

The trick I fail on, is to understand how to define how the value of the encoder in SIOC that define if the value increases or decrease.

I'm a copy-cat to the bones, As long as I have a simular path I can follow I seem to get where I want (but make obvoius misstakes down the way, hehe). But you gave me an idea.- Encoder value here is taken only on one of the connected points. I'll try to get the other connection defined as an input and and see if that gets me going (i.e. pushing the negative value into clickabledata.lua (as you see here. i'm for out LOL)

 

 

My VHF is slightly higher then real world but sure smaller then same shown in the SIM. Sorry for being unclear there. Check the pic attached. Left of comm1, I placed the real Lightpanel of the ARC-186 (partly overlays the IFF lower part)

700538997_VHFLightPanvsreal.jpg.c643b901ef984fd6ac067c71e54367bd.jpg

- - - -

Link to comment
Share on other sites

No problem, I thought at some point you had said the in game radio was smaller but I was going off memory. I will have to research before I cut out mine.

 

C# might be nice but I have to do it the older way, with 'C' no # on the end. I will need to write some software in the middle and may use C# there though.

 

If you only have one lead connected then you will have issues.. When you say one lead I assume you mean one additional as well as VCC.

 

The two bit encoder requires power + two leads and four bit requires power + 4 leads. If you look at the datasheet for your rotary you will see the values required to give to SIOC. I have never used SIOC so I can't help there but you will need more wires! :)

 

I am not sure how you got it to work with only one wire except to guess that it did not change value every time you turned it, only every couple or so?

Link to comment
Share on other sites

Is it the Throttle "cut" or the home made Laste panel ?

 

I guess it would be the throttle "cut" ... I'm planning to remove the electronics and fashion my own panels while still using the original TM handles & levers. I was just wondering if you had any trouble doing that, or any valuable tips to pass along.

Link to comment
Share on other sites

Hi Metal. Again. bad description from my side (having the kids run havoc nearby and dogs follow'em at same pace gets things a bit speeded ;-)

 

Gray encoders I use has three pins. Middle goes to grund and the left/right pins connects to two consecutives inputs on the mastercard. Pin 39 & 40 in this case.

 

In below example, SIOC Var "0050" get the encoder input from inputpin 39, and use the rotate function to increment/decr the Var 0049/VHFAM_CH_act by 1. (SIOC uses integer only, hence the conversion within exportsupport.lua) The lines below is to adjust the displayed value of the indicator itself to the Sim. (seen in the mirror, I should ofcouse used "ROTATE 0, 19, L0" instead to avoid the extra lines :doh:to adjust display settings)

 

Var 0049, name VHFAM_CH_act // PTR-ANARC186-VHFAM-PRESET

Var 0050, Link IOCARD_ENCODER, Input 39, Aceleration 1, Type 2 // PTR-ANARC186-VHFAM-PRESET_input

{

L0 = V0050

&VHFAM_CH_act = ROTATE 1 ,20 ,L0

L1 = &VHFAM_CH_act + 1

L2 = ROTATE 1 ,20 ,L1

&VHFAM_DSP_CH = L2

}

 

Var 0049 is in turn feed back into Oakes scriptpack and it's here I hit the "wall". In siocSupport.lua ref is

[49] = {SimpleRadioPre, 55, 1, 0.01, -0.01}, -- PTR-ANARC186-VHFAM-PRESET

 

and "SimpleRadioPre" is defined in ExportSupport as:

function Simple_radio_Pre(pValue, pDevice, pNumber)

GetDevice(pDevice):performClickableAction(pNumber + 3000,(pValue-1)/100)

end

 

I got a hunch that the solution whould be to in SIOC test for incr/decr of the encoder, and in ExportSupport.lua grab the inbound string, Use LUA to calc either pos or neg value and push it into the sim. Just haven't got the process on how-to working yet :joystick: but getting closer (hopefully)


Edited by Duckling

- - - -

Link to comment
Share on other sites

I guess it would be the throttle "cut" ... I'm planning to remove the electronics and fashion my own panels while still using the original TM handles & levers. I was just wondering if you had any trouble doing that, or any valuable tips to pass along.

 

Turn it belly-up and remove both plates and peek inside if not already. Easy on the cable connectors inside, they are easily broken. Toggles used by TM are flatpins soldered directly to the boards. Removing these with the crude tools I got is not an option, I'd risk the boards itself. Levers (L/R) are connected to pots in the base and the arm's not easily Modded without rendering the unit inop afterwords. The handles should be somewhat easier modified to fit either the real or an homebuilt base. Think it was Red that already made that and posted some pics of the process here somewhere.

 

Laste part with the TM is a single board with connection to the L/G horn silence button so that easier removed. LASTE PCB connects to mainboard with a patchkabel only. After I "cut" the base and the bottom plate, they need somthing to hold'em together. I used a long M3 bolt here.

Hope it can be of some help

 

cheers

Gus

- - - -

Link to comment
Share on other sites

Great work Duckling!

Win 10 64. GTX1080 ti 11 Gb, Intel i-5, 16 Gb ram, SSD 1,5 Tb, 2 Terrabyte HD, Monitor ASUS XG32V 144Hz, Slaw Milans Rudder Pedals BF109F :thumbup:, Joystick - HOTAS Warthog, Throttle - HOTAS Warthog, TrackIR V5. Pimax 5.

Link to comment
Share on other sites

  • 1 month later...

One step further though on the UHF Freq dials. As expected, the answer was right under my nose, LOL

 

By Using SIOC "LIMIT" instead of "ROTATE" function, it works ok (at least so far ;-)

 

What I still can't figure out is how to to trigger left OR right mouseclick-action based on the encoder output.

Most greatfull if anyone that can show me how to solve this quiz ? My coding skill sucks ;-/

 

 

As an example:

 

The VHF Channel select wheel

Var 0651, name VHFFM_CH_act // VHFFM_PRESET_CHANNEL_SELECTOR

 

Var 0677, name VHFFM_CH_PRE, Link IOCARD_ENCODER, Input 57, Aceleration 1, Type 2 // PTR-ANARC186-VHFFM-PRESET_input

{

L0 = &VHFFM_CH_PRE

&VHFFM_CH_act = ROTATE 0 ,19 ,L0

&VHFFM_DSP_CH = &VHFFM_CH_act + 1 (ignore this line, its the value parsed to the 7 segm disply)

}

 

 

Having the following in SiocSupport.LUA:

[651] = {VHF_CH_Select, 56, 1, 2, -0.01, 0.01}, -- PTR-ANARC186-VHFFM-PRESET

 

i.e I need to get a value from SIOC that state if the last movement of the encoder was clockwise or counter clockwise. Problem is (I think) that the pValue sent is absolute instead without directional info

 

So I could make something like this in exportsupport.lua:

 

-- VHF_CHANNEL_SELECT

 

function VHF_CH_Select(pValue, pDevice, pNumber1, pNumber2, pType1, pType2)

 

 

local pVal, pNumb, pType

 

if pValue < 0 then

pNumb = pNumber1

pVal = pType1

elseif pValue > 0 then

pNumb = pNumber2

pVal = pType2

end

 

 

GetDevice(pDevice):performClickableAction(pNumb + 3000,(pVal * pValue))

end

 

 

or..

GetDevice(pDevice):performClickableAction(pNumb + 3000,(pVal * (math.abs(pValue)))

 

Tried (with best effort and failed) to use an extra SIOC Var that was updated with the last selected channel to compare the next value from &VHFFM_CH_act, and assign a negative (leftclick) or positive value to the pValue.

 

Code for those attempts not shown here though

 

Cheers

Gus


Edited by Duckling

- - - -

Link to comment
Share on other sites

Finally got the extension cables to connect existing mastercards to the USB expansion boards on both left and rightside panels.

 

HOGBOX_120415_1.jpg

 

 

All quads in place now connected and interfaced (not OXY of obvious reasons, need a small trigger in place first) but some still missing as you can see as the CDU (don't forget me now y2kiah :-) , the outer topside quads (I hate all these angles :devil_2:, I never get these correct but still trying) and the fillers on the rear both sides.

 

Rest of the switches works but a few mentioned glitches and the ILS/TACAN 7-segm displys to where an extra card just been ordered.

 

What you think of my "ACESII" chair ? Wify suggested a rocking chair instead. Would surve me better according to estimated timespan to when this rig will be finnished (if ever)

 

Some pics of the cabling mess from underneath the rightside panel.

 

HOGBOX_120415_2.jpg

 

HOGBOX_120415_4.jpg

 

(ignore the rust stains on the pics above, it's proof of old age and will be taken care of when paintjob starts, will not say when though :-)

 

Cheers

Gus

- - - -

Link to comment
Share on other sites

Thanks guys. Far from finnsihed but it's a great feeling just to try out the startup sequence and find (allmost) all things working. Caution light pops up in correct sequence etc :-)

 

Found out another nice thing, -A model differs from -C model on the Caution panel text, LOL, so back to Visio (in my case) again.

 

Cheers

Gus

- - - -

Link to comment
Share on other sites

Can anyone recommend me an USB connectable board that handles many A/D converters ? And can use LUA in some way ?

-- Edit: Got one of Brydlings boards (13 A/D ports), that was intentially planned for other purpose... Will redirect it to here and try it out.---

 

Got at least 25 pots on the left/right panels outside the scoop of available ports on my existing Opencockpits USB expansion cards (THAT was a too long sentence ;-)

 

(There is an option on the Mastercards that uses 8 digital ports per pot but the expense total goes to high) and portcount alone is beyond the available limits

 

Thanks

Gus


Edited by Duckling

- - - -

Link to comment
Share on other sites

Hi Gus,

 

I have a quick question, your idea to display the frequencies is excellent!

 

Could you tell me or give me the link of the website or you bought your displays?

I'll use your idea if you do not mind?

 

Thank you Gus!

 

I'll be given your picture:

 

HOGBOX_VHFs_20120310_1.jpg

 

R1

Link to comment
Share on other sites

Hi R1

No problem at all :-). Just check if the size of these are what you looking for. They are bigger then the original. It was the smallest size I could easily get hold of but still pretty high.

 

I got these from ELFA 75-506-92, Everlight ELS-315GWA (Green). Just checked and ELFA stat'em as discontinued. https://www.elfa.se/elfa3~se_sv/elfa/init.do?item=75-506-92&toc=0

 

If you find em somwhere and want to use'em, the EagleCAD file for the PCB is attached (.zip) below. I made a misstake in first run that is corrected in the attached post. It's a one side board (the wiring that is :-) A few homemade patches is needed both to enable one of the 7segm units and also for the decimalpoint. It's a real "quick and dirty" job but might be usefull. Baseplate is far from exact and a few parts has been widened.

 

(Note that the PCB is made for Common Cathod type of 7 segments)

 

Ping again if questions or clarification if needed

 

Cheers

Gus

HOGBOX_COMPanMain_v1.1.pdf

Visio-L10_COMM_v0.5.5_subsection.pdf

HOGBOX_COMPanMain_v1.1.zip

- - - -

Link to comment
Share on other sites

  • 1 month later...

Hi. Been a long time since last post due to some 'problems' popped up that I been unable to 'solve' uptil know, turned out to be most simple solution then I though at first glance. Might be helpfull to avoid others going down the same road.

 

 

 

I currently have 2 USB Expansioncards with 3 Mastercards connected to first and 2 MCs the the second.

System was unable to detect switch inputs on the last pin on all groups on both J3 and J4 sockets on two of the MCs. Since I soldered all boards but one and most Quads are connected in parallell with a least one other, I assumed I made an err somewhere (usually the case when somethings not working, :cry:).

 

After countless hours ohm-checking connections, solderpoints, and quads soldering there was only one thing left.

 

The cause..? - the parallell extension cable between the USB and Mastercards !

Since these was prefab I trusted them and didn't gave'em a thought until all other options was excluded.

You heard the "assumptions is the mother of all ****ups" ?

It sure it me in the face :doh:

 

Ribbon cables was missing pin 17-22 (signal ground pins) + shield. Guess these pins should be connected to some of the others in backend of the PCB connector somewhere but not in OC case. Ordered a load of fresh cables from an eBay dealer with all pins connected and now it works

 

Cheers

Gus


Edited by Duckling

- - - -

Link to comment
Share on other sites

  • 2 months later...

Quiz to me grabbed from another thread to here to avoid derailing :-)

(Ignore bad spelling grammar please)

 

Hi Duckling,

 

Could you tell me detail of SIOC?

 

e.g. Whether is use this one master card?

http://www.opencockpits.com/catalog/master-card-p-29.html?cPath=21_27

 

e.g. with need which card?

e.g. use what software?

e.g. master card can for what of A-10C?

e.g. How to setup?

e.g. in your website's ARC-186 Radios + Parts tatorial that is how to connect and solder? which pin solder somewhere?

 

Thank you

 

Hi Moken. I'll try with best effort. Not sure I understood you correctly but ping back if not. But prior start, verify what you aim for. If it's a DCS only pit or panels you plan to build, I'd select Helios and a standard USB I/O Cards as Brydling or Leos (to name a few of those avalible)

 

Could you tell me detail of SIOC?

 

e.g. Whether is use this one master card?

http://www.opencockpits.com/catalog/master-card-p-29.html?cPath=21_27

 

To avoid missunderstanding (ignore if already known)... SIOC is an event driven database used to control I/O by a script based languaged controll cards of OC. Through SIOC, you can address Opencockpits cards and modules (as far I know all of'em) of which the mastercard is one of the options

 

The mastercard itself as base product, a generic card for digital input and output ports. Check OC for for additional info as extension bus and optional cards.

 

e.g. with need which card?

To connect the Mastercard to your PC, you nowadays need the USB expansion card. This enable you to address 4 Mastercards. If additional Mastercards is needed, get an additional USB expansion card and up to four USB Expansion cards can be served by one SIOC server.

 

 

e.g. use what software?

Here's where it get a bit more tricky depending on what mean. In Short, look at SIOC and OpenCockpits card as an 'closed' environmet. To communicate with this 'box' from outside applications you need a toolset as Oakes scripts (for DCS) or FSUIPC for MS FlightSim. But within SIOC and by use of OC cards, you can set up allmost any rules you see fit.

 

e.g. master card can for what of A-10C?

Sorry, could you rephrase the question if not already answered above

 

e.g. How to setup?

Install SIOC, Connect the USB Extension card and the Mastercard to first slot (See Open cockpits docuementation for both these)

From the Mastercards input/output blocks. Connect your switches, rotaries etc and verify connectivity.

Within SIOC.ini use the templates to define what cards you have installad and on what USB ports. Check SIOC documentation of how to set up your set of connected cards

 

To get DCS communicate with SIOC, you can use Oakes scripts. Note that this will give you the basic setup and on top of this you need to setup what functions and commands that will be communicated between DSC/SIOC

 

e.g. in your website's ARC-186 Radios + Parts tatorial that is how to connect and solder? which pin solder somewhere?

Don't get upset now but the quick answer is.. as you like. Remember that you have a freedom of were to connect each switch/encoder, toggle pins to what portnumber on the mastercards ports. I use Excel to document and track each connection within the Pit. (I uploaded the lastest copy for reference, just remamber that there is a few inconsistencies and also it's a working subject to change ;-)

 

The VHFs are found under 'MC1-J4' (Mastercard nr 4, Input block J4)

Second Column in there state what function is connected to what pin on the 'In/output connection board' and the green is the input number addressed by SIOC.

 

I use gray encoders for frequency setting and preset channel, Rotaries for mode and op settings. As long all needed pins from each individual switch/encoder Rotary pins within the 9-pins input group of the mastercard.


Edited by Duckling

- - - -

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...