Jump to content
NEW DISCORD SERVER DETAILS - SIGN UP NOW - Dogz Members Only Private Thread ×

DIY collective


Crash

Recommended Posts

The Leonardo works. BUT it isnt very obvious how to load a downloaded sketch or even how to download the sketch. After quite a while I have the board set up as a 5 axis controller and it tested OK. Now to find the sketch I need, that is 4 axis, one 4 way hat switch and maybe 10 or so buttons.

Link to comment
Share on other sites

More progress, I have soldered the 2 pots and have roughly positioned the throttle complete with thumb stick. I will put some photos up soonish in my build thread.

  • Like 1
Link to comment
Share on other sites

More progress, as I have decided to mount the Leonardo in the button box on the lever I had to feed the wires from the collective pot up the lever along with the USB cable. This meant taking the plate off the side to get access to the collective pot, and taking the lever off the pivot to allow the cables to be fed up the tube. All back together now.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
On 5/28/2023 at 8:19 AM, Crash said:

How many buttons and axis are on your sketch Dennis?

Will check Dave, I will get back to you ASAP. Last two days of work, then I'm free free free

  • Like 1
Link to comment
Share on other sites

OK Dave I use this for my radio buttons and rotary's vol up down, channel selection ect for DCS

//DEFINITIONS
#define ENABLE_PULLUPS
#define NUMROTARIES 4 //replace "?" with number of rotary encoders you are using
#define NUMBUTTONS 6 //replace "?"with number of buttong you are using
#define NUMROWS 1 //replace "?" with number of rows you have
#define NUMCOLS 6 //replace "?" with number of columns you have

as follows 4 rotary encoder switches   push down button 1 rotate 1 left rotate right 

  as in the sketch               

rotariesdef rotaries[NUMROTARIES] {
  {0,1,24,25,0},
  {2,3,26,27,0},
  {4,5,28,29,0},
  {6,7,30,31,0},

 

and 6 buttons

 

//BUTTON MATRIX
//first change number of rows and columns to match your button matrix, 
//then replace all "?" with numbers (starting from 0)
byte buttons[NUMROWS][NUMCOLS] = {
  {0,1,2,3,4,5}

               

5 potentiometers    z axis

                                                   rx axis

                                                   ry axis

                                                   rz axis

                                                   throttle

as you can see in the sketch these equal true

//JOYSTICK SETTINGS
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
  JOYSTICK_TYPE_JOYSTICK,
  32, //number of buttons
  0, //number of hat switches
  //Set as many axis to "true" as you have potentiometers for
  false, // y axis
  false, // x axis
  true, // z axis
  true, // rx axis
  true, // ry axis
  true, // rz axis
  false, // rudder
  true, // throttle
  false, // accelerator
  false, // brake
  false); // steering wheel

 

 Hope that helps Dave. I know it can be confusing.  By the way, Your collective is starting to look awesome. Nice piece of engineering their Matie. :thumbsup:

Link to comment
Share on other sites

Thanks Wingy,  most of the soldering is now done. My original rubber band on the throttle has now got a split so I will need to come up with a new cunning plan. Might get some photos up tomorrow.

Link to comment
Share on other sites

It nearly finished now Colin. I have covered what I did in the Hardware forum.

Outstanding jobs are

1/ glue the collar on to the column

2/ drill a hole to feed the usb cable through the button box

3/ do the Arduino sketch

4/ plug the cables into the board and test

5/ fit the assembly into the simpit.

  • Like 1
Link to comment
Share on other sites

Dennis, can I use the 3v to power the buttons? I have looked up on google but I cant find out. What about the 5v (pin2) on the 6 pin header, can that be used?

Link to comment
Share on other sites

2 hours ago, Crash said:

Dennis, can I use the 3v to power the buttons? I have looked up on google but I cant find out. What about the 5v (pin2) on the 6 pin header, can that be used?

Yes the 3V and/or 5Volt supply can be used,

but PC USB power supply more then enough for switches buttons and rotaries. I personally stay away from  that option as they can create more problems. Generally they are used for motors ( in our case, people run real Aircraft gauges that run with servo motors), digital readers ect, that require more power. Not really needed in our case IMO.

 

Link to comment
Share on other sites

Thanks Dennis, I will run the pots (4 of them) off the 5v and the buttons off the 3v. I have found out that i can glue the pins off my dupont cables together and make a sort of multi-pin plug. The sketch hasnt been sorted yet, I have one for 5 axis controller. I can edit that down to 4 and then add the button part. I will have 13 buttons, each to a separate pin so I will have to copy paste the routine for this and then test it.

  • Like 1
Link to comment
Share on other sites

I have hit a snag. I have soldered the dupont wires to the switches but the wires break very easily. I think I will have to re-wire and use crimped connectors.

Wire, soldering tips and terminals ordered. Got to get this sorted!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Who's Online   0 Members, 0 Anonymous, 55 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...