element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project Videos
  • Challenges & Projects
  • element14 presents
  • Project Videos
  • More
  • Cancel
Project Videos
Documents DIY Arduino Helicopter Collective Joystick Control -- Episode 440
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Project Videos to participate - click to join for free!
Related
Recommended
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 1 Apr 2020 8:47 PM Date Created
  • Last Updated Last Updated: 3 Apr 2020 7:24 AM
  • Views 28288 views
  • Likes 15 likes
  • Comments 139 comments

DIY Arduino Helicopter Collective Joystick Control -- Episode 440

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image
 

I love to fly in simulators, especially helicopters. But, there is just not an affordable collective control that I have found, so I decided to make one for myself! I am going to build a joystick using an Arduino Micro, with a bunch of buttons for assignable controls and a high quality encoder for the collective axis.

Supplemental Content:

  • Download Code from Github
  • View Model and download 3d Cad files

 

Also you can watch the live Twitch recording about this build: element14 Presents Live Twitch Stream: DIY Arduino Helicopter Collective Joystick Control

Bill of Material:

Product Name Manufacturer Quantity Buy Kit
BOURNS Absolute Rotary Encoder, 120 rpm, 128 PPR, EAW Series BOURNS 1 Buy Now
ARDUINO Development Board, Arduino Micro, ATmega32U4 MCU, 20 3.3V I/O, 12 Analogue Inputs, ISCP Header ARDUINO 1 Buy Now
ITW SWITCHES Pushbutton Switch, Industrial, 59 Series, 13.6 mm, SPST-NO-DB, Momentary, Square ITW SWITCHES 1 Buy Now
ITW SWITCHES Pushbutton Switch, Industrial, 59 Series, 13.6 mm, SPST-NO-DB, Momentary, Square ITW SWITCHES 1 Buy Now
ITW SWITCHES Pushbutton Switch, Industrial, 59 Series, 13.6 mm, SPST-NO-DB, Momentary, Round ITW SWITCHES 1 Buy Now
ITW SWITCHES Pushbutton Switch, Industrial, 59 Series, 13.6 mm, SPST-NO-DB, Momentary, Round ITW SWITCHES 1 Buy Now
C & K COMPONENTS SWITCH, SPDT, 5A, 120VAC C & K COMPONENTS 3 Buy Now
BOURNS Incremental Rotary Encoder, Pro Audio, Continuous. 24 Detents, 24 Pulses, Quadrature Output BOURNS 1 Buy Now

 

Additional Parts:

 

Product Name

5 Way Momentary Square SMD Tactitle Switch

M3x5x2 Square Nuts

8mm Bore Diameter ball mounted pillow blocks

T6 Seamless Aluminum Round Straight Tubing 16 Gauge 1-3/8" OD

Attachments:
HelicopterCollective_Resources.zip
image
DIY Arduino Helicopter Collective Joystick Control

element14 presents  |  About Kaleb |  Project Videos

  • kaleb
  • e14presents_kalebclark
  • itw
  • arduino micro
  • rotary encoder
  • friday release
  • diy arduino helicopter collective joystick control
  • bourns
  • arduino
  • e14p_KC
  • helicopter
  • friday_release
  • Share
  • History
  • More
  • Cancel
Actions
  • Share
  • More
  • Cancel
  • Sign in to reply

Top Comments

  • benaim
    benaim over 4 years ago +5
    One good project, it's one project that you can modify So I changed my mind, I use now one hall sensor AS5048a with 14-bit resolution ( Best resolution and linerality ) I changed too, the place of friction…
  • benaim
    benaim over 5 years ago in reply to benaim +4
    Pictures coming, better later than never So I used on SS495a, and to have one big range of value for "only" 45° of move, I done one adapter with 2 magnets. With this I have near 0 to 5 Volts on SS495a…
  • benaim
    benaim over 5 years ago in reply to KalebTheMaker +3
    Just received my two Bore Diameter ball So, now I can continue this project Kaleb, Thanks for sending a diagram to all followers I don't need because, I changed somethings, for example angle sensor and…
