Jump to content

Need help with building a collective stick using arduino.


Recommended Posts

Posted

Hello,

 

So I have built a helicopter collective stick for DCS using Bodnar board, I am very happy with how it feels and its functionality, but very unhappy with the electronics part. it has 8 axes, 32 buttons, and one hat switch. The board turned out to be too big to fit inside the box, plus its resolution is 12 bits. So I did some research and it appears a USB joystick controller can be built using Arduino Leonardo and there is an Instructables page on it, but I am completely illiterate when it comes to coding.

 

Has someone built a joystick controller using Arduino? I hope to find a complete and ready code that I can upload to a board and some sort of schematics outlining which pins to connect to buttons.

 

Thanks for the help.

Posted

Did you build a throttle axis, Bad_CrC? (bonjour mon ami!)

 

When I asked about building a controller for flight control, general thinking was the Aurduino did not poll fast enough (or something like that) and it was not best for analog axis'. Maybe it is OK for a throttle axis.

 

Just chippin' in,

Posted

An Arduino Leonardo is roughly three times larger than a Bodnar board, so switching to one of those isn't going to help you, if you want it mounted inside your collective box.

 

I have a Leonardo controlling my throttle and it works fine.

---------------------------------------------------------

PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor

Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe

Posted (edited)
Hello,

Bodnar board, I am very happy with how it feels and its functionality, but very unhappy with the electronics part. it has 8 axes, 32 buttons, and one hat switch. The board turned out to be too big to fit inside the box,

 

You get BU0836X perhaps? This version is really big for fit inside joysticks and similar.

 

Their 8 axes is due a Windows DInput and games limitation. Buttons could be 128, but when BU0836 was released in 2008 no game support this without keymapper software, so Bodnar want keep simple for DIY users.

 

... plus its resolution is 12 bits.

 

What means 4.096 "steeps" across a axis movement control, if your collective move ~90 degrees 12 bits resolution means that small adjust possible is 0.021 degrees, your hands can control this very small movement?

 

In practical terms any value above 12 bits is mere marketing, no usable advantage.

 

Anyway most Arduino internal ADC (hardware) used to be 10 bits (1024 "steeps"), so you are exchanging a "dozen by a quart". :D

 

You need ARM32 based Arduino for have... 12 bits. See this topic.

Edited by Sokol1_br
Posted (edited)

How big is the bodnar board? I made a PCB that uses an Arduino and shift registers. It's just the PCB so you'd have to solder the components on, or I could do that for you. My board is 2.25x4.5in.

 

attachment.php?attachmentid=199600&d=1544411866

 

Also mmjoy is my go to for Arduino based stuff. The promicro supports MMJOY and those things are pretty small. If you'd like I could help you develop a board that'd fit anywhere, even inside of the handle.

Edited by Braeden108

Light the tires kick the fires!

 

[sIGPIC][/sIGPIC]

Posted

I did get BU0836X, which turned out to be too big. Never heard of MMJoy before, but after doing a little looking around it seems like what I need. So, basically MMJoy is used to program the Arduino directly, or do I still have to go trough IDE and code things myself?

Currently, I have ELEGOO MEGA 2560, but it seems like it won't work with MMJoy. My plan is to completely redesign the internals of the collective, the location of buttons is fine, but the wiring is a total mess. I was thinking of designing my own PCB on EasyEDA.com so that I could solder some of the buttons directly on to the board, this way the mounting should be easier and reduce the wire spaghetti. My box is 5 x 3 x1.5 in

 

IMG_20190926_131016.thumb.jpg.f293e2e35cef832f5924efc2d686234f.jpg

IMG_20190926_131005.thumb.jpg.19e978f1640f29d277c5be252a81ac4d.jpg

IMG_20190926_130957.thumb.jpg.f3ffa97bf76d5de69db3682162d4a7a6.jpg

IMG_20190926_131108.thumb.jpg.f3de728f4c0d129931ad7a7c3f057d33.jpg

 

Braeden108, if you could help, that would be awesome. Since I want to have at least 32-36 buttons, shift registers will probably be a way to go

Posted
]

 

Braeden108, if you could help, that would be awesome. Since I want to have at least 32-36 buttons, shift registers will probably be a way to go

 

That collective is really really cool by the way. I bet you're itching as much as I am for the Mi-24.

 

Sure thing here's the main primer on mmjoy.

 

https://github.com/MMjoy/mmjoy_en/wiki/Connecting-basic-inputs-and-setting-up-software

 

