Fig. 1 Thermistors and CdS Photocells.
LM334 Constant Current Source with Resistive Sensors
Earlier we explored various constant current source circuits and settled for the LM334 as being the most stable for small current applications microamps though 10mA. We used the LM334 to control the emitter-base current in a PNP bipolar transistor to create a higher power constant current source to drive a bank of high-power white LEDs.
A constant current source (CCS) in electronics is a device/circuit that produces a constant value of current regardless of source voltage or load resistance.
Here we will take full advantage of the LM334 as a low-power precision constant current source to operate resistive sensors such as photocells and thermistors.
See LM334 Spec. Sheet. The LM334 is widely available for under $1 on Ebay.
Fig. 2 shows the basic circuit for a LM334 used as a series constant current sources (CCS) to bias a thermistor connected to an Arduino or PIC analog-to-digital converter. Note first we have a voltage input limit of 5-volts and both being 10-bit ADCs returns a value of 1023 based in voltage in. Volts per step is 5V / 1023 = 4.89mV per step.
As shown Iset is independent of input voltage Vcc and the resistance of Th1 The reason we should use a CCS is because Th1 produces a more linear output. By controlling Iset can set desired resistance vs. voltage point where we want in the 0-V range.
Vcc in all of these examples is 5-volts.
Here we will use thermistors from Sure Electronics - refer to sure_thermistors.pdf.
Referring back to Hatching Chicken Eggs with Arduino I used a Sure thermistor with a resistor so Arduino could read the resulting voltage value to control temperature. The egg temperature had to be maintained at 37 degrees C (99 degrees F) for 21 days - and has to be fairly accurate. The chart in Fig. 3 was taken from the spec sheet.
What I want is a voltage reading at 37 degrees C of 2.5 volts on the ADC. Between 35 degrees C and 40 degrees C resistance varies from 6.848K ohms and 5.74K ohms - these are negative coefficient thermistors meaning the resistance decreases as temperature increases.
Let's choose a value in between the two of 6.2K and assume 2.5-volts output to the Arduino ADC. 2.5V / 6200 = 400uA. This would be the value of Iset so we need to find the value of R in Fig. 4.
67.7mV / 400uA = 168 ohms. I used a 500 ohm potentiometer for calibration purposes - the 2.5-volt center gives plenty of room for adjustment.
In Fig. 5 we use the exact same circuit to control current through a CdS photocell. Everything works just the same - in this case we measure light intensity. In CdS photocells resistance decreases with light intensity.
- Constant Current Circuits with the LM334
- LM334 Constant Current Source with Resistive Sensors
- LM317 Constant Current Source Circuits
- Introduction Hall Effect Switches, Sensors, and Circuits
- Using Ratiometric Hall Effect Sensors
- Pulse Width Modulation Power Control for Microcontrollers
- Introduction to PIC12F683 Programming
- Basic Transistor Driver Circuits for Micro-Controllers
- Opto-Isolated Transistor Drivers for Micro-Controllers
- Added Nov. 16, 2014
- ULN2003A Darlington Transistor Array with Circuit Examples
- Tutorial Using TIP120 and TIP125 Power Darlington Transistors
- Driving 2N3055-MJ2955 Power Transistors with Darlington Transistors
- Understanding Bipolar Transistor Switches
- N-Channel Power MOSFET Switching Tutorial
- P-Channel Power MOSFET Switch Tutorial
- H-Bridge Motor Control with Power MOSFETS
- More Power MOSFET H-Bridge Circuit Examples
- Build a High Power Transistor H-Bridge Motor Control
- New YouTube Videos Nov. 2014
- View all of my You Tube Videos
- Using the ULN2003A Transistor Array with Arduino
- Using the TIP120 & TIP120 Darlington Transistors with Arduino
- Using Power MOSFETS with Arduino
- Using PNP Bipolar Transistors with Arduino, PIC
- Using NPN Bipolar Transistors with Arduino, PIC
- How to build a Transistor H-Bridge for Arduino, PIC
- Build a Power MOSFET H-Bridge for Arduino, PIC
- Solar Panel Charge Controller Using Arduino Microcontroller
- Solar Panel Charge Controller Using PICAXE Microcontroller