Friday, March 22, 2013

Simple Function Generator



If you are looking for something useful you can assemble, either to hone your soldering skill, or simply want to keep yourself busy in a one slow afternoon, here is a very inexpensive yet useful circuit that you can build in just one seating- a 100 Hz -1 kHz  triangle and square wave generator.

The simple function generator prototype is built on a perforated PCB. It uses a garden variety dual OPAMP LM358 equivalent – NJM2904, and handful of other components you should have no trouble finding at your favorite electronics components store. The whole projects will cost no more than 150 pesos to build, probably much less if you opt to use a slide switch in place of the more expensive mini toggle switch I used in building the prototype.




Schematic Diagram

A hand drawn schematic of the simple function generator project is shown in Figure 2. The circuit is taken from National Semiconductor’s “Op Amp Circuit Collection AN-31” application notes, slightly modified to suit our purpose. The circuit essentially consists of two section, a Schmitt trigger formed around U1a, and an integrator formed around U1b. The Schmitt trigger converts the triangle wave coming from U1a into a square wave. U1b, on the other hand, integrates the square wave output of U1a to convert it back into a triangle wave. This goes on forever as long as power is applied to the circuit. Square wave and triangle wave output function can then be easily generated by simply flipping the switch to connect either at the output of U1a or U1b.

Frequency can be set between 100Hz and 1kHz by rotating RV1 FREQ potentiometer. Output amplitude can be easily adjusted as well by correspondingly rotating RV2 OUTPUT AMPLITUDE  potentiometer.





Construction Examples

Following are pictures (of the handmade prototype) you can use as a guide while building one for yourself. Immediately shown below is a photo showing how the components were laid out.


The following photo shows the copper side of the PCB overlaid with components and wiring guide. You can connect adjacent connected pads by simply bridging solder between pads. Use insulated hook–up wires (or Kaynar wires) to complete the remaining connections.

Battery clip are used for the 9V battery wirings.  Power switch may be added in the battery circuit. In fact, this is highly desirable and recommended for obvious reasons, although none is used in the working prototype. An 18-inch pair of wire terminated with a corresponding pair of alligator clips functions as output probe. For best results, twist the OUTPUT and GND wires together (that explains the loop in the schematic).


Additional Tips
  

1. Use a polyester or polypropylene capacitor for the integrating capacitor C1.
  
2. Maximum frequency can be extended a bit to about 2kHz by replacing the 2k7 resistor with 1k5. Beyond 2kHz,   OPAMP slew rate limiting comes into play. This results in a very poor output waveform fidelity, hence is not recommended.
  
3.Lower frequencies can be generated by replacing C1 with a higher capacitance.



Bill of Materials

1 pc NJM2904 or LM358N DIP 8
1 pc 12K 1/4w resistor
1pc 8k2 1/4w resistor
1pc 2k7 1/4w resistor
1pc 0.1uF Polypropylene capacitor C1
2 pcs 0.1uF multilayer ceramic capacitor
2 pcs 330uF/10V electrolytic capacitor
1 pc 100KB linear tapered potentiometer
1 pc 1KB linear tapered potentiometer
1 pc EGPC-01 perforated prototyping PCB
1 pc Mini Toggle switch SPDT (or SPDT slide switch)
2 pcs 9V Battery Clip
1 pair mini Alligator Clip
Others – Hook up wires, soldering lead 

  

No comments:

Post a Comment