How can I detect my vehicle's shifter position? Will a Hall Effect Sensor work?

This is actually harder than it looks to get repeatable.

I would not recommend hall effect sensors for this application. Their sense distances are generally small, meaning that the mounting of the sensors and magnet need to be done with some precision. You will find it very challenging to align all of the halls to work consistently and under all operating conditions.

The transmission will move on its compliant mounts as a function of engine torque. If you're dealing with a top-loader transmission, the shift lever will also move relative to the body as a function of engine torque, making it almost impossible to obtain repeatable measurements.

Edit: The OP has a top-loader style transmission, where there is no external linkage to take advantage of. For any other transmission, there is external linkage between the shifter and transmission housing - usually rods or cables.

For a top loader: I'd recommend X and Y axis potentiometers on the shifter, with the pots mounted to the transmission (not the body), which should be accessible through the floorpan opening that the shifter comes up through. You'll need to decode the analog readings from the two pots to match gear selection.

For any other transmission: I'd recommend using a sealed potentiometer used as a voltage divider connected to each shift linkage (under the body, not inside the transmission). You'd then do the calibration + windowing in your firmware, where it will be easier to tune. If your transmission has multiple linkages, it essentially de-muxes some of the multidimensionality out of the shifter for you, again making it easier to map discrete gears to analog voltage ranges.

Reverse is easy--just tap the back up light circuit.


Edit: Well, if HikeOnPast is right, this won't work for you either (as you have no shifter linkages to deal with mechanically)... The best bet for this to work for you would be to create some sort of mask that sits on top of the shifter unit under the boot with 6 optosensors, and then attach a mask to the shifter to obstruct the sensors as necessary to determine which position it's in. The mechanical design would be a huge PITA, though. I'm not deleting this answer though, since I think this is a decent solution to someone else who might want to do the same in a different car (like me! I've been thinking about something like this for a while).


Another idea would be to use optosensors/magnetic sensors along the shifter cables (assuming your car uses shifter cables, and not some other sort of system, like hydraulics). I think optosensors would be cheaper. You'd need 2-4 of them, two for each cable. You put the optosensor around each cable (one end on one side of the cable, one end on the other side), then attach some sort of mask to the cable that will block the sensor when the shifter is in a certain position. Attaching the mask to the cable wouldn't affect the shifter travel/tension at all, and would be a lot more repeatable than using sensors directly on the shifter itself. The biggest problems I would foresee would be the availability of space around the shifter cables under the dash (before they cross into the firewall), and the fact that you'll have to take apart a good amount of your dash to get a good amount of room to work with.

Sensors

In this diagram, it's assumed you have a 5spd car that uses two linkages. The simplest way would be to use 4 optosensors to act as digital I/O for the uC. The red bars/arrows signify the optosensors, the blue bars the mask attached directly to the moving part of the linkage, and the black rectangle the linkage itself. Extrapolating the position of the shifter is real simple with this. If both left sensors on the left cable are unblocked, you know that the transmission is in neutral (regardless of the right cable). Otherwise, the transmission is in gear, and which gear is determined by the sensors that are blocked.


Mounting something to the shifter itself, hidden under the boot, is probably the best way to go.

A two-dimensional linear encoder strip, perhaps made of plastic, could be made as a collar that is mounted around the shifter and attached to it. The collar is white, with black patterns printed on it. Or perhaps transparent. You might be able to get away with a laser-printed transparency.

These patterns are scanned by optical sensors. The arrangement is such that if the stick is moved back and forth, only the back-and-forth sensors are driven with a quadrature signal which can be decoded to give the direction of movement and position. The side-to-side sensors do not see a change in the pattern because it is wide compared to conventional linear encoders. And vice versa. The picture gives a hint at the basic idea.

Basic Idea