which teensy for 12 axes?

skypickle

Active member
I need a controller for the lights and dials in my aircraft sim. Is it possible/recommended to use a single teensy for this? or do I have to build two boxes? Which teensy?
 
Not much anyone can say based on what you've told us. If you describe your project in more detail, you would be more likely to get an answer.
 
Assuming JOYSTICK interface is the plan?

Teensy 3.x and 4.x seem to default to 12 with posts indicating edits to bump that up.

Forum search "joystick sim" gave many threads - scanning them might give answers.

Depends on what is at hand or available - ideally either would work ... didn't follow any threads on T_LC in use
 
Is the driver in Windows able to do more than 8 axes?

If you edit the JOYSTICK_SIZE line in usb_desc.h for extreme joystick, it gives many axes. The joystick test programs in Linux recognize them all. But so far I've only ever seen Windows able to see 8 of them, using the Joystick control panel. Maybe other Windows programs can see more than 8?
 
what does this mean? I will have 12 dials (either pots or encoders).

They were guessing that when you said axes, you were referring to a joystick. When you first mentioned dials, you didn't say what type of input. If you need 12 analog inputs, I think any Teensy will do it. If you need 12 encoder inputs, you probably need T3.5, T3.6, or T4.1. Take a look at the product pages at pjrc.com.
 
They were guessing that when you said axes, you were referring to a joystick. When you first mentioned dials, you didn't say what type of input. If you need 12 analog inputs, I think any Teensy will do it. If you need 12 encoder inputs, you probably need T3.5, T3.6, or T4.1. Take a look at the product pages at pjrc.com.

Indeed, keying on p#1 "I need a controller" and the follow up in p#3 "12 axes in windows." it seemed the goal was a Joystick device type controller feeding into a Windows machine.

If it is other that isn't yet clear. And as @PaulStoffregen notes it seems Windows only expects 8 X-Y Axis devices on a joystick device - though it can also have a larger number of buttons ... 128?
 
