Dual rotary encoders in Knobster and other (Arduino based)

Are you building a cockpit, planning to build one or just dreaming, this is your cockpit builder meeting point

Moderators: russ, Ralph

Message
Author
User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: Dual rotary encoders in Knobster and other (Arduino based)

#11 Post by Corjan »

Hi,


We did have issues with Knobsters skipping ticks.

It seems to have to do with certain USB 3.0 hubs.
Try to plug in your Knobster directly in your computer, although that is not a guarantee since computers have internal USB hubs also...

I tried to get to the cause of this issue, but was unable to do, partially because on our systems it works fine.


Sorry for the trouble,

Corjan

p.s.: This has nothing to do with interrupt vs polling.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Dual rotary encoders in Knobster and other (Arduino based)

#12 Post by jph »

Detlef wrote: Tue Jul 13, 2021 2:00 pm
I do not want to build Knobsters. My intension is to put about four dual and two single rotary encoders in my hardware panel. I am not sure whether an Arduino Mega is fast enough to scan the encoders. In addtion it will scan other buttons, set LED states and communicate with the PC.

In general my impression is, the Arduino is darn fast. That was my impression, coming from a very old controller (called BASIC stamp) I used in my old cockpit.

Detlef
Hi Detlef,
Just to clarify ? are you wanting to build a hardware panel with multiple encoders etc - and use the AM arduino or other in built AM 'flash' for everything ?. or are you thinking of using a custom messageport ? - I am thinking you are probably talking about multiple dual / single encoders on a 'normal AM 'flash' image ? (ie: - nothing directly related to knobster apart from how it may function for reference ?)
The MEGA has a great processor, with a super range of I/O however, the Raspberry PICO is way way faster - no fair comparison really) and could be a perfect option if using the AM PICO flashed image. They are also really cheap (about 5 euro ). 2 PICO units offer more I/O for things you are talking about than a single mega at about the same price. The only thing the PICO is let down on - comparatively - is ADC inputs. But again , multiple units are still really cheap.
As to if it will still miss steps.. well, if it did - it is 99.9% certain to be software related.
Joe.
Joe. CISSP, MSc.

Detlef
Posts: 303
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Dual rotary encoders in Knobster and other (Arduino based)

#13 Post by Detlef »

Ralph,

I think I have the latest plug-in, Under Xpland plugins I have a directory Air Plugin dated May 7 2021. I installed all Airmanager updates.
I am not sure how to test the Knobster connection with print commands. Create an instrument with a dial and then print inside the dial callback function?

Thank you
Detlef

Detlef
Posts: 303
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Dual rotary encoders in Knobster and other (Arduino based)

#14 Post by Detlef »

jph wrote: Wed Jul 14, 2021 9:04 am Just to clarify ? are you wanting to build a hardware panel with multiple encoders etc - and use the AM arduino or other in built AM 'flash' for everything ?. or are you thinking of using a custom messageport ? - I am thinking you are probably talking about multiple dual / single encoders on a 'normal AM 'flash' image ? (ie: - nothing directly related to knobster apart from how it may function for reference ?)
The MEGA has a great processor, with a super range of I/O however, the Raspberry PICO is way way faster - no fair comparison really) and could be a perfect option if using the AM PICO flashed image. They are also really cheap (about 5 euro ). 2 PICO units offer more I/O for things you are talking about than a single mega at about the same price. The only thing the PICO is let down on - comparatively - is ADC inputs. But again , multiple units are still really cheap.
As to if it will still miss steps.. well, if it did - it is 99.9% certain to be software related.
Joe.
Hi Joe,
I have three slots in my overhead panel still free. So my intention is to have 4 dual rotary encoders and 2 single encoder. In addition I need buttons (those 6 on the rotary encoders) and in addition some more for camera switching and autopilot control mainly. And then probably switches for gear, and parkbrake. And some LEDs. I am not complete with my planning, and have not started counting ports I need).
I dropped the idea of including any special displays, so I just want to use a "normal" flash image. For the Aruduino Mega I am using a screw shield that works really good and saved me a lot of soldering. So that's why the Mega is my first thought, and because it has lots of ports. (I actually use all on the one I have)

I am not familiar with the Raspberries and have no knowedge in Pyhon or whatever programming language I would need for those. If I can just use a flash image, then that would probably be no issue. But then there's contacting/connecting everything. I have not come arround to learn creating a PCB with a CAD tool and then just order it complete with holes. I will probably just use prototype (grid hole?, don't know the english word?) boards.

I will look into Raspberries a little, thanks for your hint.

Detlef

Detlef
Posts: 303
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Dual rotary encoders in Knobster and other (Arduino based)

#15 Post by Detlef »

Corjan wrote: Tue Jul 13, 2021 5:23 pm We did have issues with Knobsters skipping ticks.

