Author Topic: Lever position sensing by Hall effect: switch or analog sensor  (Read 2510 times)

0 Members and 1 Guest are viewing this topic.

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Lever position sensing by Hall effect: switch or analog sensor
« on: January 09, 2019, 11:47:16 pm »
I am looking at detecting the position of a steel hand lever which can be moved forward/backward in a slot with seven side notches where the lever can be parked by moving it into the slot.
I am considering the use of seven hall sensors to detect the position of a magnet placed along the lever rod.
Due to space limitations, the sensors must go on the side opposite to the notches, which means the
distance sensor to magnet in parked position will be 15mm to 20mm. 

This is the magnet I am considering in using:
https://supermagnetman.com/search?q=Rect1020

And these are the two sensors I am considering

- DRV5033-Q1 Omnipolar digital switch sensor http://www.ti.com/lit/ds/symlink/drv5033-q1.pdf
- DRV5055-Q1 Ratiometric Linear sensor  http://www.ti.com/lit/ds/symlink/drv5055-q1.pdf

I believe, using the digital switch will result in a simpler GPIO design, but my concern is that the sensor may not get turned on at 20mm distance.    That is the reason I am considering the linear option, which will require the use of seven analog ADC readings to evaluate where the lever is.

I will appreciate any thoughts...

Note: The lever controls the chute deflector in my snowblower via a steel cable.   I want to read the position to motorize the deflector.       
 

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #1 on: January 11, 2019, 03:00:29 am »
I have ordered 10 of each.  I will have to run some tests.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #2 on: January 11, 2019, 03:06:26 am »
Depending on the full-scale angle deviation of the lever, an accelerometer may be a good solution.    Arduino+ accelerometer + your motorized thingy.
 

