# transistor switch problem

#### Drew21

Joined Oct 24, 2007
1
Hi, I have a project which is hopefully very simple. I am trying to generate a speed signal input for a cruise control retro-fit. I have a signal generator which is driven by the speedo cable and generates between 0 and 15v AC, frequency and voltage depend on speed (ie at 150mph the input would be approx 200Hz and 15volts).

So I'm trying to get this to drive a transistor as a switch but I've never done anything like this before and nothing is turning out as expected!! Which in itself is not unexpected

the signal required by the cruise control computer is an earth/ open ciruit signal with a frequnecy dependent on speed.

So I built this:

with a collect voltage of 7.6 volts (12v is wrong on the diagram) and a collector currnet of 0.76mA. So I've assumed a resistance for the load of 10k.

resistance across the frequency generator is 80 Ohms.

I have read up on a base resistor which is what I think I am missing, but what is the purpose of this, surely when the AC signal is passing through the transistor then the switch is open and the control unit is grounded. Or are things not that simple.

#### thingmaker3

Joined May 16, 2005
5,083
The purpose of the base resistor is to limit base current. Too much base current makes the transistor go bad.

To size your base resistor, look up maximum base current on the datasheet for your transistor. Divide your 15V peak voltage by the maximum base current. This will give you the minimum value for your base resistor. (E = I x R, so R = E / I) Choose a base resistor that is around 120% of this value.

Let us know how things turn out!

#### bloguetronica

Joined Apr 27, 2007
1,540
Also, the signal generator should generate an always positive voltage. The transistor is better fit for working in it's saturation region, and not as an amplifier. To add to what thinkmaker said, the base current for most transistors in the saturation region should never be higher than 10% of the collector current. That is because most transistors have betas equal to 10 in the saturation region (Ic / Ib = 10). What transistor are you using?

#### beenthere

Joined Apr 20, 2004
15,819
You mention that the voltage is variable with the frequency. Best to only work with one variable, so adding a voltage comparitor to give a pure frequency output to work with should make life easier.

#### thingmaker3

Joined May 16, 2005
5,083
I don't think a single variable option is available. These gizmos seem to rely on a generator connected to the speedometer cable. The faster the cable spins, the higher the voltage and frequency generated.

Of course, one could add a clipper circuit...