It's really easy to use, no code required. As for your mega, I'd use something else. The promicro (5V! Not 3.3V! I've made that mistake...) Is more than enough to run this. With shift registers you only need 4 connections IIRC and two of those are power.

 

I based my board on this image.

 

https://images.app.goo.gl/Q3YX3ryC1v7zhrHZ7

 

This one has some signal conditioning passives which help. I'm not sure about your knowledge level in electronics so sorry if I over explain. You can chain more than 3 or less than 3 SR (shift registers) together. I'm not sure the max number you can have. You want 36 buttons so that will be 5 SR. Now considering the space constraints I highly recommend making this a surface mount board. Maybe even a double sided board. Which is just a matter of using high temp solder on one side and low temp in the other.

 

As for mounting buttons directly to the board, this is possible but you've gotta measure down to I'd guess 10 thou. If you plan on building a new box then go for it.

Light the tires kick the fires!

 

[sIGPIC][/sIGPIC]

Posted (edited)
So, basically MMJoy is used to program the Arduino directly, or do I still have to go trough IDE and code things myself?

 

MMJoy2 is a firmware* for Arduinos based on ATMEGA43u4 (16 MHz, 5v) - e.g PRO Micro, Micro... AT90USB, Teensy 2.0, ++2.0.

 

You just need flash this firmware using a USB cable and MMJoySetup software, a minute procedure.

 

* With "pedigree", is developed (based on legendary Mjoy8/16 of 2004) by MegaMOZG, the guy actually behind VirPil electronics. :thumbup:

Edited by Sokol1_br
Posted
MMJoy2 is a firmware* for Arduinos based on ATMEGA43u4 (16 MHz, 5v) - e.g PRO Micro, Micro... AT90USB, Teensy 2.0, ++2.0.

 

You just need flash this firmware using a USB cable and MMJoySetup software, a minute procedure.

 

* With "pedigree", is developed (based on legendary Mjoy8/16 of 2004) by MegaMOZG, the guy actually behind VirPil electronics. :thumbup:

 

This guy is the guru for mmjoy. He's the one who helped me build my stuff.

Light the tires kick the fires!

 

[sIGPIC][/sIGPIC]

Posted
That collective is really really cool by the way. I bet you're itching as much as I am for the Mi-24.

 

 

Oh yeah, can't wait for mi-24, also can't wait for the Ka-50 updated cockpit and Igla missiles. I based my collective off Ka-50's collective. For two axis I used pot's with detents and then with the help of Joystick Gremlin I was able to turn them into encoders with 11 positions each. When I fly my Ka-50 it's a true HOTAS experience.

 

So the boards that are compatible with mmJoy, are they all 10bit axis resolution and is the difference only in the number of pins?

 

My knowledge of electronics is fairly basic, I can wire things up, but don't have a clear understanding of why things work lol. I will need to do some reading on how the shift registers work in conjunction with an Arduino or other similar boards.

 

Do you have schematics of the PCB with registers?

 

Is this a correct schematic?

HTB1EgvPg1GSBuNjSspbq6AiipXan.thumb.jpg.03cf0039444e950c0e9a8157b36cb49a.jpg

 

Thanks for the help, really appreciate it. This is definitely very challenging for me but at the same time pretty fun.

Posted
Oh yeah, can't wait for mi-24, also can't wait for the Ka-50 updated cockpit and Igla missiles. I based my collective off Ka-50's collective. For two axis I used pot's with detents and then with the help of Joystick Gremlin I was able to turn them into encoders with 11 positions each. When I fly my Ka-50 it's a true HOTAS experience.
Man I really need to build a collective.

 

So the boards that are compatible with mmJoy, are they all 10bit axis resolution and is the difference only in the number of pins?

 

As far as I can tell yes. You can get 12 bit resolution with an add on chip. Though I've never done this.

 

 

Do you have schematics of the PCB with registers?

 

The answer is no. The why has to do with desperation, and an external GPU. The rest of the story only comes out with enough whiskey and bitterness. (I lost my schematics when my computer up and died.) I could probably get you the gerber files but I'm not sure how much use that'd be for you.

Is this a correct schematic?

[ATTACH]218007[/ATTACH]

 

Yeah that should work nicely. Also holy crap I wish I new multi resistor packs were a thing when I built my board. And the 74HC165 is what I used. It works well. Its even too fast, as some of my switches used to trigger when they were bouncing. That's the state where they're making contact but also not. This leads to the computer thinking I'm pressing the button really really fast. However MMJOY has some settings to only let one button press over a period of time. Which is way shorter than you could ever notice. Human reaction time is glacial in the electronics world.

 

Thanks for the help, really appreciate it. This is definitely very challenging for me but at the same time pretty fun.

 

I'm literally studying electrical engineering now because I had so much fun building my own stick and throttle. So working on these kinds of things is really fun for me too.

 

If you want a more rapid form of communication my steam name is Breedus. Which like the name flaming cliffs makes less sense the more I think about it. So I don't.

Light the tires kick the fires!

 

[sIGPIC][/sIGPIC]

Posted
Man I really need to build a collective.

I could probably get you the gerber files but I'm not sure how much use that'd be for you.

 

That actually would be awesome, as I mentioned earlier I want to design (well, attempt to design) a PCB in Easyeda.com and mount most of the components directly on to it. When I was building my current one, I had a lot of trouble mounting multidirectional switches and a thumbstick. Had to come up with some crafty solutions, but at the same time cumbersome and ugly. Although I'll have to do a lot of prototyping on a breadboard for a while since nothing is cut and dry when trying to DIY something.

 

 

I think this is the chip and schematics that increases the resolution to 12.

[ATTACH]218102[/ATTACH]

 

I don't have steam looking.:no_sad:, but I am on discord pretty much all the time, my username is GasMachine #7128.

mmjoy2_promicro_mcp3208_extension.thumb.png.b9bb14dd833e06c45f4881c8e55cc9bf.png

Posted
That actually would be awesome, as I mentioned earlier I want to design (well, attempt to design) a PCB in Easyeda.com and mount most of the components directly on to it. When I was building my current one, I had a lot of trouble mounting multidirectional switches and a thumbstick. Had to come up with some crafty solutions, but at the same time cumbersome and ugly. Although I'll have to do a lot of prototyping on a breadboard for a while since nothing is cut and dry when trying to DIY something.

 

 

I think this is the chip and schematics that increases the resolution to 12.

[ATTACH]218102[/ATTACH]

 

I don't have steam looking.:no_sad:, but I am on discord pretty much all the time, my username is GasMachine #7128.

 

Sorry, I couldn't get my schematics back from JLC PCB. I think they deleted it as I ordered it over a year ago. That being said, my schematic almost exactly mirrors the one that I referenced earlier. That being said I'd be more than willing to help you design on that will fit your collective. And Sokol is right on, everything you need to build a board for MMJoy comes in the MMJoy file.

Light the tires kick the fires!

 

[sIGPIC][/sIGPIC]

  • Recently Browsing   0 members

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