Friday, July 31, 2009

Mini Function Generator: Part 3

<< [Part 1 2 3]My first prototype of the mini function generator is now officially done. It's a tight fit inside that Hammond 1593 project box from All Electronics, but it works.

I like this box a lot and will probably order several more. It has a removable front panel, a sliding battery door to fit AAs or 9V batteries, and is sizeable enough to fit my various Radio Shack prototype PCBs.

The BNC connectors come from one of the accursed Global Specialties 2002 function generators that I have been trying to get working. I gave up on that one and decided to part it out.

My first attempt to install a slide switch on the top failed miserably. I cannot cut square, straight, correctly sized holes without better equipment and more patience. Everything was wrong with this attempt (the picture doesn't even begin to convey how bad it turned out). To cover the mess I made, I used a larger power switch that covers up the original holes. Then I figured why not dress the thing up with a brass insert.

Clearance for the switch and the BNC connectors is pretty tight and I had to saw out some unused parts of the PCB to get it to fit. The PCB is mounted with plastic standoffs from Radio Shack. The plastic standoffs are glued to the case with Sure Hold Plastic Surgery. Note that this isn't my idea, but rather came from this Sparkfun Tutorial.

I swapped out the LM258N Op Amp for an LM1458CN which apparently has a faster slew rate as the trace is substantially cleaner than the one generated by the 258. No spikes, no ringing, etc.

So despite some challenges met with kludges, I'm fairly happy with the results. I haven't actually built anything in an enclosure in 15 years or more. And, sadly, while I'm no better at it now, at least I stuck my toe back in the water and I can jump in when it comes time to build an oscilloscope calibrator. But more on that another time.

<< [Part 1 2 3]

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)



[EDIT 2017] At the time I wrote this BatchPCB was the only option available and it was kind of expensive. Now we all have OSHPark and costs are quite low. This sort of circuit could be built on a 2 square inch board for $10 for a set of three.

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] >>

Monday, July 20, 2009

TGIMBOEJ Arrived!

A couple days ago I discovered a large, heavy, conspicuously labeled, rattly sort of package on my doorstep. A TGIMBOEJ has arrived for me chock full of cool electronic gadgets!

Here's a teaser pic of the contents... More to come on what's in it, what is coming out, and what is going in!