# Transistor circuit to control one voltage with another voltage

Discussion in 'General Electronics Chat' started by sunlight1000, Dec 16, 2016.

1. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
I want to design a circuit to modify my electric bicycle controller so that it won’t turn off as a result of battery voltage drop which is the result of high current being drained by controller from the battery to the motor which is the result of throttle being fully pressed. If I fully press throttle the battery can handle high current drain for several seconds, but after that the voltage of the battery will rapidly drop under 30v and the controller will shut down. After several seconds the battery voltage will raise back and the controller will turn on back and I again can use it. This is very inconvenient behavior of the controller for me. I would like that the controller intellectually decreases current drain from the battery when the battery cannot supply the requested amount of current. That is evident by the battery voltage drop.
For example I am requesting relatively high power from the controller by relatively deeply pressing the throttle. The controller tries to get the requested amount of power from the battery but then sees the voltage on the battery drops too low (say under 33v) and understands the battery cannot provide the requested amount of power. And the controller modifies my request and drains from the battery the maximum amount of power that battery can safely provide at that moment without damaging itself.
Here is how I see the solution of the problem.
A circuit have to be designed which inputs throttle voltage V1 and battery voltage V2 and outputs voltage V3 which is the modified value of V1 based on the value of V2.
V1 range is from 1v to 4.2v.
V2 range is from 40v to 30v.
The circuit should function as follows.
As long as V2 is in the range from 40v to 34v V3 should be the same as V1.
For example if V1 is 1.8v V3 have to be 1.8v or close to it.
As long as V2 is dropped below 34v to 30v V3 have to be the progressively depressed version of V1.
Here are some values for example.
When V2 is equal or above 34v V3 should be depressed by 0% value of V1. That is for any value of V1 V3 should be equal V1.
When V2 is 33v V3 should be depressed by 25% value of V1.
When V2 is 32v V3 should be depressed by 50% value of V1. That is if V1 is 2v V3 should be about 1.5v. If V1 is 4v V3 should be about 2.5v
When V2 is 31v V3 should be depressed by 75% value of V1.
When V2 is 30v V3 should be depressed by 100% value of V1. That is for any value of V1 V3 should be about 1v.
V1 at any time may freely change from 1v to 4.2v.
Is it possible to design simple analog transistor circuit which would accomplish such a task?
I have basic understanding how transistor works but do not have enough knowledge and experience to design the circuit. I am asking for simple example circuit or any advice how I could design such the circuit. Thanks.

2. ### shteii01 AAC Fanatic!

Feb 19, 2010
4,667
745
Simple?
Define simple? Is circuit with 4 or 5 compactors qualify as simple, to you?

3. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
I would like to edit my post and delete the word "simple". Please read it as if there is no "simple" word.

4. ### AlbertHall AAC Fanatic!

Jun 4, 2014
8,170
2,026
How much current does V3 need to be able to supply?
Is this circuit to be powered from the 30V+ battery?

5. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
V3 need to be able to supply the same current as V1. And V1 is from hall sensor. I don't know how much current can supply the signal from hall sensor, but I think it is not too much.
The circuit can be powered by battery voltage or there is also +5v voltage available. There is no specific requirement how to power the circuit.

6. ### AlbertHall AAC Fanatic!

Jun 4, 2014
8,170
2,026
It should be possible to do this in a linear fashion rather than stepwise using an operational transconductance amplifier (OTA). This is like an op-amp but with variable gain controlled by an input current.

7. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
I do want to do it in linear fashion. The steps are only points from the curve taken to describe the curve. Could you please post an example of this circuit?

Dec 29, 2008
688
103
9. ### AlbertHall AAC Fanatic!

Jun 4, 2014
8,170
2,026
So the resistor converts the current output into a voltage.

10. ### drc_567 AAC Fanatic!

Dec 29, 2008
688
103
http://www.cappels.org/dproj/edfet/sebuf.gif
This circuit is Dick Cappels edfet amplifier. ... uses an IRF530 mosfet or similar ...yields 7 or 8 amps out. Could be modified for a higher voltage.
What is the motor watt rating?
The ltspice circuit seen here has about 1 amp of load current for each 1 volt of input signal.

• ###### edfet3.asc
File size:
1.3 KB
Views:
12
Last edited by a moderator: Dec 16, 2016
11. ### drc_567 AAC Fanatic!

Dec 29, 2008
688
103
The only problem with that is a large battery current being used as wasted heat in that resistor.

12. ### AlbertHall AAC Fanatic!

Jun 4, 2014
8,170
2,026
This won't do the job as the gain cannot be adjusted to follow another voltage input as required by the task.

13. ### AlbertHall AAC Fanatic!

Jun 4, 2014
8,170
2,026
That might apply to the edfet design as presented (though the resistor there IS the load).
This is not a problem for an OTC design as the output current would be only as large as needed, <10mA.

14. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
The circuit should operate by currents limited to 10mA.
Currently, the signal from the Hall sensor, which is located in the throttle is passed directly to the controller. I want to make an electronic circuit that receives the signal from the Hall sensor as well as a battery voltage signal from the battery and outputs a modified signal which will be supplied to the controller instead of a Hall sensor. The battery voltage here serves as a control signal to know how to modify the signal from the Hall sensor. The signal from the Hall sensor has an amperage of about 10 milliamperes, so the output signal from the electronic circuit must also provide a current of about 10 milliamps.
I enclose a block diagram to better understand it. View attachment 117052 View attachment 117053

15. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
I enclose a block diagram for better understanding.

16. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
Here is the graph of how V3 depends on V1 and V2

17. ### hobbyist AAC Fanatic!

Aug 10, 2008
887
88
Going back to your original post, couldn't you just use a voltage regulator, to run your controller?
As the controller draws more current, the regulator can supply more to it to keep it active.

18. ### sunlight1000 Thread Starter New Member

Jul 4, 2012
8
0
May be in the original post I have described how the controller works a bit incorrectly. The controller does not shut down itself. It just stops to pump any current from the battery to the motor when the voltage on the battery drops down to the 30v. At that moment it shows on the screen blinking empty battery for several seconds. And at that moment no matter how hard I press to the throttle it won't turn on the motor. Immediately after the moment the controller has stopped to pump the current from the battery to the motor the voltage on the battery will raise back. But the controller continues to show me blinking empty battery for several seconds. At last the controller gets satisfied and shows on the screen non-empty battery. After that the controller will agree to turn on the motor when I push to the throttle.

19. ### drc_567 AAC Fanatic!

Dec 29, 2008
688
103
One point which needs to be clarified is the cause of the current shutdown, initially when the battery has been fully charged. A large initial current would cause the internal resistance of the battery, or battery pack to generate excessive heat. Consequently, the interruption of current flow from the battery is a matter of thermal resistance, an effect which lasts only a few seconds as surplus heat is conducted away. This could easily be verified with one or two temperature measurements during the initial current transient.