Friday, July 24, 2009

Mini Function Generator: Part 2

<< [Part 1 2 3] >>

The Mini Function Generator is coming along nicely. I successfully prototyped it on a pre-printed PCB from good ol' Radio Shack. Works like a charm. You can see the board on the desk with the "on" indicator lit, oscilloscope probes, and the o-scope trace on the left (the scope is sitting under the desk).

Here's the circuit diagram below. The actual circuit uses LM258N operational amplifiers. I won't pretend that I am some kind of electronic guru. As mentioned previously, the design comes from Circuit Suggest.
When an op amp uses a capacitor as a feedback, it integrates the input signal. IC1B is integrating the square wave output from IC1A. As every person on the street knows* the integral of a square wave is a triangle wave.

The IC1A op amp acts as a voltage comparator, and provides a high output when the input voltage exceeds the reference, and a low voltage otherwise. The triangle wave output is the input to the square wave generator. This waveform's voltage is above the threshold half the time, and below the threshold the other half. So IC1A generates a square wave.

The square wave is the input to the triangle wave generator. It's a bit of a weird chicken and egg sort of problem. From what I've read so far, noise is what initially gets the circuit going. The threshold is set by VR1 which therefore sets the symmetry of the wave form, too.

Anyway, here's the prototype circuit, front and back sides of the board (feel free to critique my iffy soldering skills)

As it turns out, in addition to the $7 cost per PCB, BatchPCB charges a $10 handling fee per run, plus the shipping cost, so a couple of boards would cost $30 (5 boards would cost $50, 10 @ $85). Not quite as cheap as originally excpected. For that kind of money, the end product probably should be a little more feature rich. I will do some more work and see what I can come up with.

Meanwhile, the next step is to mount the prototype above into some kind of small project box with a switch, and battery holder. The board itself is 1-7/8" (45mm) square so it's still fairly compact. I can live with that for the moment...

I'll post again when I get the enclosure finished and continue this series at a later time when I come up with an enhanced version on a custom PCB.

* One of my old math professors used to say this all the time. Bastard.

<< [Part 1 2 3] >>

No comments:

Post a Comment