# Analog Function Generator

13 Steps
Are you sick of 555 timers? I sure am. That's why I decided to build a semi-decent function generator as my term project in my analog electronics course. This design is capable of producing a square, triangle, and approximate sine wave reliably up to a frequency of around 300kHz.

Make It Real Challenge
This project has been entered in the "Make it Real Challenge", which awards a 3D printer to the winner. "To enter, post an Instructable that shows how to turn a virtual item into a tangible object." I believe this project qualifies, since I spent a significant amount of time modeling the circuit on my computer before going on to the build stage. This Instructable does cover how to model a circuit (final step) and it does require the etching of a Printed Circuit Board based on that computer model. If you like my project, please rate it and vote for me!

Yes, there are chips available that achieve MUCH better results with a simpler circuit, but they are essentially "black boxes" that use digital methods to convert a voltage to a frequency. This circuit is fully understandable with algebra and rudimentary calculus and op-amp knowledge. Since this project is for an "analog electronics" course, this fit the bill.

Here's a breakdown of roughly how long it took to complete each stage of the project:
• 10 Hours: Initial design, including EagleCAD entry, board layout, and computer simulation.
• 3 Hours: Part sourcing.
• 5 Hours: Project box design, prep, painting, and labeling.
• 1 Hour: Initial PCB component placement
• 2 Hours: Connecting the PCB to the control panel.
• 20 Hours: Troubleshooting and component revision. Seriously.
• 1 Hour: Calibration.
• 1 Hour: Characterization.
This doesn't include the time I spent thinking about it while engaged in some other activity. I have a lot of experience troubleshooting lab equipment so the amount of time it took me to get this thing working surprised me. All the revisions I made are included in this Instructable, so it should work right off the bat, but be prepared to work a little.

This is nothing you'd want to rely on if you need any kind of precision, it's just a cheap, quick and dirty source of time-varying signal. Another reason I wanted to make a function generator is just to have another piece of ghetto lab equipment worthy of my growing collection.

Remove these ads by Signing Up

## Step 1: Safety

This is a relatively complex electronics project that utilizes a lot of simple concepts and methods that all need to come together correctly. If you've never worked with electronics before, you should probably try some other project before delving into this one unless you're extremely ambitious. For those of you with a few years of electronics background, this is an exceedingly simple project.

This project utilizes Mains power of 120VAC, and is therefore EXTREMELY DANGEROUS for anyone that doesn't know what they're doing. Please have someone around that can administer CPR or call for medical help when you are experimenting with mains power.

There are other various risks associated with electronics, such as exposure to harsh chemicals (PCB etching and paint), lead (in solder) and hot tools (soldering irons).

DISCLAIMER:
This Instructable is provided for entertainment only and should not be used as a source of official information by anyone. Any and all damages incurred by the implementation of the information in this publication are the sole responsibility of the end user.
tadusmc says: Oct 15, 2012. 12:29 PM
Great Job! One question that I need clarified - on the 2 deck 6 position switch - not sure what you mean by "notch the ring". Please explain further thanks
oppie says: Mar 16, 2012. 8:39 PM
I assume that your Eagle files were version 6 (opened the files with notepad++ and saw the leading XML declaration). I have a registered copy of eagle professional version 5 and have refrained from loading version 6 until I can cough up the license fee. I know that there is a freeware version but the danger for us users of version 5 is that (accidentally) opening a v5 file with eagle 6 will convert it to the V6 format and is non-reversible. Most of my files are too large to edit in freeware mode. So... will stick to you PDF files for now.

Last time I played with a function generator, I used the ICL8038 chip. Alas, that, the X2206 and the MAX038 are no longer available. That leaves only variations of what you designed. The new wave (pun intended) is frequency generation with DDS.
Revanchist in reply to oppieMar 19, 2012. 7:57 PM
you can simply make a copy somewhere else and open the copy with V6, that way only that version is converted into v6... voilá problem solved
laserjocky (author) in reply to oppieMar 18, 2012. 8:57 PM
Let me know if you need a reprint of anything, I didn't take the version discrepancy into account.

Yeah, I've used a chip called an NTE864 that's similar to the one you listed. They're definitely easier to use if you just need a function generator. But I'm still trying to break the habit of wanting to understand everything :)
wgerstmann says: Mar 16, 2012. 6:23 AM
I am 73. I began fixing computers in 1960 - 64k memory, only paper tape input and output. Machine language programming.
My point is analog computers are the future! Digital computers will get faster and smaller but still must simulate analog situations, like traffic control.
You are on the right track! Stay with the basics and keep avoiding black boxes - they are dead-ends but are useful timesavers after you have mastered the basics.
sonrie69 says: Mar 15, 2012. 6:29 AM
awesome, man... i was looking for this kind of project for a while... one question: is posible to index or to change the freq selector to make it CV (voltage controller)?? could you help me ???
laserjocky (author) in reply to sonrie69Mar 16, 2012. 1:03 AM
I'm not sure what you mean, you want something that changes the frequency based on a reference voltage instead of an RC rise time? I don't know off hand of an analog method for doing that, but there are digital-based chips called voltage controlled oscillators that do that kind of thing.
shinyshadow says: Mar 15, 2012. 11:30 AM
Great little project, although I'd guess you'd be getting cross over distortion without any bias on the two output transistors. If the generator is to be used as an audio gen' then perhaps you could use a TDA2030 chip or some lower power chip even, also have you solved the spiking problem, perghaps a 100nF cap across the supply lines as close to the TL084 as possible might do the trick.

Great again, all the best :)