It seems to have to do with certain USB 3.0 hubs.
Try to plug in your Knobster directly in your computer, although that is not a guarantee since computers have internal USB hubs also...

I tried to get to the cause of this issue, but was unable to do, partially because on our systems it works fine.


Sorry for the trouble,

Corjan

p.s.: This has nothing to do with interrupt vs polling.
Hi Corjan,
oh yes, the USB ports itself might also be a cause of the problem, I did not think of that. It is not the first time in my setup, I stumble over it. My USB cable go all directly into the PC, but in an extension board. Lately my touchscreen USB connection was not reliably working, which I could fix by pulling and re-plugging the connector at the port. I had similar issues with my Arduino Mega.

When I disassemble my cockpit, to add new hardware, I will look at the USB card. Maybe change it.

Thanks
Detlef

Detlef
Posts: 303
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Dual rotary encoders in Knobster and other (Arduino based)

#16 Post by Detlef »

jph wrote: Wed Jul 14, 2021 9:04 am The MEGA has a great processor, with a super range of I/O however, the Raspberry PICO is way way faster - no fair comparison really)
Hi again Joe,

I have browsed a little. I see what you mean. The Raspberry PICO is way more performant. And there are also break-out boards to screw wires available. I have to do some more thinking on what functions I need and will decide then.

Regards,
Detlef

User avatar
Corjan
Posts: 2933
Joined: Thu Nov 19, 2015 9:04 am

Re: Dual rotary encoders in Knobster and other (Arduino based)

#17 Post by Corjan »

Are you using an official knobster or a DIY one?

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Dual rotary encoders in Knobster and other (Arduino based)

#18 Post by Sling »

Corjan wrote: Wed Jul 14, 2021 3:22 pm Are you using an official knobster or a DIY one?
It was confirmed further back in this thread that it is a V2 official knobster.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Dual rotary encoders in Knobster and other (Arduino based)

#19 Post by jph »

Detlef wrote: Wed Jul 14, 2021 11:44 am
jph wrote: Wed Jul 14, 2021 9:04 am Just to clarify ? are you wanting to build a hardware panel with multiple encoders etc - and use the AM arduino or other in built AM 'flash' for everything ?. or are you thinking of using a custom messageport ? - I am thinking you are probably talking about multiple dual / single encoders on a 'normal AM 'flash' image ? (ie: - nothing directly related to knobster apart from how it may function for reference ?)
The MEGA has a great processor, with a super range of I/O however, the Raspberry PICO is way way faster - no fair comparison really) and could be a perfect option if using the AM PICO flashed image. They are also really cheap (about 5 euro ). 2 PICO units offer more I/O for things you are talking about than a single mega at about the same price. The only thing the PICO is let down on - comparatively - is ADC inputs. But again , multiple units are still really cheap.
As to if it will still miss steps.. well, if it did - it is 99.9% certain to be software related.
Joe.
Hi Joe,
I have three slots in my overhead panel still free. So my intention is to have 4 dual rotary encoders and 2 single encoder. In addition I need buttons (those 6 on the rotary encoders) and in addition some more for camera switching and autopilot control mainly. And then probably switches for gear, and parkbrake. And some LEDs. I am not complete with my planning, and have not started counting ports I need).
I dropped the idea of including any special displays, so I just want to use a "normal" flash image. For the Aruduino Mega I am using a screw shield that works really good and saved me a lot of soldering. So that's why the Mega is my first thought, and because it has lots of ports. (I actually use all on the one I have)

I am not familiar with the Raspberries and have no knowedge in Pyhon or whatever programming language I would need for those. If I can just use a flash image, then that would probably be no issue. But then there's contacting/connecting everything. I have not come arround to learn creating a PCB with a CAD tool and then just order it complete with holes. I will probably just use prototype (grid hole?, don't know the english word?) boards.

I will look into Raspberries a little, thanks for your hint.

Detlef
Hi Detlef,
As you have seen (judging by your later reply) the Pico can be directly flashed from AM and used as per any other AM supported board.
A lot of interesting points regarding interfacing also.
I wonder if - for the case of the use of the multi encoders etc for your panel that we start a different thread as it is going off the Knobster topic ?. It would be a very useful thread though as what you are wanting to do is something I think many would be interested in.
Joe
Joe. CISSP, MSc.

Detlef
Posts: 303
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: Dual rotary encoders in Knobster and other (Arduino based)

#20 Post by Detlef »

jph wrote: Thu Jul 15, 2021 7:18 am I wonder if - for the case of the use of the multi encoders etc for your panel that we start a different thread as it is going off the Knobster topic ?. It would be a very useful thread though as what you are wanting to do is something I think many would be interested in.
Hi Joe,
sorry for coming back somewhat late. I was busy with non-flightsim things for a change :)
Regarding your suggestion: yes, when I am a little further with my thoughts and plannings I will report in this cockpit building section.

Thank you
Detlef

Post Reply