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

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

I measured voltage drop on the potentiometer and it is 5V. Confirmed that pedal's signal changes from 0.8V (released) to 4.2V (fully pressed) when given 5V. What would be a right way to replace potentiometer in speed control unit with Hall-Effect sensor? Note, that I would prefer to preserve full speed control range (from 0% to 100%).

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

UPDATE 1

PWM controller built-in potentiometer works like that:

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

And Hall-Effect pedal is opposite:

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

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

UPDATE 2

On further examination, it appears that potentiometer's GND (I mean, one of its legs that I referred above as GND) is connected directly to input GND of PWM controller (where negative terminal from battery goes). So, from 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 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. Aug 6 '20 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... Aug 6 '20 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. Aug 6 '20 at 3:29
• @DKNguyen pot on PWM controller adjusts from 0 to 100K or from 0 to 5V. Aug 6 '20 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. Aug 6 '20 at 3:32