# Replacing potentiometer with a Hall sensor in PWM DC motor control module

I have a DC motor speed controller (PWM) that uses a 100 kΩ potentiometer to adjust motor speed. I also have an electronic throttle pedal that used a 49E Hall-Effect sensor (+5 V, 0.8-4.2 V signal, 1 K KΩ). I want to use this pedal with this speed controller.

I measured the voltage drop across the potentiometer and it is 5 V. I confirmed that the pedal's signal changes from 0.8 V (released) to 4.2 V (fully pressed) when given 5 V.

What would be a right way to replace the potentiometer in the speed control unit with a Hall-effect sensor? Note that I would prefer to preserve full speed control range (from 0% to 100%).

If you're curious about my application: replacing binary on/off throttle in kids ride on car.

UPDATE 1

PWM controller built-in potentiometer works like this:

• Max speed: GND to wiper = 0 V, wiper to V+ = 5 V
• Min speed: GND to wiper = 5 V, wiper to V+ = 0 V

And Hall-effect pedal is opposite:

• Max speed (fully pressed): GND to signal = 4.2 V
• Min speed: GND to signal = 0.8 V

So as a drop-in replacement pedal it will behave more like a break pedal :)

UPDATE 2

On further examination, it appears that the potentiometer's GND (I mean, one of its legs that I referred above as GND) is connected directly to input GND of the PWM controller (where the negative terminal from battery goes). So, from a practical standpoint, it's probably safe to assume that I also have GND - Xv at my disposal (Xv however is variable, since it's coming from an unregulated battery).

But I think this extra voltage source makes this question less general and less useful for other people.

• What voltage do you measure between the two far ends of the pot? It will probably be constant no matter what the pot is adjusted to. Then you need to run your hall-sensor through an opamp circuit that offsets and amplifies so the 0.8 and 4.2V gets remapped of 0 and Vpotmax. Commented Aug 6, 2020 at 3:21
• @DKNguyen As I mentioned, voltage drop on the pot is 5V. Yes, the range difference is what bothers me. Can you be more specific on op-amp approach? AFAIK, they don't really do rail-to-rail, so I still will have a gap at least on one end of the spectrum (will not go to 5V, will be same ~4V upper range). I have 12V input of course, but I have no idea what kind of PWM circuit interference I can cause by powering op-amp from it... Commented Aug 6, 2020 at 3:28
• I will post circuit. Just don't have time at the moment. You're saying the pot only adjusts from 0-4V? You could, but do not need to, power the opamp from the 12V if you add some decoupling caps and stuff. But best to just power straight off the two end terminals of the pot you measured the 5V between after you cut it out and inject the output into where the center terminal of the pot was. Commented Aug 6, 2020 at 3:29
• @DKNguyen pot on PWM controller adjusts from 0 to 100K or from 0 to 5V. Commented Aug 6, 2020 at 3:31
• So what did you mean by "they don't really do rail-to-rail, so I still will have a gap at least on one end of the spectrum (will not go to 5V, will be same ~4V upper range"? Rail to rail opamps exist and are not uncommon. Commented Aug 6, 2020 at 3:32