My RC hacks: #2 : Replacing transmitter pots with hall-effect sensors

Started by Swapnil, April 25, 2017, 06:44:36 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Swapnil

Hey everyone!

This is the second hack in a series of RC hacks I've done over the years. It was done last year for one of my younger cousin's 3rd year mini project.

With age and aggressive use, the potentiometers in conventional transmitter sticks become degraded (particularly around the center).

Hall-effect sensors can sense magnetic field strength and output a proportional voltage. As there is no contact needed (and hence no friction), there is no degradation of any kind in output due to age. 
I had always wanted to replace pots with hall-effect sensors in the past but couldn't figure out how to fit them on a stick gimbal. But, with advances in 3D printing technology in the past few years, I finally had a way.

I studied the dimensions of the stick potentiometer and created a similarly shaped part in sketchup that would fit in the gimbal and hold a cylindrical magnet. This was the hardest part as there was 'trial and error' involved.

The next bit was easy. All I had to do was place an analog hall-effect sensor below the center of the magnet and read its output using a cheap STM32F103C8T6 board.

Swapnil

Pic 1: 3D design of the magnet holder that fits in the transmitter stick gimbal. Designing this part in Google Sketchup took a few hours and 5 revisions.

Swapnil

Pic 2: The actual 3D printed part.

I used Neodymium disk magnets (5mm diameter, 2mm thickness) to make a 2cm long cylindrical magnet. The 3D design was difficult as I wanted to friction-fit the cylindrical magnet in the 3D printed part such that part of the magnet was exposed. It worked perfectly. I did not have to glue it. Just pushed it hard, slowly and steadily.

This part was 3D printed by one of our forum members, Mr. Avadhut Deshmukh (Avadhut10001). He sent me 4 of those for only about  :Rs: 100!

Swapnil

Pic 3: Magnet holder placed in stick gimbal

The 3D printed part fit nicely in the stick gimbal.

As the magnet rotates around an axis passing through its center and transverse to the cylindrical axis, we can get the maximum output range from the hall effect sensor. This is achieved by placing the sensor such that as the stick is moved to one end, one face of the cylindrical magnet is closest to the sensor and as the stick is moved to the other end, the other face is closest to the sensor.


I used the ss49e hall sensor with the STM32F103C8T6 board as it has a 12-bit ADC for maximum resolution.

Bilal

Swapnil sir, if possible, kindly post a step by step instruction, I have a TGY 9X lying around that I want to do this mod on. Closely following your posts
Cessna - 184
Mr. Moss
Self-Design Glider
550 DIY Quad
Scratch Build TriCopter
VT-Allrounder
Telemaster 400
ZMR 250

saikat

good project

you are using one stm32 for all 4 inputs ?
what about the trim switches ?

.

Swapnil

@ Bilal

It's fairly straightforward. You just need 4 parts:
1) Nd magnets
2) A 3D printed part to fit in the pot socket and to hold the stack of magnets.
3) A hall sensor
4) A microcontroller

The SS49E hall sensor has a single analog voltage output which can be easily read by any microcontroller . I'd recommend using an arduino as it's easier to work with .   

@ saikat

As I mentioned in the first post, this project was my cousin's 3rd year mini project and was done mostly for demonstration purposes. We just modded the roll axis pot. However, an stm32F103 board can certainly be used for all analog channels and trim switches as it has 10 analog pins.

On one of my 12 channel transmitters, I have 8 analog inputs (for 4 sticks) and the trim switches are fed to interrupt pins. 

shreeyak

@swapnil can I ask you what tool chain and ide you use to develop code on STM32? And do you use STM HAL, libopencm or something else?

Sent from my ONE A2003 using Tapatalk

Swapnil

@  shreeyak
Back then, my cousin used the Arduino IDE with the Arduino-STM32 add-on created by Roger Clark.

With my F407 I use TrueStudio (or Keil) and HAL.