Fork me on GitHub

Project Notes

#105 BJT SawTooth

Testing a simple BJT saw-tooth oscillator.

The Build

Notes

This circuit examines a simple method for generating a simple sawtooth oscillation using only NPN and PNP transistors. I’m cribbing from the tutorial posted by w2aew.

Here’s the principle of operation:

  • R1/R2 bias Q1 as a constant current source
  • Q1 charges C1 at constant rate (Ic/C)
  • Q2 base is set with the R3/R4 voltage divider
  • Q2 is initially in cut-off as Ve (0v) < Vb (4.5v) > Vc (~0.7v)
  • As C1 charge exceeds Q2 base, Q2 becomes forward biased, which in turn forward biases Q3
  • C1 discharges through Q2 + Q3
  • discharge continues until Q2 collector falls low-enough to force cut-off, and the cycle repeats

The standard guidelines for NPN/PNP operation (from BJT page on wikipedia ) help understand the behaviour:

Voltage Relation NPN PNP
E < B < C forward-active reverse-active
E < B > C saturation cut-off
E > B < C cut-off saturation
E > B > C reverse-active forward-active

Not Oscillating?

The trick seems to be to ensure that the Q2/Q3 pair effectively cut-off. The original circuit set R3 at 10kΩ. Depending on transistor characteristics, this may not pull the voltage high enough to ensure oscillation occurs. If not, the typical behaviour is to see one oscillation, and then C1 peg at about 1 diode-drop.

Reducing the value of R3 seems to overcome the problem (here I’m using 4.7kΩ with 2N3904/2N3906 transistors). As a side-effect, this also increases the amplitude of the wave.

Changing Frequency

The capacitance of C1 affects the slope of the charge. Since we are using a constant current, charge time in V/sec = Ic/C. So higher capacitor values will slow down the wave frequency and vice versa. Here I’m using a 10µF electrolytic to give a very slow wave, visible to the eye.

Here’s a sample trace recorded using LEAP#090 PlotNValues (a simple Processing sketch) to read the data collected by the SawTooth.ino program:

processing trace

Code

The SawTooth.ino sketch is a simple data capture and reporting interface. It uses the FlexiTimer2 library to provide data capture on an accurate and stable time base.

Construction

Breadboard

The Schematic

Credits and References

About LEAP#105 BJTOscillators

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader