Need a pseudo-exponential voltage converter

Thread Starter

Altair2

Joined Aug 9, 2013
10
Hi everyone, this is my first post on this forum.
I have an e-bike on which the speed is controlled by a rotary throttle handle (like a motorcycle), and this works with a Hall-effect transducer. The output voltage varies linearly from 0.86V to 4.2V with rotation of the throttle.

I would like the throttle response to be less sensitive near the beginning of travel, and then progressively steeper to the end. So instead of being linear, I want the output voltage to be somewhat exponential. I know that a real exponential converter is quite complicated, but I do not need high precision in that application. I just want the output voltage curve to be curved instead of linear.

My idea was to try to use a FET as a voltage-controlled variable resistor, placed between my output voltage and a low reference voltage of around 0.86V, and this would pull my voltage down less and less as it gets closer to the high end of the range. So the output voltage curve would be "bent" between the two extreme points.
The voltage range of the Hall throttle must be preserved, but not precisely because the motor controller can still be adjusted to the actual range of the control voltage.
The throttle works on 5V, so the circuit cannot use a bipolar supply.

Anyone has an idea to propose for this converter?
Thanks for your attention,

Guy Sirois
 

GopherT

Joined Nov 23, 2012
8,009
Hi everyone, this is my first post on this forum.
I have an e-bike on which the speed is controlled by a rotary throttle handle (like a motorcycle), and this works with a Hall-effect transducer. The output voltage varies linearly from 0.86V to 4.2V with rotation of the throttle.

I would like the throttle response to be less sensitive near the beginning of travel, and then progressively steeper to the end. So instead of being linear, I want the output voltage to be somewhat exponential. I know that a real exponential converter is quite complicated, but I do not need high precision in that application. I just want the output voltage curve to be curved instead of linear.

My idea was to try to use a FET as a voltage-controlled variable resistor, placed between my output voltage and a low reference voltage of around 0.86V, and this would pull my voltage down less and less as it gets closer to the high end of the range. So the output voltage curve would be "bent" between the two extreme points.
The voltage range of the Hall throttle must be preserved, but not precisely because the motor controller can still be adjusted to the actual range of the control voltage.
The throttle works on 5V, so the circuit cannot use a bipolar supply.

Anyone has an idea to propose for this converter?
Thanks for your attention,

Guy Sirois

The motor on your ebike likely has a throttle that work via duty cycle control (Google: pulse width modulation). Then look up: 555 timer PWM circuit.

The Pwm circuit normally uses a potentiometer that has a linear change in resistance across the range. You could substitute a logarithmic tuned potentiometer and that should solve your problem. The lowest range may be too low of duty cycle to move the bike but you will have very fine control once the bike starts moving.
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
No, the controller has a digital interface, there is no analog timer or anything analog inside.

If my throttle was resistive, I would have put a resistor between the wiper and ground, and this would have accomplished the desired result more or less, but it is an active device, hence my question.
 

DickCappels

Joined Aug 21, 2008
10,120
Your idea of using a FET can probably be workable but you might need some opamps and have to tweak the parameters for the individual FET. Kind of a messy approach.

You can use GopherT's approach followed by a low pass filter (single R and C) to obtain an exponential analog voltage.
 
Last edited:

Thread Starter

Altair2

Joined Aug 9, 2013
10
You can use GopherT's approach followed by a low pass filter to obtain an exponential analog voltage.
But I don't have a potentiomenter anywhere in the circuit. I cannot access the inside of the (digital) controller, and the only thing I can play with is the DC varying voltage from the Hall effect sensor.
I understand very well the theory of PWM, but in this case I don't see how implementing a (voltage controlled) PWM circuit will allow me to change my response curve from linear to pseudo-exponential. A PWM signal that is L-P filtered will give DC of course, but that DC voltage is linearly proportional to the duty cycle. What I need is a non-linear voltage converter, but with the same end point voltages as that from the source (Hall sensor)
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
Yes, this is the typical exponential converter that is based on a PN junction and that has been used in analog music synthesizers since their inception. This a complex circuit that has been developped to be highly precise and temperature-stable.
As I mentionned, I do not need high precision, I'm looking for a simple alternative.
 

GopherT

Joined Nov 23, 2012
8,009
Yes, this is the typical exponential converter that is based on a PN junction and that has been used in analog music synthesizers since their inception. This a complex circuit that has been developped to be highly precise and temperature-stable.
As I mentionned, I do not need high precision, I'm looking for a simple alternative.
You completely misunderstood the goal of the circuit I proposed in post 2. It is not at all "resistive" (rheostat) based solution. Those waste lots of power. The solution I proposed uses a pot as a potentiometer (voltage divider) to vary the fully-on vs fully-off ratio (aka "duty cycle").

I am simply proposing using a pot that does not divide the voltage in half at a 50% position. Also known as log pot.

Your use of the phrase "digital" controller is funny because I don't know of any digital controllers that do not use some type of PWM concept. Good luck.
 

RichardO

Joined May 4, 2013
2,270
I have an e-bike on which the speed is controlled by a rotary throttle handle (like a motorcycle), and this works with a Hall-effect transducer. The output voltage varies linearly from 0.86V to 4.2V with rotation of the throttle.