Offline diegogmx

  • Contributor
  • Posts: 19
  • Country: dk
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #3 on: January 11, 2019, 06:55:32 am »
maybe you can use a multiplexed inductive sensor, having a coil in each notch (i'm assuming in each notch there is a hole to lock the lever), that would also be able to tell you if the lever is fixed into position properly, and you would avoid the need for a magnet
 

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #4 on: January 11, 2019, 03:18:34 pm »
Depending on the full-scale angle deviation of the lever, an accelerometer may be a good solution.    Arduino+ accelerometer + your motorized thingy.

Are you talking about using an accelerometer to determine relative position to earth?   If so, it gets complicated by the fact that the snowblower moves on inclined ground and at times it is forced to tilt off ground.   I would need two sensors, one stationary on the machine and the other on the lever and compute differences.   It is a possibility.   Funny thing is, that in the past, I was considering using the two accelerometers to determine the position angle of the deflector.   Now I am leaning toward using a linear actuator with built in feedback pot.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #5 on: January 11, 2019, 04:34:31 pm »
Depending on the full-scale angle deviation of the lever, an accelerometer may be a good solution.    Arduino+ accelerometer + your motorized thingy.

Are you talking about using an accelerometer to determine relative position to earth?   If so, it gets complicated by the fact that the snowblower moves on inclined ground and at times it is forced to tilt off ground.   I would need two sensors, one stationary on the machine and the other on the lever and compute differences.   It is a possibility.   Funny thing is, that in the past, I was considering using the two accelerometers to determine the position angle of the deflector.   Now I am leaning toward using a linear actuator with built in feedback pot.

Correct.  You would need two.
I designed and built a system for my tractor using an accelerometer and arduino.  The ACC is attached to the bucket of my tractor and it talks to the arduino to indicate when the bucket is level.  I calibrate to the current position on power up.  However, it will not take into account the situation where the tractor moves to a different location at a different grade.  Maybe that is a feature I should add.  However, for my situation, I would calibrate at the location where I am going to pick up my load because that is the only place where it is important.
 

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #6 on: January 11, 2019, 04:51:32 pm »
maybe you can use a multiplexed inductive sensor, having a coil in each notch (i'm assuming in each notch there is a hole to lock the lever), that would also be able to tell you if the lever is fixed into position properly, and you would avoid the need for a magnet

The lever is spring loaded to park in the notches in a surface steel plate.   Under the surface plate there is a steel wall very close to the parking position.   My first thought was to put something on that side, may be under the notches, but again the spaces between notches are very limited (10mm) and the mechanical mounting very hard.   That is why I decided on mounting sensors on the apposite side, although it might require going with the linear sensors with ADC and may be opamps.

I have attached pictures     
 

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #7 on: January 11, 2019, 04:56:14 pm »
Depending on the full-scale angle deviation of the lever, an accelerometer may be a good solution.    Arduino+ accelerometer + your motorized thingy.

Are you talking about using an accelerometer to determine relative position to earth?   If so, it gets complicated by the fact that the snowblower moves on inclined ground and at times it is forced to tilt off ground.   I would need two sensors, one stationary on the machine and the other on the lever and compute differences.   It is a possibility.   Funny thing is, that in the past, I was considering using the two accelerometers to determine the position angle of the deflector.   Now I am leaning toward using a linear actuator with built in feedback pot.

Correct.  You would need two.
I designed and built a system for my tractor using an accelerometer and arduino.  The ACC is attached to the bucket of my tractor and it talks to the arduino to indicate when the bucket is level.  I calibrate to the current position on power up.  However, it will not take into account the situation where the tractor moves to a different location at a different grade.  Maybe that is a feature I should add.  However, for my situation, I would calibrate at the location where I am going to pick up my load because that is the only place where it is important.

Very cool !   Both the application and having a tractor!   
 
The following users thanked this post: Wimberleytech

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #8 on: January 11, 2019, 05:45:58 pm »
Depending on the full-scale angle deviation of the lever, an accelerometer may be a good solution.    Arduino+ accelerometer + your motorized thingy.

As you can see, this is calling my attention.   It would really simplify things as far as sensor placements and mounting.   All I would need is to tie one sensor to the rod and place the second one with the MCU.   It would be much cleaner than having a circuit board pretty much exposed holding the seven hall sensors!   

I wonder if a low cost 3 axis accelerometer would provide resolution to discriminate notch positions, which are probably just a few degrees apart.   I also wonder about the complexity of the calculations.
 

Offline soldar

  • Super Contributor
  • ***
  • Posts: 3540
  • Country: es
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #9 on: January 11, 2019, 05:56:44 pm »
I believe, using the digital switch will result in a simpler GPIO design, but my concern is that the sensor may not get turned on at 20mm distance. 
Or you could have the problem that the magnet activates more than one sensor.

I would look into the very simplest and most reliable linear transducer and then take the signal to the ADC and electronics which are well protected and out of the way.

You say it moves a steel cable. Like a Bowden cable like the brakes of a bicycle? If the tension on the cable and the sheave is proportional to the position then it should not be difficult to get a transducer that measures that force. If there is no appreciable change in force on the cable then you could put a spring to any moving part and the spring would provide a variable force.

You can make a transducer quite simply with double sided PCB so that when it flexes the strips on one side stretch and increase resistance and the strips on the other side shorten and decrease resistance. A Wheatstone bridge and an OpAmp and you have your transducer.

All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #10 on: January 11, 2019, 06:00:21 pm »
Quote

As you can see, this is calling my attention.   It would really simplify things as far as sensor placements and mounting.   All I would need is to tie one sensor to the rod and place the second one with the MCU.   It would be much cleaner than having a circuit board pretty much exposed holding the seven hall sensors!   

I wonder if a low cost 3 axis accelerometer would provide resolution to discriminate notch positions, which are probably just a few degrees apart.   I also wonder about the complexity of the calculations.
I use ADXL345 breakoutboard: https://www.ebay.com/itm/ADXL345-3-Axis-Digital-Acceleration-of-Gravity-Tilt-Module-AVR-ARM-MCU/381374763026?epid=11010018748&hash=item58cbb51012:g:cTsAAOSwKApa8lbz:rk:6:pf:0

Uses I2C communications

The code is trivial. 
Pictures show the guts of the arduino board, and green units are the arduino in one tethered to the ACC in the smaller box.

Tractor demo:
« Last Edit: January 11, 2019, 06:14:12 pm by Wimberleytech »
 

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #11 on: January 11, 2019, 06:29:54 pm »
Very cool!   And you painted the enclosures John Deere green !
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1134
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #12 on: January 11, 2019, 06:40:43 pm »
Very cool!   And you painted the enclosures John Deere green !

3D printed with green filament!!
 

Offline Back2VoltsTopic starter

  • Supporter
  • ****
  • Posts: 495
  • Country: us
Re: Lever position sensing by Hall effect: switch or analog sensor
« Reply #13 on: January 12, 2019, 03:08:57 am »
I believe, using the digital switch will result in a simpler GPIO design, but my concern is that the sensor may not get turned on at 20mm distance. 
Or you could have the problem that the magnet activates more than one sensor.
Quote
I had not thought of that.   It will be fairly easy to test on breadboard.
Quote
I would look into the very simplest and most reliable linear transducer and then take the signal to the ADC and electronics which are well protected and out of the way.
My gut feeling is that this will be the way to go (if the accelerometer idea does not win)
Quote
You say it moves a steel cable. Like a Bowden cable like the brakes of a bicycle? If the tension on the cable and the sheave is proportional to the position then it should not be difficult to get a transducer that measures that force. If there is no appreciable change in force on the cable then you could put a spring to any moving part and the spring would provide a variable force.

You can make a transducer quite simply with double sided PCB so that when it flexes the strips on one side stretch and increase resistance and the strips on the other side shorten and decrease resistance. A Wheatstone bridge and an OpAmp and you have your transducer.
The existing steel cable has been giving me problems.  The goal of this project, is to take cable out of picture.   That said, the idea of hooking a spring with load cell is worth exploring... 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf