Electronic – How to convert a voltage range to LED brightness without a microcontroller

adchall-effectledsensor

I have a hall effect sensor which outputs 0V when on the North pole of a magnet, 5V when on the South pole. It idles at 2.5V.

I want to connect 2 LEDs to show the reading, one activated from 0-2.5V, the other from 2.5V to 5V.

I could use the ADC on a microcontroller to read the sensor then drive the LEDs with two PWM channels. But, this seems like overkill to me.

Can anyone suggest a better way? Without using a microcontroller?

Best Answer

Simplest but probably worst method:

Connect the LEDs back-to-back, connect one leg to your signal voltage, and connect the other leg through a few kΩ resistor to a fixed 2.5 V source. Then one LED will be on from 0 V to 0.5 V, off from 0.5 V to 4.5 V, and the other LED on from 4.5 V to 5 V. Actual voltages would be determined by the color of the LED, and I think the brightness would only vary a little.

You could probably get exactly what you want with some kind of combination of the ideas of precision rectifier (using feedback for turn-on with no dead zone) and voltage-to-current converter (brightness proportional to voltage), but I'm having trouble thinking up a circuit.