I would like the throttle response to be less sensitive near the beginning of travel, and then progressively steeper to the end. So instead of being linear, I want the output voltage to be somewhat exponential. I know that a real exponential converter is quite complicated, but I do not need high precision in that application. I just want the output voltage curve to be curved instead of linear.
You may be able to take advantage of the non-linear voltage to current curve of a bipolar transistor. If you use an NPN emitter follower it will not start to turn on until you have a few tenths of a volt on the base and then the emitter will track fairly linearly after that. Drive the base with your sensor voltage and take the output at the emitter. The emitter may need a resistor on the order of 1K to 10K to ground.

I think that you will just have to try it to see how it feels in use. The biggest danger I see is that you will not get to full speed since the base-emitter diode loses about 0.7 volts. A slight improvement will be to add a bit of attenuation between your sensor and the base of the emitter follower. I don't think it can be more than 10% or you will lose even more of your maximum speed.

A slightly more elaborate scheme with a rail-rail op-amp and a diode would allow you go to full speed and still get the non-linearity.
 

GopherT

Joined Nov 23, 2012
8,009
Or, the OP will have to take the unit apart and check what kind of throttle position sensor is used. If optical, he could simply design a log-scale progression instead of the linear one here...


image.png
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
Gopher, I understand very well the log pot, they're used in all volume controls everywhere. It's the linear pots that are rare.
I also perfectly understand how the power of the motor is controlled by the PW-modulated supply line. In fact, it's a brushless DC, 3-phase motor with a purpose-made commercial controller.
But back to the problem, I do not want to substitute my Hall-effect throttle with a log pot, I just want to find a way to modify the signal that comes out of the throttle. In my second post, I mentionned that "IF" my throttle was resistive (and linear), I would have simply put a resistor between the wiper and the ground to make the response non-linear (like a log pot). Did you knew of this trick?
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
Or, the OP will have to take the unit apart and check what kind of throttle position sensor is used. If optical, he could simply design a log-scale progression instead of the linear one here...


View attachment 124082
Gopher, I said many times that my throttle has a Hall-effect sensor in it.
There is a magnet sliding past the sensor when the throttle is rotated.
I don't understand why you're asking this
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
Thanks RichardO,
Yes your solution makes a lot of sense. It's similar to the way that a standard exponential converter will work.
But it becomes quickly complicated trying to adjust everything, and make that work on a unipolar supply. And the PN junctions are sensitive to temperature. Amplification of the signal would be required after processing, although this is not a problem.
But I'm trying to find a simpler solution that doesn't require working at millivolt level, he he he.
 

RichardO

Joined May 4, 2013
2,270
Thanks RichardO,
Yes your solution makes a lot of sense. It's similar to the way that a standard exponential converter will work.
But it becomes quickly complicated trying to adjust everything, and make that work on a unipolar supply. And the PN junctions are sensitive to temperature. Amplification of the signal would be required after processing, although this is not a problem.
But I'm trying to find a simpler solution that doesn't require working at millivolt level, he he he.
The simple transistor solution only uses the positive power supply voltage you have. No adjustments should be needed. If you need to do adjustments then a better design is needed.

The temperature coefficient of a silicon diode is about -2mv/deg C. This is an error of about 1 part in 350 for each degree of temperature change. Even in a hot, bright sun I doubt that you will be able to tell much difference. You will simply adjust for the speed you want.

You are not "working at millivolt level" unless you count your sensor's 0.86 volts output as millivolts.
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
Hi RichardO,
Yesterday I didn't realize that you were proposing an emitter-follower configuration, but you're right, this will be so simple and effective. I'm going to experiment it during the weekend.
Thanks for the great idea !
 

RichardO

Joined May 4, 2013
2,270
Hi RichardO,
Yesterday I didn't realize that you were proposing an emitter-follower configuration, but you're right, this will be so simple and effective. I'm going to experiment it during the weekend.
Thanks for the great idea !
Simple, yes. Effective, maybe. Let us know what the experiments show. ;)
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
I might have to reduce my signal amplitude before going to the emitter follower if I want to affect more than the first 10% or so of the range. Then, amplify it back to its full range.
Should be fun!
 

Thread Starter

Altair2

Joined Aug 9, 2013
10
OK I've had some time to build the circuit.
It works very well, see the video in link below.
I used a PN2222 in emitter-follower config, with the values shown in the schematic in the video.
I had to attenuate my input signal by quite a lot so the knee covers a good part of the resultant curve, not just the very beginning.
The trim pot is used to correctly position the knee of the curve where I want it.
From an initial range of 3.4V, I now have at the output a range of 140mV.
So I will make a non-inverting amp with a gain of 24 to re-amplify my signal to its original range. Might need some offset.
I spent half an hour trying to find me a single supply rail-to-rail OpAmp in my stuff, without success. I'm sure I had some, 10-15 years ago...lol.
Thanks Richard for the great idea !
https://www.dropbox.com/s/x93bm510z7a3kum/YDXJ0203.MP4?dl=0
P.S. You don't have to register with dropbox, just click "No thanks, continue to view" at the bottom.
 
Top