Parents
  • benaim
    benaim over 5 years ago

    Very nice I just ordered all that I need, but for elevation I will try another thing... image

     

    Why not use the Hall effect sensor for elevation instead of a big gear ? image

    I think is more precise, and less mechanical...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • KalebTheMaker
    KalebTheMaker over 5 years ago in reply to benaim

    It's just the route I took, Initial idea was to go with a timing belt for more precision, but... space.

     

    What hall effect sensor did you go with?

     

    -Kaleb

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dnl40
    dnl40 over 5 years ago in reply to benaim

    Philippe, I am very interested on seen tour code an electrical schematics, mostly for educational purposes, I am learning myself and i got the idea on kaleb code. What I want to see mostly is how you mangaged the correlation of the analog imput from the hall sensor and the magnets mounting. Thanks to kaleb and you for an amazing project. I hope some day I will be up to the task.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • benaim
    benaim over 5 years ago in reply to dnl40

    I am in holidays now  

    See you next week  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dnl40
    dnl40 over 5 years ago in reply to benaim

    Relax and enjoy!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • KalebTheMaker
    KalebTheMaker over 5 years ago in reply to benaim

    That looks great Philippe! Well done, I love the hall effect update!

     

    Is it performing well for you?

     

    -Kaleb

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • benaim
    benaim over 5 years ago in reply to KalebTheMaker

    Work very well :-)

    I will send one part of code about hall sensor when I come back from my holidays ;-)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • benaim
    benaim over 5 years ago in reply to dnl40

    Here the part my code for SS495a image

     

     

     

    [code]

     

    void Update_SS495a()

    {

        SS495a_ReadValue = analogRead(SS495a);

     

        static int16_t SS495a_ReadValue_Pre = 512;

        static const uint8_t SS495a_Filter = 15;

     

        static int16_t SS495a_Value_Min = 1023;

        static int16_t SS495a_Value_Max = 0;

      

        const int16_t Middle        = 503;    // Find without magnet

        const int16_t DeadZone_Up   = 40;     // For mechanic exercice

        const int16_t DeadZone_Down = 40;     // For mechanic exercice

           

        int32_t SS495a_Value_Up;

        int32_t SS495a_Value_Down;

     

        static float SS495a_Step_Up = 1;

        static float SS495a_Step_Down = 1;

     

        static float SS495a_Value_Up_float;

        static float SS495a_Value_Down_float;

     

        static int16_t SS495a_ToSend;

        static int16_t SS495a_ToSend_Pre = -1;

      

     

        // Auto Calibration after Power, Move Up and down to take Max and Min after Power On ( Plug USB )

        if (SS495a_Value_Min > SS495a_ReadValue)

        {

            SS495a_Value_Min = SS495a_ReadValue;

            SS495a_Step_Down = 512.0 / (float)(Middle - (SS495a_Value_Min + DeadZone_Down));

        }

     

        if (SS495a_Value_Max < SS495a_ReadValue)

        {

            SS495a_Value_Max = SS495a_ReadValue;

            SS495a_Step_Up = 512.0 / (float)((SS495a_Value_Max - DeadZone_Up) - Middle);

        }

     

     

     

        bool IsUp = SS495a_ReadValue > Middle;

     

        if (IsUp)

        {

            SS495a_Value_Up = SS495a_ReadValue - Middle;

            SS495a_Value_Down = 0;

        }

        else

        {

            SS495a_Value_Down = Middle - SS495a_ReadValue;

            SS495a_Value_Up = 0;

        }

     

        if ( SS495a_ReadValue  > SS495a_ReadValue_Pre + SS495a_Filter | SS495a_ReadValue  < SS495a_ReadValue_Pre - SS495a_Filter)

        {

            SS495a_Value_Up_float = (float)SS495a_Value_Up;

            SS495a_Value_Down_float = (float)SS495a_Value_Down ;

     

            SS495a_ToSend = (-(SS495a_Value_Down_float * SS495a_Step_Down) + (SS495a_Value_Up_float * SS495a_Step_Up)) + 512;

     

            if (SS495a_ToSend > 1023)

                SS495a_ToSend = 1023;

     

            if (SS495a_ToSend < 0)

                SS495a_ToSend = 0;

     

          

            if (SS495a_ToSend_Pre != SS495a_ToSend) // Send Only if different value

            {

                Joystick.setRxAxis(SS495a_ToSend);

                SS495a_ToSend_Pre = SS495a_ToSend;

            }

     

            SS495a_ReadValue_Pre = SS495a_ReadValue;

        }

    }

     

    [/code]

     

    @Webmaster : The Balise [code][/code] don't work image Maybe it's a good idea to activate image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mrpomme
    mrpomme over 5 years ago in reply to benaim

    I will try it to with the hall effect sensor it seem better by design and avoid those pot , can you shar eyour code/ print for the 2 magnet piece and sensor holder (I see you user a lot of glue image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • benaim
    benaim over 5 years ago in reply to mrpomme

    The ( hot) glue is only to fix wires image and the SS495a...

    You can find the code for double magnet below this post.

    If you want my STL of magnets support send me your email

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dnl40
    dnl40 over 4 years ago in reply to benaim

    That is awsome Philippe, thanks. I am low on cash for now but in a couple of months I will be beginning to buy parts, (for now i am just doing the pricing). If during the construction phase i get stuck I hope is ok to give you a shout out with a question or two jejejeje. Thanks again!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Charlienofun
    Charlienofun over 4 years ago in reply to benaim

    Hi Philippe - can you advise on the magnet sizes I should use? (first time using a hall sensor like this). I thought the potentiometer I had was having a short enough rotation but not in reality imageimage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • Charlienofun
    Charlienofun over 4 years ago in reply to benaim

    Hi Philippe - can you advise on the magnet sizes I should use? (first time using a hall sensor like this). I thought the potentiometer I had was having a short enough rotation but not in reality imageimage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • benaim
    benaim over 4 years ago in reply to Charlienofun

    I use square magnet 5x5x5. 

    I make this choice because many round magnets are not polarised correctly, and too much sellers send bads magnets

    NB: now I use AS5048a it's more precise than SS495a, of course it's working now in SPI interface, not in analog.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Charlienofun
    Charlienofun over 4 years ago in reply to benaim

    Thanks, benaim, I will go for the bigger square magnets. Did you have to play with magnet distance a lot to get the full range from 45 degrees of rotation? Maybe I should make my mount adjustable instead of hard 45. Interesting you moved to AS5048a, I'm on a Pro micro (planning to fly a quadcopter) and the SPI pins are not used so I could try that as well (will check the datasheet and order one to experiment with as well). Thanks for the info!! Great project KalebTheMaker

    imageimage

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • benaim
    benaim over 4 years ago in reply to Charlienofun

    I can see on your second picture, the distance is good for AS5048a but for SS495a is not the good way, SS495a mesure the distance, not angle like AS5048a

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Charlienofun
    Charlienofun over 4 years ago in reply to benaim

    Thanks, benaim I see now the AS5048a is popular for brushless gimbal position. Many PCBs like this I could use in place of the one I have with the potentiometer now. Will pause on the linear sensor and look into this further. Seems like a better solution! Much appreciate the info!! image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Charlienofun
    Charlienofun over 4 years ago in reply to Charlienofun

    I might try the AS5600 - lots of cheap kits with magnets and examples of it working on youtube.

     

    https://www.ebay.com/itm/AS5600-Magnetic-Encoder-Magnetic-Induction-Angle-Measurement-Sensor-IIC-Module/164243118854?_tr…

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • benaim
    benaim over 4 years ago in reply to Charlienofun

    Yes I use this board (https://m.fr.aliexpress.com/item/1005001622340192.html) in SPI mode, not analog...

    In SPI is very accurate, in particular with low angles, for us only 45° maybe less.

     

    Don't forget, you need 4 pins for SPI ( SCLK / MISO /MOSI) but one more for control each SPI device, same if you have only one...

     

    I'm now on my smartphone, tomorrow, when I will be on my computer, I will send, here, the link of library that I use.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Charlienofun
    Charlienofun over 4 years ago in reply to benaim

    Ah, I will look at the lib when you get a chance to post it. No rush will be a while before I get a sensor board from China. I was planning to be lazy and try the analog mode of 5600, but first setting its range with i2c so it will have a full 0-5v from whatever rotation it can sense (I got the idea from this demo video from AMS) If that works I don't have to rewrite my existing code image Did you bother with trying this or just went straight to reading the angle over SPI?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • benaim
    benaim over 4 years ago in reply to Charlienofun

    The Lib SPI for AS5048a is here : https://github.com/eborghi10/AS5048A  image

     

    I to read the angle over SPI, it's more accurate image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dallinwatson
    dallinwatson over 4 years ago in reply to benaim

    Phillipe,

     

    Do you have an electrical schematic of the configuration you've used with the AS5048a that you could share?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube