All About Circuits Forum Transistor as Variable Resistor
 Register Blogs FAQ Members List Today's Posts Search Today's Posts Mark Forums Read

 Notices Welcome to the All About Circuits forums.Our forum is a place where thousands of students, hobbyists and professionals from around the world share knowledge and ideas. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us.

 General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits E-book, Worksheets, and Videos.

#1
09-09-2009, 08:30 PM
 wmgehl Junior Member Join Date: Jul 2009 Posts: 12
Transistor as Variable Resistor

We have a 2 wire (+/-) dimmer input to a ballast that presents about 11V unloaded. Onto these terminals we hook up a simple circuit that basically consists of a NPN transistor (+ to collector, - to emitter) and a manual rheostat (one end to collector, the other to the base) which is used very successfully to vary the voltage across these terminals between 1 and 10V.

I am aware that the NPN is operating in the active region as a variable resistor where full resistance of 470K between C and B puts about 0.35V on the base (for 10V across CE) and least resistance puts 0.5V on the base (for 0.5V acorss CE).

The idea now is to replace the manual pot with a digital pot controlled by a microcontroller and I have done that. But the digital pot I need to use is half the ohmage of the original manual pot (200K) and the best I can get out of the circuit for V range is 0.5V to 7.5V. Adding a second digital pot in series (to get the full original pot resistance) makes it worse as, I assume, that the base current through the NPN is affected by these DP ICs. So this is where the fun starts.

I've replaced the NPN with a darlington pair to try to enhance the current gain and thereby get the full V range back but this has not worked. I even tried two darlington pairs and the best I can get is 0.5V to 9.3V with the original high R manual pot. I've tried all kinds of configurations and biasing as well but no success on the high end of the V range. I'm not sure why this circuit will not go far enough into cutoff to be fully turned off and present the full V range at the terminals??

So two requests here:

- can anyone offer any guidance/advice on how to make this circuit work using a digital pot (of lesser ohmage than the original rheostat)?

- can anyone suggest alternatives (like how do I use a JFET or MOSFET for this particular circuit)?

I appreciate any help. Thanks.
#2
09-09-2009, 10:17 PM
 hgmjr Super Moderator Join Date: Jan 2005 Location: Tennessee, USA (GMT-6) Posts: 9,030 Blog Entries: 11

What is the part number of your NPN transistor?

hgmjr
#3
09-09-2009, 10:32 PM
 wmgehl Junior Member Join Date: Jul 2009 Posts: 12

Originally used BC817-25 and then switched to a heavier BD-235. Both work equally as well in the manual pot circuit.
#4
09-09-2009, 10:54 PM
 hgmjr Super Moderator Join Date: Jan 2005 Location: Tennessee, USA (GMT-6) Posts: 9,030 Blog Entries: 11

Can you post a diagram of the circuit in the configuration that works?

hgmjr
#5
09-09-2009, 11:11 PM
 wmgehl Junior Member Join Date: Jul 2009 Posts: 12

Here is a sketch of the schematic.
Attached Images
 BJT-Variable Resistor.jpg (312.3 KB, 205 views)
#6
09-10-2009, 01:10 AM
 hgmjr Super Moderator Join Date: Jan 2005 Location: Tennessee, USA (GMT-6) Posts: 9,030 Blog Entries: 11

Quote:
 Originally Posted by wmgehl Here is a sketch of the schematic.
Can you shed light on the purpose of your circuit?

hgmjr
#7
09-10-2009, 04:23 PM
 wmgehl Junior Member Join Date: Jul 2009 Posts: 12

This is a dimmer control circuit for a lighting ballast. See my first post.
#8
09-11-2009, 01:49 PM
 hgmjr Super Moderator Join Date: Jan 2005 Location: Tennessee, USA (GMT-6) Posts: 9,030 Blog Entries: 11

There are a couple of things that you will need to look at concerning the digital potentiometer (DP). Consult the datasheet for the DP you are using and see what maximum voltage is allowed across the DP. The other parameter that you need to check is the maximum current it can withstand. You are probably exceeding one or both of these limitation in the circuit you have.

If you can supply the DP's part number I will be happy to assist you in checking these maximum limits.

hgmjr
#9
09-11-2009, 02:17 PM
 hgmjr Super Moderator Join Date: Jan 2005 Location: Tennessee, USA (GMT-6) Posts: 9,030 Blog Entries: 11

Since you are planning to use a microcontroller then there is another approach you may want to consider.