Using the EncoderTool (https://github.com/luni64/EncoderTool) you can easily multiplex rotary encoders and their pushbuttons which reduces the number of needed digital pins significantly. Here some examples, schematics and boards showing how to use different multiplexer chips for encoders: https://github.com/luni64/EncoderTool/tree/master/extras

WOW!
I just fell into a labyrinth. thank you. After i get my bearings, i might be able to ask an intelligent question. Some drawings however are opaque
https://github.com/luni64/EncoderTool/wiki/Connecting-Encoders
 
@ everyone who answered already
thank you educating me. I used the word 'axes' because that's how analog inputs are represented in windows , as an 'axis'. Also that's how DCS (a flight sim) labels them. Sorry if that means something different. I also understand that most game controller coders usually think of a joystick because that is the most commonly used analog input. When i say axis i mean a continuously variable input, like a joystick, a throttle, brake pedals, rudder pedals, lighting dials, radio tuning knobs. since i am limited to 8 analog inputs per device, 2 teensy LC chips might be sufficient. But then i would need two usb cables-or maybe put a small usb hub in the box containing the dials.

@ luni from the page you linked
https://github.com/luni64/EncoderTool/wiki/Connecting-Encoders
the CD 4067 looks appealling. two of those can give 16 dials. but since windows can only see 8 analog inputs per device, i do not see how that would work. I have an inkling of how this might be coded-but i'd have to study some examples. If windows sees only 8 analog inputs per device, would i need a switch to use each set of 8 dials? that would be inconvenient-i would have to flip a switch to use each bank of dials. or maybe i misunderstand how these work
 
@ luni from the page you linked
https://github.com/luni64/EncoderToo...cting-Encoders
the CD 4067 looks appealling. two of those can give 16 dials. but since windows can only see 8 analog inputs per device, i do not see how that would work. I have an inkling of how this might be coded-but i'd have to study some examples. If windows sees only 8 analog inputs per device, would i need a switch to use each set of 8 dials? that would be inconvenient-i would have to flip a switch to use each bank of dials. or maybe i misunderstand how these work

Reading out encoders and communicating the values to the PC are two completely different stories. You don't need to add 16 encoders to the 4067, 8 will work just as well. Or you use the 4051 which is a 8bit version. There are examples showing how to use the library, you can also ask here or at the gitHub repo in case you have questions about the library

Regarding your flightSim questions I have to admit that I have no clue about this. But I'm sure there are a couple of flightSim experts around who can help you. Be prepared for some learning curve if you never did anything like this. But folks here are friendly and patient... :)

Edit: see e.g. here: https://www.pjrc.com/737-300-flightsim/
 
thank you luni for your fast reply. from your answer i surmise that a multiplexer allows more than 8 analog inputs to a teensy. but i am having a hard time understanding how that might work in windows. i can however understand if someone needed for example 16 dials to control 16 hardware outputs directly.
 
@ everyone who answered already
thank you educating me. I used the word 'axes' because that's how analog inputs are represented in windows , as an 'axis'. Also that's how DCS (a flight sim) labels them. Sorry if that means something different.

Ah, interesting - I've seen "axes" used for CNC machines referring to an indepedent movement axis on
the machine. Channel is the generic term for inputs and outputs, but I can see that specific to joysticks
"axis" makes sense, but they weren't mentioned. To me "dial" means "indicator dial", ie output device,
not input (unless an old-fashioned telephone is involved!)

"Controller for the lights and dials in my aircraft sim" didn't suggest input devices to me, so I didn't really
understand the OP.
 
What FlightSim are you using? If you are using FlightGear or X Plane then you can have as many as you need. I've seen sim cockpits with hundres of buttons, dials, displays on these sims. In fact those sims are sometimes used by NASA and the FAA for real cockpit Simulation. They use USB to communicate Serialy, also over UDP with ethernet. Just search out FlightGear Arduino and you will get 46K links to the FlightGear Wiki and probably some irelivent links too. FlightGear and X Plane use the same methods so everything regarding FlightGear should also work with X Plane. You have alot of work ahead of you but the quantity of buttons, dials, axis's, etc... is just a matter of sending the appropriate data from/to whatever device/micro you make.

Here are some links (Any Microcontroller will work, but they all refer to Arduino, teensy should work just as well):

https://wiki.flightgear.org/Howto:Use_Arduino_with_FlightGear
https://playground.arduino.cc/Main/FlightGear/

As long as your sim can accept a serial or ethernet controller connection and is WELL DOCUMENTED you shouldn't be limited at all.
 
What FlightSim are you using? If you are using FlightGear or X Plane then you can have as many as you need. I've seen sim cockpits with hundres of buttons, dials, displays on these sims. In fact those sims are sometimes used by NASA and the FAA for real cockpit Simulation. They use USB to communicate Serialy, also over UDP with ethernet. Just search out FlightGear Arduino and you will get 46K links to the FlightGear Wiki and probably some irelivent links too. FlightGear and X Plane use the same methods so everything regarding FlightGear should also work with X Plane. You have alot of work ahead of you but the quantity of buttons, dials, axis's, etc... is just a matter of sending the appropriate data from/to whatever device/micro you make.

Here are some links (Any Microcontroller will work, but they all refer to Arduino, teensy should work just as well):

https://wiki.flightgear.org/Howto:Use_Arduino_with_FlightGear
https://playground.arduino.cc/Main/FlightGear/

As long as your sim can accept a serial or ethernet controller connection and is WELL DOCUMENTED you shouldn't be limited at all.

Dcs.

My understanding is that I can expand digital io up to128 buttons but that windows has a hard limit of 8 analog inputs per usb device.
 
Does DCS support protocols other than ordinary HID-based game controllers?

X-Plane supports plugins with a well documented SDK to create them. Several years ago I created the TeensyControls plugin which talks HID protocol and allows variables (C++ class instances) to link with X-Plane "dataref" variables in the simulator. But that is all very specific to X-Plane.

I have no idea what DCS really supports. Do you know?
 
I did some research but did not find any clues. I asked on the DCS forums so we’ll see. Thank you for pointing this out, I didn’t know that about xplane
 
Back
Top