smilanko
Posts: 12
Joined: Tue Mar 22, 2016 5:59 pm

Protractor Sensor

Tue Mar 22, 2016 6:06 pm

I am trying to place a protractor like sensor on a steering wheel of a car. When I turn the wheel one full cycle, the sensor should tell me I made a 360 degree turn. Likewise, if I make two, it should tell me that I turned it 720 degrees from the original position.

The problem I am facing here is how to wrap my head around the needed hardware. Is there a sensor, like the protractor, that I can use and connect to a raspberry pi?

mutley
Posts: 61
Joined: Sat Jan 02, 2016 8:06 pm

Re: Protractor Sensor

Tue Mar 22, 2016 10:31 pm

What you are talking about it a hall effect censor used to measure rotation or angle, simply putting that in google will come up with many different ways you can use it to achieve your result you want. It's very simple and cheap to measure once every 360deg, it gets more complicated and expensive the lower you want to go, depending on how accurate you want to be.
https://www.google.com/?q=hall+effect+s ... sure+angle

If this is a full size car, and you don't care about the looks, the easiest and cheapest way I can think of is to use an ABS disk stuck to the back of the steering wheel / steering column, with an ABS censor reading the disk. Then all you need to do is know the number of pickups on the disk to calculate the angle.
Image

smilanko
Posts: 12
Joined: Tue Mar 22, 2016 5:59 pm

Re: Protractor Sensor

Wed Mar 23, 2016 11:26 am

That's a good set of examples! I really do appreciate it. I'll take a look around to see what I can scavenge up! Thanks!

PiGraham
Posts: 3932
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Protractor Sensor

Wed Mar 23, 2016 12:12 pm

You may need an absolute encoder for this, rather than an incremental encoder. The ABS sensor is incremental. It doesn't kow where it is, but it knows how the wheel is moving. Since steering wheels don't routinely do full rotations, and you might want to know the steering angle when the system starts, before the steering wheel is moved, consider absolute position encoders that can tell you that.

A potentiometer attached to an analogue to digital converter (ADC) could be used, if you can tie it's rotation to the steering. One way to do that is to fit a toothed gear to the steering column and another toothed gear to the potentiometer shaft, and link them with a toothed belt. It might be possible to use a 3D printer to print a two-part gear that can clamp around the column without requiring much disassembly.

Another option is a grey code absolute position encoder. This has several markers at 1. 1/2, 1/4, 1/8... revolution spacing. Multiple optical, electrical or magnetic sensors detect the markers to produce binary grey code position value that you can read with GPIO.

The idea of attaching something to the back of the steering wheel could be used to fit a disc on which a printed pattern is attached. Optical sensors could detect white/black under the sensors to read the position.

Grey code, like binary code, gives you 2 to power n positions. n = 8 sensors/markers would give you 256 positions that can be sensed (1.4° resolution) . n = 10 would give you 1024 (0.35° resolution). Accuracy will depend on the pattern and sensor placement.

Be very careful if modifying a vehicle that will be used on public roads. You may need an engineering inspection and notification to insurers to be legal. Any possibility of jamming the controls would a no-no.

PiGraham
Posts: 3932
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Protractor Sensor

Wed Mar 23, 2016 2:03 pm

Here is some info about how this is done properly.
http://www.knowyourparts.com/technical- ... agnostics/

Return to “General discussion”