Lever position sensing by Hall effect:  switch or analog sensor - Page 1
Forum section: electronics / projects

author: Back2Volts
author_rank: Unknown
timestamp: January 09, 2019, 11:47:16 pm
content: 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 thedistance 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=Rect1020And these are the two sensors I am considering- DRV5033-Q1 Omnipolar digital switch sensorhttp://www.ti.com/lit/ds/symlink/drv5033-q1.pdf- DRV5055-Q1 Ratiometric Linear sensorhttp://www.ti.com/lit/ds/symlink/drv5055-q1.pdfI 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.

author: Back2Volts
author_rank: Unknown
timestamp: January 11, 2019, 03:00:29 am
content: I have ordered 10 of each. I will have to run some tests.

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 11, 2019, 03:06:26 am
content: Depending on the full-scale angle deviation of the lever, an accelerometer may be a good solution. Arduino+ accelerometer + your motorized thingy.

author: diegogmx
author_rank: Contributor
timestamp: January 11, 2019, 06:55:32 am
content: 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

author: Back2Volts
author_rank: Unknown
timestamp: January 11, 2019, 03:18:34 pm
content: Quote from: Wimberleytech on January 11, 2019, 03:06:26 amAre 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 11, 2019, 04:34:31 pm
content: Quote from: Back2Volts on January 11, 2019, 03:18:34 pmCorrect. 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.

author: Back2Volts
author_rank: Unknown
timestamp: January 11, 2019, 04:51:32 pm
content: Quote from: diegogmx on January 11, 2019, 06:55:32 amThe 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

author: Back2Volts
author_rank: Unknown
timestamp: January 11, 2019, 04:56:14 pm
content: Quote from: Wimberleytech on January 11, 2019, 04:34:31 pmVery cool ! Both the application and having a tractor!

author: Back2Volts
author_rank: Unknown
timestamp: January 11, 2019, 05:45:58 pm
content: Quote from: Wimberleytech on January 11, 2019, 03:06:26 amAs 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.

author: soldar
author_rank: Super Contributor
timestamp: January 11, 2019, 05:56:44 pm
content: Quote from: Back2Volts on January 09, 2019, 11:47:16 pmOr 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.

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 11, 2019, 06:00:21 pm
content: QuoteI 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:0Uses I2C communicationsThe 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:

author: Back2Volts
author_rank: Unknown
timestamp: January 11, 2019, 06:29:54 pm
content: Very cool! And you painted the enclosures John Deere green !

author: Wimberleytech
author_rank: Super Contributor
timestamp: January 11, 2019, 06:40:43 pm
content: Quote from: Back2Volts on January 11, 2019, 06:29:54 pm3D printed with green filament!!

author: Back2Volts
author_rank: Unknown
timestamp: January 12, 2019, 03:08:57 am
content: Quote from: soldar on January 11, 2019, 05:56:44 pm