Assuming that the microcontroller you have selected has an internal A-to-D then your could use a resistor divider that is connected across your ballast. You could then feed the output of the resistor divider into the A-to-D input so that you could measure a voltage that was proportional to the voltage across the ballast. Based on the voltage you measure you could then use the PWM feature of the microcontroller to feed an RC lowpass filter. You would feed the output of the lowpass filter to the gate of a mosfet such as the 2N7000. By adjusting the duty-cycle of the PWM signal feeding the mosfet through the lowpass filter, you could adjust the Rds(on) of the mosfet. This would form a feedback loop that would allow your microcontroller to periodically measure the voltage across the A-to-D and then adjust the duty-cycle of the PWM output signal to correct any error between the desired voltage across the ballast and the actual voltage measured by the microcontroller.

hgmjr
#10
09-17-2009, 01:39 AM
 wmgehl Junior Member Join Date: Jul 2009 Posts: 12

Thanks for your input hgmjr. Sorry for the delay in response.

Regarding the use of microcontroller PWM, that was my first plan.....but then my boss handed me the variable R circuit we have always used and said to adapt that to the MCU first (its made to work well with the ballasts).

No problem on current spec through the DP (base circuit uA) but, yes, I was exceeding the voltage spec on the DP R ends. Started out respecting that but got away from it in the effort. Still, the DP seems to work OK anyway! But some new developments as follows.

I needed to reduce the pot size required down to something like 50K or 100K max (lots of digital pots available in this range - very few available higher than 100K) and I needed to add isolation too. So I used the pot in a V-divider on the input of an optocoupler having a transistor output where its emitter feeds a darlington pair. This reduced the pot required to 50K.

The next step was to reduce the voltage dropped across the pot to 5V or less so that I could replace it with a digital pot and be within the DP's max V across its R pins. To do that I've got the 50K pot in a V-divider on the base of a NPN which has a fixed R on its emitter (to ground) and the optocoupler input diode on its collecter. The idea was to have variable current source (variable by base voltage) driving the optocoupler and this reduced the Vdrop across the 50K pot to a maximum of 3V (using 5V supply).

See attached schematic.

So I've got the right size pot, the proper voltage range across the pot and the isolation. And when I test the circuit using the manual pot the results are not linear but they do show a nice arc between end points on a graph which I can correct (linearize) easily with the MCU. That said, I realize that temperature variations are likely to skew the graph even more so I'll need to temp-compensate somehow, I assume.

However, the problem remains that when I replace the 50K pot with the 200K digital pot that I've been using (still waiting on my 50K pot) and use it from 0 to 50K ohms the results get way, way non-linear - which is the same problem that I wrote about in the first post in this thread!! The more things change the more they stay the same!

Granted I have only 1/4 of the DP steps available which doesn't give me too many data points but I can still tell the linearity is worse. I thought that the DP in the base circuit of the current source would help this problem, but not so.

Any ideas on how to linearize this circuit with the digital pot replacing the discrete 50K pot? And how to temp-compensate? Or any other suggestions/comments?
Attached Images
 Variable R Circuit II.jpg (286.4 KB, 123 views)

 Tags resistor, transistor, variable

 Related Site Pages Section Title Worksheet Performance-based assessments for semiconductor circuit competencies Worksheet Class A BJT amplifiers Worksheet Regulated power sources Worksheet Performance-based assessments for AC circuit competencies Worksheet Voltage divider circuits Textbook The Unijunction Transistor (UJT) : Thyristors Textbook BJT quirks : Bipolar Junction Transistors Textbook The common-base amplifier : Bipolar Junction Transistors Textbook Active mode operation : Bipolar Junction Transistors Textbook Transistor as a switch : Discrete Semiconductor Circuits

 Similar Threads Thread Thread Starter Forum Replies Last Post khb.engg@lucastvs.co.in Programmer's Corner 1 10-31-2008 10:23 AM CraigBolton88 The Projects Forum 4 10-10-2008 06:36 PM mahela007 General Electronics Chat 5 09-14-2008 12:08 PM khanz General Electronics Chat 4 04-11-2008 07:06 AM tronicsguy General Electronics Chat 5 10-13-2005 08:51 PM

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Electronics Forums     General Electronics Chat     The Projects Forum     Homework Help     Electronics Resources Software, Microcomputing, and Communications Forums     Programmer's Corner     Embedded Systems and Microcontrollers     Computing and Networks     Radio and Communications Circuits and Projects     The Completed Projects Collection Abstract Forums     Math     Physics     General Science All About Circuits Commmunity Forums     Off-Topic     The Flea Market     Feedback and Suggestions

All times are GMT. The time now is 05:53 AM.